	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function esdhc_of_set_clock
_esdhc_of_set_clock:                    ## @esdhc_of_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %rbx
	callq	_sdhci_priv
	movq	%rax, %rdi
	callq	_sdhci_pltfm_priv
	movq	%rax, %r14
	movq	8(%rbx), %rax
	movl	$0, (%rax)
	testl	%r12d, %r12d
	je	LBB0_34
## %bb.1:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rcx
	movq	_VENDOR_V_23@GOTPCREL(%rip), %rdx
	xorl	%r13d, %r13d
	cmpq	(%rdx), %rcx
	setl	%r13b
	movq	16(%rax), %rdi
	testq	%rdi, %rdi
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_5
## %bb.2:
	callq	_mmc_card_sd
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	24(%r14), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rcx
	movq	8(%rcx), %rcx
	movq	_MMC_TIMING_LEGACY@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_8
LBB0_5:
	movq	24(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.7:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	8(%rax), %rax
	shlq	$3, %rax
	addq	8(%rcx), %rax
LBB0_8:
	movq	(%rax), %rax
	jmp	LBB0_9
LBB0_34:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_esdhc_clock_enable             ## TAILCALL
LBB0_6:
	xorl	%eax, %eax
LBB0_9:
	incl	%r13d
	movl	%r12d, %ecx
	cmpq	%rcx, %rax
	movl	%eax, %ebx
	cmovgel	%r12d, %ebx
	testq	%rax, %rax
	cmovel	%r12d, %ebx
	movq	_ESDHC_SYSTEM_CONTROL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_sdhci_readl
	movq	_ESDHC_CLOCK_SDCLKEN@GOTPCREL(%rip), %rcx
	movq	_ESDHC_CLOCK_IPGEN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	movq	_ESDHC_CLOCK_HCKEN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
	movq	_ESDHC_CLOCK_PEREN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
	movq	_ESDHC_CLOCK_MASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%r15), %edx
	movq	%r14, %rdi
	callq	_sdhci_writel
	movl	(%r14), %esi
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %r14d
	movl	%esi, %eax
	cltd
	idivl	%r13d
	movl	%eax, %ecx
	leal	15(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$4, %eax
	cmpl	%ebx, %eax
	jbe	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	leal	(%r14,%r14), %r13d
	cmpl	$256, %r14d                     ## imm = 0x100
	jb	LBB0_10
LBB0_12:
	xorl	%esi, %esi
	xorl	%r13d, %r13d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	incl	%r13d
	movl	%ecx, %eax
	cltd
	idivl	%r13d
	addl	%r14d, %esi
	cmpl	$15, %r13d
	ja	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpl	%ebx, %eax
	ja	LBB0_13
LBB0_15:
	cmpq	$0, 16(%rdi)
	movq	_MMC_HS200_MAX_DTR@GOTPCREL(%rip), %rax
	je	LBB0_23
## %bb.16:
	cmpl	(%rax), %ebx
	jne	LBB0_23
## %bb.17:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rdx), %rdi
	movq	8(%rdi), %rax
	movq	_MMC_TIMING_MMC_HS400@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_19
## %bb.18:
	movq	_SDHCI_HS400_TUNING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rdx)
	je	LBB0_23
LBB0_19:
	movl	$4, %r12d
	movl	$1, %r15d
	cmpl	$5, %esi
	jb	LBB0_24
## %bb.20:
	movl	$2, %r15d
	cmpl	$9, %esi
	jb	LBB0_24
## %bb.21:
	movl	$3, %r15d
	cmpl	$13, %esi
	jb	LBB0_24
## %bb.22:
	callq	_mmc_hostname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_warn
LBB0_23:
	movl	%r13d, %r15d
	movl	%r14d, %r12d
LBB0_24:
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	8(%r13), %rdi
	callq	_mmc_dev
	movl	%eax, %edi
	movl	(%r13), %eax
	cltd
	idivl	%r12d
	cltd
	idivl	%r15d
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_dev_dbg
	movl	(%r13), %eax
	cltd
	idivl	%r12d
	cltd
	idivl	%r15d
	movq	8(%r13), %rcx
	movl	%eax, (%rcx)
	movl	%r12d, %eax
	imull	%r15d, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 8(%rcx)
	sarl	%r12d
	decl	%r15d
	movq	_ESDHC_SYSTEM_CONTROL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_sdhci_readl
	movq	_ESDHC_DIVIDER_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r15d
	movq	_ESDHC_PREDIV_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r12d
	orl	%r15d, %r12d
	movq	_ESDHC_CLOCK_IPGEN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_ESDHC_CLOCK_HCKEN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_ESDHC_CLOCK_PEREN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	orl	%eax, %r12d
	movl	(%r14), %edx
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_sdhci_writel
	movq	8(%r13), %rax
	movq	8(%rax), %rax
	movq	_MMC_TIMING_MMC_HS400@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movq	_MMC_HS200_MAX_DTR@GOTPCREL(%rip), %r15
	jne	LBB0_29
## %bb.25:
	cmpl	(%r15), %ebx
	jne	LBB0_29
## %bb.26:
	movq	_ESDHC_TBCTL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_sdhci_readl
	movq	_ESDHC_HS400_MODE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r14), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_sdhci_writel
	movq	_ESDHC_SDCLKCTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_sdhci_readl
	movq	_ESDHC_CMD_CLK_CTL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_sdhci_writel
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_esdhc_clock_enable
	movq	_ESDHC_DLLCFG0@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_sdhci_readl
	movq	_ESDHC_DLL_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	8(%r13), %rcx
	movl	(%rcx), %edx
	movl	$0, %ecx
	cmpl	(%r15), %edx
	jne	LBB0_28
## %bb.27:
	movq	_ESDHC_DLL_FREQ_SEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_28:
	orl	%ecx, %eax
	movl	(%rbx), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_sdhci_writel
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_sdhci_readl
	movq	_ESDHC_HS400_WNDW_ADJUST@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r14), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_sdhci_writel
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_esdhc_clock_enable
	movq	_ESDHC_DMA_SYSCTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_sdhci_readl
	movq	_ESDHC_FLUSH_ASYNC_FIFO@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_sdhci_writel
LBB0_29:
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	movl	$20, %esi
	callq	_ktime_add_ms
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_ktime_after
	movl	%eax, %ebx
	movq	_ESDHC_PRSSTAT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_sdhci_readl
	movq	_ESDHC_CLOCK_STABLE@GOTPCREL(%rip), %r12
	testl	%eax, (%r12)
	jne	LBB0_33
	.p2align	4, 0x90
LBB0_31:                                ## =>This Inner Loop Header: Depth=1
	testl	%ebx, %ebx
	jne	LBB0_35
## %bb.32:                              ##   in Loop: Header=BB0_31 Depth=1
	movl	$10, %edi
	callq	_udelay
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_ktime_after
	movl	%eax, %ebx
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_sdhci_readl
	testl	%eax, (%r12)
	je	LBB0_31
LBB0_33:
	movq	_ESDHC_SYSTEM_CONTROL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_sdhci_readl
	movq	_ESDHC_CLOCK_SDCLKEN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdhci_writel                   ## TAILCALL
LBB0_35:
	movq	8(%r13), %rdi
	callq	_mmc_hostname
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_err                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VENDOR_V_23,8,3                ## @VENDOR_V_23
	.comm	_MMC_TIMING_LEGACY,8,3          ## @MMC_TIMING_LEGACY
	.comm	_ESDHC_SYSTEM_CONTROL,4,2       ## @ESDHC_SYSTEM_CONTROL
	.comm	_ESDHC_CLOCK_SDCLKEN,4,2        ## @ESDHC_CLOCK_SDCLKEN
	.comm	_ESDHC_CLOCK_IPGEN,4,2          ## @ESDHC_CLOCK_IPGEN
	.comm	_ESDHC_CLOCK_HCKEN,4,2          ## @ESDHC_CLOCK_HCKEN
	.comm	_ESDHC_CLOCK_PEREN,4,2          ## @ESDHC_CLOCK_PEREN
	.comm	_ESDHC_CLOCK_MASK,4,2           ## @ESDHC_CLOCK_MASK
	.comm	_MMC_HS200_MAX_DTR,4,2          ## @MMC_HS200_MAX_DTR
	.comm	_MMC_TIMING_MMC_HS400,8,3       ## @MMC_TIMING_MMC_HS400
	.comm	_SDHCI_HS400_TUNING,4,2         ## @SDHCI_HS400_TUNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: using unsupported clock division.\n"

L_.str.1:                               ## @.str.1
	.asciz	"desired SD clock: %d, actual: %d\n"

	.comm	_ESDHC_DIVIDER_SHIFT,4,2        ## @ESDHC_DIVIDER_SHIFT
	.comm	_ESDHC_PREDIV_SHIFT,4,2         ## @ESDHC_PREDIV_SHIFT
	.comm	_ESDHC_TBCTL,4,2                ## @ESDHC_TBCTL
	.comm	_ESDHC_HS400_MODE,4,2           ## @ESDHC_HS400_MODE
	.comm	_ESDHC_SDCLKCTL,4,2             ## @ESDHC_SDCLKCTL
	.comm	_ESDHC_CMD_CLK_CTL,4,2          ## @ESDHC_CMD_CLK_CTL
	.comm	_ESDHC_DLLCFG0,4,2              ## @ESDHC_DLLCFG0
	.comm	_ESDHC_DLL_ENABLE,4,2           ## @ESDHC_DLL_ENABLE
	.comm	_ESDHC_DLL_FREQ_SEL,4,2         ## @ESDHC_DLL_FREQ_SEL
	.comm	_ESDHC_HS400_WNDW_ADJUST,4,2    ## @ESDHC_HS400_WNDW_ADJUST
	.comm	_ESDHC_DMA_SYSCTL,4,2           ## @ESDHC_DMA_SYSCTL
	.comm	_ESDHC_FLUSH_ASYNC_FIFO,4,2     ## @ESDHC_FLUSH_ASYNC_FIFO
	.comm	_ESDHC_PRSSTAT,4,2              ## @ESDHC_PRSSTAT
	.comm	_ESDHC_CLOCK_STABLE,4,2         ## @ESDHC_CLOCK_STABLE
L_.str.2:                               ## @.str.2
	.asciz	"%s: Internal clock never stabilised.\n"

	.no_dead_strip	_esdhc_of_set_clock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function esdhc_of_set_clock
_esdhc_of_set_clock:                    ; @esdhc_of_set_clock
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x19, x0
	bl	_sdhci_priv
	bl	_sdhci_pltfm_priv
	ldr	x8, [x19, #8]
	str	wzr, [x8]
	cbz	w21, LBB0_20
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x9, _VENDOR_V_23@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VENDOR_V_23@GOTPAGEOFF]
	ldr	x10, [x0]
Lloh2:
	ldr	x9, [x9]
	cmp	x10, x9
	mov	w9, #1
	cinc	w23, w9, lt
	ldr	x0, [x8, #16]
	cbz	x0, LBB0_5
; %bb.2:
	bl	_mmc_card_sd
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	x9, [x19, #8]
	ldr	x9, [x9, #8]
Lloh3:
	adrp	x10, _MMC_TIMING_LEGACY@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MMC_TIMING_LEGACY@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_7
LBB0_5:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_8
; %bb.6:
	ldr	x8, [x8, #8]
	ldr	x9, [x19, #8]
	ldr	x9, [x9, #8]
	add	x8, x8, x9, lsl #3
LBB0_7:
	ldr	x8, [x8]
LBB0_8:
	cmp	x8, w21, uxtw
	ccmp	x8, #0, #4, lt
	csel	w21, w8, w21, ne
Lloh6:
	adrp	x22, _ESDHC_SYSTEM_CONTROL@GOTPAGE
Lloh7:
	ldr	x22, [x22, _ESDHC_SYSTEM_CONTROL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_sdhci_readl
Lloh8:
	adrp	x8, _ESDHC_CLOCK_SDCLKEN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ESDHC_CLOCK_SDCLKEN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _ESDHC_CLOCK_IPGEN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ESDHC_CLOCK_IPGEN@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh14:
	adrp	x26, _ESDHC_CLOCK_HCKEN@GOTPAGE
Lloh15:
	ldr	x26, [x26, _ESDHC_CLOCK_HCKEN@GOTPAGEOFF]
	ldr	w9, [x26]
	orr	w8, w8, w9
Lloh16:
	adrp	x27, _ESDHC_CLOCK_PEREN@GOTPAGE
Lloh17:
	ldr	x27, [x27, _ESDHC_CLOCK_PEREN@GOTPAGEOFF]
	ldr	w9, [x27]
	orr	w8, w8, w9
Lloh18:
	adrp	x9, _ESDHC_CLOCK_MASK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _ESDHC_CLOCK_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w8, w9
	bic	w1, w0, w8
	ldr	w2, [x22]
	mov	x0, x19
	bl	_sdhci_writel
	ldr	w8, [x19]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x28, x23
	sdiv	w9, w8, w23
	add	w10, w9, #15
	cmp	w9, #0
	csel	w10, w10, w9, lt
	cmp	w21, w10, asr #4
	b.hs	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	lsl	w23, w28, #1
	cmp	w28, #256
	b.lo	LBB0_9
LBB0_11:
	mov	w8, #0
	mov	w24, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	add	w24, w24, #1
	add	w8, w8, w28
	cmp	w24, #15
	b.hi	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	sdiv	w10, w9, w24
	cmp	w10, w21
	b.hi	LBB0_12
LBB0_14:
	ldr	x9, [x20, #16]
Lloh21:
	adrp	x25, _MMC_HS200_MAX_DTR@GOTPAGE
Lloh22:
	ldr	x25, [x25, _MMC_HS200_MAX_DTR@GOTPAGEOFF]
Lloh23:
	adrp	x23, _MMC_TIMING_MMC_HS400@GOTPAGE
Lloh24:
	ldr	x23, [x23, _MMC_TIMING_MMC_HS400@GOTPAGEOFF]
	cbz	x9, LBB0_26
; %bb.15:
	ldr	w9, [x25]
	cmp	w21, w9
	b.ne	LBB0_26
; %bb.16:
	ldr	x0, [x19, #8]
	ldr	x9, [x0, #8]
	ldr	x10, [x23]
	cmp	x9, x10
	b.eq	LBB0_18
; %bb.17:
	ldr	w9, [x19, #4]
Lloh25:
	adrp	x10, _SDHCI_HS400_TUNING@GOTPAGE
Lloh26:
	ldr	x10, [x10, _SDHCI_HS400_TUNING@GOTPAGEOFF]
Lloh27:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_26
LBB0_18:
	cmp	w8, #5
	b.hs	LBB0_21
; %bb.19:
	mov	w28, #4
	mov	w24, #1
	b	LBB0_26
LBB0_20:
	mov	x0, x19
	mov	w1, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_esdhc_clock_enable
LBB0_21:
	cmp	w8, #9
	b.hs	LBB0_23
; %bb.22:
	mov	w28, #4
	mov	w24, #2
	b	LBB0_26
LBB0_23:
	cmp	w8, #13
	b.hs	LBB0_25
; %bb.24:
	mov	w28, #4
	mov	w24, #3
	b	LBB0_26
LBB0_25:
	bl	_mmc_hostname
	mov	x1, x0
Lloh28:
	adrp	x0, l_.str@PAGE
Lloh29:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
LBB0_26:
	ldr	x0, [x19, #8]
	bl	_mmc_dev
	ldr	w8, [x19]
	sdiv	w8, w8, w28
	sdiv	w3, w8, w24
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_dev_dbg
	ldr	w8, [x19]
	sdiv	w8, w8, w28
	sdiv	w8, w8, w24
	ldr	x9, [x19, #8]
	str	w8, [x9]
	mul	w8, w28, w24
	str	w8, [x20, #8]
	asr	w20, w28, #1
	sub	w24, w24, #1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_sdhci_readl
Lloh32:
	adrp	x8, _ESDHC_CLOCK_IPGEN@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ESDHC_CLOCK_IPGEN@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	ldr	w9, [x26]
	ldr	w10, [x27]
Lloh35:
	adrp	x11, _ESDHC_DIVIDER_SHIFT@GOTPAGE
Lloh36:
	ldr	x11, [x11, _ESDHC_DIVIDER_SHIFT@GOTPAGEOFF]
Lloh37:
	ldr	w11, [x11]
	lsl	w11, w24, w11
Lloh38:
	adrp	x12, _ESDHC_PREDIV_SHIFT@GOTPAGE
Lloh39:
	ldr	x12, [x12, _ESDHC_PREDIV_SHIFT@GOTPAGEOFF]
Lloh40:
	ldr	w12, [x12]
	lsl	w12, w20, w12
	orr	w8, w8, w0
	orr	w8, w8, w9
	orr	w8, w8, w10
	orr	w8, w8, w11
	orr	w1, w8, w12
	ldr	w2, [x22]
	mov	x0, x19
	bl	_sdhci_writel
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_29
; %bb.27:
	ldr	w8, [x25]
	cmp	w21, w8
	b.ne	LBB0_29
; %bb.28:
Lloh41:
	adrp	x20, _ESDHC_TBCTL@GOTPAGE
Lloh42:
	ldr	x20, [x20, _ESDHC_TBCTL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_sdhci_readl
Lloh43:
	adrp	x8, _ESDHC_HS400_MODE@GOTPAGE
Lloh44:
	ldr	x8, [x8, _ESDHC_HS400_MODE@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w2, [x20]
	mov	x0, x19
	bl	_sdhci_writel
Lloh46:
	adrp	x21, _ESDHC_SDCLKCTL@GOTPAGE
Lloh47:
	ldr	x21, [x21, _ESDHC_SDCLKCTL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_sdhci_readl
Lloh48:
	adrp	x8, _ESDHC_CMD_CLK_CTL@GOTPAGE
Lloh49:
	ldr	x8, [x8, _ESDHC_CMD_CLK_CTL@GOTPAGEOFF]
Lloh50:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w2, [x21]
	mov	x0, x19
	bl	_sdhci_writel
	mov	x0, x19
	mov	w1, #1
	bl	_esdhc_clock_enable
Lloh51:
	adrp	x21, _ESDHC_DLLCFG0@GOTPAGE
Lloh52:
	ldr	x21, [x21, _ESDHC_DLLCFG0@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_sdhci_readl
Lloh53:
	adrp	x8, _ESDHC_DLL_ENABLE@GOTPAGE
Lloh54:
	ldr	x8, [x8, _ESDHC_DLL_ENABLE@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
	orr	w8, w8, w0
	ldr	x9, [x19, #8]
	ldr	w9, [x9]
Lloh56:
	adrp	x10, _ESDHC_DLL_FREQ_SEL@GOTPAGE
Lloh57:
	ldr	x10, [x10, _ESDHC_DLL_FREQ_SEL@GOTPAGEOFF]
	ldr	w11, [x25]
Lloh58:
	ldr	w10, [x10]
	cmp	w9, w11
	csel	w9, w10, wzr, eq
	orr	w1, w8, w9
	ldr	w2, [x21]
	mov	x0, x19
	bl	_sdhci_writel
	ldr	w1, [x20]
	mov	x0, x19
	bl	_sdhci_readl
Lloh59:
	adrp	x8, _ESDHC_HS400_WNDW_ADJUST@GOTPAGE
Lloh60:
	ldr	x8, [x8, _ESDHC_HS400_WNDW_ADJUST@GOTPAGEOFF]
Lloh61:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w2, [x20]
	mov	x0, x19
	bl	_sdhci_writel
	mov	x0, x19
	mov	w1, #0
	bl	_esdhc_clock_enable
Lloh62:
	adrp	x20, _ESDHC_DMA_SYSCTL@GOTPAGE
Lloh63:
	ldr	x20, [x20, _ESDHC_DMA_SYSCTL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_sdhci_readl
Lloh64:
	adrp	x8, _ESDHC_FLUSH_ASYNC_FIFO@GOTPAGE
Lloh65:
	ldr	x8, [x8, _ESDHC_FLUSH_ASYNC_FIFO@GOTPAGEOFF]
Lloh66:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w2, [x20]
	mov	x0, x19
	bl	_sdhci_writel
LBB0_29:
	bl	_ktime_get
	mov	w1, #20
	bl	_ktime_add_ms
	mov	x20, x0
	bl	_ktime_get
	mov	x1, x20
	bl	_ktime_after
	mov	x21, x0
Lloh67:
	adrp	x23, _ESDHC_PRSSTAT@GOTPAGE
Lloh68:
	ldr	x23, [x23, _ESDHC_PRSSTAT@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_sdhci_readl
Lloh69:
	adrp	x24, _ESDHC_CLOCK_STABLE@GOTPAGE
Lloh70:
	ldr	x24, [x24, _ESDHC_CLOCK_STABLE@GOTPAGEOFF]
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24]
	tst	w8, w0
	b.ne	LBB0_33
; %bb.31:                               ;   in Loop: Header=BB0_30 Depth=1
	cbnz	w21, LBB0_34
; %bb.32:                               ;   in Loop: Header=BB0_30 Depth=1
	mov	w0, #10
	bl	_udelay
	bl	_ktime_get
	mov	x1, x20
	bl	_ktime_after
	mov	x21, x0
	ldr	w1, [x23]
	mov	x0, x19
	bl	_sdhci_readl
	b	LBB0_30
LBB0_33:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_sdhci_readl
Lloh71:
	adrp	x8, _ESDHC_CLOCK_SDCLKEN@GOTPAGE
Lloh72:
	ldr	x8, [x8, _ESDHC_CLOCK_SDCLKEN@GOTPAGEOFF]
Lloh73:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w2, [x22]
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_sdhci_writel
LBB0_34:
	ldr	x0, [x19, #8]
	bl	_mmc_hostname
	mov	x1, x0
Lloh74:
	adrp	x0, l_.str.2@PAGE
Lloh75:
	add	x0, x0, l_.str.2@PAGEOFF
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_pr_err
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGot	Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh69, Lloh70
	.loh AdrpLdrGot	Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpAdd	Lloh74, Lloh75
	.cfi_endproc
                                        ; -- End function
	.comm	_VENDOR_V_23,8,3                ; @VENDOR_V_23
	.comm	_MMC_TIMING_LEGACY,8,3          ; @MMC_TIMING_LEGACY
	.comm	_ESDHC_SYSTEM_CONTROL,4,2       ; @ESDHC_SYSTEM_CONTROL
	.comm	_ESDHC_CLOCK_SDCLKEN,4,2        ; @ESDHC_CLOCK_SDCLKEN
	.comm	_ESDHC_CLOCK_IPGEN,4,2          ; @ESDHC_CLOCK_IPGEN
	.comm	_ESDHC_CLOCK_HCKEN,4,2          ; @ESDHC_CLOCK_HCKEN
	.comm	_ESDHC_CLOCK_PEREN,4,2          ; @ESDHC_CLOCK_PEREN
	.comm	_ESDHC_CLOCK_MASK,4,2           ; @ESDHC_CLOCK_MASK
	.comm	_MMC_HS200_MAX_DTR,4,2          ; @MMC_HS200_MAX_DTR
	.comm	_MMC_TIMING_MMC_HS400,8,3       ; @MMC_TIMING_MMC_HS400
	.comm	_SDHCI_HS400_TUNING,4,2         ; @SDHCI_HS400_TUNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: using unsupported clock division.\n"

l_.str.1:                               ; @.str.1
	.asciz	"desired SD clock: %d, actual: %d\n"

	.comm	_ESDHC_DIVIDER_SHIFT,4,2        ; @ESDHC_DIVIDER_SHIFT
	.comm	_ESDHC_PREDIV_SHIFT,4,2         ; @ESDHC_PREDIV_SHIFT
	.comm	_ESDHC_TBCTL,4,2                ; @ESDHC_TBCTL
	.comm	_ESDHC_HS400_MODE,4,2           ; @ESDHC_HS400_MODE
	.comm	_ESDHC_SDCLKCTL,4,2             ; @ESDHC_SDCLKCTL
	.comm	_ESDHC_CMD_CLK_CTL,4,2          ; @ESDHC_CMD_CLK_CTL
	.comm	_ESDHC_DLLCFG0,4,2              ; @ESDHC_DLLCFG0
	.comm	_ESDHC_DLL_ENABLE,4,2           ; @ESDHC_DLL_ENABLE
	.comm	_ESDHC_DLL_FREQ_SEL,4,2         ; @ESDHC_DLL_FREQ_SEL
	.comm	_ESDHC_HS400_WNDW_ADJUST,4,2    ; @ESDHC_HS400_WNDW_ADJUST
	.comm	_ESDHC_DMA_SYSCTL,4,2           ; @ESDHC_DMA_SYSCTL
	.comm	_ESDHC_FLUSH_ASYNC_FIFO,4,2     ; @ESDHC_FLUSH_ASYNC_FIFO
	.comm	_ESDHC_PRSSTAT,4,2              ; @ESDHC_PRSSTAT
	.comm	_ESDHC_CLOCK_STABLE,4,2         ; @ESDHC_CLOCK_STABLE
l_.str.2:                               ; @.str.2
	.asciz	"%s: Internal clock never stabilised.\n"

	.no_dead_strip	_esdhc_of_set_clock
.subsections_via_symbols
