	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function native_apic_enable_vector
_native_apic_enable_vector:             ## @native_apic_enable_vector
	.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
	movl	%esi, %ebx
	movq	_IDT_SYSCALL@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	%esi, (%rax)
	setne	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	_ioint_handlers@GOTPCREL(%rip), %r14
	leal	31(%rbx), %eax
	testl	%ebx, %ebx
	cmovnsl	%ebx, %eax
	movq	(%r14), %rcx
	sarl	$5, %eax
	movslq	%eax, %r15
	xorl	%edi, %edi
	cmpq	$0, (%rcx,%r15,8)
	setne	%dil
	movslq	%ebx, %rsi
	callq	_KASSERT
	movq	_pti@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_ioint_pti_handlers@GOTPCREL(%rip), %r14
LBB0_2:
	movq	(%r14), %rax
	movq	(%rax,%r15,8), %rsi
	movq	_SDT_APIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SEL_KPL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_GSEL_APIC@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_setidt                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IDT_SYSCALL,4,2                ## @IDT_SYSCALL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Attempt to overwrite syscall entry"

	.comm	_ioint_handlers,8,3             ## @ioint_handlers
	.comm	_pti,8,3                        ## @pti
	.comm	_ioint_pti_handlers,8,3         ## @ioint_pti_handlers
	.comm	_SDT_APIC,4,2                   ## @SDT_APIC
	.comm	_SEL_KPL,4,2                    ## @SEL_KPL
	.comm	_GSEL_APIC,4,2                  ## @GSEL_APIC
	.comm	_IDT_DTRACE_RET,4,2             ## @IDT_DTRACE_RET
	.no_dead_strip	_native_apic_enable_vector
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function native_apic_enable_vector
_native_apic_enable_vector:             ; @native_apic_enable_vector
	.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, x1
Lloh0:
	adrp	x8, _IDT_SYSCALL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IDT_SYSCALL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	cset	w0, ne
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
Lloh5:
	adrp	x20, _ioint_handlers@GOTPAGE
Lloh6:
	ldr	x20, [x20, _ioint_handlers@GOTPAGEOFF]
	ldr	x8, [x20]
	add	w9, w19, #31
	cmp	w19, #0
	csel	w9, w9, w19, lt
	asr	w9, w9, #5
	sbfiz	x21, x9, #3, #32
	ldr	x8, [x8, x21]
	cmp	x8, #0
	cset	w0, ne
	sxtw	x1, w19
	bl	_KASSERT
Lloh7:
	adrp	x8, _pti@GOTPAGE
Lloh8:
	ldr	x8, [x8, _pti@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _ioint_pti_handlers@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ioint_pti_handlers@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x20, x9, eq
	ldr	x8, [x8]
	ldr	x1, [x8, x21]
Lloh12:
	adrp	x8, _SDT_APIC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SDT_APIC@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x8, _SEL_KPL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SEL_KPL@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
Lloh18:
	adrp	x8, _GSEL_APIC@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GSEL_APIC@GOTPAGEOFF]
Lloh20:
	ldr	w4, [x8]
	mov	x0, x19
	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	_setidt
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IDT_SYSCALL,4,2                ; @IDT_SYSCALL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Attempt to overwrite syscall entry"

	.comm	_ioint_handlers,8,3             ; @ioint_handlers
	.comm	_pti,8,3                        ; @pti
	.comm	_ioint_pti_handlers,8,3         ; @ioint_pti_handlers
	.comm	_SDT_APIC,4,2                   ; @SDT_APIC
	.comm	_SEL_KPL,4,2                    ; @SEL_KPL
	.comm	_GSEL_APIC,4,2                  ; @GSEL_APIC
	.comm	_IDT_DTRACE_RET,4,2             ; @IDT_DTRACE_RET
	.no_dead_strip	_native_apic_enable_vector
.subsections_via_symbols
