	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msdc_prepare_hs400_tuning
_msdc_prepare_hs400_tuning:             ## @msdc_prepare_hs400_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	callq	_mmc_priv
	movq	%rax, %rbx
	movl	$1, (%rax)
	movq	24(%rax), %rsi
	movl	16(%rax), %edi
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	_EMMC50_PAD_DS_TUNE@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	8(%rbx), %rsi
	movq	_PAD_DS_TUNE@GOTPCREL(%rip), %rax
LBB0_3:
	addq	(%rax), %rsi
	callq	_writel
	movq	_MSDC_PATCH_BIT2@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	movq	_MSDC_PATCH_BIT2_CFGCRCSTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_sdr_clr_bits
	movq	_EMMC50_CFG3@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	movq	_EMMC50_CFG3_OUTS_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$2, %edx
	callq	_sdr_set_field
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EMMC50_PAD_DS_TUNE,8,3         ## @EMMC50_PAD_DS_TUNE
	.comm	_PAD_DS_TUNE,8,3                ## @PAD_DS_TUNE
	.comm	_MSDC_PATCH_BIT2,8,3            ## @MSDC_PATCH_BIT2
	.comm	_MSDC_PATCH_BIT2_CFGCRCSTS,4,2  ## @MSDC_PATCH_BIT2_CFGCRCSTS
	.comm	_EMMC50_CFG3,8,3                ## @EMMC50_CFG3
	.comm	_EMMC50_CFG3_OUTS_WR,4,2        ## @EMMC50_CFG3_OUTS_WR
	.no_dead_strip	_msdc_prepare_hs400_tuning
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msdc_prepare_hs400_tuning
_msdc_prepare_hs400_tuning:             ; @msdc_prepare_hs400_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
	bl	_mmc_priv
	mov	x19, x0
	mov	w8, #1
	str	w8, [x0]
	ldr	x8, [x0, #24]
	ldr	w0, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, _EMMC50_PAD_DS_TUNE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EMMC50_PAD_DS_TUNE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19, #8]
Lloh2:
	adrp	x9, _PAD_DS_TUNE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PAD_DS_TUNE@GOTPAGEOFF]
LBB0_3:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh4:
	adrp	x8, _MSDC_PATCH_BIT2@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MSDC_PATCH_BIT2@GOTPAGEOFF]
	ldr	x9, [x19, #8]
Lloh6:
	ldr	x8, [x8]
	add	x0, x8, x9
Lloh7:
	adrp	x8, _MSDC_PATCH_BIT2_CFGCRCSTS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MSDC_PATCH_BIT2_CFGCRCSTS@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_sdr_clr_bits
Lloh10:
	adrp	x8, _EMMC50_CFG3@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EMMC50_CFG3@GOTPAGEOFF]
	ldr	x9, [x19, #8]
Lloh12:
	ldr	x8, [x8]
	add	x0, x8, x9
Lloh13:
	adrp	x8, _EMMC50_CFG3_OUTS_WR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EMMC50_CFG3_OUTS_WR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	w2, #2
	bl	_sdr_set_field
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EMMC50_PAD_DS_TUNE,8,3         ; @EMMC50_PAD_DS_TUNE
	.comm	_PAD_DS_TUNE,8,3                ; @PAD_DS_TUNE
	.comm	_MSDC_PATCH_BIT2,8,3            ; @MSDC_PATCH_BIT2
	.comm	_MSDC_PATCH_BIT2_CFGCRCSTS,4,2  ; @MSDC_PATCH_BIT2_CFGCRCSTS
	.comm	_EMMC50_CFG3,8,3                ; @EMMC50_CFG3
	.comm	_EMMC50_CFG3_OUTS_WR,4,2        ; @EMMC50_CFG3_OUTS_WR
	.no_dead_strip	_msdc_prepare_hs400_tuning
.subsections_via_symbols
