	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xenon_enable_internal_clk
_xenon_enable_internal_clk:             ## @xenon_enable_internal_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_CONTROL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_sdhci_readl
	movq	_SDHCI_CLOCK_INT_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r13), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_sdhci_writel
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	movl	$20, %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	(%r13), %esi
	movq	%r14, %rdi
	callq	_sdhci_readw
	movq	_SDHCI_CLOCK_INT_STABLE@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	jne	LBB0_5
## %bb.1:
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	testl	%ebx, %ebx
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$900, %edi                      ## imm = 0x384
	movl	$1100, %esi                     ## imm = 0x44C
	callq	_usleep_range
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_ktime_after
	movl	%eax, %ebx
	movq	_SDHCI_CLOCK_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_sdhci_readw
	testl	%eax, (%r13)
	je	LBB0_2
	jmp	LBB0_5
LBB0_3:
	movl	(%r14), %edi
	callq	_mmc_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_5:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDHCI_CLOCK_CONTROL,4,2        ## @SDHCI_CLOCK_CONTROL
	.comm	_SDHCI_CLOCK_INT_EN,4,2         ## @SDHCI_CLOCK_INT_EN
	.comm	_SDHCI_CLOCK_INT_STABLE,4,2     ## @SDHCI_CLOCK_INT_STABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Internal clock never stabilised.\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_xenon_enable_internal_clk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xenon_enable_internal_clk
_xenon_enable_internal_clk:             ; @xenon_enable_internal_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	x22, _SDHCI_CLOCK_CONTROL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SDHCI_CLOCK_CONTROL@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_sdhci_readl
Lloh2:
	adrp	x8, _SDHCI_CLOCK_INT_EN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SDHCI_CLOCK_INT_EN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w2, [x22]
	mov	x0, x19
	bl	_sdhci_writel
	bl	_ktime_get
	mov	w1, #20
	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_5
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #900
	mov	w1, #1100
	bl	_usleep_range
	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:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	ldr	w0, [x19]
	bl	_mmc_dev
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh9:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SDHCI_CLOCK_CONTROL,4,2        ; @SDHCI_CLOCK_CONTROL
	.comm	_SDHCI_CLOCK_INT_EN,4,2         ; @SDHCI_CLOCK_INT_EN
	.comm	_SDHCI_CLOCK_INT_STABLE,4,2     ; @SDHCI_CLOCK_INT_STABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Internal clock never stabilised.\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_xenon_enable_internal_clk
.subsections_via_symbols
