	.file	"extr_cx231xx-417.c_mc417_memory_read.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mc417_memory_read, @function
mc417_memory_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, esi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	edx, DWORD PTR MCI_MEMORY_ADDRESS_BYTE2[rip]
	or	edx, DWORD PTR MCI_MODE_MEMORY_READ[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	eax, esi
	mov	esi, DWORD PTR ITVC_WRITE_DIR[rip]
	sar	eax, 8
	and	eax, 16128
	or	edx, eax
	sal	edx, 10
	or	edx, 133120
	mov	DWORD PTR 4[rsp], edx
	call	set_itvc_reg@PLT
	mov	r13d, eax
	test	eax, eax
	js	.L1
	mov	edx, DWORD PTR 4[rsp]
	mov	esi, DWORD PTR ITVC_WRITE_DIR[rip]
	mov	rdi, rbp
	or	dh, 20
	mov	DWORD PTR 4[rsp], edx
	call	set_itvc_reg@PLT
	mov	edx, ebx
	mov	esi, DWORD PTR ITVC_WRITE_DIR[rip]
	mov	rdi, rbp
	and	edx, 65280
	or	edx, DWORD PTR MCI_MEMORY_ADDRESS_BYTE1[rip]
	sal	ebx, 8
	sal	edx, 10
	or	edx, 133120
	mov	DWORD PTR 4[rsp], edx
	call	set_itvc_reg@PLT
	mov	edx, DWORD PTR 4[rsp]
	mov	esi, DWORD PTR ITVC_WRITE_DIR[rip]
	mov	rdi, rbp
	or	dh, 20
	mov	DWORD PTR 4[rsp], edx
	call	set_itvc_reg@PLT
	movzx	edx, bx
	mov	rdi, rbp
	lea	rbx, 4[rsp]
	or	edx, DWORD PTR MCI_MEMORY_ADDRESS_BYTE0[rip]
	mov	esi, DWORD PTR ITVC_WRITE_DIR[rip]
	sal	edx, 10
	or	edx, 133120
	mov	DWORD PTR 4[rsp], edx
	call	set_itvc_reg@PLT
	mov	edx, DWORD PTR 4[rsp]
	mov	esi, DWORD PTR ITVC_WRITE_DIR[rip]
	mov	rdi, rbp
	or	dh, 20
	mov	DWORD PTR 4[rsp], edx
	call	set_itvc_reg@PLT
	mov	rdi, rbp
	call	wait_for_mci_complete@PLT
	mov	edx, DWORD PTR MCI_MEMORY_DATA_BYTE3[rip]
	mov	esi, DWORD PTR ITVC_READ_DIR[rip]
	mov	rdi, rbp
	mov	r13d, eax
	sal	edx, 10
	or	edx, 133120
	mov	DWORD PTR 4[rsp], edx
	call	set_itvc_reg@PLT
	mov	edx, DWORD PTR MCI_MEMORY_DATA_BYTE3[rip]
	mov	esi, DWORD PTR ITVC_READ_DIR[rip]
	mov	rdi, rbp
	sal	edx, 10
	or	edx, 132096
	mov	DWORD PTR 4[rsp], edx
	call	set_itvc_reg@PLT
	mov	esi, DWORD PTR ITVC_READ_DIR[rip]
	mov	rdx, rbx
	mov	rdi, rbp
	call	get_itvc_reg@PLT
	mov	esi, DWORD PTR ITVC_READ_DIR[rip]
	mov	edx, 138240
	mov	rdi, rbp
	mov	r15d, DWORD PTR 4[rsp]
	call	set_itvc_reg@PLT
	mov	edx, DWORD PTR MCI_MEMORY_DATA_BYTE2[rip]
	mov	esi, DWORD PTR ITVC_READ_DIR[rip]
	mov	rdi, rbp
	sal	r15d, 6
	sal	edx, 10
	and	r15d, -16777216
	or	edx, 133120
	mov	DWORD PTR 4[rsp], edx
	call	set_itvc_reg@PLT
	mov	edx, DWORD PTR MCI_MEMORY_DATA_BYTE2[rip]
	mov	esi, DWORD PTR ITVC_READ_DIR[rip]
	mov	rdi, rbp
	sal	edx, 10
	or	edx, 132096
	mov	DWORD PTR 4[rsp], edx
	call	set_itvc_reg@PLT
	mov	esi, DWORD PTR ITVC_READ_DIR[rip]
	mov	rdx, rbx
	mov	rdi, rbp
	call	get_itvc_reg@PLT
	mov	esi, DWORD PTR ITVC_READ_DIR[rip]
	mov	edx, 138240
	mov	rdi, rbp
	mov	r14d, DWORD PTR 4[rsp]
	call	set_itvc_reg@PLT
	mov	edx, DWORD PTR MCI_MEMORY_DATA_BYTE1[rip]
	mov	esi, DWORD PTR ITVC_READ_DIR[rip]
	mov	rdi, rbp
	sar	r14d, 2
	sal	edx, 10
	and	r14d, 16711680
	or	edx, 133120
	or	r15d, r14d
	mov	DWORD PTR 4[rsp], edx
	call	set_itvc_reg@PLT
	mov	edx, DWORD PTR MCI_MEMORY_DATA_BYTE1[rip]
	mov	esi, DWORD PTR ITVC_READ_DIR[rip]
	mov	rdi, rbp
	sal	edx, 10
	or	edx, 132096
	mov	DWORD PTR 4[rsp], edx
	call	set_itvc_reg@PLT
	mov	esi, DWORD PTR ITVC_READ_DIR[rip]
	mov	rdx, rbx
	mov	rdi, rbp
	call	get_itvc_reg@PLT
	mov	esi, DWORD PTR ITVC_READ_DIR[rip]
	mov	edx, 138240
	mov	rdi, rbp
	mov	r14d, DWORD PTR 4[rsp]
	call	set_itvc_reg@PLT
	mov	edx, DWORD PTR MCI_MEMORY_DATA_BYTE0[rip]
	mov	esi, DWORD PTR ITVC_READ_DIR[rip]
	mov	rdi, rbp
	sar	r14d, 10
	sal	edx, 10
	and	r14d, 65280
	or	edx, 133120
	or	r14d, r15d
	mov	DWORD PTR 4[rsp], edx
	call	set_itvc_reg@PLT
	mov	edx, DWORD PTR MCI_MEMORY_DATA_BYTE0[rip]
	mov	esi, DWORD PTR ITVC_READ_DIR[rip]
	mov	rdi, rbp
	sal	edx, 10
	or	edx, 132096
	mov	DWORD PTR 4[rsp], edx
	call	set_itvc_reg@PLT
	mov	esi, DWORD PTR ITVC_READ_DIR[rip]
	mov	rdx, rbx
	mov	rdi, rbp
	call	get_itvc_reg@PLT
	mov	eax, DWORD PTR 4[rsp]
	mov	edx, 138240
	mov	rdi, rbp
	mov	esi, DWORD PTR ITVC_READ_DIR[rip]
	sar	eax, 18
	movzx	ebx, al
	call	set_itvc_reg@PLT
	or	ebx, r14d
	mov	DWORD PTR [r12], ebx
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L7
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mc417_memory_read, .-mc417_memory_read
	.comm	MCI_MODE_MEMORY_READ,4,4
	.comm	MCI_MEMORY_DATA_BYTE3,4,4
	.comm	MCI_MEMORY_DATA_BYTE2,4,4
	.comm	MCI_MEMORY_DATA_BYTE1,4,4
	.comm	MCI_MEMORY_DATA_BYTE0,4,4
	.comm	MCI_MEMORY_ADDRESS_BYTE2,4,4
	.comm	MCI_MEMORY_ADDRESS_BYTE1,4,4
	.comm	MCI_MEMORY_ADDRESS_BYTE0,4,4
	.comm	ITVC_WRITE_DIR,4,4
	.comm	ITVC_READ_DIR,4,4
	.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_cx231xx-417.c_mc417_memory_read.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mc417_memory_read, %function
mc417_memory_read:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r1
	ldr	r3, .L7
	mov	r8, r2
	ldr	r2, .L7+4
	ldr	r1, [r3]
	ldr	r2, [r2]
	asr	r3, r5, #8
	and	r3, r3, #16128
	orr	r2, r2, r1
	orr	r2, r2, r3
	ldr	r7, .L7+8
	ldr	r3, .L7+12
	lsl	r2, r2, #10
	sub	sp, sp, #12
	orr	r2, r2, #133120
	ldr	r1, [r7]
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r4, r0
	str	r2, [sp]
	bl	set_itvc_reg
	subs	r6, r0, #0
	blt	.L1
	ldr	r2, [sp]
	ldr	r1, [r7]
	orr	r2, r2, #5120
	mov	r0, r4
	str	r2, [sp]
	bl	set_itvc_reg
	ldr	r3, .L7+16
	and	r2, r5, #65280
	ldr	r3, [r3]
	ldr	r1, [r7]
	orr	r2, r2, r3
	lsl	r2, r2, #10
	orr	r2, r2, #133120
	mov	r0, r4
	str	r2, [sp]
	bl	set_itvc_reg
	ldr	r2, [sp]
	ldr	r1, [r7]
	orr	r2, r2, #5120
	mov	r0, r4
	str	r2, [sp]
	bl	set_itvc_reg
	ldr	r3, .L7+20
	ldr	r2, .L7+24
	ldr	r1, [r3]
	and	r2, r2, r5, lsl #8
	orr	r2, r2, r1
	lsl	r2, r2, #10
	ldr	r1, [r7]
	orr	r2, r2, #133120
	mov	r0, r4
	str	r2, [sp]
	bl	set_itvc_reg
	ldr	r2, [sp]
	ldr	r1, [r7]
	orr	r2, r2, #5120
	mov	r0, r4
	str	r2, [sp]
	bl	set_itvc_reg
	mov	r0, r4
	bl	wait_for_mci_complete
	ldr	r7, .L7+28
	ldr	r5, .L7+32
	ldr	r2, [r7]
	ldr	r1, [r5]
	lsl	r2, r2, #10
	orr	r2, r2, #133120
	mov	r6, r0
	mov	r0, r4
	str	r2, [sp]
	bl	set_itvc_reg
	ldr	r2, [r7]
	ldr	r1, [r5]
	lsl	r2, r2, #10
	orr	r2, r2, #132096
	mov	r0, r4
	ldr	r10, .L7+36
	str	r2, [sp]
	bl	set_itvc_reg
	mov	r2, sp
	ldr	r1, [r5]
	mov	r0, r4
	bl	get_itvc_reg
	mov	r2, #138240
	ldr	r1, [r5]
	mov	r0, r4
	ldr	r9, [sp]
	bl	set_itvc_reg
	ldr	r2, [r10]
	ldr	r1, [r5]
	lsl	r2, r2, #10
	orr	r2, r2, #133120
	mov	r0, r4
	str	r2, [sp]
	bl	set_itvc_reg
	ldr	r2, [r10]
	ldr	r1, [r5]
	lsl	r2, r2, #10
	orr	r2, r2, #132096
	mov	r0, r4
	ldr	r10, .L7+40
	str	r2, [sp]
	bl	set_itvc_reg
	mov	r2, sp
	ldr	r1, [r5]
	mov	r0, r4
	bl	get_itvc_reg
	mov	r2, #138240
	ldr	r1, [r5]
	mov	r0, r4
	ldr	r7, [sp]
	bl	set_itvc_reg
	ldr	r2, [r10]
	ldr	r1, [r5]
	lsl	r2, r2, #10
	orr	r2, r2, #133120
	mov	r0, r4
	str	r2, [sp]
	bl	set_itvc_reg
	ldr	r2, [r10]
	ldr	r1, [r5]
	lsl	r2, r2, #10
	orr	r2, r2, #132096
	mov	r0, r4
	ldr	r10, .L7+44
	str	r2, [sp]
	lsl	r9, r9, #6
	bl	set_itvc_reg
	asr	r7, r7, #2
	mov	r2, sp
	ldr	r1, [r5]
	mov	r0, r4
	bl	get_itvc_reg
	and	r7, r7, #16711680
	mov	r2, #138240
	ldr	r1, [r5]
	mov	r0, r4
	and	fp, r9, #-16777216
	orr	fp, r7, fp
	ldr	r7, [sp]
	bl	set_itvc_reg
	ldr	r2, [r10]
	ldr	r1, [r5]
	lsl	r2, r2, #10
	orr	r2, r2, #133120
	mov	r0, r4
	str	r2, [sp]
	bl	set_itvc_reg
	ldr	r2, [r10]
	ldr	r1, [r5]
	lsl	r2, r2, #10
	orr	r2, r2, #132096
	mov	r0, r4
	str	r2, [sp]
	bl	set_itvc_reg
	mov	r2, sp
	ldr	r1, [r5]
	mov	r0, r4
	bl	get_itvc_reg
	asr	r7, r7, #10
	ldr	r3, [sp]
	and	r7, r7, #65280
	lsl	r3, r3, #6
	orr	r7, r7, fp
	orr	r7, r7, r3, lsr #24
	mov	r0, r4
	mov	r2, #138240
	ldr	r1, [r5]
	bl	set_itvc_reg
	str	r7, [r8]
.L1:
	ldr	r3, .L7+12
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L6
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	bl	__stack_chk_fail
.L8:
	.align	2
.L7:
	.word	MCI_MODE_MEMORY_READ
	.word	MCI_MEMORY_ADDRESS_BYTE2
	.word	ITVC_WRITE_DIR
	.word	.LC0
	.word	MCI_MEMORY_ADDRESS_BYTE1
	.word	MCI_MEMORY_ADDRESS_BYTE0
	.word	65535
	.word	MCI_MEMORY_DATA_BYTE3
	.word	ITVC_READ_DIR
	.word	MCI_MEMORY_DATA_BYTE2
	.word	MCI_MEMORY_DATA_BYTE1
	.word	MCI_MEMORY_DATA_BYTE0
	.size	mc417_memory_read, .-mc417_memory_read
	.comm	MCI_MODE_MEMORY_READ,4,4
	.comm	MCI_MEMORY_DATA_BYTE3,4,4
	.comm	MCI_MEMORY_DATA_BYTE2,4,4
	.comm	MCI_MEMORY_DATA_BYTE1,4,4
	.comm	MCI_MEMORY_DATA_BYTE0,4,4
	.comm	MCI_MEMORY_ADDRESS_BYTE2,4,4
	.comm	MCI_MEMORY_ADDRESS_BYTE1,4,4
	.comm	MCI_MEMORY_ADDRESS_BYTE0,4,4
	.comm	ITVC_WRITE_DIR,4,4
	.comm	ITVC_READ_DIR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
