	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uniphier_sd_host_init
_uniphier_sd_host_init:                 ## @uniphier_sd_host_init
	.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, %r14
	callq	_uniphier_sd_priv
	movq	%rax, %rbx
	movq	_UNIPHIER_SD_CAP_EXTENDED_IP@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	andl	(%rbx), %eax
	movl	$257, %edi                      ## imm = 0x101
	cmovel	%eax, %edi
	movq	_UNIPHIER_SD_HOST_MODE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	callq	_writel
	movl	(%r15), %edi
	andl	(%rbx), %edi
	je	LBB0_2
## %bb.1:
	movq	_UNIPHIER_SD_CLKCTL_OFFEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_2:
	movq	_CTL_SD_CARD_CLK_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	movslq	%eax, %rsi
	addq	(%r14), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_UNIPHIER_SD_CAP_EXTENDED_IP,4,2 ## @UNIPHIER_SD_CAP_EXTENDED_IP
	.comm	_UNIPHIER_SD_HOST_MODE,8,3      ## @UNIPHIER_SD_HOST_MODE
	.comm	_UNIPHIER_SD_CLKCTL_OFFEN,4,2   ## @UNIPHIER_SD_CLKCTL_OFFEN
	.comm	_CTL_SD_CARD_CLK_CTL,4,2        ## @CTL_SD_CARD_CLK_CTL
	.no_dead_strip	_uniphier_sd_host_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uniphier_sd_host_init
_uniphier_sd_host_init:                 ; @uniphier_sd_host_init
	.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	_uniphier_sd_priv
	mov	x20, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x21, _UNIPHIER_SD_CAP_EXTENDED_IP@GOTPAGE
Lloh1:
	ldr	x21, [x21, _UNIPHIER_SD_CAP_EXTENDED_IP@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	mov	w8, #257
	csel	w0, wzr, w8, eq
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _UNIPHIER_SD_HOST_MODE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _UNIPHIER_SD_HOST_MODE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w8, [x20]
Lloh5:
	adrp	x9, _UNIPHIER_SD_CLKCTL_OFFEN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _UNIPHIER_SD_CLKCTL_OFFEN@GOTPAGEOFF]
	ldr	w10, [x21]
Lloh7:
	ldr	w9, [x9]
	tst	w10, w8
	csel	w0, wzr, w9, eq
Lloh8:
	adrp	x8, _CTL_SD_CARD_CLK_CTL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CTL_SD_CARD_CLK_CTL@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh10:
	ldr	w8, [x8]
	lsl	w8, w8, #1
	add	x1, x9, w8, sxtw
	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	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_UNIPHIER_SD_CAP_EXTENDED_IP,4,2 ; @UNIPHIER_SD_CAP_EXTENDED_IP
	.comm	_UNIPHIER_SD_HOST_MODE,8,3      ; @UNIPHIER_SD_HOST_MODE
	.comm	_UNIPHIER_SD_CLKCTL_OFFEN,4,2   ; @UNIPHIER_SD_CLKCTL_OFFEN
	.comm	_CTL_SD_CARD_CLK_CTL,4,2        ; @CTL_SD_CARD_CLK_CTL
	.no_dead_strip	_uniphier_sd_host_init
.subsections_via_symbols
