	.file	"extr_tmio_mmc_core.c_tmio_mmc_transfer_data.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	tmio_mmc_transfer_data, @function
tmio_mmc_transfer_data:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rsi
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rcx, QWORD PTR [rdi]
	mov	esi, DWORD PTR CTL_SD_DATA_PORT[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 8[rdi]
	mov	ecx, DWORD PTR [rcx]
	mov	eax, DWORD PTR [rax]
	and	eax, DWORD PTR MMC_DATA_READ[rip]
	test	DWORD PTR TMIO_MMC_32BIT_DATA_PORT[rip], ecx
	je	.L2
	mov	r13d, edx
	and	edx, 3
	mov	DWORD PTR 4[rsp], 0
	shr	r13d, 2
	mov	r12d, edx
	mov	rdx, rbx
	mov	ecx, r13d
	test	eax, eax
	je	.L3
	call	sd_ctrl_read32_rep@PLT
	test	r12d, r12d
	jne	.L4
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L24
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	r13d, edx
	and	edx, 1
	shr	r13d
	mov	r12d, edx
	mov	rdx, rbx
	mov	ecx, r13d
	test	eax, eax
	je	.L9
	call	sd_ctrl_read16_rep@PLT
	test	r12d, r12d
	je	.L1
	mov	esi, DWORD PTR CTL_SD_DATA_PORT[rip]
	mov	rdi, rbp
	lea	rbx, [rbx+r13*2]
	call	sd_ctrl_read16@PLT
	movzx	eax, al
	mov	DWORD PTR [rbx], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	call	sd_ctrl_write16_rep@PLT
	test	r12d, r12d
	je	.L1
	mov	edx, DWORD PTR [rbx+r13*2]
	mov	esi, DWORD PTR CTL_SD_DATA_PORT[rip]
	mov	rdi, rbp
	call	sd_ctrl_write16@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	call	sd_ctrl_write32_rep@PLT
	test	r12d, r12d
	je	.L1
	lea	rsi, [rbx+r13*4]
	lea	r13, 4[rsp]
	mov	edx, r12d
	mov	rdi, r13
	call	memcpy@PLT
	mov	ecx, 1
	mov	rdx, r13
	mov	rdi, rbp
	mov	esi, DWORD PTR CTL_SD_DATA_PORT[rip]
	call	sd_ctrl_write32_rep@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	lea	r14, [rbx+r13*4]
	mov	esi, DWORD PTR CTL_SD_DATA_PORT[rip]
	lea	r13, 4[rsp]
	mov	rdi, rbp
	mov	rdx, r13
	mov	ecx, 1
	call	sd_ctrl_read32_rep@PLT
	mov	edx, r12d
	mov	rsi, r13
	mov	rdi, r14
	call	memcpy@PLT
	jmp	.L1
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	tmio_mmc_transfer_data, .-tmio_mmc_transfer_data
	.comm	TMIO_MMC_32BIT_DATA_PORT,4,4
	.comm	MMC_DATA_READ,4,4
	.comm	CTL_SD_DATA_PORT,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_tmio_mmc_core.c_tmio_mmc_transfer_data.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tmio_mmc_transfer_data, %function
tmio_mmc_transfer_data:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L25
	ldr	r4, [r0]
	ldr	r3, [r3]
	ldr	ip, [r0, #4]
	ldr	lr, .L25+4
	ldr	r4, [r4]
	ldr	ip, [ip]
	ldr	lr, [lr]
	ldr	r7, .L25+8
	tst	r4, r3
	ldr	r3, .L25+12
	sub	sp, sp, #8
	mov	r6, r1
	mov	r5, r0
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	ldr	r1, [r7]
	and	ip, ip, lr
	beq	.L2
	mov	r3, #0
	lsr	r8, r2, #2
	cmp	ip, r3
	str	r3, [sp]
	and	r4, r2, #3
	mov	r3, r8
	mov	r2, r6
	beq	.L3
	bl	sd_ctrl_read32_rep
	cmp	r4, #0
	bne	.L4
.L1:
	ldr	r3, .L25+12
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L24
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	lsr	r8, r2, #1
	cmp	ip, #0
	and	r4, r2, #1
	mov	r3, r8
	mov	r2, r6
	beq	.L9
	bl	sd_ctrl_read16_rep
	cmp	r4, #0
	beq	.L1
	mov	r0, r5
	ldr	r1, [r7]
	bl	sd_ctrl_read16
	and	r0, r0, #255
	str	r0, [r6, r8, lsl #1]
	b	.L1
.L9:
	bl	sd_ctrl_write16_rep
	cmp	r4, #0
	beq	.L1
	mov	r0, r5
	ldr	r2, [r6, r8, lsl #1]
	ldr	r1, [r7]
	bl	sd_ctrl_write16
	b	.L1
.L3:
	bl	sd_ctrl_write32_rep
	cmp	r4, #0
	beq	.L1
	mov	r2, r4
	add	r1, r6, r8, lsl #2
	mov	r0, sp
	bl	memcpy
	mov	r2, sp
	mov	r0, r5
	mov	r3, #1
	ldr	r1, [r7]
	bl	sd_ctrl_write32_rep
	b	.L1
.L4:
	mov	r2, sp
	ldr	r1, [r7]
	mov	r0, r5
	mov	r3, #1
	add	r6, r6, r8, lsl #2
	bl	sd_ctrl_read32_rep
	mov	r2, r4
	mov	r1, sp
	mov	r0, r6
	bl	memcpy
	b	.L1
.L24:
	bl	__stack_chk_fail
.L26:
	.align	2
.L25:
	.word	TMIO_MMC_32BIT_DATA_PORT
	.word	MMC_DATA_READ
	.word	CTL_SD_DATA_PORT
	.word	.LC0
	.size	tmio_mmc_transfer_data, .-tmio_mmc_transfer_data
	.comm	TMIO_MMC_32BIT_DATA_PORT,4,4
	.comm	MMC_DATA_READ,4,4
	.comm	CTL_SD_DATA_PORT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
