	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setup_guest_gdt                ## -- Begin function setup_guest_gdt
	.p2align	4, 0x90
_setup_guest_gdt:                       ## @setup_guest_gdt
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rax
	movq	_GDT_ENTRY_KERNEL_CS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_FULL_EXEC_SEGMENT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, (%rax,%rcx,4)
	movq	_GDT_ENTRY_KERNEL_DS@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_FULL_SEGMENT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, (%rax,%rdx,4)
	movq	_GUEST_PL@GOTPCREL(%rip), %rsi
	movl	(%rsi), %edi
	shll	$13, %edi
	orl	%edi, (%rax,%rcx,4)
	movl	(%rsi), %ecx
	shll	$13, %ecx
	orl	%ecx, (%rax,%rdx,4)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GDT_ENTRY_KERNEL_CS,8,3        ## @GDT_ENTRY_KERNEL_CS
	.comm	_FULL_EXEC_SEGMENT,4,2          ## @FULL_EXEC_SEGMENT
	.comm	_GDT_ENTRY_KERNEL_DS,8,3        ## @GDT_ENTRY_KERNEL_DS
	.comm	_FULL_SEGMENT,4,2               ## @FULL_SEGMENT
	.comm	_GUEST_PL,4,2                   ## @GUEST_PL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setup_guest_gdt                ; -- Begin function setup_guest_gdt
	.p2align	2
_setup_guest_gdt:                       ; @setup_guest_gdt
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _GDT_ENTRY_KERNEL_CS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GDT_ENTRY_KERNEL_CS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	lsl	x9, x9, #2
Lloh3:
	adrp	x10, _FULL_EXEC_SEGMENT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _FULL_EXEC_SEGMENT@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	str	w10, [x8, x9]
Lloh6:
	adrp	x10, _GDT_ENTRY_KERNEL_DS@GOTPAGE
Lloh7:
	ldr	x10, [x10, _GDT_ENTRY_KERNEL_DS@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
Lloh9:
	adrp	x11, _FULL_SEGMENT@GOTPAGE
Lloh10:
	ldr	x11, [x11, _FULL_SEGMENT@GOTPAGEOFF]
	lsl	x10, x10, #2
Lloh11:
	ldr	w11, [x11]
	str	w11, [x8, x10]
Lloh12:
	adrp	x11, _GUEST_PL@GOTPAGE
Lloh13:
	ldr	x11, [x11, _GUEST_PL@GOTPAGEOFF]
	ldr	w12, [x11]
	ldr	w13, [x8, x9]
	orr	w12, w13, w12, lsl #13
	str	w12, [x8, x9]
	ldr	w9, [x11]
	ldr	w11, [x8, x10]
	orr	w9, w11, w9, lsl #13
	str	w9, [x8, x10]
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GDT_ENTRY_KERNEL_CS,8,3        ; @GDT_ENTRY_KERNEL_CS
	.comm	_FULL_EXEC_SEGMENT,4,2          ; @FULL_EXEC_SEGMENT
	.comm	_GDT_ENTRY_KERNEL_DS,8,3        ; @GDT_ENTRY_KERNEL_DS
	.comm	_FULL_SEGMENT,4,2               ; @FULL_SEGMENT
	.comm	_GUEST_PL,4,2                   ; @GUEST_PL
.subsections_via_symbols
