	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_hsmmc_disabled_to_sleep
_omap_hsmmc_disabled_to_sleep:          ## @omap_hsmmc_disabled_to_sleep
	.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
	subq	$120, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rdi
	callq	_mmc_try_claim_host
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_12
## %bb.1:
	movl	24(%rbx), %edi
	callq	_clk_enable
	movq	%rbx, %rdi
	callq	_omap_hsmmc_context_restore
	movq	16(%rbx), %rdi
	callq	_mmc_card_can_sleep
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	16(%rbx), %rdi
	callq	_mmc_card_sleep
	testl	%eax, %eax
	js	LBB0_13
## %bb.4:
	movq	_CARDSLEEP@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	movq	_REGSLEEP@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %r15d
	leaq	-144(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_mmc_slot
	cmpq	$0, -128(%rbp)
	je	LBB0_7
## %bb.6:
	leaq	-120(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_mmc_slot
	movl	4(%rbx), %esi
	movl	8(%rbx), %edi
	movq	_CARDSLEEP@GOTPCREL(%rip), %rax
	xorl	%r8d, %r8d
	cmpl	(%rax), %r15d
	sete	%r8b
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	*-104(%rbp)
LBB0_7:
	movl	24(%rbx), %edi
	callq	_clk_disable
	movl	%r15d, (%rbx)
	movq	16(%rbx), %rdi
	callq	_mmc_release_host
	movq	16(%rbx), %rdi
	callq	_mmc_dev
	movl	(%rbx), %ecx
	movq	_CARDSLEEP@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	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	16(%rbx), %rax
	movq	_MMC_CAP_NONREMOVABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_11
## %bb.8:
	leaq	-96(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_mmc_slot
	cmpq	$0, -88(%rbp)
	je	LBB0_9
LBB0_11:
	movq	_OMAP_MMC_OFF_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movl	%eax, %r14d
	jmp	LBB0_12
LBB0_13:
	movl	%eax, %r15d
	movl	24(%rbx), %edi
	callq	_clk_disable
	movq	16(%rbx), %rdi
	callq	_mmc_release_host
	movl	%r15d, %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	leaq	-72(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_mmc_slot
	cmpq	$0, -72(%rbp)
	je	LBB0_12
## %bb.10:
	leaq	-48(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_mmc_slot
	movl	4(%rbx), %esi
	movl	8(%rbx), %edi
	callq	*-48(%rbp)
	testq	%rax, %rax
	jne	LBB0_11
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_CARDSLEEP,4,2                  ## @CARDSLEEP
	.comm	_REGSLEEP,4,2                   ## @REGSLEEP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DISABLED -> %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"CARDSLEEP"

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

	.comm	_MMC_CAP_NONREMOVABLE,4,2       ## @MMC_CAP_NONREMOVABLE
	.comm	_OMAP_MMC_OFF_TIMEOUT,4,2       ## @OMAP_MMC_OFF_TIMEOUT
	.no_dead_strip	_omap_hsmmc_disabled_to_sleep
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_hsmmc_disabled_to_sleep
_omap_hsmmc_disabled_to_sleep:          ; @omap_hsmmc_disabled_to_sleep
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x0, [x0, #16]
	bl	_mmc_try_claim_host
	cbz	w0, LBB0_13
; %bb.1:
	ldr	w0, [x19, #24]
	bl	_clk_enable
	mov	x0, x19
	bl	_omap_hsmmc_context_restore
	ldr	x0, [x19, #16]
	bl	_mmc_card_can_sleep
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x0, [x19, #16]
	bl	_mmc_card_sleep
	tbnz	w0, #31, LBB0_10
; %bb.3:
Lloh0:
	adrp	x8, _CARDSLEEP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CARDSLEEP@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, _REGSLEEP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _REGSLEEP@GOTPAGEOFF]
LBB0_5:
Lloh4:
	adrp	x20, _CARDSLEEP@GOTPAGE
Lloh5:
	ldr	x20, [x20, _CARDSLEEP@GOTPAGEOFF]
	ldr	w21, [x8]
	sub	x8, x29, #56
	mov	x0, x19
	bl	_mmc_slot
	ldur	x8, [x29, #-40]
	cbz	x8, LBB0_7
; %bb.6:
	add	x8, sp, #80
	mov	x0, x19
	bl	_mmc_slot
	ldr	x8, [sp, #96]
	ldp	w1, w0, [x19, #4]
	ldr	w9, [x20]
	cmp	w21, w9
	cset	w4, eq
	mov	w2, #1
	mov	w3, #0
	blr	x8
LBB0_7:
	ldr	w0, [x19, #24]
	bl	_clk_disable
	str	w21, [x19]
	ldr	x0, [x19, #16]
	bl	_mmc_release_host
	ldr	x0, [x19, #16]
	bl	_mmc_dev
	ldr	w8, [x19]
	ldr	w9, [x20]
Lloh6:
	adrp	x10, l_.str.2@PAGE
Lloh7:
	add	x10, x10, l_.str.2@PAGEOFF
Lloh8:
	adrp	x11, l_.str.1@PAGE
Lloh9:
	add	x11, x11, l_.str.1@PAGEOFF
	cmp	w8, w9
	csel	x2, x11, x10, eq
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _MMC_CAP_NONREMOVABLE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MMC_CAP_NONREMOVABLE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_9
; %bb.8:
	add	x8, sp, #56
	mov	x0, x19
	bl	_mmc_slot
	ldr	x8, [sp, #64]
	cbz	x8, LBB0_11
LBB0_9:
Lloh15:
	adrp	x8, _OMAP_MMC_OFF_TIMEOUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _OMAP_MMC_OFF_TIMEOUT@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x20, x0
	b	LBB0_14
LBB0_10:
	mov	x20, x0
	ldr	w0, [x19, #24]
	bl	_clk_disable
	ldr	x0, [x19, #16]
	bl	_mmc_release_host
	b	LBB0_14
LBB0_11:
	add	x8, sp, #32
	mov	x0, x19
	bl	_mmc_slot
	ldr	x8, [sp, #32]
	cbz	x8, LBB0_13
; %bb.12:
	add	x8, sp, #8
	mov	x0, x19
	bl	_mmc_slot
	ldr	x8, [sp, #8]
	ldp	w1, w0, [x19, #4]
	blr	x8
	cbnz	x0, LBB0_9
LBB0_13:
	mov	w20, #0
LBB0_14:
	mov	x0, x20
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_CARDSLEEP,4,2                  ; @CARDSLEEP
	.comm	_REGSLEEP,4,2                   ; @REGSLEEP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DISABLED -> %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"CARDSLEEP"

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

	.comm	_MMC_CAP_NONREMOVABLE,4,2       ; @MMC_CAP_NONREMOVABLE
	.comm	_OMAP_MMC_OFF_TIMEOUT,4,2       ; @OMAP_MMC_OFF_TIMEOUT
	.no_dead_strip	_omap_hsmmc_disabled_to_sleep
.subsections_via_symbols
