	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function renesas_sdhi_hw_reset
_renesas_sdhi_hw_reset:                 ## @renesas_sdhi_hw_reset
	.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	%r12, %rdi
	movq	%rax, %rsi
	callq	_renesas_sdhi_reset_scc
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_renesas_sdhi_reset_hs400_mode
	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
	movq	_SH_MOBILE_SDHI_SCC_RVSCNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN@GOTPCREL(%rip), %r13
	movl	(%r13), %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_RVSCNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	(%r13), %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	(%r12), %rax
	movq	_TMIO_MMC_MIN_RCAR2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_CTL_IRQ_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TMIO_MASK_INIT_RCAR2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sd_ctrl_write32_as_16_and_16   ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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	_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	_TMIO_MMC_MIN_RCAR2,4,2         ## @TMIO_MMC_MIN_RCAR2
	.comm	_CTL_IRQ_MASK,4,2               ## @CTL_IRQ_MASK
	.comm	_TMIO_MASK_INIT_RCAR2,4,2       ## @TMIO_MASK_INIT_RCAR2
	.no_dead_strip	_renesas_sdhi_hw_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function renesas_sdhi_hw_reset
_renesas_sdhi_hw_reset:                 ; @renesas_sdhi_hw_reset
	.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
	mov	x0, x19
	mov	x1, x20
	bl	_renesas_sdhi_reset_scc
	mov	x0, x19
	mov	x1, x20
	bl	_renesas_sdhi_reset_hs400_mode
Lloh0:
	adrp	x8, _CTL_SD_CARD_CLK_CTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CTL_SD_CARD_CLK_CTL@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x8, _CLK_CTL_SCLKEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CLK_CTL_SCLKEN@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_sd_ctrl_read16
	orr	w2, w0, w22
	mov	x0, x19
	mov	x1, x21
	bl	_sd_ctrl_write16
Lloh6:
	adrp	x22, _SH_MOBILE_SDHI_SCC_RVSCNTL@GOTPAGE
Lloh7:
	ldr	x22, [x22, _SH_MOBILE_SDHI_SCC_RVSCNTL@GOTPAGEOFF]
	ldr	w21, [x22]
Lloh8:
	adrp	x23, _SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN@GOTPAGE
Lloh9:
	ldr	x23, [x23, _SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN@GOTPAGEOFF]
	ldr	w24, [x23]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_sd_scc_read32
	bic	w3, w0, w24
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_sd_scc_write32
	ldr	w21, [x22]
	ldr	w22, [x23]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_sd_scc_read32
	bic	w3, w0, w22
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_sd_scc_write32
	ldr	x8, [x19]
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _TMIO_MMC_MIN_RCAR2@GOTPAGE
Lloh11:
	ldr	x9, [x9, _TMIO_MMC_MIN_RCAR2@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh13:
	adrp	x8, _CTL_IRQ_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CTL_IRQ_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _TMIO_MASK_INIT_RCAR2@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TMIO_MASK_INIT_RCAR2@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x19
	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_write32_as_16_and_16
LBB0_2:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.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	_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	_TMIO_MMC_MIN_RCAR2,4,2         ; @TMIO_MMC_MIN_RCAR2
	.comm	_CTL_IRQ_MASK,4,2               ; @CTL_IRQ_MASK
	.comm	_TMIO_MASK_INIT_RCAR2,4,2       ; @TMIO_MASK_INIT_RCAR2
	.no_dead_strip	_renesas_sdhi_hw_reset
.subsections_via_symbols
