	.file	"extr_sdhci.c_sdhci_pre_dma_transfer.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"%s: asked for transfer of %u bytes exceeds bounce buffer %u bytes\n"
	.text
	.p2align 4
	.type	sdhci_pre_dma_transfer, @function
sdhci_pre_dma_transfer:
.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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	eax, DWORD PTR COOKIE_PRE_MAPPED[rip]
	cmp	DWORD PTR [rsi], eax
	je	.L10
	cmp	QWORD PTR 24[rdi], 0
	mov	rbp, rdi
	mov	r12d, edx
	je	.L4
	mov	r13d, DWORD PTR 8[rsi]
	imul	r13d, DWORD PTR 12[rsi]
	mov	r14d, DWORD PTR [rdi]
	cmp	r14d, r13d
	jb	.L11
	mov	rdi, rsi
	call	mmc_get_dma_dir@PLT
	cmp	rax, QWORD PTR DMA_TO_DEVICE[rip]
	je	.L12
.L6:
	mov	rdi, rbx
	call	mmc_get_dma_dir@PLT
	mov	esi, DWORD PTR 16[rbp]
	mov	edx, DWORD PTR 0[rbp]
	mov	rcx, rax
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR [rax]
	call	dma_sync_single_for_device@PLT
	mov	eax, 1
.L7:
	mov	DWORD PTR 4[rbx], eax
	mov	DWORD PTR [rbx], r12d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rdi, rsi
	call	mmc_get_dma_dir@PLT
	mov	rdi, QWORD PTR 8[rbp]
	mov	r15d, DWORD PTR 16[rbx]
	mov	r14d, DWORD PTR 20[rbx]
	mov	r13, rax
	call	mmc_dev@PLT
	mov	rcx, r13
	mov	edx, r15d
	mov	edi, eax
	mov	esi, r14d
	call	dma_map_sg@PLT
	test	eax, eax
	jne	.L7
	mov	eax, DWORD PTR ENOSPC[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	eax, DWORD PTR 4[rsi]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[rdi]
	call	mmc_hostname@PLT
	mov	ecx, r14d
	mov	edx, r13d
	lea	rdi, .LC0[rip]
	mov	esi, eax
	call	pr_err@PLT
	mov	eax, DWORD PTR EIO[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	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
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	rdx, QWORD PTR 24[rbp]
	mov	esi, DWORD PTR 16[rbx]
	mov	ecx, r13d
	mov	edi, DWORD PTR 20[rbx]
	call	sg_copy_to_buffer@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	sdhci_pre_dma_transfer, .-sdhci_pre_dma_transfer
	.comm	ENOSPC,4,4
	.comm	EIO,4,4
	.comm	DMA_TO_DEVICE,8,8
	.comm	COOKIE_PRE_MAPPED,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_sdhci.c_sdhci_pre_dma_transfer.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s: asked for transfer of %u bytes exceeds bounce b"
	.ascii	"uffer %u bytes\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sdhci_pre_dma_transfer, %function
sdhci_pre_dma_transfer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L13
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, [r3]
	mov	r4, r1
	ldr	r1, [r1]
	cmp	r1, r3
	beq	.L10
	ldr	r3, [r0, #12]
	mov	r5, r0
	cmp	r3, #0
	mov	r7, r2
	beq	.L4
	ldr	r6, [r4, #8]
	ldr	r2, [r4, #12]
	ldr	r3, [r0]
	mul	r6, r2, r6
	cmp	r3, r6
	bcc	.L11
	mov	r0, r4
	bl	mmc_get_dma_dir
	ldr	r3, .L13+4
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L12
.L6:
	ldmib	r5, {r3, r8}
	mov	r0, r4
	ldr	r6, [r3]
	ldr	r5, [r5]
	bl	mmc_get_dma_dir
	mov	r2, r5
	mov	r3, r0
	mov	r1, r8
	mov	r0, r6
	bl	dma_sync_single_for_device
	mov	r0, #1
.L7:
	str	r0, [r4, #4]
	str	r7, [r4]
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	ldr	r0, [r0, #4]
	bl	mmc_dev
	mov	r5, r0
	mov	r0, r4
	ldr	r6, [r4, #20]
	ldr	r8, [r4, #16]
	bl	mmc_get_dma_dir
	mov	r2, r8
	mov	r3, r0
	mov	r1, r6
	mov	r0, r5
	bl	dma_map_sg
	cmp	r0, #0
	bne	.L7
	ldr	r3, .L13+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	ldr	r0, [r4, #4]
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	ldr	r0, [r0, #4]
	bl	mmc_hostname
	ldr	r3, [r5]
	mov	r1, r0
	mov	r2, r6
	ldr	r0, .L13+12
	bl	pr_err
	ldr	r3, .L13+16
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	mov	r3, r6
	ldr	r2, [r5, #12]
	ldr	r1, [r4, #16]
	ldr	r0, [r4, #20]
	bl	sg_copy_to_buffer
	b	.L6
.L14:
	.align	2
.L13:
	.word	COOKIE_PRE_MAPPED
	.word	DMA_TO_DEVICE
	.word	ENOSPC
	.word	.LC0
	.word	EIO
	.size	sdhci_pre_dma_transfer, .-sdhci_pre_dma_transfer
	.comm	ENOSPC,4,4
	.comm	EIO,4,4
	.comm	DMA_TO_DEVICE,4,4
	.comm	COOKIE_PRE_MAPPED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
