	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_cmu_set_clock
_sdhci_cmu_set_clock:                   ## @sdhci_cmu_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, %r15d
	movq	%rdi, %r14
	callq	_to_s3c
	movq	%rax, %r12
	movq	16(%rax), %rcx
	movq	(%r14), %rax
	movq	$0, (%rax)
	testl	%r15d, %r15d
	je	LBB0_1
## %bb.3:
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_sdhci_s3c_set_clock
	movq	_SDHCI_CLOCK_CONTROL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_sdhci_readw
	movq	_SDHCI_CLOCK_CARD_EN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%r13), %edx
	movq	%r14, %rdi
	callq	_sdhci_writew
	movq	(%r12), %rax
	movq	8(%r12), %rcx
	movl	(%rcx,%rax,4), %edi
	movl	%r15d, %esi
	callq	_clk_set_rate
	testl	%eax, %eax
	je	LBB0_4
## %bb.9:
	movq	(%r14), %rdi
	callq	_mmc_hostname
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_1:
	movq	_SDHCI_CLOCK_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	jmp	LBB0_2
LBB0_4:
	movq	%rbx, %r12
	movq	_SDHCI_CLOCK_INT_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	movq	%r14, %rdi
	callq	_sdhci_writew
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_sdhci_readw
	movq	_SDHCI_CLOCK_INT_STABLE@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	jne	LBB0_8
## %bb.5:
	movq	$-21, %rbx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	incq	%rbx
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edi
	callq	_mdelay
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_sdhci_readw
	testl	%eax, (%r15)
	je	LBB0_6
LBB0_8:
	orl	(%r12), %eax
	movl	(%r13), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdhci_writew                   ## TAILCALL
LBB0_10:
	movq	(%r14), %rdi
	callq	_mmc_hostname
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SDHCI_CLOCK_CONTROL,4,2        ## @SDHCI_CLOCK_CONTROL
	.comm	_SDHCI_CLOCK_CARD_EN,4,2        ## @SDHCI_CLOCK_CARD_EN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: failed to set clock rate %uHz\n"

	.comm	_SDHCI_CLOCK_INT_EN,4,2         ## @SDHCI_CLOCK_INT_EN
	.comm	_SDHCI_CLOCK_INT_STABLE,4,2     ## @SDHCI_CLOCK_INT_STABLE
L_.str.1:                               ## @.str.1
	.asciz	"%s: Internal clock never stabilised.\n"

	.no_dead_strip	_sdhci_cmu_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_cmu_set_clock
_sdhci_cmu_set_clock:                   ; @sdhci_cmu_set_clock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x1
	mov	x19, x0
	bl	_to_s3c
	ldr	x20, [x0, #16]
	ldr	x8, [x19]
	str	xzr, [x8]
	cbz	w21, LBB0_3
; %bb.1:
	mov	x22, x0
	mov	x0, x19
	mov	x1, x21
	bl	_sdhci_s3c_set_clock
Lloh0:
	adrp	x23, _SDHCI_CLOCK_CONTROL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SDHCI_CLOCK_CONTROL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_sdhci_readw
Lloh2:
	adrp	x24, _SDHCI_CLOCK_CARD_EN@GOTPAGE
Lloh3:
	ldr	x24, [x24, _SDHCI_CLOCK_CARD_EN@GOTPAGEOFF]
	ldr	w8, [x24]
	bic	w1, w0, w8
	ldr	w2, [x23]
	mov	x0, x19
	bl	_sdhci_writew
	ldp	x9, x8, [x22]
	ldr	w0, [x8, x9, lsl #2]
	mov	x1, x21
	bl	_clk_set_rate
	cbz	w0, LBB0_4
; %bb.2:
	ldr	x0, [x19]
	bl	_mmc_hostname
	mov	x2, x0
	str	x21, [sp]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_3:
Lloh6:
	adrp	x8, _SDHCI_CLOCK_CONTROL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SDHCI_CLOCK_CONTROL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	b	LBB0_9
LBB0_4:
Lloh9:
	adrp	x8, _SDHCI_CLOCK_INT_EN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SDHCI_CLOCK_INT_EN@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_sdhci_writew
	ldr	w1, [x23]
	mov	x0, x19
	bl	_sdhci_readw
Lloh12:
	adrp	x21, _SDHCI_CLOCK_INT_STABLE@GOTPAGE
Lloh13:
	ldr	x21, [x21, _SDHCI_CLOCK_INT_STABLE@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_8
; %bb.5:
	mov	x22, #-21
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	adds	x22, x22, #1
	b.hs	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x23]
	mov	x0, x19
	bl	_sdhci_readw
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_6
LBB0_8:
	ldr	w8, [x24]
	orr	w1, w8, w0
	ldr	w2, [x23]
	mov	x0, x19
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_sdhci_writew
LBB0_10:
	ldr	x0, [x19]
	bl	_mmc_hostname
	mov	x2, x0
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_dev_err
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_SDHCI_CLOCK_CONTROL,4,2        ; @SDHCI_CLOCK_CONTROL
	.comm	_SDHCI_CLOCK_CARD_EN,4,2        ; @SDHCI_CLOCK_CARD_EN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: failed to set clock rate %uHz\n"

	.comm	_SDHCI_CLOCK_INT_EN,4,2         ; @SDHCI_CLOCK_INT_EN
	.comm	_SDHCI_CLOCK_INT_STABLE,4,2     ; @SDHCI_CLOCK_INT_STABLE
l_.str.1:                               ; @.str.1
	.asciz	"%s: Internal clock never stabilised.\n"

	.no_dead_strip	_sdhci_cmu_set_clock
.subsections_via_symbols
