	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_sdio_detect
_mmc_sdio_detect:                       ## @mmc_sdio_detect
	.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	%rdi, %rbx
	movq	_MMC_CAP_POWER_OFF_CARD@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, (%rdi)
	je	LBB0_4
## %bb.1:
	movq	8(%rbx), %rdi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_2
LBB0_4:
	movq	%rbx, %rdi
	callq	_mmc_claim_host
	movq	%rbx, %rdi
	callq	__mmc_detect_card_removed
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_mmc_release_host
	movl	(%r15), %eax
	testl	%eax, (%rbx)
	je	LBB0_6
## %bb.5:
	movq	8(%rbx), %rdi
	callq	_pm_runtime_put_sync
LBB0_6:
	testl	%r14d, %r14d
	jne	LBB0_3
## %bb.7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	8(%rbx), %rdi
	callq	_pm_runtime_put_noidle
LBB0_3:
	movq	%rbx, %rdi
	callq	_mmc_sdio_remove
	movq	%rbx, %rdi
	callq	_mmc_claim_host
	movq	%rbx, %rdi
	callq	_mmc_detach_bus
	movq	%rbx, %rdi
	callq	_mmc_power_off
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mmc_release_host               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_CAP_POWER_OFF_CARD,4,2     ## @MMC_CAP_POWER_OFF_CARD
	.no_dead_strip	_mmc_sdio_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_sdio_detect
_mmc_sdio_detect:                       ; @mmc_sdio_detect
	.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, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x21, _MMC_CAP_POWER_OFF_CARD@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MMC_CAP_POWER_OFF_CARD@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	x0, [x19, #8]
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_6
LBB0_2:
	mov	x0, x19
	bl	_mmc_claim_host
	mov	x0, x19
	bl	__mmc_detect_card_removed
	mov	x20, x0
	mov	x0, x19
	bl	_mmc_release_host
	ldr	w8, [x19]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	ldr	x0, [x19, #8]
	bl	_pm_runtime_put_sync
LBB0_4:
	cbnz	w20, LBB0_7
; %bb.5:
	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
LBB0_6:
	ldr	x0, [x19, #8]
	bl	_pm_runtime_put_noidle
LBB0_7:
	mov	x0, x19
	bl	_mmc_sdio_remove
	mov	x0, x19
	bl	_mmc_claim_host
	mov	x0, x19
	bl	_mmc_detach_bus
	mov	x0, x19
	bl	_mmc_power_off
	mov	x0, x19
	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
	b	_mmc_release_host
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_CAP_POWER_OFF_CARD,4,2     ; @MMC_CAP_POWER_OFF_CARD
	.no_dead_strip	_mmc_sdio_detect
.subsections_via_symbols
