	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_apic_access_page
_alloc_apic_access_page:                ## @alloc_apic_access_page
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_mutex_lock
	xorl	%ebx, %ebx
	cmpq	$0, 8(%r14)
	jne	LBB0_3
## %bb.1:
	movq	_APIC_ACCESS_PAGE_PRIVATE_MEMSLOT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movq	$0, -32(%rbp)
	movl	$-18874368, -40(%rbp)           ## imm = 0xFEE00000
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	leaq	-40(%rbp), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	___kvm_set_memory_region
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	movl	$1043968, %esi                  ## imm = 0xFEE00
	callq	_gfn_to_page
	movq	%rax, 8(%r14)
	xorl	%ebx, %ebx
LBB0_3:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_APIC_ACCESS_PAGE_PRIVATE_MEMSLOT,4,2 ## @APIC_ACCESS_PAGE_PRIVATE_MEMSLOT
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.no_dead_strip	_alloc_apic_access_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_apic_access_page
_alloc_apic_access_page:                ; @alloc_apic_access_page
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_mutex_lock
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _APIC_ACCESS_PAGE_PRIVATE_MEMSLOT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _APIC_ACCESS_PAGE_PRIVATE_MEMSLOT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	str	xzr, [sp, #16]
	mov	w8, #-18874368
Lloh3:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #0
	bl	___kvm_set_memory_region
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #60928
	movk	w1, #15, lsl #16
	bl	_gfn_to_page
	str	x0, [x19, #8]
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_APIC_ACCESS_PAGE_PRIVATE_MEMSLOT,4,2 ; @APIC_ACCESS_PAGE_PRIVATE_MEMSLOT
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.no_dead_strip	_alloc_apic_access_page
.subsections_via_symbols
