	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmx_inject_pir
_vmx_inject_pir:                        ## @vmx_inject_pir
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	leaq	8(%rbx), %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_atomic_cmpset_long
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movq	8(%r14), %r13
	movq	(%rbx), %rdi
	callq	_atomic_readandclear_long
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	orl	%r15d, (%r13)
	xorl	%r12d, %r12d
	jmp	LBB0_4
LBB0_13:
	movl	(%r14), %esi
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_VCPU_CTR0                      ## TAILCALL
LBB0_2:
	movl	$-1, %r12d
LBB0_4:
	movq	(%rbx), %rdi
	addq	$4, %rdi
	callq	_atomic_readandclear_long
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	orl	%eax, 8(%r13)
	movl	$64, %r12d
	movl	%eax, %r15d
LBB0_6:
	movq	(%rbx), %rdi
	addq	$8, %rdi
	callq	_atomic_readandclear_long
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	orl	%eax, 16(%r13)
	movl	$128, %r12d
	movl	%eax, %r15d
LBB0_8:
	movq	(%rbx), %rdi
	addq	$12, %rdi
	callq	_atomic_readandclear_long
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %ebx
	orl	%eax, 24(%r13)
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_VLAPIC_CTR_IRR
	movl	$192, %r12d
	movl	%ebx, %r15d
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_VLAPIC_CTR_IRR
	testl	%r15d, %r15d
	je	LBB0_12
LBB0_11:
	movl	%r15d, %edi
	callq	_flsl
                                        ## kill: def $eax killed $eax def $rax
	leal	(%r12,%rax), %r13d
	decl	%r13d
	movq	_VMCS_GUEST_INTR_STATUS@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_vmcs_read
	movl	%eax, %ebx
	andl	$65280, %ebx                    ## imm = 0xFF00
	orl	%r13d, %ebx
	cmpl	%eax, %ebx
	jle	LBB0_12
## %bb.14:
	movl	%eax, %r15d
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_vmcs_write
	movl	(%r14), %esi
	movl	4(%r14), %edi
	leaq	L_.str.2(%rip), %rdx
	movl	%r15d, %ecx
	movl	%ebx, %r8d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_VCPU_CTR2                      ## TAILCALL
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vmx_inject_pir: no posted interrupt pending"

L_.str.1:                               ## @.str.1
	.asciz	"vmx_inject_pir"

	.comm	_VMCS_GUEST_INTR_STATUS,4,2     ## @VMCS_GUEST_INTR_STATUS
L_.str.2:                               ## @.str.2
	.asciz	"vmx_inject_pir: guest_intr_status changed from 0x%04x to 0x%04x"

	.no_dead_strip	_vmx_inject_pir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmx_inject_pir
_vmx_inject_pir:                        ; @vmx_inject_pir
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x21, [x0]
	add	x0, x21, #8
	mov	w1, #1
	mov	w2, #0
	bl	_atomic_cmpset_long
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x22, [x19, #8]
	ldr	x0, [x21]
	bl	_atomic_readandclear_long
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.2:
	mov	w23, #0
	ldr	w8, [x22]
	orr	w8, w8, w20
	str	w8, [x22]
	b	LBB0_5
LBB0_3:
	ldp	w1, w0, [x19]
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_VCPU_CTR0
LBB0_4:
	mov	w23, #-1
LBB0_5:
	ldr	x8, [x21]
	add	x0, x8, #4
	bl	_atomic_readandclear_long
	cbz	w0, LBB0_7
; %bb.6:
	ldr	w8, [x22, #8]
	orr	w8, w8, w0
	str	w8, [x22, #8]
	mov	w23, #64
	mov	x20, x0
LBB0_7:
	ldr	x8, [x21]
	add	x0, x8, #8
	bl	_atomic_readandclear_long
	cbz	w0, LBB0_9
; %bb.8:
	ldr	w8, [x22, #16]
	orr	w8, w8, w0
	str	w8, [x22, #16]
	mov	w23, #128
	mov	x20, x0
LBB0_9:
	ldr	x8, [x21]
	add	x0, x8, #12
	bl	_atomic_readandclear_long
	cbz	w0, LBB0_11
; %bb.10:
	mov	x21, x0
	ldr	w8, [x22, #24]
	orr	w8, w8, w0
	str	w8, [x22, #24]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_VLAPIC_CTR_IRR
	mov	w23, #192
	mov	x20, x21
	b	LBB0_12
LBB0_11:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_VLAPIC_CTR_IRR
	cbz	w20, LBB0_14
LBB0_12:
	mov	x0, x20
	bl	_flsl
	add	w8, w23, w0
	sub	w21, w8, #1
Lloh6:
	adrp	x22, _VMCS_GUEST_INTR_STATUS@GOTPAGE
Lloh7:
	ldr	x22, [x22, _VMCS_GUEST_INTR_STATUS@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_vmcs_read
	and	w8, w0, #0xff00
	orr	w21, w8, w21
	cmp	w21, w0
	b.le	LBB0_14
; %bb.13:
	mov	x20, x0
	ldr	w0, [x22]
	mov	x1, x21
	bl	_vmcs_write
Lloh8:
	adrp	x2, l_.str.2@PAGE
Lloh9:
	add	x2, x2, l_.str.2@PAGEOFF
	ldp	w1, w0, [x19]
	mov	x3, x20
	mov	x4, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_VCPU_CTR2
LBB0_14:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vmx_inject_pir: no posted interrupt pending"

l_.str.1:                               ; @.str.1
	.asciz	"vmx_inject_pir"

	.comm	_VMCS_GUEST_INTR_STATUS,4,2     ; @VMCS_GUEST_INTR_STATUS
l_.str.2:                               ; @.str.2
	.asciz	"vmx_inject_pir: guest_intr_status changed from 0x%04x to 0x%04x"

	.no_dead_strip	_vmx_inject_pir
.subsections_via_symbols
