	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_arasan_set_clock
_sdhci_arasan_set_clock:                ## @sdhci_arasan_set_clock
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_sdhci_priv
	movq	%rax, %rdi
	callq	_sdhci_pltfm_priv
	movq	%rax, %rbx
	movl	8(%rax), %edi
	callq	_IS_ERR
	movb	$1, %r12b
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movl	(%rbx), %eax
	testl	%eax, %eax
	setne	%dl
	movq	_PHY_CLK_TOO_SLOW_HZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%r14d, %ecx
	setb	%r13b
	orb	%dl, %r13b
	je	LBB0_2
## %bb.3:
	cmpl	%r14d, %ecx
	jae	LBB0_7
## %bb.4:
	xorl	%r12d, %r12d
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	8(%rbx), %edi
	callq	_phy_power_off
	jmp	LBB0_6
LBB0_2:
	movl	(%r15), %esi
	movq	%r15, %rdi
	callq	_sdhci_set_clock
	movl	8(%rbx), %edi
	callq	_phy_power_on
	movl	$1, %r12d
LBB0_6:
	xorb	$1, %r13b
	movl	%r12d, (%rbx)
	movl	%r13d, %r12d
LBB0_7:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_sdhci_set_clock
	movq	_SDHCI_ARASAN_QUIRK_CLOCK_UNSTABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	je	LBB0_9
## %bb.8:
	movl	$20, %edi
	callq	_msleep
LBB0_9:
	testb	%r12b, %r12b
	jne	LBB0_11
## %bb.10:
	movl	8(%rbx), %edi
	callq	_phy_power_on
	movl	$1, (%rbx)
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_CLK_TOO_SLOW_HZ,4,2        ## @PHY_CLK_TOO_SLOW_HZ
	.comm	_SDHCI_ARASAN_QUIRK_CLOCK_UNSTABLE,4,2 ## @SDHCI_ARASAN_QUIRK_CLOCK_UNSTABLE
	.no_dead_strip	_sdhci_arasan_set_clock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdhci_arasan_set_clock
_sdhci_arasan_set_clock:                ; @sdhci_arasan_set_clock
	.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	x20, x1
	mov	x21, x0
	bl	_sdhci_priv
	bl	_sdhci_pltfm_priv
	mov	x19, x0
	ldr	w0, [x0, #8]
	bl	_IS_ERR
	cbz	w0, LBB0_2
LBB0_1:
	mov	w22, #1
	b	LBB0_8
LBB0_2:
	ldr	w8, [x19]
	cmp	w8, #0
Lloh0:
	adrp	x9, _PHY_CLK_TOO_SLOW_HZ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PHY_CLK_TOO_SLOW_HZ@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ccmp	w9, w20, #0, eq
	cset	w22, lo
	b.hs	LBB0_6
; %bb.3:
	cmp	w9, w20
	b.hs	LBB0_1
; %bb.4:
	cbz	w8, LBB0_13
; %bb.5:
	ldr	w0, [x19, #8]
	bl	_phy_power_off
	mov	w8, #0
	b	LBB0_7
LBB0_6:
	ldr	w1, [x21]
	mov	x0, x21
	bl	_sdhci_set_clock
	ldr	w0, [x19, #8]
	bl	_phy_power_on
	mov	w8, #1
LBB0_7:
	eor	w22, w22, #0x1
	str	w8, [x19]
LBB0_8:
	mov	x0, x21
	mov	x1, x20
	bl	_sdhci_set_clock
	ldr	w8, [x19, #4]
Lloh3:
	adrp	x9, _SDHCI_ARASAN_QUIRK_CLOCK_UNSTABLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SDHCI_ARASAN_QUIRK_CLOCK_UNSTABLE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
	mov	w0, #20
	bl	_msleep
LBB0_10:
	tbnz	w22, #0, LBB0_12
; %bb.11:
	ldr	w0, [x19, #8]
	bl	_phy_power_on
	mov	w8, #1
	str	w8, [x19]
LBB0_12:
	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_13:
	mov	w22, #0
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_CLK_TOO_SLOW_HZ,4,2        ; @PHY_CLK_TOO_SLOW_HZ
	.comm	_SDHCI_ARASAN_QUIRK_CLOCK_UNSTABLE,4,2 ; @SDHCI_ARASAN_QUIRK_CLOCK_UNSTABLE
	.no_dead_strip	_sdhci_arasan_set_clock
.subsections_via_symbols
