	.file	"extr_sil-sii8620.c_sii8620_msc_mr_write_stat.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sii8620_msc_mr_write_stat, @function
sii8620_msc_mr_write_stat:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	push	r12
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -40
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MHL_DST_SIZE[rip]
	mov	rsi, rsp
	mov	rcx, rax
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L3
.L24:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L24
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L25
.L4:
	movsx	rax, DWORD PTR MHL_XDS_SIZE[rip]
	mov	rsi, rsp
	mov	rbx, rsp
	lea	rax, 15[0+rax*4]
	mov	rdx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L6
.L26:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L26
.L6:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L27
.L7:
	mov	esi, DWORD PTR REG_MHL_STAT_0[rip]
	mov	rdx, rbx
	mov	rdi, r12
	mov	r13, rsp
	call	sii8620_read_buf@PLT
	mov	ecx, DWORD PTR MHL_XDS_SIZE[rip]
	mov	rdx, r13
	mov	rdi, r12
	mov	esi, DWORD PTR REG_MHL_EXTSTAT_0[rip]
	call	sii8620_read_buf@PLT
	mov	edx, DWORD PTR MHL_DST_SIZE[rip]
	mov	rdi, QWORD PTR [r12]
	mov	rsi, rbx
	call	sii8620_update_array@PLT
	mov	edx, DWORD PTR MHL_XDS_SIZE[rip]
	mov	rdi, QWORD PTR 8[r12]
	mov	rsi, r13
	call	sii8620_update_array@PLT
	mov	rdx, QWORD PTR MHL_DST_CONNECTED_RDY[rip]
	mov	rax, QWORD PTR [r12]
	mov	eax, DWORD PTR [rax+rdx*4]
	and	eax, DWORD PTR MHL_DST_CONN_DCAP_RDY[rip]
	test	DWORD PTR [rbx+rdx*4], eax
	jne	.L28
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rax, QWORD PTR MHL_DST_LINK_MODE[rip]
	mov	eax, DWORD PTR [rbx+rax*4]
	test	DWORD PTR MHL_DST_LM_PATH_ENABLED[rip], eax
	jne	.L29
.L1:
	mov	rax, QWORD PTR -40[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L30
	lea	rsp, -24[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L28:
	mov	rdi, r12
	call	sii8620_status_dcap_ready@PLT
	mov	rdi, r12
	call	sii8620_is_mhl3@PLT
	test	eax, eax
	jne	.L9
	xor	esi, esi
	mov	rdi, r12
	call	sii8620_mt_read_devcap@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L29:
	mov	rdi, r12
	call	sii8620_status_changed_path@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L27:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L7
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sii8620_msc_mr_write_stat, .-sii8620_msc_mr_write_stat
	.comm	REG_MHL_STAT_0,4,4
	.comm	REG_MHL_EXTSTAT_0,4,4
	.comm	MHL_XDS_SIZE,4,4
	.comm	MHL_DST_SIZE,4,4
	.comm	MHL_DST_LM_PATH_ENABLED,4,4
	.comm	MHL_DST_LINK_MODE,8,8
	.comm	MHL_DST_CONN_DCAP_RDY,4,4
	.comm	MHL_DST_CONNECTED_RDY,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_sil-sii8620.c_sii8620_msc_mr_write_stat.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sii8620_msc_mr_write_stat, %function
sii8620_msc_mr_write_stat:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, fp, lr}
	add	fp, sp, #24
	sub	sp, sp, #12
	ldr	r6, .L15
	ldr	r5, .L15+4
	ldr	r3, [r6]
	ldr	r2, [r5]
	lsl	r1, r3, #2
	add	r1, r1, #7
	bic	r1, r1, #7
	sub	sp, sp, r1
	lsl	r2, r2, #2
	mov	r7, sp
	add	r2, r2, #7
	bic	r2, r2, #7
	sub	sp, sp, r2
	mov	r4, r0
	mov	r8, sp
	ldr	r1, .L15+8
	ldr	ip, .L15+12
	mov	r2, r7
	ldr	r1, [r1]
	ldr	ip, [ip]
	str	ip, [fp, #-32]
	mov	ip,#0
	bl	sii8620_read_buf
	ldr	r1, .L15+16
	ldr	r3, [r5]
	mov	r2, r8
	ldr	r1, [r1]
	mov	r0, r4
	bl	sii8620_read_buf
	mov	r1, r7
	ldr	r2, [r6]
	ldr	r0, [r4]
	bl	sii8620_update_array
	mov	r1, r8
	ldr	r2, [r5]
	ldr	r0, [r4, #4]
	bl	sii8620_update_array
	ldr	r2, .L15+20
	ldr	r3, [r4]
	ldr	r2, [r2]
	ldr	r1, .L15+24
	ldr	r3, [r3, r2, lsl #2]
	ldr	r1, [r1]
	ldr	r2, [r7, r2, lsl #2]
	and	r3, r3, r1
	tst	r3, r2
	bne	.L12
.L3:
	ldr	r2, .L15+28
	ldr	r3, .L15+32
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r2, [r7, r2, lsl #2]
	tst	r2, r3
	bne	.L13
.L1:
	ldr	r3, .L15+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	sub	sp, fp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, fp, pc}
.L12:
	mov	r0, r4
	bl	sii8620_status_dcap_ready
	mov	r0, r4
	bl	sii8620_is_mhl3
	subs	r1, r0, #0
	bne	.L3
	mov	r0, r4
	bl	sii8620_mt_read_devcap
	b	.L3
.L13:
	mov	r0, r4
	bl	sii8620_status_changed_path
	b	.L1
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	MHL_DST_SIZE
	.word	MHL_XDS_SIZE
	.word	REG_MHL_STAT_0
	.word	.LC0
	.word	REG_MHL_EXTSTAT_0
	.word	MHL_DST_CONNECTED_RDY
	.word	MHL_DST_CONN_DCAP_RDY
	.word	MHL_DST_LINK_MODE
	.word	MHL_DST_LM_PATH_ENABLED
	.size	sii8620_msc_mr_write_stat, .-sii8620_msc_mr_write_stat
	.comm	REG_MHL_STAT_0,4,4
	.comm	REG_MHL_EXTSTAT_0,4,4
	.comm	MHL_XDS_SIZE,4,4
	.comm	MHL_DST_SIZE,4,4
	.comm	MHL_DST_LM_PATH_ENABLED,4,4
	.comm	MHL_DST_LINK_MODE,4,4
	.comm	MHL_DST_CONN_DCAP_RDY,4,4
	.comm	MHL_DST_CONNECTED_RDY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
