	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sunxi_mmc_handle_manual_stop
_sunxi_mmc_handle_manual_stop:          ## @sunxi_mmc_handle_manual_stop
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	leaq	4(%rsi), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	8(%rbx), %r14
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %edi
	callq	_mmc_dev
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_sunxi_mmc_send_manual_stop
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	$0, 8(%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movl	(%rbx), %edi
	movq	%r14, %rsi
	callq	_mmc_request_done
	jmp	LBB0_3
LBB0_1:
	movl	(%rbx), %edi
	callq	_mmc_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
LBB0_3:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no request for manual stop\n"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
L_.str.1:                               ## @.str.1
	.asciz	"data error, sending stop command\n"

	.no_dead_strip	_sunxi_mmc_handle_manual_stop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sunxi_mmc_handle_manual_stop
_sunxi_mmc_handle_manual_stop:          ; @sunxi_mmc_handle_manual_stop
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	add	x21, x1, #4
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x20, [x19, #8]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	cbz	x20, LBB0_2
; %bb.1:
	ldr	w0, [x19]
	bl	_mmc_dev
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	mov	x0, x19
	mov	x1, x20
	bl	_sunxi_mmc_send_manual_stop
	mov	x0, x21
	bl	_spin_lock_irqsave
	str	xzr, [x19, #8]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	w0, [x19]
	mov	x1, x20
	bl	_mmc_request_done
	b	LBB0_3
LBB0_2:
	ldr	w0, [x19]
	bl	_mmc_dev
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_3:
Lloh4:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no request for manual stop\n"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
l_.str.1:                               ; @.str.1
	.asciz	"data error, sending stop command\n"

	.no_dead_strip	_sunxi_mmc_handle_manual_stop
.subsections_via_symbols
