	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function esdhc_prepare_tuning
_esdhc_prepare_tuning:                  ## @esdhc_prepare_tuning
	.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, %rbx
	movl	$1, %edi
	callq	_mdelay
	movq	_ESDHC_MIX_CTRL@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	(%rbx), %rdi
	callq	_readl
	movq	_ESDHC_MIX_CTRL_EXE_TUNE@GOTPCREL(%rip), %rcx
	movq	_ESDHC_MIX_CTRL_SMPCLK_SEL@GOTPCREL(%rip), %rdx
	movq	_ESDHC_MIX_CTRL_FBCLK_SEL@GOTPCREL(%rip), %rsi
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	orl	(%rsi), %eax
	movq	(%r15), %rsi
	addq	(%rbx), %rsi
	movl	%eax, %edi
	callq	_writel
	movl	%r14d, %edi
	shll	$8, %edi
	movq	_ESDHC_TUNE_CTRL_STATUS@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	(%rbx), %rsi
	callq	_writel
	movl	8(%rbx), %edi
	callq	_mmc_dev
	movl	%eax, %r15d
	movq	(%r12), %rdi
	addq	(%rbx), %rdi
	callq	_readl
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edi
	movl	%r14d, %edx
	movl	%eax, %ecx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ESDHC_MIX_CTRL,8,3             ## @ESDHC_MIX_CTRL
	.comm	_ESDHC_MIX_CTRL_EXE_TUNE,4,2    ## @ESDHC_MIX_CTRL_EXE_TUNE
	.comm	_ESDHC_MIX_CTRL_SMPCLK_SEL,4,2  ## @ESDHC_MIX_CTRL_SMPCLK_SEL
	.comm	_ESDHC_MIX_CTRL_FBCLK_SEL,4,2   ## @ESDHC_MIX_CTRL_FBCLK_SEL
	.comm	_ESDHC_TUNE_CTRL_STATUS,8,3     ## @ESDHC_TUNE_CTRL_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tuning with delay 0x%x ESDHC_TUNE_CTRL_STATUS 0x%x\n"

	.no_dead_strip	_esdhc_prepare_tuning
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function esdhc_prepare_tuning
_esdhc_prepare_tuning:                  ; @esdhc_prepare_tuning
	.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	x19, x1
	mov	x20, x0
	mov	w0, #1
	bl	_mdelay
	ldr	x8, [x20]
Lloh0:
	adrp	x21, _ESDHC_MIX_CTRL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ESDHC_MIX_CTRL@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
Lloh2:
	adrp	x8, _ESDHC_MIX_CTRL_EXE_TUNE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ESDHC_MIX_CTRL_EXE_TUNE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _ESDHC_MIX_CTRL_SMPCLK_SEL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ESDHC_MIX_CTRL_SMPCLK_SEL@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _ESDHC_MIX_CTRL_FBCLK_SEL@GOTPAGE
Lloh9:
	ldr	x10, [x10, _ESDHC_MIX_CTRL_FBCLK_SEL@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	orr	w8, w8, w0
	orr	w8, w8, w9
	orr	w0, w8, w10
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writel
	lsl	w0, w19, #8
	ldr	x8, [x20]
Lloh11:
	adrp	x22, _ESDHC_TUNE_CTRL_STATUS@GOTPAGE
Lloh12:
	ldr	x22, [x22, _ESDHC_TUNE_CTRL_STATUS@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writel
	ldr	w0, [x20, #8]
	bl	_mmc_dev
	mov	x21, x0
	ldr	x8, [x20]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	mov	x3, x0
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, 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	_dev_dbg
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ESDHC_MIX_CTRL,8,3             ; @ESDHC_MIX_CTRL
	.comm	_ESDHC_MIX_CTRL_EXE_TUNE,4,2    ; @ESDHC_MIX_CTRL_EXE_TUNE
	.comm	_ESDHC_MIX_CTRL_SMPCLK_SEL,4,2  ; @ESDHC_MIX_CTRL_SMPCLK_SEL
	.comm	_ESDHC_MIX_CTRL_FBCLK_SEL,4,2   ; @ESDHC_MIX_CTRL_FBCLK_SEL
	.comm	_ESDHC_TUNE_CTRL_STATUS,8,3     ; @ESDHC_TUNE_CTRL_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tuning with delay 0x%x ESDHC_TUNE_CTRL_STATUS 0x%x\n"

	.no_dead_strip	_esdhc_prepare_tuning
.subsections_via_symbols
