	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cb_setgdt
_cb_setgdt:                             ## @cb_setgdt
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%esi, %ebx
	movq	_ctx@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BSP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VM_REG_GUEST_GDTR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	-1(%rdx), %r8
	movl	%eax, %edx
	movl	%ebx, %ecx
	xorl	%r9d, %r9d
	callq	_vm_set_desc
	testl	%eax, %eax
	jne	LBB0_1
LBB0_2:
	movq	_gdtbase@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	callq	_cb_setgdt.cold.1
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function cb_setgdt.cold.1
_cb_setgdt.cold.1:                      ## @cb_setgdt.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str(%rip), %rdi
	callq	_perror
	movq	_USERBOOT_EXIT_QUIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	popq	%rbp
	jmp	_cb_exit                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ctx,4,2                        ## @ctx
	.comm	_BSP,4,2                        ## @BSP
	.comm	_VM_REG_GUEST_GDTR,4,2          ## @VM_REG_GUEST_GDTR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vm_set_desc(gdt)"

	.comm	_USERBOOT_EXIT_QUIT,4,2         ## @USERBOOT_EXIT_QUIT
	.comm	_gdtbase,4,2                    ## @gdtbase
	.no_dead_strip	_cb_setgdt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cb_setgdt
_cb_setgdt:                             ; @cb_setgdt
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
Lloh0:
	adrp	x8, _ctx@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ctx@GOTPAGEOFF]
Lloh2:
	adrp	x9, _BSP@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BSP@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	ldr	w1, [x9]
Lloh6:
	adrp	x8, _VM_REG_GUEST_GDTR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VM_REG_GUEST_GDTR@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	sub	x4, x2, #1
	mov	x2, x8
	mov	x3, x19
	mov	w5, #0
	bl	_vm_set_desc
	cbnz	w0, LBB0_2
LBB0_1:
Lloh9:
	adrp	x8, _gdtbase@GOTPAGE
Lloh10:
	ldr	x8, [x8, _gdtbase@GOTPAGEOFF]
Lloh11:
	str	w19, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	bl	_cb_setgdt.cold.1
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function cb_setgdt.cold.1
_cb_setgdt.cold.1:                      ; @cb_setgdt.cold.1
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
Lloh14:
	adrp	x8, _USERBOOT_EXIT_QUIT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _USERBOOT_EXIT_QUIT@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_cb_exit
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ctx,4,2                        ; @ctx
	.comm	_BSP,4,2                        ; @BSP
	.comm	_VM_REG_GUEST_GDTR,4,2          ; @VM_REG_GUEST_GDTR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vm_set_desc(gdt)"

	.comm	_USERBOOT_EXIT_QUIT,4,2         ; @USERBOOT_EXIT_QUIT
	.comm	_gdtbase,4,2                    ; @gdtbase
	.no_dead_strip	_cb_setgdt
.subsections_via_symbols
