	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spear_smi_hw_init
_spear_smi_hw_init:                     ## @spear_smi_hw_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	20(%rdi), %edi
	callq	_clk_get_rate
	movl	16(%r14), %esi
	movq	%rax, %rdi
	callq	_DIV_ROUND_UP
	movl	%eax, %ebx
	movq	_HOLD1@GOTPCREL(%rip), %rax
	movq	_BANK_EN@GOTPCREL(%rip), %rcx
	movq	_DSEL_TIME@GOTPCREL(%rip), %rdx
	shll	$8, %ebx
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
	orl	(%rdx), %ebx
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_SMI_SR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r14), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	_SMI_CR1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r14), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HOLD1,4,2                      ## @HOLD1
	.comm	_BANK_EN,4,2                    ## @BANK_EN
	.comm	_DSEL_TIME,4,2                  ## @DSEL_TIME
	.comm	_SMI_SR,8,3                     ## @SMI_SR
	.comm	_SMI_CR1,8,3                    ## @SMI_CR1
	.no_dead_strip	_spear_smi_hw_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spear_smi_hw_init
_spear_smi_hw_init:                     ; @spear_smi_hw_init
	.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
	ldr	w0, [x0, #20]
	bl	_clk_get_rate
	ldr	w1, [x19, #16]
	bl	_DIV_ROUND_UP
Lloh0:
	adrp	x8, _HOLD1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HOLD1@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _BANK_EN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BANK_EN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _DSEL_TIME@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DSEL_TIME@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w8, w8, w0, lsl #8
	orr	w8, w8, w9
	orr	w20, w8, w10
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x9, _SMI_SR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SMI_SR@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	ldr	x8, [x19, #8]
Lloh12:
	adrp	x9, _SMI_CR1@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SMI_CR1@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x20
	bl	_writel
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_HOLD1,4,2                      ; @HOLD1
	.comm	_BANK_EN,4,2                    ; @BANK_EN
	.comm	_DSEL_TIME,4,2                  ; @DSEL_TIME
	.comm	_SMI_SR,8,3                     ; @SMI_SR
	.comm	_SMI_CR1,8,3                    ; @SMI_CR1
	.no_dead_strip	_spear_smi_hw_init
.subsections_via_symbols
