	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdhci_enable_clk               ## -- Begin function sdhci_enable_clk
	.p2align	4, 0x90
_sdhci_enable_clk:                      ## @sdhci_enable_clk
	.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
	movq	%rdi, %r14
	movq	_SDHCI_CLOCK_INT_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_SDHCI_CLOCK_CONTROL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	callq	_sdhci_writew
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	movl	$150, %esi
	callq	_ktime_add_ms
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_ktime_after
	movl	%eax, %ebx
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_sdhci_readw
	movq	_SDHCI_CLOCK_INT_STABLE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	testl	%eax, %esi
	jne	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%ebx, %ebx
	jne	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$10, %edi
	callq	_udelay
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_ktime_after
	movl	%eax, %ebx
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_sdhci_readw
	jmp	LBB0_1
LBB0_6:
	movq	(%r14), %rcx
	movq	_SDHCI_SPEC_410@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jl	LBB0_13
## %bb.7:
	cmpq	$0, 16(%r14)
	je	LBB0_13
## %bb.8:
	movq	_SDHCI_CLOCK_PLL_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	notl	%esi
	andl	%eax, %esi
	movl	(%r12), %edx
	movq	%r14, %rdi
	callq	_sdhci_writew
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	movl	$150, %esi
	callq	_ktime_add_ms
	movl	%eax, %r15d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_ktime_after
	movl	%eax, %ebx
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_sdhci_readw
	testl	%eax, (%r13)
	jne	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	testl	%ebx, %ebx
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	$10, %edi
	callq	_udelay
	jmp	LBB0_9
LBB0_13:
	movq	_SDHCI_CLOCK_CARD_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r12), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdhci_writew                   ## TAILCALL
LBB0_3:
	movl	8(%r14), %edi
	callq	_mmc_hostname
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_4
LBB0_11:
	movl	8(%r14), %edi
	callq	_mmc_hostname
	leaq	L_.str.1(%rip), %rdi
LBB0_4:
	movl	%eax, %esi
	callq	_pr_err
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdhci_dumpregs                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SDHCI_CLOCK_INT_EN,4,2         ## @SDHCI_CLOCK_INT_EN
	.comm	_SDHCI_CLOCK_CONTROL,4,2        ## @SDHCI_CLOCK_CONTROL
	.comm	_SDHCI_CLOCK_INT_STABLE,4,2     ## @SDHCI_CLOCK_INT_STABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Internal clock never stabilised.\n"

	.comm	_SDHCI_SPEC_410,8,3             ## @SDHCI_SPEC_410
	.comm	_SDHCI_CLOCK_PLL_EN,4,2         ## @SDHCI_CLOCK_PLL_EN
L_.str.1:                               ## @.str.1
	.asciz	"%s: PLL clock never stabilised.\n"

	.comm	_SDHCI_CLOCK_CARD_EN,4,2        ## @SDHCI_CLOCK_CARD_EN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdhci_enable_clk               ; -- Begin function sdhci_enable_clk
	.p2align	2
_sdhci_enable_clk:                      ; @sdhci_enable_clk
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, _SDHCI_CLOCK_INT_EN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDHCI_CLOCK_INT_EN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w1, w8, w1
Lloh3:
	adrp	x22, _SDHCI_CLOCK_CONTROL@GOTPAGE
Lloh4:
	ldr	x22, [x22, _SDHCI_CLOCK_CONTROL@GOTPAGEOFF]
	ldr	w2, [x22]
	bl	_sdhci_writew
	bl	_ktime_get
	mov	w1, #150
	bl	_ktime_add_ms
	mov	x20, x0
	bl	_ktime_get
	mov	x1, x20
	bl	_ktime_after
	mov	x21, x0
	ldr	w1, [x22]
	mov	x0, x19
	bl	_sdhci_readw
Lloh5:
	adrp	x23, _SDHCI_CLOCK_INT_STABLE@GOTPAGE
Lloh6:
	ldr	x23, [x23, _SDHCI_CLOCK_INT_STABLE@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cbnz	w21, LBB0_11
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #10
	bl	_udelay
	bl	_ktime_get
	mov	x1, x20
	bl	_ktime_after
	mov	x21, x0
	ldr	w1, [x22]
	mov	x0, x19
	bl	_sdhci_readw
	b	LBB0_1
LBB0_4:
	ldr	x9, [x19]
Lloh7:
	adrp	x10, _SDHCI_SPEC_410@GOTPAGE
Lloh8:
	ldr	x10, [x10, _SDHCI_SPEC_410@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
	cmp	x9, x10
	b.lt	LBB0_10
; %bb.5:
	ldr	x9, [x19, #16]
	cbz	x9, LBB0_10
; %bb.6:
Lloh10:
	adrp	x9, _SDHCI_CLOCK_PLL_EN@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SDHCI_CLOCK_PLL_EN@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w9, w9, w0
	bic	w1, w9, w8
	ldr	w2, [x22]
	mov	x0, x19
	bl	_sdhci_writew
	bl	_ktime_get
	mov	w1, #150
	bl	_ktime_add_ms
	mov	x20, x0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	bl	_ktime_get
	mov	x1, x20
	bl	_ktime_after
	mov	x21, x0
	ldr	w1, [x22]
	mov	x0, x19
	bl	_sdhci_readw
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cbnz	w21, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w0, #10
	bl	_udelay
	b	LBB0_7
LBB0_10:
Lloh13:
	adrp	x8, _SDHCI_CLOCK_CARD_EN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SDHCI_CLOCK_CARD_EN@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w2, [x22]
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_sdhci_writew
LBB0_11:
	ldr	w0, [x19, #8]
	bl	_mmc_hostname
	mov	x1, x0
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_13
LBB0_12:
	ldr	w0, [x19, #8]
	bl	_mmc_hostname
	mov	x1, x0
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_13:
	bl	_pr_err
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_sdhci_dumpregs
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_SDHCI_CLOCK_INT_EN,4,2         ; @SDHCI_CLOCK_INT_EN
	.comm	_SDHCI_CLOCK_CONTROL,4,2        ; @SDHCI_CLOCK_CONTROL
	.comm	_SDHCI_CLOCK_INT_STABLE,4,2     ; @SDHCI_CLOCK_INT_STABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Internal clock never stabilised.\n"

	.comm	_SDHCI_SPEC_410,8,3             ; @SDHCI_SPEC_410
	.comm	_SDHCI_CLOCK_PLL_EN,4,2         ; @SDHCI_CLOCK_PLL_EN
l_.str.1:                               ; @.str.1
	.asciz	"%s: PLL clock never stabilised.\n"

	.comm	_SDHCI_CLOCK_CARD_EN,4,2        ; @SDHCI_CLOCK_CARD_EN
.subsections_via_symbols
