	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_hsmmc_sleep_to_off
_omap_hsmmc_sleep_to_off:               ## @omap_hsmmc_sleep_to_off
	.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
	subq	$104, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	callq	_mmc_try_claim_host
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	movq	8(%rbx), %rax
	movq	_MMC_CAP_NONREMOVABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_5
## %bb.2:
	leaq	-104(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_mmc_slot
	cmpq	$0, -88(%rbp)
	je	LBB0_3
LBB0_5:
	leaq	-32(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_mmc_slot
	movl	32(%rbx), %esi
	movl	36(%rbx), %edi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	*-32(%rbp)
	movq	$0, 24(%rbx)
	movq	_MMC_POWER_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	8(%rbx), %rdi
	callq	_mmc_dev
	movq	(%rbx), %rcx
	movq	_CARDSLEEP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	leaq	L_.str.1(%rip), %rcx
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rcx, %rdx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg
	movq	_OFF@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
LBB0_6:
	movq	8(%rbx), %rdi
	callq	_mmc_release_host
LBB0_7:
	xorl	%eax, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_3:
	leaq	-80(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_mmc_slot
	cmpq	$0, -72(%rbp)
	je	LBB0_6
## %bb.4:
	leaq	-56(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_mmc_slot
	movl	32(%rbx), %esi
	movl	36(%rbx), %edi
	callq	*-48(%rbp)
	testq	%rax, %rax
	jne	LBB0_5
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_CAP_NONREMOVABLE,4,2       ## @MMC_CAP_NONREMOVABLE
	.comm	_MMC_POWER_OFF,4,2              ## @MMC_POWER_OFF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s -> OFF\n"

	.comm	_CARDSLEEP,8,3                  ## @CARDSLEEP
L_.str.1:                               ## @.str.1
	.asciz	"CARDSLEEP"

L_.str.2:                               ## @.str.2
	.asciz	"REGSLEEP"

	.comm	_OFF,8,3                        ## @OFF
	.no_dead_strip	_omap_hsmmc_sleep_to_off
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_hsmmc_sleep_to_off
_omap_hsmmc_sleep_to_off:               ; @omap_hsmmc_sleep_to_off
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x0, [x0, #8]
	bl	_mmc_try_claim_host
	cbz	w0, LBB0_5
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _MMC_CAP_NONREMOVABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMC_CAP_NONREMOVABLE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.2:
	sub	x8, x29, #40
	mov	x0, x19
	bl	_mmc_slot
	ldur	x8, [x29, #-24]
	cbz	x8, LBB0_6
LBB0_3:
	mov	x8, sp
	mov	x0, x19
	bl	_mmc_slot
	ldr	x8, [sp]
	ldp	w1, w0, [x19, #32]
	mov	w2, #0
	mov	w3, #0
	blr	x8
	str	xzr, [x19, #24]
Lloh3:
	adrp	x8, _MMC_POWER_OFF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MMC_POWER_OFF@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	x0, [x19, #8]
	bl	_mmc_dev
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _CARDSLEEP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CARDSLEEP@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, l_.str.2@PAGE
Lloh10:
	add	x10, x10, l_.str.2@PAGEOFF
Lloh11:
	adrp	x11, l_.str.1@PAGE
Lloh12:
	add	x11, x11, l_.str.1@PAGEOFF
	cmp	x8, x9
	csel	x2, x11, x10, eq
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh15:
	adrp	x8, _OFF@GOTPAGE
Lloh16:
	ldr	x8, [x8, _OFF@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_4:
	ldr	x0, [x19, #8]
	bl	_mmc_release_host
LBB0_5:
	mov	w0, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_6:
	add	x8, sp, #48
	mov	x0, x19
	bl	_mmc_slot
	ldr	x8, [sp, #56]
	cbz	x8, LBB0_4
; %bb.7:
	add	x8, sp, #24
	mov	x0, x19
	bl	_mmc_slot
	ldr	x8, [sp, #32]
	ldp	w1, w0, [x19, #32]
	blr	x8
	cbnz	x0, LBB0_3
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_CAP_NONREMOVABLE,4,2       ; @MMC_CAP_NONREMOVABLE
	.comm	_MMC_POWER_OFF,4,2              ; @MMC_POWER_OFF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s -> OFF\n"

	.comm	_CARDSLEEP,8,3                  ; @CARDSLEEP
l_.str.1:                               ; @.str.1
	.asciz	"CARDSLEEP"

l_.str.2:                               ; @.str.2
	.asciz	"REGSLEEP"

	.comm	_OFF,8,3                        ; @OFF
	.no_dead_strip	_omap_hsmmc_sleep_to_off
.subsections_via_symbols
