	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmexit_task_switch             ## -- Begin function vmexit_task_switch
	.p2align	4, 0x90
_vmexit_task_switch:                    ## @vmexit_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	$184, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	16(%rsi), %r13
	movl	16(%rsi), %r15d
	movl	20(%rsi), %eax
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movl	24(%rsi), %eax
	movl	%eax, -84(%rbp)                 ## 4-byte Spill
	movl	(%rdx), %r14d
	movq	32(%rsi), %rax
	movq	_CPU_MODE_PROTECTED@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
	movq	(%rbx), %rcx
	movq	32(%rbx), %rax
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	addq	8(%rbx), %rcx
	movq	%rcx, -192(%rbp)                ## 8-byte Spill
	movq	%rax, -184(%rbp)
	movq	$0, -176(%rbp)
	leaq	-104(%rbp), %rbx
	leaq	-68(%rbp), %r9
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movl	%r14d, -72(%rbp)                ## 4-byte Spill
	movl	%r14d, %esi
	movq	%r13, -144(%rbp)                ## 8-byte Spill
	movq	%r13, %rdx
	movl	%r15d, -80(%rbp)                ## 4-byte Spill
	movl	%r15d, %ecx
	movq	%rbx, %r8
	callq	_read_tss_descriptor
	movl	-68(%rbp), %esi
	movl	%eax, %edi
	callq	_CHKERR
	movq	%rbx, %rdi
	callq	_usd_to_seg_desc
	movq	%rax, %r12
	movq	%rdx, %r14
	movq	%rax, -208(%rbp)
	movq	%rdx, %rdi
	callq	_SEG_DESC_TYPE
	movq	_SDT_SYS386BSY@GOTPCREL(%rip), %rbx
	movq	_SDT_SYS386TSS@GOTPCREL(%rip), %r13
	movq	_SDT_SYS286BSY@GOTPCREL(%rip), %rcx
	movq	_SDT_SYS286TSS@GOTPCREL(%rip), %rdx
	cmpl	(%rbx), %eax
	je	LBB0_6
## %bb.1:
	cmpl	(%r13), %eax
	je	LBB0_6
## %bb.2:
	cmpl	(%rcx), %eax
	je	LBB0_6
## %bb.3:
	cmpl	(%rdx), %eax
	je	LBB0_6
## %bb.4:
	movq	_IDT_TS@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_6:
	movl	%eax, -88(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_SEG_DESC_PRESENT
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movl	$103, %r15d
	movl	$1, %edi
	movl	-88(%rbp), %edx                 ## 4-byte Reload
	cmpl	(%rbx), %edx
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_9
## %bb.10:
	cmpl	(%r13), %edx
	movl	-84(%rbp), %ebx                 ## 4-byte Reload
	je	LBB0_12
## %bb.11:
	movq	_SDT_SYS286BSY@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	sete	%al
	movq	_SDT_SYS286TSS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	xorl	%eax, %eax
	testb	%dil, %dil
	movl	$43, %r15d
	cmovel	%eax, %r15d
	jmp	LBB0_12
LBB0_7:
	movq	_IDT_NP@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %edx
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_9:
	movl	-84(%rbp), %ebx                 ## 4-byte Reload
LBB0_12:
	callq	_assert
	cmpl	%r12d, %r15d
	jle	LBB0_17
LBB0_13:
	movq	_IDT_TS@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %edx
	movq	%r14, %rdi
LBB0_15:
	movl	-72(%rbp), %esi                 ## 4-byte Reload
	movl	-80(%rbp), %ecx                 ## 4-byte Reload
	movl	-76(%rbp), %r8d                 ## 4-byte Reload
LBB0_16:
	callq	_sel_exception
	movq	_VMEXIT_CONTINUE@GOTPCREL(%rip), %rbx
LBB0_40:
	movl	(%rbx), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_42
## %bb.41:
	addq	$184, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movl	%ebx, %ecx
	movq	_TSR_IRET@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	cmpl	%eax, %ecx
	jne	LBB0_20
## %bb.18:
	movl	-88(%rbp), %edi                 ## 4-byte Reload
	callq	_TSS_BUSY
	testq	%rax, %rax
	je	LBB0_13
## %bb.19:
	movl	(%rbx), %eax
	movl	-84(%rbp), %ecx                 ## 4-byte Reload
LBB0_20:
	cmpl	%eax, %ecx
	je	LBB0_23
## %bb.21:
	movl	-88(%rbp), %edi                 ## 4-byte Reload
	callq	_TSS_BUSY
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movq	_IDT_GP@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_23:
	shrq	$32, %r12
	incl	%r15d
	movq	_PROT_READ@GOTPCREL(%rip), %r13
	movq	_PROT_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	orl	(%r13), %ebx
	leaq	-56(%rbp), %r14
	movq	%r14, %rdi
	callq	_nitems
                                        ## kill: def $eax killed $eax def $rax
	subq	$8, %rsp
	leaq	-184(%rbp), %rdx
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	-72(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %ecx
	movl	%esi, %r12d
	movl	%r15d, %r8d
	movl	%ebx, %r9d
	leaq	-68(%rbp), %rbx
	pushq	%rbx
	pushq	%rax
	pushq	%r14
	callq	_vm_copy_setup
	addq	$32, %rsp
	movl	-68(%rbp), %esi
	movl	%eax, %edi
	callq	_CHKERR
	leaq	-128(%rbp), %rcx
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movq	%r14, %rdx
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	movl	%r15d, -76(%rbp)                ## 4-byte Spill
	movl	%r15d, %r8d
	callq	_vm_copyin
	movq	_VM_REG_GUEST_TR@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_GETREG
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_ISLDT
	testq	%rax, %rax
	je	LBB0_24
LBB0_25:
	movq	_IDT_TS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movl	20(%rax), %r8d
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%ebx, %ecx
	jmp	LBB0_16
LBB0_24:
	movl	%ebx, %edi
	callq	_IDXSEL
	testq	%rax, %rax
	je	LBB0_25
## %bb.26:
	movl	(%r15), %edx
	leaq	-164(%rbp), %rcx
	leaq	-216(%rbp), %r8
	leaq	-152(%rbp), %r9
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_vm_get_desc
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	movq	-152(%rbp), %rdi
	callq	_SEG_DESC_UNUSABLE
	xorl	%edi, %edi
	testl	%eax, %eax
	jne	LBB0_28
## %bb.27:
	movq	-152(%rbp), %rdi
	callq	_SEG_DESC_PRESENT
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
LBB0_28:
	callq	_assert
	movq	-152(%rbp), %rdi
	callq	_SEG_DESC_TYPE
	movq	_SDT_SYS386BSY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	sete	%cl
	movq	_SDT_SYS286BSY@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
	leaq	-120(%rbp), %r8
	movq	%r14, %rdi
	movl	%r12d, %esi
	movq	-144(%rbp), %rdx                ## 8-byte Reload
	movl	%ebx, -132(%rbp)                ## 4-byte Spill
	movl	%ebx, %ecx
	leaq	-68(%rbp), %r9
	callq	_read_tss_descriptor
	movl	-68(%rbp), %esi
	movl	%eax, %edi
	callq	_CHKERR
	movl	-164(%rbp), %r12d
	movq	_PROT_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	orl	(%r13), %ebx
	leaq	-64(%rbp), %r14
	movq	%r14, %rdi
	callq	_nitems
                                        ## kill: def $eax killed $eax def $rax
	subq	$8, %rsp
	leaq	-184(%rbp), %rdx
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	-72(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %ecx
	movl	-72(%rbp), %r12d                ## 4-byte Reload
	movl	-76(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %r8d
	movl	%ebx, %r9d
	leaq	-68(%rbp), %rbx
	pushq	%rbx
	pushq	%rax
	pushq	%r14
	callq	_vm_copy_setup
	addq	$32, %rsp
	movl	-68(%rbp), %esi
	movl	%eax, %edi
	callq	_CHKERR
	leaq	-160(%rbp), %rcx
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movq	%r14, %rdx
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	movl	%r15d, %r8d
	callq	_vm_copyin
	movq	_TSR_IRET@GOTPCREL(%rip), %rbx
	movl	-84(%rbp), %eax                 ## 4-byte Reload
	cmpl	(%rbx), %eax
	je	LBB0_30
## %bb.29:
	movq	_TSR_JMP@GOTPCREL(%rip), %rax
	movl	-84(%rbp), %ecx                 ## 4-byte Reload
	cmpl	(%rax), %ecx
	jne	LBB0_31
LBB0_30:
	andb	$-3, -120(%rbp)
	leaq	-184(%rbp), %rdx
	leaq	-120(%rbp), %r8
	leaq	-68(%rbp), %r9
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	-132(%rbp), %ecx                ## 4-byte Reload
	callq	_desc_table_write
	movl	-68(%rbp), %esi
	movl	%eax, %edi
	callq	_CHKERR
LBB0_31:
	movq	_SDT_SYS286BSY@GOTPCREL(%rip), %rax
	movl	-88(%rbp), %ecx                 ## 4-byte Reload
	cmpl	(%rax), %ecx
	je	LBB0_33
## %bb.32:
	movq	_SDT_SYS286TSS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	je	LBB0_33
## %bb.34:
	leaq	-160(%rbp), %r8
	leaq	-64(%rbp), %r9
	movq	%r14, %rdi
	movl	%r12d, %esi
	movq	-144(%rbp), %rdx                ## 8-byte Reload
	movq	-192(%rbp), %rcx                ## 8-byte Reload
	callq	_tss32_save
	movl	-84(%rbp), %eax                 ## 4-byte Reload
	cmpl	(%rbx), %eax
	je	LBB0_36
## %bb.35:
	orb	$2, -104(%rbp)
	leaq	-184(%rbp), %rdx
	leaq	-104(%rbp), %r8
	leaq	-68(%rbp), %r9
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	-80(%rbp), %ecx                 ## 4-byte Reload
	callq	_desc_table_write
	movl	-68(%rbp), %esi
	movl	%eax, %edi
	callq	_CHKERR
LBB0_36:
	movq	_VM_REG_GUEST_TR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	-80(%rbp), %ecx                 ## 4-byte Reload
	callq	_SETREG
	leaq	-104(%rbp), %rdi
	callq	_usd_to_seg_desc
	movq	%rax, -208(%rbp)
	movq	%rdx, -200(%rbp)
	movl	(%rbx), %edx
	leaq	-208(%rbp), %rcx
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_update_seg_desc
	movq	_VM_REG_GUEST_CR0@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_GETREG
	movl	(%rbx), %edx
	movq	_CR0_TS@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%eax, %ecx
	callq	_SETREG
	movq	_VM_REG_GUEST_RIP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	-128(%rbp), %ecx
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_vm_set_register
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	subq	$8, %rsp
	leaq	-128(%rbp), %r8
	leaq	-56(%rbp), %r9
	movq	%r14, %rdi
	movl	%r12d, %esi
	movq	-144(%rbp), %rdx                ## 8-byte Reload
	movl	-132(%rbp), %ecx                ## 4-byte Reload
	leaq	-68(%rbp), %rax
	pushq	%rax
	callq	_tss32_restore
	addq	$16, %rsp
	movl	-68(%rbp), %esi
	movl	%eax, %edi
	callq	_CHKERR
	movq	-112(%rbp), %rax                ## 8-byte Reload
	cmpq	$0, 48(%rax)
	je	LBB0_38
## %bb.37:
	leaq	32(%rax), %rbx
	movl	20(%rax), %edi
	callq	_assert
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movslq	24(%rax), %rax
	movq	_TSR_IDT_GATE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	%rax, (%rcx)
	sete	%dil
	callq	_assert
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movl	28(%rax), %r8d
	leaq	-68(%rbp), %r9
	movq	%r14, %rdi
	movl	%r12d, %esi
	movq	%rbx, %rdx
	movl	-88(%rbp), %ecx                 ## 4-byte Reload
	callq	_push_errcode
	movl	-68(%rbp), %esi
	movl	%eax, %edi
	callq	_CHKERR
	movq	-112(%rbp), %rax                ## 8-byte Reload
LBB0_38:
	movslq	24(%rax), %rax
	movq	_TSR_IDT_GATE@GOTPCREL(%rip), %rcx
	movq	_VMEXIT_CONTINUE@GOTPCREL(%rip), %rbx
	cmpq	%rax, (%rcx)
	jne	LBB0_40
## %bb.39:
	movq	%r14, %rdi
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	_vm_set_intinfo
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	jmp	LBB0_40
LBB0_33:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movq	_VMEXIT_ABORT@GOTPCREL(%rip), %rbx
	jmp	LBB0_40
LBB0_42:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CPU_MODE_PROTECTED,8,3         ## @CPU_MODE_PROTECTED
	.comm	_SDT_SYS386BSY,4,2              ## @SDT_SYS386BSY
	.comm	_SDT_SYS386TSS,4,2              ## @SDT_SYS386TSS
	.comm	_SDT_SYS286BSY,4,2              ## @SDT_SYS286BSY
	.comm	_SDT_SYS286TSS,4,2              ## @SDT_SYS286TSS
	.comm	_IDT_TS,4,2                     ## @IDT_TS
	.comm	_IDT_NP,4,2                     ## @IDT_NP
	.comm	_TSR_IRET,4,2                   ## @TSR_IRET
	.comm	_IDT_GP,4,2                     ## @IDT_GP
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_VM_REG_GUEST_TR,4,2            ## @VM_REG_GUEST_TR
	.comm	_TSR_JMP,4,2                    ## @TSR_JMP
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Task switch to 16-bit TSS not supported\n"

	.comm	_VMEXIT_ABORT,4,2               ## @VMEXIT_ABORT
	.comm	_VM_REG_GUEST_CR0,4,2           ## @VM_REG_GUEST_CR0
	.comm	_CR0_TS,4,2                     ## @CR0_TS
	.comm	_VM_REG_GUEST_RIP,4,2           ## @VM_REG_GUEST_RIP
	.comm	_TSR_IDT_GATE,8,3               ## @TSR_IDT_GATE
	.comm	_VMEXIT_CONTINUE,4,2            ## @VMEXIT_CONTINUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmexit_task_switch             ; -- Begin function vmexit_task_switch
	.p2align	2
_vmexit_task_switch:                    ; @vmexit_task_switch
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #272
	.cfi_def_cfa_offset 272
	stp	x28, x27, [sp, #176]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #192]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #208]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #224]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #240]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #256]            ; 16-byte Folded Spill
	add	x29, sp, #256
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	mov	x23, x1
	ldr	w25, [x23, #16]!
	ldp	w26, w8, [x1, #20]
	str	w8, [sp, #36]                   ; 4-byte Folded Spill
	mov	x22, x1
	ldr	x8, [x22, #32]!
	ldr	w20, [x2]
Lloh3:
	adrp	x9, _CPU_MODE_PROTECTED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CPU_MODE_PROTECTED@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	ldr	x9, [x21, #8]
	ldr	x8, [x21]
	stp	x8, x9, [sp, #16]               ; 16-byte Folded Spill
	ldr	x8, [x22]
	stp	x8, xzr, [sp, #96]
	add	x4, sp, #88
	add	x5, sp, #52
	str	x19, [sp, #40]                  ; 8-byte Folded Spill
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	mov	x3, x25
	bl	_read_tss_descriptor
	ldr	w1, [sp, #52]
	bl	_CHKERR
	add	x0, sp, #88
	bl	_usd_to_seg_desc
	mov	x27, x0
	mov	x28, x1
	str	x0, [sp, #128]
	mov	x0, x1
	bl	_SEG_DESC_TYPE
	mov	x24, x0
Lloh6:
	adrp	x8, _SDT_SYS386BSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SDT_SYS386BSY@GOTPAGEOFF]
Lloh8:
	adrp	x19, _SDT_SYS386TSS@GOTPAGE
Lloh9:
	ldr	x19, [x19, _SDT_SYS386TSS@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x10, _SDT_SYS286BSY@GOTPAGE
Lloh12:
	ldr	x10, [x10, _SDT_SYS286BSY@GOTPAGEOFF]
Lloh13:
	adrp	x9, _SDT_SYS286TSS@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SDT_SYS286TSS@GOTPAGEOFF]
	cmp	w0, w8
	b.eq	LBB0_5
; %bb.1:
	ldr	w8, [x19]
	cmp	w24, w8
	b.eq	LBB0_5
; %bb.2:
	ldr	w8, [x10]
	cmp	w24, w8
	b.eq	LBB0_5
; %bb.3:
	ldr	w8, [x9]
	cmp	w24, w8
	b.eq	LBB0_5
; %bb.4:
Lloh15:
	adrp	x8, _IDT_TS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IDT_TS@GOTPAGEOFF]
	b	LBB0_13
LBB0_5:
	mov	x0, x28
	bl	_SEG_DESC_PRESENT
	cbz	x0, LBB0_12
; %bb.6:
Lloh17:
	adrp	x8, _SDT_SYS386BSY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SDT_SYS386BSY@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	mov	w28, #103
	mov	w0, #1
	cmp	w24, w8
	b.eq	LBB0_9
; %bb.7:
	ldr	w8, [x19]
	cmp	w24, w8
	b.eq	LBB0_9
; %bb.8:
Lloh20:
	adrp	x8, _SDT_SYS286BSY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SDT_SYS286BSY@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	w24, w8
Lloh23:
	adrp	x8, _SDT_SYS286TSS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SDT_SYS286TSS@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	ccmp	w24, w8, #4, ne
	cset	w0, eq
	mov	w8, #43
	csel	w28, w8, wzr, eq
LBB0_9:
	bl	_assert
	cmp	w28, w27
	ldr	x19, [sp, #40]                  ; 8-byte Folded Reload
	b.le	LBB0_19
LBB0_10:
Lloh26:
	adrp	x8, _IDT_TS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _IDT_TS@GOTPAGEOFF]
LBB0_11:
	ldr	w2, [x8]
	mov	x0, x19
	b	LBB0_14
LBB0_12:
Lloh28:
	adrp	x8, _IDT_NP@GOTPAGE
Lloh29:
	ldr	x8, [x8, _IDT_NP@GOTPAGEOFF]
LBB0_13:
	ldr	w2, [x8]
	ldr	x0, [sp, #40]                   ; 8-byte Folded Reload
LBB0_14:
	mov	x1, x20
	mov	x3, x25
	mov	x4, x26
LBB0_15:
	bl	_sel_exception
LBB0_16:
Lloh30:
	adrp	x8, _VMEXIT_CONTINUE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _VMEXIT_CONTINUE@GOTPAGEOFF]
LBB0_17:
	ldr	w0, [x8]
	ldur	x8, [x29, #-96]
Lloh32:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh33:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_43
; %bb.18:
	ldp	x29, x30, [sp, #256]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #240]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #224]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #208]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #192]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #176]            ; 16-byte Folded Reload
	add	sp, sp, #272
	ret
LBB0_19:
Lloh35:
	adrp	x8, _TSR_IRET@GOTPAGE
Lloh36:
	ldr	x8, [x8, _TSR_IRET@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	ldr	w9, [sp, #36]                   ; 4-byte Folded Reload
	cmp	w9, w8
	b.ne	LBB0_22
; %bb.20:
	mov	x0, x24
	bl	_TSS_BUSY
	cbz	x0, LBB0_10
; %bb.21:
Lloh38:
	adrp	x8, _TSR_IRET@GOTPAGE
Lloh39:
	ldr	x8, [x8, _TSR_IRET@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	ldr	w9, [sp, #36]                   ; 4-byte Folded Reload
LBB0_22:
	cmp	w9, w8
	b.eq	LBB0_25
; %bb.23:
	mov	x0, x24
	bl	_TSS_BUSY
	cbz	x0, LBB0_25
; %bb.24:
Lloh41:
	adrp	x8, _IDT_GP@GOTPAGE
Lloh42:
	ldr	x8, [x8, _IDT_GP@GOTPAGEOFF]
	b	LBB0_11
LBB0_25:
	lsr	x26, x27, #32
Lloh43:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh44:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
	add	w27, w28, #1
Lloh45:
	ldr	w8, [x8]
Lloh46:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh47:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
	orr	w28, w9, w8
	sub	x0, x29, #104
	bl	_nitems
	mov	x7, x0
	add	x8, sp, #52
	str	x8, [sp]
	add	x2, sp, #96
	sub	x6, x29, #104
	mov	x0, x19
	mov	x1, x20
	mov	x3, x26
	mov	x4, x27
	mov	x5, x28
	bl	_vm_copy_setup
	ldr	w1, [sp, #52]
	bl	_CHKERR
	sub	x2, x29, #104
	add	x3, sp, #112
	mov	x0, x19
	mov	x1, x20
	mov	x4, x27
	bl	_vm_copyin
Lloh49:
	adrp	x28, _VM_REG_GUEST_TR@GOTPAGE
Lloh50:
	ldr	x28, [x28, _VM_REG_GUEST_TR@GOTPAGEOFF]
	ldr	w2, [x28]
	mov	x0, x19
	mov	x1, x20
	bl	_GETREG
	mov	x26, x0
	bl	_ISLDT
	cbz	x0, LBB0_27
LBB0_26:
Lloh51:
	adrp	x8, _IDT_TS@GOTPAGE
Lloh52:
	ldr	x8, [x8, _IDT_TS@GOTPAGEOFF]
Lloh53:
	ldr	w2, [x8]
	ldr	w4, [x21, #20]
	mov	x0, x19
	mov	x1, x20
	mov	x3, x26
	b	LBB0_15
LBB0_27:
	mov	x0, x26
	bl	_IDXSEL
	cbz	x0, LBB0_26
; %bb.28:
	ldr	w2, [x28]
	add	x3, sp, #76
	add	x4, sp, #64
	add	x5, sp, #56
	mov	x0, x19
	mov	x1, x20
	bl	_vm_get_desc
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	ldr	x0, [sp, #56]
	bl	_SEG_DESC_UNUSABLE
	cbz	w0, LBB0_30
; %bb.29:
	mov	w0, #0
	b	LBB0_31
LBB0_30:
	ldr	x0, [sp, #56]
	bl	_SEG_DESC_PRESENT
	cmp	x0, #0
	cset	w0, ne
LBB0_31:
	bl	_assert
	ldr	x0, [sp, #56]
	bl	_SEG_DESC_TYPE
Lloh54:
	adrp	x8, _SDT_SYS386BSY@GOTPAGE
Lloh55:
	ldr	x8, [x8, _SDT_SYS386BSY@GOTPAGEOFF]
Lloh56:
	ldr	w8, [x8]
	cmp	w0, w8
Lloh57:
	adrp	x8, _SDT_SYS286BSY@GOTPAGE
Lloh58:
	ldr	x8, [x8, _SDT_SYS286BSY@GOTPAGEOFF]
Lloh59:
	ldr	w8, [x8]
	ccmp	w0, w8, #4, ne
	cset	w0, eq
	bl	_assert
	add	x4, sp, #80
	add	x5, sp, #52
	ldr	x19, [sp, #40]                  ; 8-byte Folded Reload
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	mov	x3, x26
	bl	_read_tss_descriptor
	ldr	w1, [sp, #52]
	bl	_CHKERR
	ldr	w8, [sp, #76]
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
Lloh60:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh61:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh62:
	ldr	w8, [x8]
Lloh63:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh64:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh65:
	ldr	w9, [x9]
	orr	w28, w9, w8
	sub	x0, x29, #112
	bl	_nitems
	mov	x7, x0
	add	x8, sp, #52
	str	x8, [sp]
	add	x2, sp, #96
	sub	x6, x29, #112
	mov	x0, x19
	mov	x1, x20
	ldr	w3, [sp, #12]                   ; 4-byte Folded Reload
	mov	x4, x27
	mov	x5, x28
	bl	_vm_copy_setup
	ldr	w1, [sp, #52]
	bl	_CHKERR
	sub	x2, x29, #112
	add	x3, sp, #120
	mov	x0, x19
	mov	x1, x20
	mov	x4, x27
	bl	_vm_copyin
Lloh66:
	adrp	x8, _TSR_IRET@GOTPAGE
Lloh67:
	ldr	x8, [x8, _TSR_IRET@GOTPAGEOFF]
Lloh68:
	ldr	w8, [x8]
	ldr	w9, [sp, #36]                   ; 4-byte Folded Reload
	cmp	w9, w8
	b.eq	LBB0_33
; %bb.32:
Lloh69:
	adrp	x8, _TSR_JMP@GOTPAGE
Lloh70:
	ldr	x8, [x8, _TSR_JMP@GOTPAGEOFF]
Lloh71:
	ldr	w8, [x8]
	cmp	w9, w8
	b.ne	LBB0_34
LBB0_33:
	ldr	w8, [sp, #80]
	and	w8, w8, #0xfffffffd
	str	w8, [sp, #80]
	add	x2, sp, #96
	add	x4, sp, #80
	add	x5, sp, #52
	mov	x0, x19
	mov	x1, x20
	mov	x3, x26
	bl	_desc_table_write
	ldr	w1, [sp, #52]
	bl	_CHKERR
	ldr	w9, [sp, #36]                   ; 4-byte Folded Reload
LBB0_34:
Lloh72:
	adrp	x8, _SDT_SYS286BSY@GOTPAGE
Lloh73:
	ldr	x8, [x8, _SDT_SYS286BSY@GOTPAGEOFF]
Lloh74:
	ldr	w8, [x8]
	cmp	w24, w8
Lloh75:
	adrp	x28, _VM_REG_GUEST_TR@GOTPAGE
Lloh76:
	ldr	x28, [x28, _VM_REG_GUEST_TR@GOTPAGEOFF]
	b.eq	LBB0_42
; %bb.35:
Lloh77:
	adrp	x8, _SDT_SYS286TSS@GOTPAGE
Lloh78:
	ldr	x8, [x8, _SDT_SYS286TSS@GOTPAGEOFF]
Lloh79:
	ldr	w8, [x8]
	cmp	w24, w8
	b.eq	LBB0_42
; %bb.36:
	ldp	x10, x8, [sp, #16]              ; 16-byte Folded Reload
	add	x3, x10, x8
	add	x4, sp, #120
	sub	x5, x29, #112
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	mov	x27, x9
	bl	_tss32_save
Lloh80:
	adrp	x8, _TSR_IRET@GOTPAGE
Lloh81:
	ldr	x8, [x8, _TSR_IRET@GOTPAGEOFF]
Lloh82:
	ldr	w8, [x8]
	cmp	w27, w8
	b.eq	LBB0_38
; %bb.37:
	ldr	w8, [sp, #88]
	orr	w8, w8, #0x2
	str	w8, [sp, #88]
	add	x2, sp, #96
	add	x4, sp, #88
	add	x5, sp, #52
	mov	x0, x19
	mov	x1, x20
	mov	x3, x25
	bl	_desc_table_write
	ldr	w1, [sp, #52]
	bl	_CHKERR
LBB0_38:
	ldr	w2, [x28]
	mov	x0, x19
	mov	x1, x20
	mov	x3, x25
	bl	_SETREG
	add	x0, sp, #88
	bl	_usd_to_seg_desc
	stp	x0, x1, [sp, #128]
	ldr	w2, [x28]
	add	x3, sp, #128
	mov	x0, x19
	mov	x1, x20
	bl	_update_seg_desc
	mov	x25, x19
Lloh83:
	adrp	x19, _VM_REG_GUEST_CR0@GOTPAGE
Lloh84:
	ldr	x19, [x19, _VM_REG_GUEST_CR0@GOTPAGEOFF]
	ldr	w2, [x19]
	mov	x0, x25
	mov	x1, x20
	bl	_GETREG
	ldr	w2, [x19]
Lloh85:
	adrp	x8, _CR0_TS@GOTPAGE
Lloh86:
	ldr	x8, [x8, _CR0_TS@GOTPAGEOFF]
Lloh87:
	ldr	w8, [x8]
	orr	w3, w8, w0
	mov	x0, x25
	mov	x1, x20
	bl	_SETREG
Lloh88:
	adrp	x8, _VM_REG_GUEST_RIP@GOTPAGE
Lloh89:
	ldr	x8, [x8, _VM_REG_GUEST_RIP@GOTPAGEOFF]
Lloh90:
	ldr	w2, [x8]
	ldr	w3, [sp, #112]
	mov	x0, x25
	mov	x1, x20
	bl	_vm_set_register
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	add	x4, sp, #112
	sub	x5, x29, #104
	add	x6, sp, #52
	mov	x0, x25
	mov	x1, x20
	mov	x2, x23
	mov	x3, x26
	bl	_tss32_restore
	ldr	w1, [sp, #52]
	bl	_CHKERR
	ldr	x8, [x21, #48]
Lloh91:
	adrp	x19, _TSR_IDT_GATE@GOTPAGE
Lloh92:
	ldr	x19, [x19, _TSR_IDT_GATE@GOTPAGEOFF]
	cbz	x8, LBB0_40
; %bb.39:
	ldr	w0, [x21, #20]
	bl	_assert
	ldrsw	x8, [x21, #24]
	ldr	x9, [x19]
	cmp	x9, x8
	cset	w0, eq
	bl	_assert
	ldr	w4, [x21, #28]
	add	x5, sp, #52
	mov	x0, x25
	mov	x1, x20
	mov	x2, x22
	mov	x3, x24
	bl	_push_errcode
	ldr	w1, [sp, #52]
	bl	_CHKERR
LBB0_40:
	ldrsw	x8, [x21, #24]
	ldr	x9, [x19]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.41:
	ldr	x0, [sp, #40]                   ; 8-byte Folded Reload
	mov	x1, x20
	mov	w2, #0
	bl	_vm_set_intinfo
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	b	LBB0_16
LBB0_42:
Lloh93:
	adrp	x8, _stderr@GOTPAGE
Lloh94:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh95:
	ldr	w0, [x8]
Lloh96:
	adrp	x1, l_.str@PAGE
Lloh97:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
Lloh98:
	adrp	x8, _VMEXIT_ABORT@GOTPAGE
Lloh99:
	ldr	x8, [x8, _VMEXIT_ABORT@GOTPAGEOFF]
	b	LBB0_17
LBB0_43:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGot	Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGotLdr	Lloh80, Lloh81, Lloh82
	.loh AdrpLdrGot	Lloh91, Lloh92
	.loh AdrpLdrGotLdr	Lloh88, Lloh89, Lloh90
	.loh AdrpLdrGotLdr	Lloh85, Lloh86, Lloh87
	.loh AdrpLdrGot	Lloh83, Lloh84
	.loh AdrpLdrGot	Lloh98, Lloh99
	.loh AdrpAdd	Lloh96, Lloh97
	.loh AdrpLdrGotLdr	Lloh93, Lloh94, Lloh95
	.cfi_endproc
                                        ; -- End function
	.comm	_CPU_MODE_PROTECTED,8,3         ; @CPU_MODE_PROTECTED
	.comm	_SDT_SYS386BSY,4,2              ; @SDT_SYS386BSY
	.comm	_SDT_SYS386TSS,4,2              ; @SDT_SYS386TSS
	.comm	_SDT_SYS286BSY,4,2              ; @SDT_SYS286BSY
	.comm	_SDT_SYS286TSS,4,2              ; @SDT_SYS286TSS
	.comm	_IDT_TS,4,2                     ; @IDT_TS
	.comm	_IDT_NP,4,2                     ; @IDT_NP
	.comm	_TSR_IRET,4,2                   ; @TSR_IRET
	.comm	_IDT_GP,4,2                     ; @IDT_GP
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_VM_REG_GUEST_TR,4,2            ; @VM_REG_GUEST_TR
	.comm	_TSR_JMP,4,2                    ; @TSR_JMP
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Task switch to 16-bit TSS not supported\n"

	.comm	_VMEXIT_ABORT,4,2               ; @VMEXIT_ABORT
	.comm	_VM_REG_GUEST_CR0,4,2           ; @VM_REG_GUEST_CR0
	.comm	_CR0_TS,4,2                     ; @CR0_TS
	.comm	_VM_REG_GUEST_RIP,4,2           ; @VM_REG_GUEST_RIP
	.comm	_TSR_IDT_GATE,8,3               ; @TSR_IDT_GATE
	.comm	_VMEXIT_CONTINUE,4,2            ; @VMEXIT_CONTINUE
.subsections_via_symbols
