	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pxamci_cmd_done
_pxamci_cmd_done:                       ## @pxamci_cmd_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	24(%rdi), %r13
	testq	%r13, %r13
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r15
	movq	$0, 24(%rdi)
	movq	_MMC_RES@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	16(%r15), %rdi
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	callq	_readl
	movl	%eax, %ebx
	movq	(%r14), %rdi
	addq	16(%r15), %rdi
	callq	_readl
	movl	%eax, %r12d
	movq	(%r14), %rdi
	addq	16(%r15), %rdi
	callq	_readl
	shll	$24, %ebx
	movzwl	%r12w, %edx
	shll	$8, %edx
	orl	%ebx, %edx
	movzbl	%ah, %ecx
	movl	%eax, %r12d
	orl	%edx, %ecx
	movq	(%r13), %rax
	movl	%ecx, (%rax)
	movq	(%r14), %rdi
	addq	16(%r15), %rdi
	callq	_readl
	movl	%eax, %ebx
	movq	(%r14), %rdi
	addq	16(%r15), %rdi
	callq	_readl
	movl	%r12d, %ecx
	shll	$24, %ecx
	movzwl	%bx, %edx
	shll	$8, %edx
	orl	%ecx, %edx
	movzbl	%ah, %ecx
	movl	%eax, %r14d
	orl	%edx, %ecx
	movq	(%r13), %rax
	movl	%ecx, 4(%rax)
	movq	_MMC_RES@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	16(%r15), %rdi
	callq	_readl
	movl	%eax, %r12d
	movq	(%rbx), %rdi
	addq	16(%r15), %rdi
	callq	_readl
	movl	%eax, %ebx
	shll	$24, %r14d
	movzwl	%r12w, %eax
	shll	$8, %eax
	orl	%r14d, %eax
	movzbl	%bh, %ecx
	orl	%eax, %ecx
	movq	(%r13), %rax
	movl	%ecx, 8(%rax)
	movq	_MMC_RES@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%r15), %rdi
	callq	_readl
	movl	%eax, %r12d
	movq	_MMC_RES@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%r15), %rdi
	callq	_readl
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	shll	$24, %ebx
	movzwl	%r12w, %ecx
	shll	$8, %ecx
	orl	%ebx, %ecx
	movzbl	%ah, %eax
	orl	%ecx, %eax
	movq	(%r13), %rcx
	movl	%eax, 12(%rcx)
	movq	_STAT_TIME_OUT_RESPONSE@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, 12(%r13)
LBB0_11:
	movq	_END_CMD_RES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_pxamci_disable_irq
	cmpq	$0, 8(%r15)
	je	LBB0_16
## %bb.12:
	cmpl	$0, 12(%r13)
	je	LBB0_13
LBB0_16:
	movl	(%r15), %esi
	movq	%r15, %rdi
	callq	_pxamci_finish_request
	movl	$1, %ebx
	jmp	LBB0_17
LBB0_1:
	xorl	%ebx, %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_STAT_RES_CRC_ERR@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_11
## %bb.5:
	movq	_MMC_RSP_CRC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r13)
	je	LBB0_11
## %bb.6:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_cpu_is_pxa27x
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	_MMC_RSP_136@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r13)
	je	LBB0_10
## %bb.8:
	movq	(%r13), %rax
	cmpl	$0, (%rax)
	js	LBB0_9
LBB0_10:
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, 12(%r13)
	jmp	LBB0_11
LBB0_13:
	movq	_DATA_TRAN_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_pxamci_enable_irq
	xorl	%eax, %eax
	callq	_cpu_is_pxa27x
	movl	$1, %ebx
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:
	movq	8(%r15), %rax
	movq	_MMC_DATA_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_17
## %bb.15:
	movl	4(%r15), %edi
	callq	_dma_async_issue_pending
	jmp	LBB0_17
LBB0_9:
	movl	16(%r13), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_RES,8,3                    ## @MMC_RES
	.comm	_STAT_TIME_OUT_RESPONSE,4,2     ## @STAT_TIME_OUT_RESPONSE
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_STAT_RES_CRC_ERR,4,2           ## @STAT_RES_CRC_ERR
	.comm	_MMC_RSP_CRC,4,2                ## @MMC_RSP_CRC
	.comm	_MMC_RSP_136,4,2                ## @MMC_RSP_136
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ignoring CRC from command %d - *risky*\n"

	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.comm	_END_CMD_RES,4,2                ## @END_CMD_RES
	.comm	_DATA_TRAN_DONE,4,2             ## @DATA_TRAN_DONE
	.comm	_MMC_DATA_WRITE,4,2             ## @MMC_DATA_WRITE
	.no_dead_strip	_pxamci_cmd_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pxamci_cmd_done
_pxamci_cmd_done:                       ; @pxamci_cmd_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
	ldr	x24, [x0, #24]
	cbz	x24, LBB0_8
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	str	xzr, [x0, #24]
	ldr	x8, [x0, #16]
Lloh0:
	adrp	x25, _MMC_RES@GOTPAGE
Lloh1:
	ldr	x25, [x25, _MMC_RES@GOTPAGEOFF]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	ldr	x8, [x19, #16]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
	mov	x22, x0
	ldr	x8, [x19, #16]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
	mov	x23, x0
	lsl	w8, w21, #24
	bfi	w8, w22, #8, #16
	bfxil	w8, w0, #8, #8
	ldr	x9, [x24]
	str	w8, [x9]
	ldr	x8, [x19, #16]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	ldr	x8, [x19, #16]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
	mov	x22, x0
	lsl	w8, w23, #24
	bfi	w8, w21, #8, #16
	bfxil	w8, w0, #8, #8
	ldr	x9, [x24]
	str	w8, [x9, #4]
	ldr	x8, [x19, #16]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	ldr	x8, [x19, #16]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
	mov	x23, x0
	lsl	w8, w22, #24
	bfi	w8, w21, #8, #16
	bfxil	w8, w0, #8, #8
	ldr	x9, [x24]
	str	w8, [x9, #8]
	ldr	x8, [x19, #16]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	ldr	x8, [x19, #16]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
	lsl	w8, w23, #24
	bfi	w8, w21, #8, #16
	bfxil	w8, w0, #8, #8
	ldr	x9, [x24]
	str	w8, [x9, #12]
Lloh2:
	adrp	x8, _STAT_TIME_OUT_RESPONSE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _STAT_TIME_OUT_RESPONSE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_10
; %bb.2:
Lloh5:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x24, #12]
LBB0_4:
Lloh7:
	adrp	x8, _END_CMD_RES@GOTPAGE
Lloh8:
	ldr	x8, [x8, _END_CMD_RES@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pxamci_disable_irq
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	w8, [x24, #12]
	cbz	w8, LBB0_16
LBB0_6:
	ldr	w1, [x19]
	mov	x0, x19
	bl	_pxamci_finish_request
LBB0_7:
	mov	w0, #1
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	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_10:
Lloh10:
	adrp	x8, _STAT_RES_CRC_ERR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _STAT_RES_CRC_ERR@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_4
; %bb.11:
	ldr	w8, [x24, #8]
Lloh13:
	adrp	x9, _MMC_RSP_CRC@GOTPAGE
Lloh14:
	ldr	x9, [x9, _MMC_RSP_CRC@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.12:
	bl	_cpu_is_pxa27x
	cbz	x0, LBB0_15
; %bb.13:
	ldr	w8, [x24, #8]
Lloh16:
	adrp	x9, _MMC_RSP_136@GOTPAGE
Lloh17:
	ldr	x9, [x9, _MMC_RSP_136@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.14:
	ldr	x8, [x24]
	ldr	w8, [x8]
	tbnz	w8, #31, LBB0_19
LBB0_15:
Lloh19:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
	b	LBB0_3
LBB0_16:
Lloh21:
	adrp	x8, _DATA_TRAN_DONE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _DATA_TRAN_DONE@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pxamci_enable_irq
	bl	_cpu_is_pxa27x
	cbz	x0, LBB0_7
; %bb.17:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _MMC_DATA_WRITE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _MMC_DATA_WRITE@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.18:
	ldr	w0, [x19, #4]
	bl	_dma_async_issue_pending
	b	LBB0_7
LBB0_19:
	ldr	w1, [x24, #16]
Lloh27:
	adrp	x0, l_.str@PAGE
Lloh28:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_RES,8,3                    ; @MMC_RES
	.comm	_STAT_TIME_OUT_RESPONSE,4,2     ; @STAT_TIME_OUT_RESPONSE
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_STAT_RES_CRC_ERR,4,2           ; @STAT_RES_CRC_ERR
	.comm	_MMC_RSP_CRC,4,2                ; @MMC_RSP_CRC
	.comm	_MMC_RSP_136,4,2                ; @MMC_RSP_136
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ignoring CRC from command %d - *risky*\n"

	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.comm	_END_CMD_RES,4,2                ; @END_CMD_RES
	.comm	_DATA_TRAN_DONE,4,2             ; @DATA_TRAN_DONE
	.comm	_MMC_DATA_WRITE,4,2             ; @MMC_DATA_WRITE
	.no_dead_strip	_pxamci_cmd_done
.subsections_via_symbols
