	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_lapic_set_vapic_addr       ## -- Begin function kvm_lapic_set_vapic_addr
	.p2align	4, 0x90
_kvm_lapic_set_vapic_addr:              ## @kvm_lapic_set_vapic_addr
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.1:
	movq	%rbx, %rdi
	callq	_offset_in_page
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	$-4, %ecx
	cmpl	%ecx, %eax
	jg	LBB0_2
## %bb.3:
	movl	16(%r14), %edi
	movq	(%r14), %rsi
	addq	$8, %rsi
	movq	%rbx, %rdx
	callq	_kvm_gfn_to_hva_cache_init
	testq	%rax, %rax
	je	LBB0_4
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_5:
	movq	_KVM_APIC_CHECK_VAPIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r14), %rsi
	callq	___clear_bit
	jmp	LBB0_6
LBB0_4:
	movq	_KVM_APIC_CHECK_VAPIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r14), %rsi
	callq	___set_bit
LBB0_6:
	movq	(%r14), %rax
	movq	%rbx, (%rax)
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_KVM_APIC_CHECK_VAPIC,4,2       ## @KVM_APIC_CHECK_VAPIC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_lapic_set_vapic_addr       ; -- Begin function kvm_lapic_set_vapic_addr
	.p2align	2
_kvm_lapic_set_vapic_addr:              ; @kvm_lapic_set_vapic_addr
	.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
	mov	x19, x1
	mov	x20, x0
	cbz	x1, LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_offset_in_page
Lloh0:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w8, w8, #4
	cmp	w0, w8
	b.gt	LBB0_3
; %bb.2:
	ldr	w0, [x20, #16]
	ldr	x8, [x20]
	add	x1, x8, #8
	mov	x2, x19
	bl	_kvm_gfn_to_hva_cache_init
	cbz	x0, LBB0_5
LBB0_3:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_4:
Lloh6:
	adrp	x8, _KVM_APIC_CHECK_VAPIC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KVM_APIC_CHECK_VAPIC@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	add	x1, x20, #8
	bl	___clear_bit
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _KVM_APIC_CHECK_VAPIC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _KVM_APIC_CHECK_VAPIC@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	add	x1, x20, #8
	bl	___set_bit
LBB0_6:
	mov	w0, #0
	ldr	x8, [x20]
	str	x19, [x8]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_KVM_APIC_CHECK_VAPIC,4,2       ; @KVM_APIC_CHECK_VAPIC
.subsections_via_symbols
