	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_pre_dma_transfer
_sdhci_pre_dma_transfer:                ## @sdhci_pre_dma_transfer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movl	(%rsi), %eax
	movq	_COOKIE_PRE_MAPPED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	movl	4(%rbx), %eax
	jmp	LBB0_12
LBB0_2:
	movl	%edx, %r14d
	movq	%rdi, %r15
	cmpq	$0, 24(%rdi)
	je	LBB0_9
## %bb.3:
	movl	12(%rbx), %r12d
	imull	8(%rbx), %r12d
	cmpl	(%r15), %r12d
	jbe	LBB0_5
## %bb.4:
	movq	8(%r15), %rdi
	callq	_mmc_hostname
	movl	(%r15), %ecx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	movl	%r12d, %edx
	callq	_pr_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_9:
	movq	8(%r15), %rdi
	callq	_mmc_dev
	movl	%eax, %r15d
	movl	16(%rbx), %r12d
	movl	20(%rbx), %r13d
	movq	%rbx, %rdi
	callq	_mmc_get_dma_dir
	movl	%r15d, %edi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movq	%rax, %rcx
	callq	_dma_map_sg
	testl	%eax, %eax
	jne	LBB0_8
## %bb.10:
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
LBB0_11:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_5:
	movq	%rbx, %rdi
	callq	_mmc_get_dma_dir
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movl	16(%rbx), %esi
	movl	20(%rbx), %edi
	movq	24(%r15), %rdx
	movl	%r12d, %ecx
	callq	_sg_copy_to_buffer
LBB0_7:
	movq	8(%r15), %rax
	movl	(%rax), %r12d
	movl	16(%r15), %r13d
	movl	(%r15), %r15d
	movq	%rbx, %rdi
	callq	_mmc_get_dma_dir
	movl	%r12d, %edi
	movl	%r13d, %esi
	movl	%r15d, %edx
	movq	%rax, %rcx
	callq	_dma_sync_single_for_device
	movl	$1, %eax
LBB0_8:
	movl	%eax, 4(%rbx)
	movl	%r14d, (%rbx)
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COOKIE_PRE_MAPPED,4,2          ## @COOKIE_PRE_MAPPED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: asked for transfer of %u bytes exceeds bounce buffer %u bytes\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_DMA_TO_DEVICE,8,3              ## @DMA_TO_DEVICE
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.no_dead_strip	_sdhci_pre_dma_transfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdhci_pre_dma_transfer
_sdhci_pre_dma_transfer:                ; @sdhci_pre_dma_transfer
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _COOKIE_PRE_MAPPED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _COOKIE_PRE_MAPPED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x19, #4]
	b	LBB0_12
LBB0_2:
	mov	x20, x2
	mov	x21, x0
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_5
; %bb.3:
	ldp	w8, w9, [x19, #8]
	mul	w22, w9, w8
	ldr	w8, [x21]
	cmp	w22, w8
	b.ls	LBB0_8
; %bb.4:
	ldr	x0, [x21, #8]
	bl	_mmc_hostname
	mov	x1, x0
	ldr	w3, [x21]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x22
	bl	_pr_err
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
	ldr	x0, [x21, #8]
	bl	_mmc_dev
	mov	x21, x0
	ldp	w23, w22, [x19, #16]
	mov	x0, x19
	bl	_mmc_get_dma_dir
	mov	x3, x0
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	bl	_dma_map_sg
	cbnz	w0, LBB0_11
; %bb.6:
Lloh7:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_8:
	mov	x0, x19
	bl	_mmc_get_dma_dir
Lloh9:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.9:
	ldp	w1, w0, [x19, #16]
	ldr	x2, [x21, #24]
	mov	x3, x22
	bl	_sg_copy_to_buffer
LBB0_10:
	ldr	x8, [x21, #8]
	ldr	w22, [x8]
	ldr	w23, [x21, #16]
	ldr	w21, [x21]
	mov	x0, x19
	bl	_mmc_get_dma_dir
	mov	x3, x0
	mov	x0, x22
	mov	x1, x23
	mov	x2, x21
	bl	_dma_sync_single_for_device
	mov	w0, #1
LBB0_11:
	stp	w20, w0, [x19]
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_COOKIE_PRE_MAPPED,4,2          ; @COOKIE_PRE_MAPPED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: asked for transfer of %u bytes exceeds bounce buffer %u bytes\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_DMA_TO_DEVICE,8,3              ; @DMA_TO_DEVICE
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.no_dead_strip	_sdhci_pre_dma_transfer
.subsections_via_symbols
