	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_apic_set_version           ## -- Begin function kvm_apic_set_version
	.p2align	4, 0x90
_kvm_apic_set_version:                  ## @kvm_apic_set_version
	.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	8(%rdi), %rbx
	movq	_APIC_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	(%rdi), %edi
	callq	_irqchip_in_kernel
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movl	(%rbx), %edi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_kvm_find_cpuid_entry
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	(%rax), %eax
	movq	_X86_FEATURE_X2APIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	btl	%ecx, %eax
	jae	LBB0_4
## %bb.3:
	movq	_APIC_LVR_DIRECTED_EOI@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
LBB0_4:
	movq	_APIC_LVR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_apic_set_reg                   ## TAILCALL
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_APIC_VERSION,4,2               ## @APIC_VERSION
	.comm	_X86_FEATURE_X2APIC,4,2         ## @X86_FEATURE_X2APIC
	.comm	_APIC_LVR_DIRECTED_EOI,4,2      ## @APIC_LVR_DIRECTED_EOI
	.comm	_APIC_LVR,4,2                   ## @APIC_LVR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_apic_set_version           ; -- Begin function kvm_apic_set_version
	.p2align	2
_kvm_apic_set_version:                  ; @kvm_apic_set_version
	.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
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x8, _APIC_VERSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _APIC_VERSION@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	ldr	w0, [x0]
	bl	_irqchip_in_kernel
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x19]
	mov	w1, #1
	mov	w2, #0
	bl	_kvm_find_cpuid_entry
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w8, [x0]
Lloh3:
	adrp	x9, _X86_FEATURE_X2APIC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _X86_FEATURE_X2APIC@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	lsr	w8, w8, w9
	tbz	w8, #0, LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _APIC_LVR_DIRECTED_EOI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _APIC_LVR_DIRECTED_EOI@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w20, w8, w20
LBB0_4:
Lloh9:
	adrp	x8, _APIC_LVR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _APIC_LVR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_apic_set_reg
LBB0_5:
	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	_APIC_VERSION,4,2               ; @APIC_VERSION
	.comm	_X86_FEATURE_X2APIC,4,2         ; @X86_FEATURE_X2APIC
	.comm	_APIC_LVR_DIRECTED_EOI,4,2      ; @APIC_LVR_DIRECTED_EOI
	.comm	_APIC_LVR,4,2                   ; @APIC_LVR
.subsections_via_symbols
