	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmx_save_host_state
_vmx_save_host_state:                   ## @vmx_save_host_state
	.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
	callq	_to_vmx
	cmpl	$0, 28(%rax)
	jne	LBB0_7
## %bb.1:
	movq	%rax, %r15
	movl	$1, 28(%rax)
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_kvm_read_ldt
	movl	%eax, 32(%r15)
	movl	%eax, 36(%r15)
	movq	_fs@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	40(%r15), %esi
	callq	_savesegment
	movl	40(%r15), %eax
	xorl	%ebx, %ebx
	testb	$7, %al
	setne	%bl
	movq	_HOST_FS_SELECTOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	cmovel	%eax, %r14d
	movl	%r14d, %esi
	callq	_vmcs_write16
	movl	%ebx, 44(%r15)
	movq	_gs@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	48(%r15), %esi
	callq	_savesegment
	movl	48(%r15), %esi
	movq	_HOST_GS_SELECTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testb	$7, %sil
	je	LBB0_2
## %bb.3:
	xorl	%esi, %esi
	callq	_vmcs_write16
	movl	$1, 36(%r15)
	jmp	LBB0_4
LBB0_2:
	callq	_vmcs_write16
LBB0_4:
	movq	_HOST_FS_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	40(%r15), %edi
	callq	_segment_base
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_vmcs_writel
	movq	_HOST_GS_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	48(%r15), %edi
	callq	_segment_base
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_vmcs_writel
	cmpl	$0, (%r15)
	jle	LBB0_7
## %bb.5:
	movl	$8, %ebx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movl	(%rax,%rbx), %edi
	movl	-8(%rax,%rbx), %edx
	movl	-4(%rax,%rbx), %esi
	callq	_kvm_set_shared_msr
	incq	%r14
	movslq	(%r15), %rax
	addq	$12, %rbx
	cmpq	%rax, %r14
	jl	LBB0_6
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fs,4,2                         ## @fs
	.comm	_HOST_FS_SELECTOR,4,2           ## @HOST_FS_SELECTOR
	.comm	_gs,4,2                         ## @gs
	.comm	_HOST_GS_SELECTOR,4,2           ## @HOST_GS_SELECTOR
	.comm	_HOST_FS_BASE,4,2               ## @HOST_FS_BASE
	.comm	_HOST_GS_BASE,4,2               ## @HOST_GS_BASE
	.comm	_MSR_FS_BASE,4,2                ## @MSR_FS_BASE
	.comm	_MSR_GS_BASE,4,2                ## @MSR_GS_BASE
	.comm	_MSR_KERNEL_GS_BASE,4,2         ## @MSR_KERNEL_GS_BASE
	.no_dead_strip	_vmx_save_host_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmx_save_host_state
_vmx_save_host_state:                   ; @vmx_save_host_state
	.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
	bl	_to_vmx
	ldr	w8, [x0, #28]
	cbnz	w8, LBB0_7
; %bb.1:
	mov	x19, x0
	mov	w20, #1
	str	w20, [x0, #28]
	bl	_kvm_read_ldt
	stp	w0, w0, [x19, #32]
Lloh0:
	adrp	x8, _fs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fs@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x19, #40]
	bl	_savesegment
	ldr	w8, [x19, #40]
	tst	w8, #0x7
	cset	w21, ne
Lloh3:
	adrp	x9, _HOST_FS_SELECTOR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HOST_FS_SELECTOR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x9]
	csel	w1, w8, wzr, eq
	bl	_vmcs_write16
	str	w21, [x19, #44]
Lloh6:
	adrp	x8, _gs@GOTPAGE
Lloh7:
	ldr	x8, [x8, _gs@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	w1, [x19, #48]
	bl	_savesegment
	ldr	w1, [x19, #48]
Lloh9:
	adrp	x8, _HOST_GS_SELECTOR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HOST_GS_SELECTOR@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	tst	w1, #0x7
	b.eq	LBB0_3
; %bb.2:
	mov	w1, #0
	bl	_vmcs_write16
	str	w20, [x19, #36]
	b	LBB0_4
LBB0_3:
	bl	_vmcs_write16
LBB0_4:
Lloh12:
	adrp	x8, _HOST_FS_BASE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HOST_FS_BASE@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	ldr	w0, [x19, #40]
	bl	_segment_base
	mov	x1, x0
	mov	x0, x20
	bl	_vmcs_writel
Lloh15:
	adrp	x8, _HOST_GS_BASE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HOST_GS_BASE@GOTPAGEOFF]
Lloh17:
	ldr	w20, [x8]
	ldr	w0, [x19, #48]
	bl	_segment_base
	mov	x1, x0
	mov	x0, x20
	bl	_vmcs_writel
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x20, #0
	mov	x21, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x8, x8, x20
	ldp	w1, w0, [x8, #4]
	ldr	w2, [x8]
	bl	_kvm_set_shared_msr
	add	x21, x21, #1
	ldrsw	x8, [x19]
	add	x20, x20, #12
	cmp	x21, x8
	b.lt	LBB0_6
LBB0_7:
	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
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_fs,4,2                         ; @fs
	.comm	_HOST_FS_SELECTOR,4,2           ; @HOST_FS_SELECTOR
	.comm	_gs,4,2                         ; @gs
	.comm	_HOST_GS_SELECTOR,4,2           ; @HOST_GS_SELECTOR
	.comm	_HOST_FS_BASE,4,2               ; @HOST_FS_BASE
	.comm	_HOST_GS_BASE,4,2               ; @HOST_GS_BASE
	.comm	_MSR_FS_BASE,4,2                ; @MSR_FS_BASE
	.comm	_MSR_GS_BASE,4,2                ; @MSR_GS_BASE
	.comm	_MSR_KERNEL_GS_BASE,4,2         ; @MSR_KERNEL_GS_BASE
	.no_dead_strip	_vmx_save_host_state
.subsections_via_symbols
