	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_task_switch
_handle_task_switch:                    ## @handle_task_switch
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_to_vmx
	movq	%rax, %r15
	movl	(%rax), %ebx
	movq	_VECTORING_INFO_VALID_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_VECTORING_INFO_TYPE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	andl	%ebx, %r14d
	movq	_EXIT_QUALIFICATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_vmcs_readl
	movl	%eax, %r13d
	sarl	$30, %r13d
	movq	_TASK_SWITCH_GATE@GOTPCREL(%rip), %rcx
	xorl	%r8d, %r8d
	cmpl	(%rcx), %r13d
	movl	%r12d, -60(%rbp)                ## 4-byte Spill
	jne	LBB0_6
## %bb.1:
	movl	%r12d, %ecx
	movl	$0, %r12d
	andl	%ebx, %ecx
	je	LBB0_15
## %bb.2:
	xorl	%r8d, %r8d
	leal	-128(%r14), %edx
	cmpl	$4, %edx
	ja	LBB0_6
## %bb.3:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rdx,4), %rax
	addq	%rcx, %rax
	xorl	%r12d, %r12d
	jmpq	*%rax
LBB0_4:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_kvm_clear_interrupt_queue
	xorl	%r8d, %r8d
	xorl	%r12d, %r12d
	jmp	LBB0_13
LBB0_6:
	xorl	%r12d, %r12d
	jmp	LBB0_15
LBB0_7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	xorl	%eax, %eax
	callq	_cpu_has_virtual_nmis
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movq	_GUEST_INTERRUPTIBILITY_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GUEST_INTR_STATE_NMI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_vmcs_set_bits
LBB0_9:
	xorl	%r12d, %r12d
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	xorl	%r8d, %r8d
	jmp	LBB0_14
LBB0_10:
	movq	_VECTORING_INFO_DELIVER_CODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$0, %r12d
	testl	%eax, (%r15)
	je	LBB0_12
## %bb.11:
	movq	_IDT_VECTORING_ERROR_CODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_vmcs_read32
	movl	%eax, %r8d
	movl	$1, %r12d
LBB0_12:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r8d, %ebx
	callq	_kvm_clear_exception_queue
	movl	%ebx, %r8d
LBB0_13:
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
LBB0_14:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_15:
	movslq	%eax, %r15
	testl	%ebx, -60(%rbp)                 ## 4-byte Folded Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_17
## %bb.16:
	addl	$-133, %r14d
	cmpl	$-4, %r14d
	ja	LBB0_18
LBB0_17:
	movq	%rbx, %rdi
	movl	%r8d, %r14d
	callq	_skip_emulated_instruction
	movl	%r14d, %r8d
LBB0_18:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	callq	_kvm_task_switch
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	movq	_GUEST_DR7@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_vmcs_readl
	andl	$-56, %eax
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_vmcs_writel
	movl	$1, %eax
	jmp	LBB0_21
LBB0_20:
	xorl	%eax, %eax
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_12
	.long	L0_0_set_7
	.long	L0_0_set_10
	.long	L0_0_set_4
	.end_data_region
                                        ## -- End function
	.comm	_VECTORING_INFO_VALID_MASK,4,2  ## @VECTORING_INFO_VALID_MASK
	.comm	_VECTORING_INFO_TYPE_MASK,4,2   ## @VECTORING_INFO_TYPE_MASK
	.comm	_EXIT_QUALIFICATION,4,2         ## @EXIT_QUALIFICATION
	.comm	_TASK_SWITCH_GATE,4,2           ## @TASK_SWITCH_GATE
	.comm	_GUEST_INTERRUPTIBILITY_INFO,4,2 ## @GUEST_INTERRUPTIBILITY_INFO
	.comm	_GUEST_INTR_STATE_NMI,4,2       ## @GUEST_INTR_STATE_NMI
	.comm	_VECTORING_INFO_DELIVER_CODE_MASK,4,2 ## @VECTORING_INFO_DELIVER_CODE_MASK
	.comm	_IDT_VECTORING_ERROR_CODE,4,2   ## @IDT_VECTORING_ERROR_CODE
	.comm	_GUEST_DR7,4,2                  ## @GUEST_DR7
	.no_dead_strip	_handle_task_switch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_task_switch
_handle_task_switch:                    ; @handle_task_switch
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_to_vmx
	mov	x24, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _VECTORING_INFO_VALID_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VECTORING_INFO_VALID_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _VECTORING_INFO_TYPE_MASK@GOTPAGE
Lloh4:
	ldr	x10, [x10, _VECTORING_INFO_TYPE_MASK@GOTPAGEOFF]
	and	w25, w9, w8
Lloh5:
	ldr	w9, [x10]
	and	w26, w9, w8
Lloh6:
	adrp	x8, _EXIT_QUALIFICATION@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EXIT_QUALIFICATION@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_vmcs_readl
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x20, w0
	asr	w21, w0, #30
Lloh9:
	adrp	x8, _TASK_SWITCH_GATE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TASK_SWITCH_GATE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w21, w8
	ccmp	w25, #0, #4, eq
	b.eq	LBB0_7
; %bb.1:
	mov	w22, #0
	sub	w8, w26, #128
	cmp	w8, #4
	b.hi	LBB0_4
; %bb.2:
Lloh12:
	adrp	x9, lJTI0_0@PAGE
Lloh13:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	mov	x23, x22
	br	x10
LBB0_3:
	mov	x0, x19
	bl	_kvm_clear_interrupt_queue
	b	LBB0_7
LBB0_4:
	mov	x23, x22
	b	LBB0_8
LBB0_5:
	str	wzr, [x19]
	bl	_cpu_has_virtual_nmis
	cbz	w0, LBB0_7
; %bb.6:
Lloh14:
	adrp	x8, _GUEST_INTERRUPTIBILITY_INFO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GUEST_INTERRUPTIBILITY_INFO@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x8, _GUEST_INTR_STATE_NMI@GOTPAGE
Lloh18:
	ldr	x8, [x8, _GUEST_INTR_STATE_NMI@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_vmcs_set_bits
LBB0_7:
	mov	w22, #0
	mov	w23, #0
LBB0_8:
	sub	w8, w26, #133
	cmp	w25, #0
	ccmn	w8, #4, #0, ne
	b.hi	LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_skip_emulated_instruction
LBB0_10:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x23
	mov	x4, x22
	bl	_kvm_task_switch
	cbz	w0, LBB0_12
; %bb.11:
Lloh20:
	adrp	x8, _GUEST_DR7@GOTPAGE
Lloh21:
	ldr	x8, [x8, _GUEST_DR7@GOTPAGEOFF]
Lloh22:
	ldr	w19, [x8]
	mov	x0, x19
	bl	_vmcs_readl
	mov	w8, #-56
	and	w1, w0, w8
	mov	x0, x19
	bl	_vmcs_writel
	mov	w0, #1
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
	ldr	w8, [x24]
Lloh23:
	adrp	x9, _VECTORING_INFO_DELIVER_CODE_MASK@GOTPAGE
Lloh24:
	ldr	x9, [x9, _VECTORING_INFO_DELIVER_CODE_MASK@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.14:
Lloh26:
	adrp	x8, _IDT_VECTORING_ERROR_CODE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _IDT_VECTORING_ERROR_CODE@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_vmcs_read32
	mov	x22, x0
	mov	w23, #1
	b	LBB0_16
LBB0_15:
	mov	w22, #0
	mov	w23, #0
LBB0_16:
	mov	x0, x19
	bl	_kvm_clear_exception_queue
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_16-LBB0_3)>>2
	.byte	(LBB0_5-LBB0_3)>>2
	.byte	(LBB0_13-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
                                        ; -- End function
	.comm	_VECTORING_INFO_VALID_MASK,4,2  ; @VECTORING_INFO_VALID_MASK
	.comm	_VECTORING_INFO_TYPE_MASK,4,2   ; @VECTORING_INFO_TYPE_MASK
	.comm	_EXIT_QUALIFICATION,4,2         ; @EXIT_QUALIFICATION
	.comm	_TASK_SWITCH_GATE,4,2           ; @TASK_SWITCH_GATE
	.comm	_GUEST_INTERRUPTIBILITY_INFO,4,2 ; @GUEST_INTERRUPTIBILITY_INFO
	.comm	_GUEST_INTR_STATE_NMI,4,2       ; @GUEST_INTR_STATE_NMI
	.comm	_VECTORING_INFO_DELIVER_CODE_MASK,4,2 ; @VECTORING_INFO_DELIVER_CODE_MASK
	.comm	_IDT_VECTORING_ERROR_CODE,4,2   ; @IDT_VECTORING_ERROR_CODE
	.comm	_GUEST_DR7,4,2                  ; @GUEST_DR7
	.no_dead_strip	_handle_task_switch
.subsections_via_symbols
