	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_stop_host                  ## -- Begin function mmc_stop_host
	.p2align	4, 0x90
_mmc_stop_host:                         ## @mmc_stop_host
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	cmpq	$0, 40(%rdi)
	js	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_mmc_gpio_set_cd_wake
	movq	40(%rbx), %rdi
	callq	_disable_irq
LBB0_2:
	movl	$1, (%rbx)
	leaq	32(%rbx), %rdi
	callq	_cancel_delayed_work_sync
	movq	$0, 24(%rbx)
	movq	%rbx, %rdi
	callq	_mmc_bus_get
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	cmpl	$0, 16(%rbx)
	je	LBB0_4
LBB0_5:
	movq	%rbx, %rdi
	callq	_mmc_bus_put
	movq	%rbx, %rdi
	callq	_mmc_claim_host
	movq	%rbx, %rdi
	callq	_mmc_power_off
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_mmc_release_host               ## TAILCALL
LBB0_4:
	movq	%rbx, %rdi
	callq	*(%rax)
	movq	%rbx, %rdi
	callq	_mmc_claim_host
	movq	%rbx, %rdi
	callq	_mmc_detach_bus
	movq	%rbx, %rdi
	callq	_mmc_power_off
	movq	%rbx, %rdi
	callq	_mmc_release_host
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_mmc_bus_put                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_stop_host                  ; -- Begin function mmc_stop_host
	.p2align	2
_mmc_stop_host:                         ; @mmc_stop_host
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #40]
	tbnz	x8, #63, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	bl	_mmc_gpio_set_cd_wake
	ldr	x0, [x19, #40]
	bl	_disable_irq
LBB0_2:
	mov	w8, #1
	str	w8, [x19]
	add	x0, x19, #32
	bl	_cancel_delayed_work_sync
	str	xzr, [x19, #24]
	mov	x0, x19
	bl	_mmc_bus_get
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w9, [x19, #16]
	cbz	w9, LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_mmc_bus_put
	mov	x0, x19
	bl	_mmc_claim_host
	mov	x0, x19
	bl	_mmc_power_off
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mmc_release_host
LBB0_5:
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	mov	x0, x19
	bl	_mmc_claim_host
	mov	x0, x19
	bl	_mmc_detach_bus
	mov	x0, x19
	bl	_mmc_power_off
	mov	x0, x19
	bl	_mmc_release_host
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mmc_bus_put
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
