	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function native_lapic_id
_native_lapic_id:                       ## @native_lapic_id
	.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	_x2apic_mode@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	_lapic_map@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	orq	(%rcx), %rax
	setne	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	_LAPIC_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_lapic_read32
	xorl	%ecx, %ecx
	cmpq	$0, (%rbx)
	jne	LBB0_2
## %bb.1:
	movq	_APIC_ID_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_2:
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_x2apic_mode,8,3                ## @x2apic_mode
	.comm	_lapic_map,8,3                  ## @lapic_map
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"local APIC is not mapped"

	.comm	_LAPIC_ID,4,2                   ## @LAPIC_ID
	.comm	_APIC_ID_SHIFT,4,2              ## @APIC_ID_SHIFT
	.no_dead_strip	_native_lapic_id
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function native_lapic_id
_native_lapic_id:                       ; @native_lapic_id
	.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
Lloh0:
	adrp	x19, _x2apic_mode@GOTPAGE
Lloh1:
	ldr	x19, [x19, _x2apic_mode@GOTPAGEOFF]
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _lapic_map@GOTPAGE
Lloh3:
	ldr	x9, [x9, _lapic_map@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	orr	x8, x8, x9
	cmp	x8, #0
	cset	w0, ne
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
Lloh7:
	adrp	x8, _LAPIC_ID@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LAPIC_ID@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_lapic_read32
Lloh10:
	adrp	x8, _APIC_ID_SHIFT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _APIC_ID_SHIFT@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh12:
	ldr	w8, [x8]
	cmp	x9, #0
	csel	w8, w8, wzr, eq
	asr	w0, w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_x2apic_mode,8,3                ; @x2apic_mode
	.comm	_lapic_map,8,3                  ; @lapic_map
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"local APIC is not mapped"

	.comm	_LAPIC_ID,4,2                   ; @LAPIC_ID
	.comm	_APIC_ID_SHIFT,4,2              ; @APIC_ID_SHIFT
	.no_dead_strip	_native_lapic_id
.subsections_via_symbols
