	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lima_pmu_init                  ## -- Begin function lima_pmu_init
	.p2align	4, 0x90
_lima_pmu_init:                         ## @lima_pmu_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_LIMA_PMU_INT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_pmu_write
	movq	_LIMA_PMU_SW_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$65535, %esi                    ## imm = 0xFFFF
	callq	_pmu_write
	movq	_LIMA_PMU_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_pmu_read
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_LIMA_PMU_POWER_UP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%eax, %esi
	callq	_pmu_write
	movq	%rbx, %rdi
	callq	_lima_pmu_wait_cmd
	testl	%eax, %eax
	jne	LBB0_3
LBB0_2:
	xorl	%eax, %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LIMA_PMU_INT_MASK,4,2          ## @LIMA_PMU_INT_MASK
	.comm	_LIMA_PMU_SW_DELAY,4,2          ## @LIMA_PMU_SW_DELAY
	.comm	_LIMA_PMU_STATUS,4,2            ## @LIMA_PMU_STATUS
	.comm	_LIMA_PMU_POWER_UP,4,2          ## @LIMA_PMU_POWER_UP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lima_pmu_init                  ; -- Begin function lima_pmu_init
	.p2align	2
_lima_pmu_init:                         ; @lima_pmu_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
Lloh0:
	adrp	x8, _LIMA_PMU_INT_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LIMA_PMU_INT_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_pmu_write
Lloh3:
	adrp	x8, _LIMA_PMU_SW_DELAY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LIMA_PMU_SW_DELAY@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w1, #65535
	bl	_pmu_write
Lloh6:
	adrp	x8, _LIMA_PMU_STATUS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LIMA_PMU_STATUS@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_pmu_read
	cbz	w0, LBB0_2
; %bb.1:
	mov	x1, x0
Lloh9:
	adrp	x8, _LIMA_PMU_POWER_UP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LIMA_PMU_POWER_UP@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_pmu_write
	mov	x0, x19
	bl	_lima_pmu_wait_cmd
	cbnz	w0, LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_LIMA_PMU_INT_MASK,4,2          ; @LIMA_PMU_INT_MASK
	.comm	_LIMA_PMU_SW_DELAY,4,2          ; @LIMA_PMU_SW_DELAY
	.comm	_LIMA_PMU_STATUS,4,2            ; @LIMA_PMU_STATUS
	.comm	_LIMA_PMU_POWER_UP,4,2          ; @LIMA_PMU_POWER_UP
.subsections_via_symbols
