	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_x2apic_msr_write           ## -- Begin function kvm_x2apic_msr_write
	.p2align	4, 0x90
_kvm_x2apic_msr_write:                  ## @kvm_x2apic_msr_write
	.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
	movl	%edx, %r14d
	movl	%esi, %r12d
	movq	8(%rdi), %r15
	movq	_APIC_BASE_MSR@GOTPCREL(%rip), %rax
	movl	%esi, %ebx
	subl	(%rax), %ebx
	movl	(%rdi), %edi
	callq	_irqchip_in_kernel
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movq	%r15, %rdi
	callq	_apic_x2apic_mode
	testl	%eax, %eax
	je	LBB0_5
## %bb.2:
	shll	$4, %ebx
	cmpl	$2096, %r12d                    ## imm = 0x830
	jne	LBB0_4
## %bb.3:
	movq	_APIC_ICR2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_apic_reg_write
LBB0_4:
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_apic_reg_write                 ## TAILCALL
LBB0_5:
	movl	$1, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_APIC_BASE_MSR,4,2              ## @APIC_BASE_MSR
	.comm	_APIC_ICR2,4,2                  ## @APIC_ICR2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_x2apic_msr_write           ; -- Begin function kvm_x2apic_msr_write
	.p2align	2
_kvm_x2apic_msr_write:                  ; @kvm_x2apic_msr_write
	.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
	mov	x19, x2
	mov	x21, x1
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x8, _APIC_BASE_MSR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _APIC_BASE_MSR@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	ldr	w0, [x0]
	bl	_irqchip_in_kernel
	cbz	w0, LBB0_5
; %bb.1:
	mov	x0, x20
	bl	_apic_x2apic_mode
	cbz	w0, LBB0_5
; %bb.2:
	sub	w8, w21, w22
	lsl	w22, w8, #4
	cmp	w21, #2096
	b.ne	LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _APIC_ICR2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _APIC_ICR2@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_apic_reg_write
LBB0_4:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	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
	b	_apic_reg_write
LBB0_5:
	mov	w0, #1
	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	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_APIC_BASE_MSR,4,2              ; @APIC_BASE_MSR
	.comm	_APIC_ICR2,4,2                  ; @APIC_ICR2
.subsections_via_symbols
