	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmx_set_segment
_vmx_set_segment:                       ## @vmx_set_segment
	.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
	movl	%edx, %r14d
	movq	%rsi, %rbx
	callq	_to_vmx
	movq	%rax, %r15
	movq	_kvm_vmx_segment_fields@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movslq	%r14d, %r12
	cmpq	$0, 16(%r15)
	je	LBB0_4
## %bb.1:
	movq	_VCPU_SREG_TR@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_4
## %bb.2:
	shlq	$4, %r12
	movl	8(%r13,%r12), %edi
	movl	(%rbx), %esi
	callq	_vmcs_write16
	movl	(%rbx), %eax
	movl	%eax, 24(%r15)
	movl	4(%rbx), %eax
	movl	%eax, 28(%r15)
	movl	8(%rbx), %eax
	movl	%eax, 32(%r15)
	movq	%rbx, %rdi
	callq	_vmx_segment_access_rights
	movq	%rax, 40(%r15)
	jmp	LBB0_3
LBB0_4:
	shlq	$4, %r12
	movl	4(%r13,%r12), %edi
	movl	4(%rbx), %esi
	callq	_vmcs_writel
	movl	12(%r13,%r12), %edi
	movl	8(%rbx), %esi
	callq	_vmcs_write32
	movl	8(%r13,%r12), %edi
	movl	(%rbx), %esi
	callq	_vmcs_write16
	cmpq	$0, 16(%r15)
	je	LBB0_9
## %bb.5:
	cmpq	$0, 16(%rbx)
	je	LBB0_9
## %bb.6:
	movl	$243, %eax
	cmpl	$-65536, 4(%rbx)                ## imm = 0xFFFF0000
	jne	LBB0_10
## %bb.7:
	cmpl	$61440, (%rbx)                  ## imm = 0xF000
	jne	LBB0_10
## %bb.8:
	leaq	(%r12,%r13), %rax
	addq	$4, %rax
	movl	(%rax), %edi
	movl	$983040, %esi                   ## imm = 0xF0000
	callq	_vmcs_writel
	movl	$243, %eax
	jmp	LBB0_10
LBB0_9:
	movq	%rbx, %rdi
	callq	_vmx_segment_access_rights
LBB0_10:
	movq	_enable_unrestricted_guest@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	setne	%dl
	movq	_VCPU_SREG_LDTR@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	setne	%cl
	andb	%dl, %cl
	movzbl	%cl, %esi
	orl	%eax, %esi
	movl	(%r13,%r12), %edi
	callq	_vmcs_write32
	cmpq	$0, (%rbx)
	je	LBB0_11
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	cmpq	$0, 16(%r15)
	je	LBB0_3
## %bb.12:
	addl	$-128, %r14d
	cmpl	$5, %r14d
	ja	LBB0_3
## %bb.13:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r14,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_22:
	movq	_GUEST_SS_SELECTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_GUEST_SS_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_vmcs_readl
	sarl	$4, %eax
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_vmcs_write16
	movq	_GUEST_SS_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$65535, %esi                    ## imm = 0xFFFF
	callq	_vmcs_write32
	movq	_GUEST_SS_AR_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$243, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vmcs_write32                   ## TAILCALL
LBB0_19:
	addq	$4, %r15
	movl	$129, %edi
	jmp	LBB0_21
LBB0_20:
	movl	$130, %edi
	jmp	LBB0_21
LBB0_17:
	addq	$12, %r15
	movl	$131, %edi
	jmp	LBB0_21
LBB0_18:
	addq	$8, %r15
	movl	$132, %edi
LBB0_21:
	movq	%r15, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fix_rmode_seg                  ## TAILCALL
LBB0_14:
	movq	_GUEST_CS_AR_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$243, %esi
	callq	_vmcs_write32
	movq	_GUEST_CS_LIMIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$65535, %esi                    ## imm = 0xFFFF
	callq	_vmcs_write32
	movq	_GUEST_CS_BASE@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_vmcs_readl
	cmpl	$-65536, %eax                   ## imm = 0xFFFF0000
	jne	LBB0_16
## %bb.15:
	movl	(%r14), %edi
	movl	$983040, %esi                   ## imm = 0xF0000
	callq	_vmcs_writel
LBB0_16:
	movq	_GUEST_CS_SELECTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	(%r14), %edi
	callq	_vmcs_readl
	sarl	$4, %eax
	movl	%ebx, %edi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vmcs_write16                   ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_22
	.long	L0_0_set_19
	.long	L0_0_set_20
	.long	L0_0_set_17
	.long	L0_0_set_18
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_kvm_vmx_segment_fields,8,3     ## @kvm_vmx_segment_fields
	.comm	_VCPU_SREG_TR,4,2               ## @VCPU_SREG_TR
	.comm	_enable_unrestricted_guest,8,3  ## @enable_unrestricted_guest
	.comm	_VCPU_SREG_LDTR,4,2             ## @VCPU_SREG_LDTR
	.comm	_GUEST_CS_AR_BYTES,4,2          ## @GUEST_CS_AR_BYTES
	.comm	_GUEST_CS_LIMIT,4,2             ## @GUEST_CS_LIMIT
	.comm	_GUEST_CS_BASE,4,2              ## @GUEST_CS_BASE
	.comm	_GUEST_CS_SELECTOR,4,2          ## @GUEST_CS_SELECTOR
	.comm	_GUEST_SS_SELECTOR,4,2          ## @GUEST_SS_SELECTOR
	.comm	_GUEST_SS_BASE,4,2              ## @GUEST_SS_BASE
	.comm	_GUEST_SS_LIMIT,4,2             ## @GUEST_SS_LIMIT
	.comm	_GUEST_SS_AR_BYTES,4,2          ## @GUEST_SS_AR_BYTES
	.no_dead_strip	_vmx_set_segment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmx_set_segment
_vmx_set_segment:                       ; @vmx_set_segment
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x21, x1
	bl	_to_vmx
	mov	x19, x0
Lloh0:
	adrp	x8, _kvm_vmx_segment_fields@GOTPAGE
Lloh1:
	ldr	x8, [x8, _kvm_vmx_segment_fields@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	sxtw	x23, w20
	ldr	x8, [x0, #16]
Lloh3:
	adrp	x9, _VCPU_SREG_TR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VCPU_SREG_TR@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	x8, #0
	ccmp	w9, w20, #0, ne
	b.eq	LBB0_7
; %bb.1:
	add	x24, x22, x23, lsl #4
	ldr	w0, [x24, #4]!
	ldr	w1, [x21, #4]
	bl	_vmcs_writel
	ldr	w0, [x24, #8]
	ldr	w1, [x21, #8]
	bl	_vmcs_write32
	ldr	w0, [x24, #4]
	ldr	w1, [x21]
	bl	_vmcs_write16
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_8
; %bb.2:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_8
; %bb.3:
	ldr	w8, [x21, #4]
	cmn	w8, #16, lsl #12                ; =65536
	b.ne	LBB0_6
; %bb.4:
	ldr	w8, [x21]
	cmp	w8, #15, lsl #12                ; =61440
	b.ne	LBB0_6
; %bb.5:
	ldr	w0, [x24]
	mov	w1, #983040
	bl	_vmcs_writel
LBB0_6:
	mov	w0, #243
	b	LBB0_9
LBB0_7:
	add	x8, x22, x23, lsl #4
	ldr	w0, [x8, #8]
	ldr	w1, [x21]
	bl	_vmcs_write16
	ldr	d0, [x21]
	str	d0, [x19, #24]
	ldr	w8, [x21, #8]
	str	w8, [x19, #32]
	mov	x0, x21
	bl	_vmx_segment_access_rights
	str	x0, [x19, #40]
	b	LBB0_10
LBB0_8:
	mov	x0, x21
	bl	_vmx_segment_access_rights
LBB0_9:
Lloh6:
	adrp	x21, _enable_unrestricted_guest@GOTPAGE
Lloh7:
	ldr	x21, [x21, _enable_unrestricted_guest@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x8, #0
Lloh8:
	adrp	x8, _VCPU_SREG_LDTR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VCPU_SREG_LDTR@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ccmp	w8, w20, #4, ne
	cset	w8, ne
	orr	w1, w0, w8
	lsl	x8, x23, #4
	ldr	w0, [x22, x8]
	bl	_vmcs_write32
	ldr	x8, [x21]
	cbz	x8, LBB0_11
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_10
; %bb.12:
	sub	w8, w20, #128
	cmp	w8, #5
	b.hi	LBB0_10
; %bb.13:
Lloh11:
	adrp	x9, lJTI0_0@PAGE
Lloh12:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_14
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_14:
Lloh13:
	adrp	x8, _GUEST_SS_SELECTOR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GUEST_SS_SELECTOR@GOTPAGEOFF]
Lloh15:
	ldr	w19, [x8]
Lloh16:
	adrp	x8, _GUEST_SS_BASE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GUEST_SS_BASE@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_vmcs_readl
	asr	w1, w0, #4
	mov	x0, x19
	bl	_vmcs_write16
Lloh19:
	adrp	x8, _GUEST_SS_LIMIT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _GUEST_SS_LIMIT@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	mov	w1, #65535
	bl	_vmcs_write32
Lloh22:
	adrp	x8, _GUEST_SS_AR_BYTES@GOTPAGE
Lloh23:
	ldr	x8, [x8, _GUEST_SS_AR_BYTES@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	mov	w1, #243
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_vmcs_write32
LBB0_15:
	add	x1, x19, #4
	mov	w0, #129
	b	LBB0_19
LBB0_16:
	mov	w0, #130
	mov	x1, x19
	b	LBB0_19
LBB0_17:
	add	x1, x19, #12
	mov	w0, #131
	b	LBB0_19
LBB0_18:
	add	x1, x19, #8
	mov	w0, #132
LBB0_19:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_fix_rmode_seg
LBB0_20:
Lloh25:
	adrp	x8, _GUEST_CS_AR_BYTES@GOTPAGE
Lloh26:
	ldr	x8, [x8, _GUEST_CS_AR_BYTES@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	mov	w1, #243
	bl	_vmcs_write32
Lloh28:
	adrp	x8, _GUEST_CS_LIMIT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _GUEST_CS_LIMIT@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	mov	w1, #65535
	bl	_vmcs_write32
Lloh31:
	adrp	x20, _GUEST_CS_BASE@GOTPAGE
Lloh32:
	ldr	x20, [x20, _GUEST_CS_BASE@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_vmcs_readl
	cmn	w0, #16, lsl #12                ; =65536
	b.ne	LBB0_22
; %bb.21:
	ldr	w0, [x20]
	mov	w1, #983040
	bl	_vmcs_writel
LBB0_22:
Lloh33:
	adrp	x8, _GUEST_CS_SELECTOR@GOTPAGE
Lloh34:
	ldr	x8, [x8, _GUEST_CS_SELECTOR@GOTPAGEOFF]
Lloh35:
	ldr	w19, [x8]
	ldr	w0, [x20]
	bl	_vmcs_readl
	asr	w1, w0, #4
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_vmcs_write16
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_14-LBB0_14)>>2
	.byte	(LBB0_15-LBB0_14)>>2
	.byte	(LBB0_16-LBB0_14)>>2
	.byte	(LBB0_17-LBB0_14)>>2
	.byte	(LBB0_18-LBB0_14)>>2
	.byte	(LBB0_20-LBB0_14)>>2
                                        ; -- End function
	.comm	_kvm_vmx_segment_fields,8,3     ; @kvm_vmx_segment_fields
	.comm	_VCPU_SREG_TR,4,2               ; @VCPU_SREG_TR
	.comm	_enable_unrestricted_guest,8,3  ; @enable_unrestricted_guest
	.comm	_VCPU_SREG_LDTR,4,2             ; @VCPU_SREG_LDTR
	.comm	_GUEST_CS_AR_BYTES,4,2          ; @GUEST_CS_AR_BYTES
	.comm	_GUEST_CS_LIMIT,4,2             ; @GUEST_CS_LIMIT
	.comm	_GUEST_CS_BASE,4,2              ; @GUEST_CS_BASE
	.comm	_GUEST_CS_SELECTOR,4,2          ; @GUEST_CS_SELECTOR
	.comm	_GUEST_SS_SELECTOR,4,2          ; @GUEST_SS_SELECTOR
	.comm	_GUEST_SS_BASE,4,2              ; @GUEST_SS_BASE
	.comm	_GUEST_SS_LIMIT,4,2             ; @GUEST_SS_LIMIT
	.comm	_GUEST_SS_AR_BYTES,4,2          ; @GUEST_SS_AR_BYTES
	.no_dead_strip	_vmx_set_segment
.subsections_via_symbols
