	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function esdhc_reset_tuning
_esdhc_reset_tuning:                    ## @esdhc_reset_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_sdhci_priv
	movq	%rax, %rdi
	callq	_sdhci_pltfm_priv
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_esdhc_is_usdhc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	(%rbx), %rax
	movl	(%rax), %eax
	movq	_ESDHC_FLAG_MAN_TUNING@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.2:
	movq	_ESDHC_MIX_CTRL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	(%r14), %rdi
	callq	_readl
	movq	_ESDHC_MIX_CTRL_SMPCLK_SEL@GOTPCREL(%rip), %rcx
	movq	_ESDHC_MIX_CTRL_FBCLK_SEL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	orl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	movq	(%rbx), %rsi
	addq	(%r14), %rsi
	callq	_writel
	xorl	%edi, %edi
	movq	_ESDHC_TUNE_CTRL_STATUS@GOTPCREL(%rip), %rbx
	jmp	LBB0_5
LBB0_3:
	movq	_ESDHC_FLAG_STD_TUNING@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.4:
	movq	_SDHCI_AUTO_CMD_STATUS@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	(%r14), %rdi
	callq	_readl
	movq	_ESDHC_MIX_CTRL_SMPCLK_SEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
LBB0_5:
	movq	(%rbx), %rsi
	addq	(%r14), %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_writel                         ## TAILCALL
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ESDHC_FLAG_MAN_TUNING,4,2      ## @ESDHC_FLAG_MAN_TUNING
	.comm	_ESDHC_MIX_CTRL,8,3             ## @ESDHC_MIX_CTRL
	.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
	.comm	_ESDHC_FLAG_STD_TUNING,4,2      ## @ESDHC_FLAG_STD_TUNING
	.comm	_SDHCI_AUTO_CMD_STATUS,8,3      ## @SDHCI_AUTO_CMD_STATUS
	.no_dead_strip	_esdhc_reset_tuning
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function esdhc_reset_tuning
_esdhc_reset_tuning:                    ; @esdhc_reset_tuning
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_sdhci_priv
	bl	_sdhci_pltfm_priv
	mov	x20, x0
	bl	_esdhc_is_usdhc
	cbz	x0, LBB0_6
; %bb.1:
	ldr	x8, [x20]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _ESDHC_FLAG_MAN_TUNING@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ESDHC_FLAG_MAN_TUNING@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	ldr	x8, [x19]
Lloh3:
	adrp	x20, _ESDHC_MIX_CTRL@GOTPAGE
Lloh4:
	ldr	x20, [x20, _ESDHC_MIX_CTRL@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl
Lloh5:
	adrp	x8, _ESDHC_MIX_CTRL_SMPCLK_SEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ESDHC_MIX_CTRL_SMPCLK_SEL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _ESDHC_MIX_CTRL_FBCLK_SEL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ESDHC_MIX_CTRL_FBCLK_SEL@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w0, w0, w8
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_writel
	mov	w0, #0
Lloh11:
	adrp	x20, _ESDHC_TUNE_CTRL_STATUS@GOTPAGE
Lloh12:
	ldr	x20, [x20, _ESDHC_TUNE_CTRL_STATUS@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
Lloh13:
	adrp	x9, _ESDHC_FLAG_STD_TUNING@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ESDHC_FLAG_STD_TUNING@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:
	ldr	x8, [x19]
Lloh16:
	adrp	x20, _SDHCI_AUTO_CMD_STATUS@GOTPAGE
Lloh17:
	ldr	x20, [x20, _SDHCI_AUTO_CMD_STATUS@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl
Lloh18:
	adrp	x8, _ESDHC_MIX_CTRL_SMPCLK_SEL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ESDHC_MIX_CTRL_SMPCLK_SEL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	bic	w0, w0, w8
LBB0_5:
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x1, x9, x8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_writel
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ESDHC_FLAG_MAN_TUNING,4,2      ; @ESDHC_FLAG_MAN_TUNING
	.comm	_ESDHC_MIX_CTRL,8,3             ; @ESDHC_MIX_CTRL
	.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
	.comm	_ESDHC_FLAG_STD_TUNING,4,2      ; @ESDHC_FLAG_STD_TUNING
	.comm	_SDHCI_AUTO_CMD_STATUS,8,3      ; @SDHCI_AUTO_CMD_STATUS
	.no_dead_strip	_esdhc_reset_tuning
.subsections_via_symbols
