	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msm_hc_select_hs400
_msm_hc_select_hs400:                   ## @msm_hc_select_hs400
	.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, %r14
	callq	_sdhci_priv
	movq	%rax, %rdi
	callq	_sdhci_pltfm_priv
	movq	%rax, %r12
	movq	(%r14), %rax
	movq	(%rax), %rbx
	movq	24(%r12), %r15
	movq	8(%r15), %rdi
	addq	8(%r14), %rdi
	callq	_readl_relaxed
	movq	_CORE_HC_MCLK_SEL_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	movq	_CORE_HC_MCLK_SEL_HS400@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	8(%r15), %rsi
	addq	8(%r14), %rsi
	callq	_writel_relaxed
	orq	16(%r12), %rbx
	je	LBB0_3
## %bb.1:
	cmpl	$0, 8(%r12)
	je	LBB0_2
LBB0_3:
	cmpl	$0, 4(%r12)
	jne	LBB0_7
LBB0_4:
	cmpl	$0, (%r12)
	jne	LBB0_7
## %bb.5:
	movq	(%r15), %rdi
	addq	8(%r14), %rdi
	xorl	%edx, %edx
	movl	$10, %ecx
	movl	$1000, %r8d                     ## imm = 0x3E8
	callq	_readl_relaxed_poll_timeout
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	jne	LBB0_7
## %bb.6:
	movq	(%r14), %rdi
	callq	_mmc_hostname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	jmp	LBB0_7
LBB0_2:
	movq	8(%r15), %rdi
	addq	8(%r14), %rdi
	callq	_readl_relaxed
	movq	_CORE_HC_SELECT_IN_HS400@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_CORE_HC_SELECT_IN_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	8(%r15), %rsi
	addq	8(%r14), %rsi
	movl	%eax, %edi
	callq	_writel_relaxed
	cmpl	$0, 4(%r12)
	je	LBB0_4
LBB0_7:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wmb                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CORE_HC_MCLK_SEL_MASK,4,2      ## @CORE_HC_MCLK_SEL_MASK
	.comm	_CORE_HC_MCLK_SEL_HS400,4,2     ## @CORE_HC_MCLK_SEL_HS400
	.comm	_CORE_HC_SELECT_IN_HS400,4,2    ## @CORE_HC_SELECT_IN_HS400
	.comm	_CORE_HC_SELECT_IN_EN,4,2       ## @CORE_HC_SELECT_IN_EN
	.comm	_CORE_DLL_LOCK,4,2              ## @CORE_DLL_LOCK
	.comm	_CORE_DDR_DLL_LOCK,4,2          ## @CORE_DDR_DLL_LOCK
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Unable to get DLL_LOCK/DDR_DLL_LOCK, dll_status: 0x%08x\n"

	.no_dead_strip	_msm_hc_select_hs400
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msm_hc_select_hs400
_msm_hc_select_hs400:                   ; @msm_hc_select_hs400
	.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	_sdhci_priv
	bl	_sdhci_pltfm_priv
	mov	x20, x0
	ldp	x8, x9, [x19]
	ldr	x22, [x8]
	ldr	x21, [x0, #24]
	ldr	x8, [x21, #8]
	add	x0, x8, x9
	bl	_readl_relaxed
Lloh0:
	adrp	x8, _CORE_HC_MCLK_SEL_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CORE_HC_MCLK_SEL_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _CORE_HC_MCLK_SEL_HS400@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CORE_HC_MCLK_SEL_HS400@GOTPAGEOFF]
	bic	w8, w0, w8
Lloh5:
	ldr	w9, [x9]
	orr	w0, w8, w9
	ldr	x8, [x19, #8]
	ldr	x9, [x21, #8]
	add	x1, x9, x8
	bl	_writel_relaxed
	ldr	x8, [x20, #16]
	orr	x8, x8, x22
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_6
LBB0_2:
	ldr	w8, [x20, #4]
	cbnz	w8, LBB0_7
LBB0_3:
	ldr	w8, [x20]
	cbnz	w8, LBB0_7
; %bb.4:
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x0, x9, x8
	mov	w2, #0
	mov	w3, #10
	mov	w4, #1000
	bl	_readl_relaxed_poll_timeout
Lloh6:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_7
; %bb.5:
	ldr	x0, [x19]
	bl	_mmc_hostname
	mov	x1, x0
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_7
LBB0_6:
	ldr	x8, [x19, #8]
	ldr	x9, [x21, #8]
	add	x0, x9, x8
	bl	_readl_relaxed
Lloh11:
	adrp	x8, _CORE_HC_SELECT_IN_HS400@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CORE_HC_SELECT_IN_HS400@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _CORE_HC_SELECT_IN_EN@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CORE_HC_SELECT_IN_EN@GOTPAGEOFF]
	orr	w8, w8, w0
Lloh16:
	ldr	w9, [x9]
	orr	w0, w8, w9
	ldr	x8, [x19, #8]
	ldr	x9, [x21, #8]
	add	x1, x9, x8
	bl	_writel_relaxed
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_3
LBB0_7:
	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	_wmb
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_CORE_HC_MCLK_SEL_MASK,4,2      ; @CORE_HC_MCLK_SEL_MASK
	.comm	_CORE_HC_MCLK_SEL_HS400,4,2     ; @CORE_HC_MCLK_SEL_HS400
	.comm	_CORE_HC_SELECT_IN_HS400,4,2    ; @CORE_HC_SELECT_IN_HS400
	.comm	_CORE_HC_SELECT_IN_EN,4,2       ; @CORE_HC_SELECT_IN_EN
	.comm	_CORE_DLL_LOCK,4,2              ; @CORE_DLL_LOCK
	.comm	_CORE_DDR_DLL_LOCK,4,2          ; @CORE_DDR_DLL_LOCK
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Unable to get DLL_LOCK/DDR_DLL_LOCK, dll_status: 0x%08x\n"

	.no_dead_strip	_msm_hc_select_hs400
.subsections_via_symbols
