	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lapic_et_start
_lapic_et_start:                        ## @lapic_et_start
	.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
	movl	%edx, %r12d
	movq	%rdi, %r14
	movq	_lapics@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_apic_id@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PCPU_GET
	leaq	(%rbx,%rax,4), %r15
	testl	%r12d, %r12d
	je	LBB0_2
## %bb.1:
	movq	_LAT_MODE_PERIODIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_lapic_change_mode
	movq	%r15, %rdi
	callq	_lapic_timer_periodic
	jmp	LBB0_5
LBB0_2:
	movq	_lapic_timer_tsc_deadline@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_LAT_MODE_DEADLINE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_lapic_change_mode
	movq	%r15, %rdi
	callq	_lapic_timer_deadline
	jmp	LBB0_5
LBB0_4:
	movq	_LAT_MODE_ONESHOT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_lapic_change_mode
	movq	%r15, %rdi
	callq	_lapic_timer_oneshot
LBB0_5:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_lapics,8,3                     ## @lapics
	.comm	_apic_id,4,2                    ## @apic_id
	.comm	_LAT_MODE_PERIODIC,4,2          ## @LAT_MODE_PERIODIC
	.comm	_lapic_timer_tsc_deadline,8,3   ## @lapic_timer_tsc_deadline
	.comm	_LAT_MODE_DEADLINE,4,2          ## @LAT_MODE_DEADLINE
	.comm	_LAT_MODE_ONESHOT,4,2           ## @LAT_MODE_ONESHOT
	.no_dead_strip	_lapic_et_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lapic_et_start
_lapic_et_start:                        ; @lapic_et_start
	.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	x21, x2
	mov	x20, x0
Lloh0:
	adrp	x8, _lapics@GOTPAGE
Lloh1:
	ldr	x8, [x8, _lapics@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
Lloh3:
	adrp	x8, _apic_id@GOTPAGE
Lloh4:
	ldr	x8, [x8, _apic_id@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_PCPU_GET
	add	x19, x19, x0, lsl #2
	cbz	w21, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _LAT_MODE_PERIODIC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LAT_MODE_PERIODIC@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_lapic_change_mode
	mov	x0, x19
	bl	_lapic_timer_periodic
	b	LBB0_5
LBB0_2:
Lloh9:
	adrp	x8, _lapic_timer_tsc_deadline@GOTPAGE
Lloh10:
	ldr	x8, [x8, _lapic_timer_tsc_deadline@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
Lloh12:
	adrp	x8, _LAT_MODE_DEADLINE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LAT_MODE_DEADLINE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_lapic_change_mode
	mov	x0, x19
	bl	_lapic_timer_deadline
	b	LBB0_5
LBB0_4:
Lloh15:
	adrp	x8, _LAT_MODE_ONESHOT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LAT_MODE_ONESHOT@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_lapic_change_mode
	mov	x0, x19
	bl	_lapic_timer_oneshot
LBB0_5:
	mov	w0, #0
	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
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_lapics,8,3                     ; @lapics
	.comm	_apic_id,4,2                    ; @apic_id
	.comm	_LAT_MODE_PERIODIC,4,2          ; @LAT_MODE_PERIODIC
	.comm	_lapic_timer_tsc_deadline,8,3   ; @lapic_timer_tsc_deadline
	.comm	_LAT_MODE_DEADLINE,4,2          ; @LAT_MODE_DEADLINE
	.comm	_LAT_MODE_ONESHOT,4,2           ; @LAT_MODE_ONESHOT
	.no_dead_strip	_lapic_et_start
.subsections_via_symbols
