	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function renesas_sdhi_hs400_complete
_renesas_sdhi_hs400_complete:           ## @renesas_sdhi_hs400_complete
	.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_SD_CARD_CLK_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_CLK_CTL_SCLKEN@GOTPCREL(%rip), %r13
	movl	(%r13), %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	_CTL_SDIF_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_sd_ctrl_read16
	orl	$1, %eax
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_sd_ctrl_write16
	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	_SH_MOBILE_SDHI_SCC_TMPPORT2@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_SH_MOBILE_SDHI_SCC_TMPPORT2_HS400EN@GOTPCREL(%rip), %rax
	movq	_SH_MOBILE_SDHI_SCC_TMPPORT2_HS400OSEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%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_DTCNTL@GOTPCREL(%rip), %rdx
	movq	_SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$4, %eax
	shll	%cl, %eax
	movl	(%rdx), %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	8(%r12), %rax
	movq	_TMIO_MMC_HAVE_4TAP_HS400@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_SH_MOBILE_SDHI_SCC_TAPSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r12), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_sd_scc_write32
LBB0_2:
	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	_CTL_SD_CARD_CLK_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	(%r13), %ebx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_sd_ctrl_read16
	orl	%eax, %ebx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sd_ctrl_write16                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CTL_SD_CARD_CLK_CTL,4,2        ## @CTL_SD_CARD_CLK_CTL
	.comm	_CLK_CTL_SCLKEN,4,2             ## @CLK_CTL_SCLKEN
	.comm	_CTL_SDIF_MODE,4,2              ## @CTL_SDIF_MODE
	.comm	_SH_MOBILE_SDHI_SCC_DT2FF,4,2   ## @SH_MOBILE_SDHI_SCC_DT2FF
	.comm	_SH_MOBILE_SDHI_SCC_TMPPORT2,4,2 ## @SH_MOBILE_SDHI_SCC_TMPPORT2
	.comm	_SH_MOBILE_SDHI_SCC_TMPPORT2_HS400EN,4,2 ## @SH_MOBILE_SDHI_SCC_TMPPORT2_HS400EN
	.comm	_SH_MOBILE_SDHI_SCC_TMPPORT2_HS400OSEL,4,2 ## @SH_MOBILE_SDHI_SCC_TMPPORT2_HS400OSEL
	.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	_TMIO_MMC_HAVE_4TAP_HS400,4,2   ## @TMIO_MMC_HAVE_4TAP_HS400
	.comm	_SH_MOBILE_SDHI_SCC_TAPSET,4,2  ## @SH_MOBILE_SDHI_SCC_TAPSET
	.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
	.no_dead_strip	_renesas_sdhi_hs400_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function renesas_sdhi_hs400_complete
_renesas_sdhi_hs400_complete:           ; @renesas_sdhi_hs400_complete
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	bl	_host_to_priv
	mov	x20, x0
Lloh0:
	adrp	x22, _CTL_SD_CARD_CLK_CTL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CTL_SD_CARD_CLK_CTL@GOTPAGEOFF]
	ldr	w21, [x22]
Lloh2:
	adrp	x23, _CLK_CTL_SCLKEN@GOTPAGE
Lloh3:
	ldr	x23, [x23, _CLK_CTL_SCLKEN@GOTPAGEOFF]
	ldr	w24, [x23]
	mov	x0, x19
	mov	x1, x21
	bl	_sd_ctrl_read16
	bic	w2, w0, w24
	mov	x0, x19
	mov	x1, x21
	bl	_sd_ctrl_write16
Lloh4:
	adrp	x8, _CTL_SDIF_MODE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CTL_SDIF_MODE@GOTPAGEOFF]
Lloh6:
	ldr	w21, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_sd_ctrl_read16
	orr	w2, w0, #0x1
	mov	x0, x19
	mov	x1, x21
	bl	_sd_ctrl_write16
Lloh7:
	adrp	x8, _SH_MOBILE_SDHI_SCC_DT2FF@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SH_MOBILE_SDHI_SCC_DT2FF@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	ldr	w3, [x20]
	mov	x0, x19
	mov	x1, x20
	bl	_sd_scc_write32
Lloh10:
	adrp	x8, _SH_MOBILE_SDHI_SCC_TMPPORT2@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SH_MOBILE_SDHI_SCC_TMPPORT2@GOTPAGEOFF]
Lloh12:
	adrp	x9, _SH_MOBILE_SDHI_SCC_TMPPORT2_HS400EN@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SH_MOBILE_SDHI_SCC_TMPPORT2_HS400EN@GOTPAGEOFF]
Lloh14:
	ldr	w21, [x8]
Lloh15:
	ldr	w8, [x9]
Lloh16:
	adrp	x9, _SH_MOBILE_SDHI_SCC_TMPPORT2_HS400OSEL@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SH_MOBILE_SDHI_SCC_TMPPORT2_HS400OSEL@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w24, w9, w8
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_sd_scc_read32
	orr	w3, w24, w0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_sd_scc_write32
Lloh19:
	adrp	x8, _SH_MOBILE_SDHI_SCC_DTCNTL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SH_MOBILE_SDHI_SCC_DTCNTL@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
Lloh22:
	adrp	x8, _SH_MOBILE_SDHI_SCC_DTCNTL_TAPEN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SH_MOBILE_SDHI_SCC_DTCNTL_TAPEN@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_SHIFT@GOTPAGE
Lloh26:
	ldr	x9, [x9, _SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_SHIFT@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	mov	w10, #4
	lsl	w9, w10, w9
	orr	w3, w9, w8
	mov	x0, x19
	mov	x1, x20
	bl	_sd_scc_write32
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh28:
	adrp	x9, _TMIO_MMC_HAVE_4TAP_HS400@GOTPAGE
Lloh29:
	ldr	x9, [x9, _TMIO_MMC_HAVE_4TAP_HS400@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh31:
	adrp	x8, _SH_MOBILE_SDHI_SCC_TAPSET@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SH_MOBILE_SDHI_SCC_TAPSET@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	ldr	w8, [x19]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w3, w8, #1
	mov	x0, x19
	mov	x1, x20
	bl	_sd_scc_write32
LBB0_2:
Lloh34:
	adrp	x8, _SH_MOBILE_SDHI_SCC_CKSEL@GOTPAGE
Lloh35:
	ldr	x8, [x8, _SH_MOBILE_SDHI_SCC_CKSEL@GOTPAGEOFF]
Lloh36:
	ldr	w21, [x8]
Lloh37:
	adrp	x8, _SH_MOBILE_SDHI_SCC_CKSEL_DTSEL@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SH_MOBILE_SDHI_SCC_CKSEL_DTSEL@GOTPAGEOFF]
Lloh39:
	ldr	w24, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_sd_scc_read32
	orr	w3, w0, w24
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_sd_scc_write32
	ldr	w20, [x22]
	ldr	w21, [x23]
	mov	x0, x19
	mov	x1, x20
	bl	_sd_ctrl_read16
	orr	w2, w0, w21
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_sd_ctrl_write16
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_CTL_SD_CARD_CLK_CTL,4,2        ; @CTL_SD_CARD_CLK_CTL
	.comm	_CLK_CTL_SCLKEN,4,2             ; @CLK_CTL_SCLKEN
	.comm	_CTL_SDIF_MODE,4,2              ; @CTL_SDIF_MODE
	.comm	_SH_MOBILE_SDHI_SCC_DT2FF,4,2   ; @SH_MOBILE_SDHI_SCC_DT2FF
	.comm	_SH_MOBILE_SDHI_SCC_TMPPORT2,4,2 ; @SH_MOBILE_SDHI_SCC_TMPPORT2
	.comm	_SH_MOBILE_SDHI_SCC_TMPPORT2_HS400EN,4,2 ; @SH_MOBILE_SDHI_SCC_TMPPORT2_HS400EN
	.comm	_SH_MOBILE_SDHI_SCC_TMPPORT2_HS400OSEL,4,2 ; @SH_MOBILE_SDHI_SCC_TMPPORT2_HS400OSEL
	.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	_TMIO_MMC_HAVE_4TAP_HS400,4,2   ; @TMIO_MMC_HAVE_4TAP_HS400
	.comm	_SH_MOBILE_SDHI_SCC_TAPSET,4,2  ; @SH_MOBILE_SDHI_SCC_TAPSET
	.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
	.no_dead_strip	_renesas_sdhi_hs400_complete
.subsections_via_symbols
