	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmx_pending_intr
_vmx_pending_intr:                      ## @vmx_pending_intr
	.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, %r12
	xorl	%edi, %edi
	testq	%rsi, %rsi
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	8(%r12), %rbx
	leaq	8(%rbx), %rdi
	callq	_atomic_load_acq_long
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	8(%r12), %rax
	movl	(%rax), %ecx
	movq	_APIC_TPR_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	$1, %r14d
	andl	%ecx, %r15d
	je	LBB0_13
## %bb.3:
	movl	(%r12), %esi
	movl	4(%r12), %edi
	leaq	L_.str.2(%rip), %rdx
	callq	_VCPU_CTR1
	movq	(%rbx), %rax
	movq	24(%rax), %rdi
	movl	$191, %r13d
	testq	%rdi, %rdi
	jne	LBB0_4
## %bb.5:
	movq	16(%rax), %rdi
	movl	$127, %r13d
	testq	%rdi, %rdi
	jne	LBB0_4
## %bb.6:
	movq	8(%rax), %rdi
	movl	$63, %r13d
	testq	%rdi, %rdi
	jne	LBB0_4
## %bb.7:
	movq	(%rax), %rdi
	movl	$-1, %r13d
	testq	%rdi, %rdi
	je	LBB0_8
LBB0_4:
	callq	_flsl
	addl	%r13d, %eax
	movq	_APIC_TPR_INT@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	cmpl	%r15d, %eax
	jg	LBB0_13
LBB0_10:
	movl	%eax, %edi
	callq	_VPR_PRIO_BIT
	movl	(%r12), %ecx
	xorl	%r14d, %r14d
	cmpl	%eax, %ecx
	jle	LBB0_13
## %bb.11:
	andl	%eax, %ecx
	jne	LBB0_13
## %bb.12:
	movl	%eax, (%r12)
	jmp	LBB0_13
LBB0_1:
	movl	(%r12), %esi
	movl	4(%r12), %edi
	callq	_vm_exitinfo
	movq	%rax, %r14
	movq	(%rax), %rax
	movq	_VM_EXITCODE_HLT@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movq	_APIC_TPR_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	8(%r14), %ecx
	andl	%eax, %ecx
	movq	8(%r12), %rdx
	andl	(%rdx), %eax
	xorl	%r14d, %r14d
	cmpl	%eax, %ecx
	setg	%r14b
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	xorl	%eax, %eax
	cmpl	%r15d, %eax
	jle	LBB0_10
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vmx_pending_intr: vecptr must be NULL"

	.comm	_VM_EXITCODE_HLT,8,3            ## @VM_EXITCODE_HLT
L_.str.1:                               ## @.str.1
	.asciz	"vmx_pending_intr: exitcode not 'HLT'"

	.comm	_APIC_TPR_INT,4,2               ## @APIC_TPR_INT
L_.str.2:                               ## @.str.2
	.asciz	"HLT with non-zero PPR %d"

	.no_dead_strip	_vmx_pending_intr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmx_pending_intr
_vmx_pending_intr:                      ; @vmx_pending_intr
	.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, x0
	cmp	x1, #0
	cset	w0, eq
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	ldr	x22, [x19, #8]
	add	x0, x22, #8
	bl	_atomic_load_acq_long
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	w3, [x8]
Lloh2:
	adrp	x21, _APIC_TPR_INT@GOTPAGE
Lloh3:
	ldr	x21, [x21, _APIC_TPR_INT@GOTPAGEOFF]
	ldr	w8, [x21]
	ands	w20, w8, w3
	b.eq	LBB0_13
; %bb.2:
	ldp	w1, w0, [x19]
Lloh4:
	adrp	x2, l_.str.2@PAGE
Lloh5:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	_VCPU_CTR1
	ldr	x8, [x22]
	ldr	x0, [x8, #24]
	cbz	x0, LBB0_5
; %bb.3:
	mov	w22, #191
	b	LBB0_11
LBB0_4:
	ldp	w1, w0, [x19]
	bl	_vm_exitinfo
	mov	x20, x0
	ldr	x8, [x0]
Lloh6:
	adrp	x9, _VM_EXITCODE_HLT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _VM_EXITCODE_HLT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	ldr	w8, [x20, #8]
Lloh11:
	adrp	x9, _APIC_TPR_INT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _APIC_TPR_INT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	and	w8, w9, w8
	ldr	x10, [x19, #8]
	ldr	w10, [x10]
	and	w9, w10, w9
	cmp	w8, w9
	cset	w0, gt
	b	LBB0_14
LBB0_5:
	ldr	x0, [x8, #16]
	cbz	x0, LBB0_7
; %bb.6:
	mov	w22, #127
	b	LBB0_11
LBB0_7:
	ldr	x0, [x8, #8]
	cbz	x0, LBB0_9
; %bb.8:
	mov	w22, #63
	b	LBB0_11
LBB0_9:
	ldr	x0, [x8]
	cbz	x0, LBB0_12
; %bb.10:
	mov	w22, #-1
LBB0_11:
	bl	_flsl
	ldr	w8, [x21]
	add	w9, w22, w0
	and	w0, w9, w8
LBB0_12:
	cmp	w0, w20
	b.le	LBB0_15
LBB0_13:
	mov	w0, #1
LBB0_14:
	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
LBB0_15:
	bl	_VPR_PRIO_BIT
	ldr	w9, [x19]
	and	w10, w9, w0
	cmp	w9, w0
	ccmp	w10, #0, #0, gt
	b.eq	LBB0_17
; %bb.16:
	mov	w0, #0
	b	LBB0_14
LBB0_17:
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_14
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vmx_pending_intr: vecptr must be NULL"

	.comm	_VM_EXITCODE_HLT,8,3            ; @VM_EXITCODE_HLT
l_.str.1:                               ; @.str.1
	.asciz	"vmx_pending_intr: exitcode not 'HLT'"

	.comm	_APIC_TPR_INT,4,2               ; @APIC_TPR_INT
l_.str.2:                               ; @.str.2
	.asciz	"HLT with non-zero PPR %d"

	.no_dead_strip	_vmx_pending_intr
.subsections_via_symbols
