	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmx_inject_nmi
_vmx_inject_nmi:                        ## @vmx_inject_nmi
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_to_vmx
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_cpu_has_virtual_nmis
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	$1, (%rbx)
	movq	$0, 32(%rbx)
LBB0_2:
	incl	(%r14)
	cmpq	$0, 24(%rbx)
	je	LBB0_4
## %bb.3:
	movl	$1, 8(%rbx)
	movq	_NMI_VECTOR@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movl	%eax, 12(%rbx)
	movq	%r14, %rdi
	callq	_kvm_rip_read
	movq	%rax, 16(%rbx)
	movq	_VM_ENTRY_INTR_INFO_FIELD@GOTPCREL(%rip), %rax
	movq	_INTR_TYPE_SOFT_INTR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%r15), %esi
	movl	(%rax), %edi
	movq	_INTR_INFO_VALID_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	callq	_vmcs_write32
	movq	_VM_ENTRY_INSTRUCTION_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_vmcs_write32
	movq	16(%rbx), %rsi
	decq	%rsi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kvm_rip_write                  ## TAILCALL
LBB0_4:
	movq	_VM_ENTRY_INTR_INFO_FIELD@GOTPCREL(%rip), %rax
	movq	_INTR_TYPE_NMI_INTR@GOTPCREL(%rip), %rcx
	movq	_INTR_INFO_VALID_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	movl	(%rax), %edi
	movq	_NMI_VECTOR@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	callq	_vmcs_write32
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vmx_clear_hlt                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NMI_VECTOR,4,2                 ## @NMI_VECTOR
	.comm	_VM_ENTRY_INTR_INFO_FIELD,4,2   ## @VM_ENTRY_INTR_INFO_FIELD
	.comm	_INTR_TYPE_SOFT_INTR,4,2        ## @INTR_TYPE_SOFT_INTR
	.comm	_INTR_INFO_VALID_MASK,4,2       ## @INTR_INFO_VALID_MASK
	.comm	_VM_ENTRY_INSTRUCTION_LEN,4,2   ## @VM_ENTRY_INSTRUCTION_LEN
	.comm	_INTR_TYPE_NMI_INTR,4,2         ## @INTR_TYPE_NMI_INTR
	.no_dead_strip	_vmx_inject_nmi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmx_inject_nmi
_vmx_inject_nmi:                        ; @vmx_inject_nmi
	.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
	bl	_to_vmx
	mov	x20, x0
	bl	_cpu_has_virtual_nmis
	cbnz	w0, LBB0_2
; %bb.1:
	mov	w8, #1
	str	w8, [x20]
	str	xzr, [x20, #32]
LBB0_2:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_4
; %bb.3:
	mov	w8, #1
Lloh0:
	adrp	x21, _NMI_VECTOR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _NMI_VECTOR@GOTPAGEOFF]
	ldr	w9, [x21]
	stp	w8, w9, [x20, #8]
	mov	x0, x19
	bl	_kvm_rip_read
	str	x0, [x20, #16]
Lloh2:
	adrp	x8, _VM_ENTRY_INTR_INFO_FIELD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VM_ENTRY_INTR_INFO_FIELD@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	w8, [x21]
Lloh5:
	adrp	x9, _INTR_TYPE_SOFT_INTR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _INTR_TYPE_SOFT_INTR@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _INTR_INFO_VALID_MASK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _INTR_INFO_VALID_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w1, w8, w9
	bl	_vmcs_write32
Lloh11:
	adrp	x8, _VM_ENTRY_INSTRUCTION_LEN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VM_ENTRY_INSTRUCTION_LEN@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_vmcs_write32
	ldr	x8, [x20, #16]
	sub	x1, x8, #1
	mov	x0, 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	_kvm_rip_write
LBB0_4:
Lloh14:
	adrp	x8, _VM_ENTRY_INTR_INFO_FIELD@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VM_ENTRY_INTR_INFO_FIELD@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x8, _INTR_TYPE_NMI_INTR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _INTR_TYPE_NMI_INTR@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _INTR_INFO_VALID_MASK@GOTPAGE
Lloh21:
	ldr	x9, [x9, _INTR_INFO_VALID_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh23:
	adrp	x9, _NMI_VECTOR@GOTPAGE
Lloh24:
	ldr	x9, [x9, _NMI_VECTOR@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w1, w8, w9
	bl	_vmcs_write32
	mov	x0, 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	_vmx_clear_hlt
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_NMI_VECTOR,4,2                 ; @NMI_VECTOR
	.comm	_VM_ENTRY_INTR_INFO_FIELD,4,2   ; @VM_ENTRY_INTR_INFO_FIELD
	.comm	_INTR_TYPE_SOFT_INTR,4,2        ; @INTR_TYPE_SOFT_INTR
	.comm	_INTR_INFO_VALID_MASK,4,2       ; @INTR_INFO_VALID_MASK
	.comm	_VM_ENTRY_INSTRUCTION_LEN,4,2   ; @VM_ENTRY_INSTRUCTION_LEN
	.comm	_INTR_TYPE_NMI_INTR,4,2         ; @INTR_TYPE_NMI_INTR
	.no_dead_strip	_vmx_inject_nmi
.subsections_via_symbols
