	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_at91_set_clock
_sdhci_at91_set_clock:                  ## @sdhci_at91_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	$0, (%rax)
	movq	_SDHCI_CLOCK_CONTROL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_sdhci_readw
	movq	_SDHCI_CLOCK_INT_EN@GOTPCREL(%rip), %rbx
	andl	(%rbx), %eax
	movl	(%r15), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_sdhci_writew
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.1:
	movq	(%r12), %rdx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_sdhci_calc_clk
	orl	(%rbx), %eax
	movl	(%r15), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_sdhci_writew
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_sdhci_readw
	movq	_SDHCI_CLOCK_INT_STABLE@GOTPCREL(%rip), %r14
	testl	%eax, (%r14)
	jne	LBB0_5
## %bb.2:
	movq	$-21, %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	incq	%rbx
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_mdelay
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_sdhci_readw
	testl	%eax, (%r14)
	je	LBB0_3
LBB0_5:
	movq	_SDHCI_CLOCK_CARD_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r15), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdhci_writew                   ## TAILCALL
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	(%r12), %rdi
	callq	_mmc_hostname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_err                         ## TAILCALL
	.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	"%s: Internal clock never stabilised.\n"

	.comm	_SDHCI_CLOCK_CARD_EN,4,2        ## @SDHCI_CLOCK_CARD_EN
	.no_dead_strip	_sdhci_at91_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_at91_set_clock
_sdhci_at91_set_clock:                  ; @sdhci_at91_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	x19, x0
	ldr	x8, [x0]
	str	xzr, [x8]
Lloh0:
	adrp	x21, _SDHCI_CLOCK_CONTROL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SDHCI_CLOCK_CONTROL@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_sdhci_readw
Lloh2:
	adrp	x22, _SDHCI_CLOCK_INT_EN@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SDHCI_CLOCK_INT_EN@GOTPAGEOFF]
	ldr	w8, [x22]
	and	w1, w8, w0
	ldr	w2, [x21]
	mov	x0, x19
	bl	_sdhci_writew
	cbz	w20, LBB0_6
; %bb.1:
	ldr	x2, [x19]
	mov	x0, x19
	mov	x1, x20
	bl	_sdhci_calc_clk
	ldr	w8, [x22]
	orr	w1, w8, w0
	ldr	w2, [x21]
	mov	x0, x19
	bl	_sdhci_writew
	ldr	w1, [x21]
	mov	x0, x19
	bl	_sdhci_readw
Lloh4:
	adrp	x20, _SDHCI_CLOCK_INT_STABLE@GOTPAGE
Lloh5:
	ldr	x20, [x20, _SDHCI_CLOCK_INT_STABLE@GOTPAGEOFF]
	ldr	w8, [x20]
	tst	w8, w0
	b.ne	LBB0_5
; %bb.2:
	mov	x22, #-21
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	adds	x22, x22, #1
	b.hs	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x21]
	mov	x0, x19
	bl	_sdhci_readw
	ldr	w8, [x20]
	tst	w8, w0
	b.eq	LBB0_3
LBB0_5:
Lloh6:
	adrp	x8, _SDHCI_CLOCK_CARD_EN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SDHCI_CLOCK_CARD_EN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w2, [x21]
	mov	x0, x19
	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
	b	_sdhci_writew
LBB0_6:
	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_7:
	ldr	x0, [x19]
	bl	_mmc_hostname
	mov	x1, x0
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	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
	b	_pr_err
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.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	"%s: Internal clock never stabilised.\n"

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