	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lapic_timer_setup
_lapic_timer_setup:                     ## @lapic_timer_setup
	.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	_CLOCK_EVT_FEAT_DUMMY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rsi)
	je	LBB0_1
## %bb.6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	movl	%edi, %ebx
	callq	_local_irq_save
	leal	-128(%rbx), %eax
	cmpl	$2, %eax
	jb	LBB0_4
## %bb.2:
	leal	-131(%rbx), %eax
	cmpl	$1, %eax
	ja	LBB0_5
## %bb.3:
	movq	_calibration_result@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	cmpl	$131, %ebx
	setne	%sil
	movl	$1, %edx
	callq	___setup_APIC_LVTT
	jmp	LBB0_5
LBB0_4:
	movq	_APIC_LVTT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_apic_read
	movq	_APIC_LVT_MASKED@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_LOCAL_TIMER_VECTOR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_apic_write
	movq	_APIC_TMICT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$-1, %esi
	callq	_apic_write
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_local_irq_restore              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CLOCK_EVT_FEAT_DUMMY,4,2       ## @CLOCK_EVT_FEAT_DUMMY
	.comm	_calibration_result,4,2         ## @calibration_result
	.comm	_APIC_LVTT,4,2                  ## @APIC_LVTT
	.comm	_APIC_LVT_MASKED,4,2            ## @APIC_LVT_MASKED
	.comm	_LOCAL_TIMER_VECTOR,4,2         ## @LOCAL_TIMER_VECTOR
	.comm	_APIC_TMICT,4,2                 ## @APIC_TMICT
	.no_dead_strip	_lapic_timer_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lapic_timer_setup
_lapic_timer_setup:                     ; @lapic_timer_setup
	.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
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _CLOCK_EVT_FEAT_DUMMY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CLOCK_EVT_FEAT_DUMMY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x0
	bl	_local_irq_save
	sub	w8, w19, #128
	cmp	w8, #2
	b.lo	LBB0_5
; %bb.3:
	sub	w8, w19, #131
	cmp	w8, #1
	b.hi	LBB0_6
; %bb.4:
Lloh3:
	adrp	x8, _calibration_result@GOTPAGE
Lloh4:
	ldr	x8, [x8, _calibration_result@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	cmp	w19, #131
	cset	w1, ne
	mov	w2, #1
	bl	___setup_APIC_LVTT
	b	LBB0_6
LBB0_5:
Lloh6:
	adrp	x19, _APIC_LVTT@GOTPAGE
Lloh7:
	ldr	x19, [x19, _APIC_LVTT@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_apic_read
Lloh8:
	adrp	x8, _APIC_LVT_MASKED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _APIC_LVT_MASKED@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _LOCAL_TIMER_VECTOR@GOTPAGE
Lloh12:
	ldr	x9, [x9, _LOCAL_TIMER_VECTOR@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w1, w8, w9
	ldr	w0, [x19]
	bl	_apic_write
Lloh14:
	adrp	x8, _APIC_TMICT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _APIC_TMICT@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	mov	w1, #-1
	bl	_apic_write
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_local_irq_restore
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CLOCK_EVT_FEAT_DUMMY,4,2       ; @CLOCK_EVT_FEAT_DUMMY
	.comm	_calibration_result,4,2         ; @calibration_result
	.comm	_APIC_LVTT,4,2                  ; @APIC_LVTT
	.comm	_APIC_LVT_MASKED,4,2            ; @APIC_LVT_MASKED
	.comm	_LOCAL_TIMER_VECTOR,4,2         ; @LOCAL_TIMER_VECTOR
	.comm	_APIC_TMICT,4,2                 ; @APIC_TMICT
	.no_dead_strip	_lapic_timer_setup
.subsections_via_symbols
