	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_sprd_set_clock
_sdhci_sprd_set_clock:                  ## @sdhci_sprd_set_clock
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	testl	%esi, %esi
	je	LBB0_4
## %bb.1:
	movl	%esi, %ebx
	cmpl	%esi, (%r14)
	jne	LBB0_2
## %bb.5:
	movq	%r14, %rdi
	movl	%ebx, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	__sdhci_sprd_set_clock          ## TAILCALL
LBB0_4:
	movq	_SDHCI_CLOCK_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_sdhci_writew                   ## TAILCALL
LBB0_2:
	movq	%r14, %rdi
	callq	_sdhci_sprd_sd_clk_off
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	__sdhci_sprd_set_clock
	xorl	%edx, %edx
	cmpl	$400001, %ebx                   ## imm = 0x61A81
	setb	%dl
	movq	_SDHCI_SPRD_BIT_CMD_DLY_INV@GOTPCREL(%rip), %rax
	movq	_SDHCI_SPRD_BIT_POSRD_DLY_INV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r14, %rdi
	callq	_sdhci_sprd_set_dll_invert
	movq	_SDHCI_SPRD_PHY_DLL_CLK@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jae	LBB0_3
## %bb.6:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_sdhci_sprd_enable_phy_dll      ## TAILCALL
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDHCI_CLOCK_CONTROL,4,2        ## @SDHCI_CLOCK_CONTROL
	.comm	_SDHCI_SPRD_BIT_CMD_DLY_INV,4,2 ## @SDHCI_SPRD_BIT_CMD_DLY_INV
	.comm	_SDHCI_SPRD_BIT_POSRD_DLY_INV,4,2 ## @SDHCI_SPRD_BIT_POSRD_DLY_INV
	.comm	_SDHCI_SPRD_PHY_DLL_CLK,4,2     ## @SDHCI_SPRD_PHY_DLL_CLK
	.no_dead_strip	_sdhci_sprd_set_clock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdhci_sprd_set_clock
_sdhci_sprd_set_clock:                  ; @sdhci_sprd_set_clock
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	cbz	w1, LBB0_3
; %bb.1:
	mov	x20, x1
	ldr	w8, [x19]
	cmp	w8, w1
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	__sdhci_sprd_set_clock
LBB0_3:
Lloh0:
	adrp	x8, _SDHCI_CLOCK_CONTROL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDHCI_CLOCK_CONTROL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_sdhci_writew
LBB0_4:
	mov	x0, x19
	bl	_sdhci_sprd_sd_clk_off
	mov	x0, x19
	mov	x1, x20
	bl	__sdhci_sprd_set_clock
	mov	w8, #6785
	movk	w8, #6, lsl #16
	cmp	w20, w8
Lloh3:
	adrp	x8, _SDHCI_SPRD_BIT_CMD_DLY_INV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SDHCI_SPRD_BIT_CMD_DLY_INV@GOTPAGEOFF]
	cset	w2, lo
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _SDHCI_SPRD_BIT_POSRD_DLY_INV@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SDHCI_SPRD_BIT_POSRD_DLY_INV@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x19
	bl	_sdhci_sprd_set_dll_invert
Lloh9:
	adrp	x8, _SDHCI_SPRD_PHY_DLL_CLK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SDHCI_SPRD_PHY_DLL_CLK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, w20
	b.hs	LBB0_6
; %bb.5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_sdhci_sprd_enable_phy_dll
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SDHCI_CLOCK_CONTROL,4,2        ; @SDHCI_CLOCK_CONTROL
	.comm	_SDHCI_SPRD_BIT_CMD_DLY_INV,4,2 ; @SDHCI_SPRD_BIT_CMD_DLY_INV
	.comm	_SDHCI_SPRD_BIT_POSRD_DLY_INV,4,2 ; @SDHCI_SPRD_BIT_POSRD_DLY_INV
	.comm	_SDHCI_SPRD_PHY_DLL_CLK,4,2     ; @SDHCI_SPRD_PHY_DLL_CLK
	.no_dead_strip	_sdhci_sprd_set_clock
.subsections_via_symbols
