	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_s3c_check_sclk
_sdhci_s3c_check_sclk:                  ## @sdhci_s3c_check_sclk
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_to_s3c
	movq	%rax, %r14
	movq	_S3C_SDHCI_CONTROL2@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r15), %rdi
	callq	_readl
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_get_curclk
	cmpl	(%r14), %eax
	jne	LBB0_2
## %bb.1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	_S3C_SDHCI_CTRL2_SELBASECLK_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movq	_S3C_SDHCI_CTRL2_SELBASECLK_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movl	(%r14), %edi
	shll	%cl, %edi
	andl	%eax, %ebx
	orl	%ebx, %edi
	movq	(%r15), %rsi
	subq	$-128, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_S3C_SDHCI_CONTROL2,8,3         ## @S3C_SDHCI_CONTROL2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"restored ctrl2 clock setting\n"

	.comm	_S3C_SDHCI_CTRL2_SELBASECLK_MASK,4,2 ## @S3C_SDHCI_CTRL2_SELBASECLK_MASK
	.comm	_S3C_SDHCI_CTRL2_SELBASECLK_SHIFT,4,2 ## @S3C_SDHCI_CTRL2_SELBASECLK_SHIFT
	.no_dead_strip	_sdhci_s3c_check_sclk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdhci_s3c_check_sclk
_sdhci_s3c_check_sclk:                  ; @sdhci_s3c_check_sclk
	.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	_to_s3c
	mov	x20, x0
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _S3C_SDHCI_CONTROL2@GOTPAGE
Lloh1:
	ldr	x9, [x9, _S3C_SDHCI_CONTROL2@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	bl	_get_curclk
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
	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_2:
	ldr	x0, [x20, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh5:
	adrp	x8, _S3C_SDHCI_CTRL2_SELBASECLK_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _S3C_SDHCI_CTRL2_SELBASECLK_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	bic	w8, w21, w8
	ldr	w9, [x20]
Lloh8:
	adrp	x10, _S3C_SDHCI_CTRL2_SELBASECLK_SHIFT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _S3C_SDHCI_CTRL2_SELBASECLK_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w0, w9, w8
	ldr	x8, [x19]
	add	x1, x8, #128
	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
	b	_writel
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_S3C_SDHCI_CONTROL2,8,3         ; @S3C_SDHCI_CONTROL2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"restored ctrl2 clock setting\n"

	.comm	_S3C_SDHCI_CTRL2_SELBASECLK_MASK,4,2 ; @S3C_SDHCI_CTRL2_SELBASECLK_MASK
	.comm	_S3C_SDHCI_CTRL2_SELBASECLK_SHIFT,4,2 ; @S3C_SDHCI_CTRL2_SELBASECLK_SHIFT
	.no_dead_strip	_sdhci_s3c_check_sclk
.subsections_via_symbols
