	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function renesas_sdhi_check_scc_error
_renesas_sdhi_check_scc_error:          ## @renesas_sdhi_check_scc_error
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_host_to_priv
	movq	%rax, %r14
	movq	(%rbx), %rdi
	movq	(%rdi), %rax
	movq	_MMC_TIMING_UHS_SDR104@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.1:
	movq	_MMC_TIMING_MMC_HS200@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.2:
	movq	_MMC_TIMING_MMC_HS400@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.3:
	movq	8(%rbx), %rax
	movq	_TMIO_MMC_HAVE_4TAP_HS400@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	jne	LBB0_8
LBB0_4:
	callq	_mmc_doing_retune
	xorl	%r15d, %r15d
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:
	movq	_SH_MOBILE_SDHI_SCC_RVSCNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_sd_scc_read32
	movq	_SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.6:
	movq	_SH_MOBILE_SDHI_SCC_RVSREQ@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_sd_scc_read32
	movq	_SH_MOBILE_SDHI_SCC_RVSREQ_RVSERR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.7:
	movl	(%r12), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	callq	_sd_scc_write32
	movl	$1, %r15d
LBB0_8:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TMIO_MMC_HAVE_4TAP_HS400,4,2   ## @TMIO_MMC_HAVE_4TAP_HS400
	.comm	_MMC_TIMING_UHS_SDR104,8,3      ## @MMC_TIMING_UHS_SDR104
	.comm	_MMC_TIMING_MMC_HS200,8,3       ## @MMC_TIMING_MMC_HS200
	.comm	_MMC_TIMING_MMC_HS400,8,3       ## @MMC_TIMING_MMC_HS400
	.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_RVSREQ,4,2  ## @SH_MOBILE_SDHI_SCC_RVSREQ
	.comm	_SH_MOBILE_SDHI_SCC_RVSREQ_RVSERR,4,2 ## @SH_MOBILE_SDHI_SCC_RVSREQ_RVSERR
	.no_dead_strip	_renesas_sdhi_check_scc_error
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function renesas_sdhi_check_scc_error
_renesas_sdhi_check_scc_error:          ; @renesas_sdhi_check_scc_error
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_host_to_priv
	mov	x20, x0
	ldr	x0, [x19]
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _MMC_TIMING_UHS_SDR104@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMC_TIMING_UHS_SDR104@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _MMC_TIMING_MMC_HS200@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MMC_TIMING_MMC_HS200@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_2
; %bb.1:
	ldr	x9, [x19, #8]
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _TMIO_MMC_HAVE_4TAP_HS400@GOTPAGE
Lloh7:
	ldr	x10, [x10, _TMIO_MMC_HAVE_4TAP_HS400@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	and	w9, w10, w9
Lloh9:
	adrp	x10, _MMC_TIMING_MMC_HS400@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MMC_TIMING_MMC_HS400@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x8, x10
	ccmp	w9, #0, #0, eq
	b.ne	LBB0_3
LBB0_2:
	bl	_mmc_doing_retune
	cbz	x0, LBB0_5
LBB0_3:
	mov	w0, #0
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh12:
	adrp	x8, _SH_MOBILE_SDHI_SCC_RVSCNTL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SH_MOBILE_SDHI_SCC_RVSCNTL@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_sd_scc_read32
Lloh15:
	adrp	x8, _SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SH_MOBILE_SDHI_SCC_RVSCNTL_RVSEN@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.6:
Lloh18:
	adrp	x21, _SH_MOBILE_SDHI_SCC_RVSREQ@GOTPAGE
Lloh19:
	ldr	x21, [x21, _SH_MOBILE_SDHI_SCC_RVSREQ@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_sd_scc_read32
Lloh20:
	adrp	x8, _SH_MOBILE_SDHI_SCC_RVSREQ_RVSERR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SH_MOBILE_SDHI_SCC_RVSREQ_RVSERR@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.7:
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	bl	_sd_scc_write32
	mov	w0, #1
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_TMIO_MMC_HAVE_4TAP_HS400,4,2   ; @TMIO_MMC_HAVE_4TAP_HS400
	.comm	_MMC_TIMING_UHS_SDR104,8,3      ; @MMC_TIMING_UHS_SDR104
	.comm	_MMC_TIMING_MMC_HS200,8,3       ; @MMC_TIMING_MMC_HS200
	.comm	_MMC_TIMING_MMC_HS400,8,3       ; @MMC_TIMING_MMC_HS400
	.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_RVSREQ,4,2  ; @SH_MOBILE_SDHI_SCC_RVSREQ
	.comm	_SH_MOBILE_SDHI_SCC_RVSREQ_RVSERR,4,2 ; @SH_MOBILE_SDHI_SCC_RVSREQ_RVSERR
	.no_dead_strip	_renesas_sdhi_check_scc_error
.subsections_via_symbols
