	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reserve_eilvt_offset
_reserve_eilvt_offset:                  ## @reserve_eilvt_offset
	.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
	movq	_APIC_EILVT_NR_MAX@GOTPCREL(%rip), %rax
	movl	$-1, %ebx
	cmpl	%edi, (%rax)
	jle	LBB0_6
## %bb.1:
	movl	%esi, %r14d
	movq	_eilvt_offsets@GOTPCREL(%rip), %r15
	movslq	%edi, %r12
	shlq	$2, %r12
	movq	(%r15), %rdi
	addq	%r12, %rdi
	callq	_atomic_read
	movq	_APIC_EILVT_MASKED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rdi
	addq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_atomic_cmpxchg
	movl	%eax, %ebx
	cmpl	%r14d, %eax
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_eilvt_entry_is_changeable
	testl	%eax, %eax
	jne	LBB0_4
	jmp	LBB0_6
LBB0_5:
	movl	%r14d, %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_APIC_EILVT_NR_MAX,4,2          ## @APIC_EILVT_NR_MAX
	.comm	_eilvt_offsets,8,3              ## @eilvt_offsets
	.comm	_APIC_EILVT_MASKED,4,2          ## @APIC_EILVT_MASKED
	.no_dead_strip	_reserve_eilvt_offset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reserve_eilvt_offset
_reserve_eilvt_offset:                  ; @reserve_eilvt_offset
	.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
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, _APIC_EILVT_NR_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _APIC_EILVT_NR_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.le	LBB0_5
; %bb.1:
	mov	x19, x1
Lloh3:
	adrp	x21, _eilvt_offsets@GOTPAGE
Lloh4:
	ldr	x21, [x21, _eilvt_offsets@GOTPAGEOFF]
	ldr	x8, [x21]
	sxtw	x22, w0
	add	x0, x8, w0, sxtw #2
	bl	_atomic_read
Lloh5:
	adrp	x8, _APIC_EILVT_MASKED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _APIC_EILVT_MASKED@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	bic	w20, w0, w8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x21]
	add	x0, x8, x22, lsl #2
	mov	x1, x20
	mov	x2, x19
	bl	_atomic_cmpxchg
	mov	x20, x0
	cmp	w0, w19
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w20, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_eilvt_entry_is_changeable
	cbnz	w0, LBB0_2
	b	LBB0_7
LBB0_5:
	mov	w20, #-1
	b	LBB0_7
LBB0_6:
	mov	x20, x19
LBB0_7:
	mov	x0, x20
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_APIC_EILVT_NR_MAX,4,2          ; @APIC_EILVT_NR_MAX
	.comm	_eilvt_offsets,8,3              ; @eilvt_offsets
	.comm	_APIC_EILVT_MASKED,4,2          ; @APIC_EILVT_MASKED
	.no_dead_strip	_reserve_eilvt_offset
.subsections_via_symbols
