	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function renesas_sdhi_init_tuning
_renesas_sdhi_init_tuning:              ## @renesas_sdhi_init_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	%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
	movq	%rdi, %r12
	callq	_host_to_priv
	movq	%rax, %r14
	movq	_CTL_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_sd_ctrl_write32_as_16_and_16
	movq	_CTL_SD_CARD_CLK_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_CLK_CTL_SCLKEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	notl	%ebx
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_sd_ctrl_read16
	andl	%eax, %ebx
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_sd_ctrl_write16
	movq	_SH_MOBILE_SDHI_SCC_DTCNTL@GOTPCREL(%rip), %r13
	movq	_SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$8, %eax
	shll	%cl, %eax
	movl	(%r13), %edx
	movq	_SH_MOBILE_SDHI_SCC_DTCNTL_TAPEN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%eax, %ecx
	callq	_sd_scc_write32
	movq	_SH_MOBILE_SDHI_SCC_CKSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_SH_MOBILE_SDHI_SCC_CKSEL_DTSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_sd_scc_read32
	orl	%eax, %ebx
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	callq	_sd_scc_write32
	movq	_SH_MOBILE_SDHI_SCC_RVSCNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	notl	%ebx
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_sd_scc_read32
	andl	%eax, %ebx
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	callq	_sd_scc_write32
	movq	_SH_MOBILE_SDHI_SCC_DT2FF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r14), %ecx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_sd_scc_write32
	movq	_CTL_SD_CARD_CLK_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_CLK_CTL_SCLKEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_sd_ctrl_read16
	orl	%eax, %ebx
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_sd_ctrl_write16
	movl	(%r13), %edx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_sd_scc_read32
	movq	_SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movq	_SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CTL_STATUS,4,2                 ## @CTL_STATUS
	.comm	_CTL_SD_CARD_CLK_CTL,4,2        ## @CTL_SD_CARD_CLK_CTL
	.comm	_CLK_CTL_SCLKEN,4,2             ## @CLK_CTL_SCLKEN
	.comm	_SH_MOBILE_SDHI_SCC_DTCNTL,4,2  ## @SH_MOBILE_SDHI_SCC_DTCNTL
	.comm	_SH_MOBILE_SDHI_SCC_DTCNTL_TAPEN,4,2 ## @SH_MOBILE_SDHI_SCC_DTCNTL_TAPEN
	.comm	_SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_SHIFT,4,2 ## @SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_SHIFT
	.comm	_SH_MOBILE_SDHI_SCC_CKSEL,4,2   ## @SH_MOBILE_SDHI_SCC_CKSEL
	.comm	_SH_MOBILE_SDHI_SCC_CKSEL_DTSEL,4,2 ## @SH_MOBILE_SDHI_SCC_CKSEL_DTSEL
	.comm	_SH_MOBILE_SDHI_SCC_RVSCNTL,4,2 ## @SH_MOBILE_SDHI_SCC_RVSCNTL
	.comm	_SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN,4,2 ## @SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN
	.comm	_SH_MOBILE_SDHI_SCC_DT2FF,4,2   ## @SH_MOBILE_SDHI_SCC_DT2FF
	.comm	_SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_MASK,4,2 ## @SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_MASK
	.no_dead_strip	_renesas_sdhi_init_tuning
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function renesas_sdhi_init_tuning
_renesas_sdhi_init_tuning:              ; @renesas_sdhi_init_tuning
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_host_to_priv
	mov	x20, x0
Lloh0:
	adrp	x8, _CTL_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CTL_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_sd_ctrl_write32_as_16_and_16
Lloh3:
	adrp	x23, _CTL_SD_CARD_CLK_CTL@GOTPAGE
Lloh4:
	ldr	x23, [x23, _CTL_SD_CARD_CLK_CTL@GOTPAGEOFF]
	ldr	w21, [x23]
Lloh5:
	adrp	x24, _CLK_CTL_SCLKEN@GOTPAGE
Lloh6:
	ldr	x24, [x24, _CLK_CTL_SCLKEN@GOTPAGEOFF]
	ldr	w22, [x24]
	mov	x0, x19
	mov	x1, x21
	bl	_sd_ctrl_read16
	bic	w2, w0, w22
	mov	x0, x19
	mov	x1, x21
	bl	_sd_ctrl_write16
Lloh7:
	adrp	x25, _SH_MOBILE_SDHI_SCC_DTCNTL@GOTPAGE
Lloh8:
	ldr	x25, [x25, _SH_MOBILE_SDHI_SCC_DTCNTL@GOTPAGEOFF]
	ldr	w2, [x25]
Lloh9:
	adrp	x8, _SH_MOBILE_SDHI_SCC_DTCNTL_TAPEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SH_MOBILE_SDHI_SCC_DTCNTL_TAPEN@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x22, _SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_SHIFT@GOTPAGE
Lloh13:
	ldr	x22, [x22, _SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_SHIFT@GOTPAGEOFF]
	ldr	w9, [x22]
	mov	w10, #8
	lsl	w9, w10, w9
	orr	w3, w9, w8
	mov	x0, x19
	mov	x1, x20
	bl	_sd_scc_write32
Lloh14:
	adrp	x8, _SH_MOBILE_SDHI_SCC_CKSEL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SH_MOBILE_SDHI_SCC_CKSEL@GOTPAGEOFF]
Lloh16:
	ldr	w21, [x8]
Lloh17:
	adrp	x8, _SH_MOBILE_SDHI_SCC_CKSEL_DTSEL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SH_MOBILE_SDHI_SCC_CKSEL_DTSEL@GOTPAGEOFF]
Lloh19:
	ldr	w26, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_sd_scc_read32
	orr	w3, w0, w26
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_sd_scc_write32
Lloh20:
	adrp	x8, _SH_MOBILE_SDHI_SCC_RVSCNTL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SH_MOBILE_SDHI_SCC_RVSCNTL@GOTPAGEOFF]
Lloh22:
	ldr	w21, [x8]
Lloh23:
	adrp	x8, _SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN@GOTPAGEOFF]
Lloh25:
	ldr	w26, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_sd_scc_read32
	bic	w3, w0, w26
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_sd_scc_write32
Lloh26:
	adrp	x8, _SH_MOBILE_SDHI_SCC_DT2FF@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SH_MOBILE_SDHI_SCC_DT2FF@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	ldr	w3, [x20]
	mov	x0, x19
	mov	x1, x20
	bl	_sd_scc_write32
	ldr	w21, [x23]
	ldr	w23, [x24]
	mov	x0, x19
	mov	x1, x21
	bl	_sd_ctrl_read16
	orr	w2, w0, w23
	mov	x0, x19
	mov	x1, x21
	bl	_sd_ctrl_write16
	ldr	w2, [x25]
	mov	x0, x19
	mov	x1, x20
	bl	_sd_scc_read32
	ldr	w8, [x22]
	asr	w8, w0, w8
Lloh29:
	adrp	x9, _SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_MASK@GOTPAGE
Lloh30:
	ldr	x9, [x9, _SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_MASK@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	and	w0, w8, w9
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CTL_STATUS,4,2                 ; @CTL_STATUS
	.comm	_CTL_SD_CARD_CLK_CTL,4,2        ; @CTL_SD_CARD_CLK_CTL
	.comm	_CLK_CTL_SCLKEN,4,2             ; @CLK_CTL_SCLKEN
	.comm	_SH_MOBILE_SDHI_SCC_DTCNTL,4,2  ; @SH_MOBILE_SDHI_SCC_DTCNTL
	.comm	_SH_MOBILE_SDHI_SCC_DTCNTL_TAPEN,4,2 ; @SH_MOBILE_SDHI_SCC_DTCNTL_TAPEN
	.comm	_SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_SHIFT,4,2 ; @SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_SHIFT
	.comm	_SH_MOBILE_SDHI_SCC_CKSEL,4,2   ; @SH_MOBILE_SDHI_SCC_CKSEL
	.comm	_SH_MOBILE_SDHI_SCC_CKSEL_DTSEL,4,2 ; @SH_MOBILE_SDHI_SCC_CKSEL_DTSEL
	.comm	_SH_MOBILE_SDHI_SCC_RVSCNTL,4,2 ; @SH_MOBILE_SDHI_SCC_RVSCNTL
	.comm	_SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN,4,2 ; @SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN
	.comm	_SH_MOBILE_SDHI_SCC_DT2FF,4,2   ; @SH_MOBILE_SDHI_SCC_DT2FF
	.comm	_SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_MASK,4,2 ; @SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_MASK
	.no_dead_strip	_renesas_sdhi_init_tuning
.subsections_via_symbols
