	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_request_done
_sdhci_request_done:                    ## @sdhci_request_done
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	24(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	_SDHCI_MAX_MRQS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_4
## %bb.1:
	movq	32(%r15), %rcx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%r13,8), %rbx
	testq	%rbx, %rbx
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	cmpq	%r13, %rax
	jne	LBB0_2
	jmp	LBB0_4
LBB0_5:
	movq	_SDHCI_REQ_USE_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_16
## %bb.6:
	movq	(%rbx), %r12
	testq	%r12, %r12
	je	LBB0_16
## %bb.7:
	movq	(%r12), %rax
	movq	_COOKIE_MAPPED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.8:
	cmpl	$0, 76(%r15)
	je	LBB0_14
## %bb.9:
	movq	%r12, %rdi
	callq	_mmc_get_dma_dir
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.10:
	movl	8(%r12), %esi
	movl	4(%r15), %edx
	cmpl	%edx, %esi
	jbe	LBB0_12
## %bb.11:
	movq	16(%r15), %rdi
	callq	_mmc_hostname
	movl	4(%r15), %edx
	movl	8(%r12), %ecx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	movl	4(%r15), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%edx, %esi
LBB0_12:
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	16(%r15), %rcx
	movl	(%rcx), %edi
	movl	72(%r15), %esi
	movq	%rax, %rcx
	callq	_dma_sync_single_for_cpu
	movl	12(%r12), %esi
	movl	16(%r12), %edi
	movl	76(%r15), %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_sg_copy_from_buffer
	jmp	LBB0_15
LBB0_14:
	movq	16(%r15), %rdi
	callq	_mmc_dev
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	12(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	16(%r12), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_mmc_get_dma_dir
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%rax, %rcx
	callq	_dma_unmap_sg
	jmp	LBB0_15
LBB0_13:
	movq	16(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	72(%r15), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	4(%r15), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_mmc_get_dma_dir
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	%rax, %rcx
	callq	_dma_sync_single_for_cpu
LBB0_15:
	movq	_COOKIE_UNMAPPED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
LBB0_16:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_sdhci_needs_reset
	testq	%rax, %rax
	je	LBB0_22
## %bb.17:
	cmpq	$0, 64(%r15)
	jne	LBB0_4
## %bb.18:
	cmpq	$0, 56(%r15)
	je	LBB0_19
LBB0_4:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	$1, %eax
LBB0_23:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	_SDHCI_QUIRK_CLOCK_BEFORE_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r15)
	je	LBB0_21
## %bb.20:
	movq	48(%r15), %rax
	movl	40(%r15), %esi
	movq	%r15, %rdi
	callq	*(%rax)
LBB0_21:
	movq	_SDHCI_RESET_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_sdhci_do_reset
	movq	_SDHCI_RESET_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_sdhci_do_reset
	movl	$0, 12(%r15)
LBB0_22:
	movq	32(%r15), %rax
	movq	$0, (%rax,%r13,8)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	16(%r15), %rdi
	movq	%rbx, %rsi
	callq	_mmc_request_done
	xorl	%eax, %eax
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_SDHCI_MAX_MRQS,4,2             ## @SDHCI_MAX_MRQS
	.comm	_SDHCI_REQ_USE_DMA,4,2          ## @SDHCI_REQ_USE_DMA
	.comm	_COOKIE_MAPPED,8,3              ## @COOKIE_MAPPED
	.comm	_DMA_FROM_DEVICE,8,3            ## @DMA_FROM_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: bounce buffer is %u bytes but DMA claims to have transferred %u bytes\n"

	.comm	_COOKIE_UNMAPPED,8,3            ## @COOKIE_UNMAPPED
	.comm	_SDHCI_QUIRK_CLOCK_BEFORE_RESET,4,2 ## @SDHCI_QUIRK_CLOCK_BEFORE_RESET
	.comm	_SDHCI_RESET_CMD,4,2            ## @SDHCI_RESET_CMD
	.comm	_SDHCI_RESET_DATA,4,2           ## @SDHCI_RESET_DATA
	.no_dead_strip	_sdhci_request_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdhci_request_done
_sdhci_request_done:                    ; @sdhci_request_done
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	add	x19, x0, #24
	mov	x0, x19
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x8, _SDHCI_MAX_MRQS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDHCI_MAX_MRQS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_19
; %bb.1:
	mov	x26, #0
	ldr	x8, [x20, #32]
	lsl	x9, x9, #3
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x21, [x8, x26]
	cbnz	x21, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x26, x26, #8
	cmp	x9, x26
	b.ne	LBB0_2
	b	LBB0_19
LBB0_4:
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _SDHCI_REQ_USE_DMA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SDHCI_REQ_USE_DMA@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.5:
	ldr	x22, [x21]
	cbz	x22, LBB0_16
; %bb.6:
	ldr	x8, [x22]
Lloh6:
	adrp	x9, _COOKIE_MAPPED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _COOKIE_MAPPED@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.7:
	ldr	w8, [x20, #76]
	cbz	w8, LBB0_11
; %bb.8:
	mov	x0, x22
	bl	_mmc_get_dma_dir
Lloh9:
	adrp	x24, _DMA_FROM_DEVICE@GOTPAGE
Lloh10:
	ldr	x24, [x24, _DMA_FROM_DEVICE@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.9:
	ldr	w23, [x22, #8]
	ldr	w2, [x20, #4]
	cmp	w23, w2
	b.ls	LBB0_13
; %bb.10:
	ldr	x0, [x20, #16]
	bl	_mmc_hostname
	mov	x1, x0
	ldr	w2, [x20, #4]
	ldr	w3, [x22, #8]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	ldr	w2, [x20, #4]
	ldr	x3, [x24]
	mov	x23, x2
	b	LBB0_14
LBB0_11:
	ldr	x0, [x20, #16]
	bl	_mmc_dev
	mov	x23, x0
	ldp	w25, w24, [x22, #12]
	mov	x0, x22
	bl	_mmc_get_dma_dir
	mov	x3, x0
	mov	x0, x23
	mov	x1, x24
	mov	x2, x25
	bl	_dma_unmap_sg
	b	LBB0_15
LBB0_12:
	ldr	x8, [x20, #16]
	ldr	w23, [x8]
	ldr	w24, [x20, #72]
	ldr	w25, [x20, #4]
	mov	x0, x22
	bl	_mmc_get_dma_dir
	mov	x3, x0
	mov	x0, x23
	mov	x1, x24
	mov	x2, x25
	bl	_dma_sync_single_for_cpu
	b	LBB0_15
LBB0_13:
	mov	x3, x0
LBB0_14:
	ldr	x8, [x20, #16]
	ldr	w0, [x8]
	ldr	w1, [x20, #72]
	bl	_dma_sync_single_for_cpu
	ldp	w1, w0, [x22, #12]
	ldr	w2, [x20, #76]
	mov	x3, x23
	bl	_sg_copy_from_buffer
LBB0_15:
Lloh13:
	adrp	x8, _COOKIE_UNMAPPED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _COOKIE_UNMAPPED@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	str	x8, [x22]
LBB0_16:
	mov	x0, x20
	mov	x1, x21
	bl	_sdhci_needs_reset
	cbz	x0, LBB0_24
; %bb.17:
	ldr	x8, [x20, #64]
	cbnz	x8, LBB0_19
; %bb.18:
	ldr	x8, [x20, #56]
	cbz	x8, LBB0_21
LBB0_19:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	w0, #1
LBB0_20:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_21:
	ldr	w8, [x20, #8]
Lloh16:
	adrp	x9, _SDHCI_QUIRK_CLOCK_BEFORE_RESET@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SDHCI_QUIRK_CLOCK_BEFORE_RESET@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_23
; %bb.22:
	ldr	x8, [x20, #48]
	ldr	x8, [x8]
	ldr	w1, [x20, #40]
	mov	x0, x20
	blr	x8
LBB0_23:
Lloh19:
	adrp	x8, _SDHCI_RESET_CMD@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SDHCI_RESET_CMD@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_sdhci_do_reset
Lloh22:
	adrp	x8, _SDHCI_RESET_DATA@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SDHCI_RESET_DATA@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_sdhci_do_reset
	str	wzr, [x20, #12]
LBB0_24:
	ldr	x8, [x20, #32]
	str	xzr, [x8, x26]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	ldr	x0, [x20, #16]
	mov	x1, x21
	bl	_mmc_request_done
	mov	w0, #0
	b	LBB0_20
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_SDHCI_MAX_MRQS,4,2             ; @SDHCI_MAX_MRQS
	.comm	_SDHCI_REQ_USE_DMA,4,2          ; @SDHCI_REQ_USE_DMA
	.comm	_COOKIE_MAPPED,8,3              ; @COOKIE_MAPPED
	.comm	_DMA_FROM_DEVICE,8,3            ; @DMA_FROM_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: bounce buffer is %u bytes but DMA claims to have transferred %u bytes\n"

	.comm	_COOKIE_UNMAPPED,8,3            ; @COOKIE_UNMAPPED
	.comm	_SDHCI_QUIRK_CLOCK_BEFORE_RESET,4,2 ; @SDHCI_QUIRK_CLOCK_BEFORE_RESET
	.comm	_SDHCI_RESET_CMD,4,2            ; @SDHCI_RESET_CMD
	.comm	_SDHCI_RESET_DATA,4,2           ; @SDHCI_RESET_DATA
	.no_dead_strip	_sdhci_request_done
.subsections_via_symbols
