	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vmi_set_ldt
_vmi_set_ldt:                           ## @vmi_set_ldt
	.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	%esi, %ebx
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_smp_processor_id
	movl	%eax, %r15d
	leal	-1(,%rbx,4), %edx
	movq	_DESC_LDT@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	leaq	-48(%rbp), %r12
	movq	%r12, %rdi
	movq	%r14, %rsi
	xorl	%r8d, %r8d
	callq	_pack_descriptor
	movl	%r15d, %edi
	callq	_get_cpu_gdt_table
	movq	_GDT_ENTRY_LDT@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	(%r13), %ecx
	movl	%eax, %edi
	movq	%r12, %rdx
	callq	_write_gdt_entry
	movq	_vmi_ops@GOTPCREL(%rip), %rax
	movl	(%r14), %edi
	shll	$2, %edi
	testl	%ebx, %ebx
	cmovel	%ebx, %edi
	callq	*(%rax)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DESC_LDT,4,2                   ## @DESC_LDT
	.comm	_GDT_ENTRY_LDT,4,2              ## @GDT_ENTRY_LDT
	.comm	_vmi_ops,8,3                    ## @vmi_ops
	.no_dead_strip	_vmi_set_ldt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vmi_set_ldt
_vmi_set_ldt:                           ; @vmi_set_ldt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_smp_processor_id
	mov	x21, x0
	lsl	w8, w19, #2
	sub	w2, w8, #1
Lloh0:
	adrp	x22, _DESC_LDT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DESC_LDT@GOTPAGEOFF]
	ldr	w3, [x22]
	add	x0, sp, #8
	mov	x1, x20
	mov	w4, #0
	bl	_pack_descriptor
	mov	x0, x21
	bl	_get_cpu_gdt_table
Lloh2:
	adrp	x20, _GDT_ENTRY_LDT@GOTPAGE
Lloh3:
	ldr	x20, [x20, _GDT_ENTRY_LDT@GOTPAGEOFF]
	ldr	w1, [x20]
	ldr	w3, [x22]
	add	x2, sp, #8
	bl	_write_gdt_entry
Lloh4:
	adrp	x8, _vmi_ops@GOTPAGE
Lloh5:
	ldr	x8, [x8, _vmi_ops@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	ldr	w9, [x20]
	lsl	w9, w9, #2
	cmp	w19, #0
	csel	w0, wzr, w9, eq
	blr	x8
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DESC_LDT,4,2                   ; @DESC_LDT
	.comm	_GDT_ENTRY_LDT,4,2              ; @GDT_ENTRY_LDT
	.comm	_vmi_ops,8,3                    ; @vmi_ops
	.no_dead_strip	_vmi_set_ldt
.subsections_via_symbols
