	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function desc_table_rw
_desc_table_rw:                         ## @desc_table_rw
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -60(%rbp)                 ## 4-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r14d
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	%ecx, %edi
	callq	_ISLDT
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	_VM_REG_GUEST_GDTR@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_VM_REG_GUEST_LDTR@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %edx
	leaq	-96(%rbp), %rcx
	leaq	-88(%rbp), %r8
	leaq	-104(%rbp), %r9
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_vm_get_desc
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	movq	-88(%rbp), %rbx
	movl	%r14d, %edi
	callq	_SEL_LIMIT
	xorl	%edi, %edi
	cmpq	%rax, %rbx
	setge	%dil
	callq	_assert
	movq	-96(%rbp), %r13
	movl	%r14d, %edi
	callq	_SEL_START
	movq	%rax, %rbx
	addq	%r13, %rbx
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_4
## %bb.5:
	movq	_PROT_WRITE@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_PROT_READ@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %r14d
	leaq	-56(%rbp), %r13
	movq	%r13, %rdi
	callq	_nitems
                                        ## kill: def $eax killed $eax def $rax
	subq	$8, %rsp
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%rbx, %rcx
	movl	$4, %r8d
	movl	%r14d, %r9d
	movq	16(%rbp), %r14
	pushq	%r14
	pushq	%rax
	pushq	%r13
	callq	_vm_copy_setup
	addq	$32, %rsp
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:
	cmpl	$0, (%r14)
	jne	LBB0_11
## %bb.8:
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_10
## %bb.9:
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	$4, %r8d
	callq	_vm_copyin
	jmp	LBB0_11
LBB0_10:
	leaq	-56(%rbp), %rcx
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	$4, %r8d
	callq	_vm_copyout
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_VM_REG_GUEST_LDTR,4,2          ## @VM_REG_GUEST_LDTR
	.comm	_VM_REG_GUEST_GDTR,4,2          ## @VM_REG_GUEST_GDTR
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.no_dead_strip	_desc_table_rw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function desc_table_rw
_desc_table_rw:                         ; @desc_table_rw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x6
	mov	x22, x5
	mov	x19, x4
	mov	x25, x3
	mov	x24, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	mov	x0, x3
	bl	_ISLDT
Lloh3:
	adrp	x8, _VM_REG_GUEST_LDTR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VM_REG_GUEST_LDTR@GOTPAGEOFF]
Lloh5:
	adrp	x9, _VM_REG_GUEST_GDTR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _VM_REG_GUEST_GDTR@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	ldr	w2, [x8]
	add	x3, sp, #24
	add	x4, sp, #16
	add	x5, sp, #8
	mov	x0, x21
	mov	x1, x20
	bl	_vm_get_desc
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	ldr	x26, [sp, #16]
	mov	x0, x25
	bl	_SEL_LIMIT
	cmp	x26, x0
	cset	w0, ge
	bl	_assert
	ldr	x26, [sp, #24]
	mov	x0, x25
	bl	_SEL_START
Lloh7:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
	add	x25, x0, x26
Lloh9:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
	cmp	w22, #0
	csel	x8, x9, x8, eq
	ldr	w26, [x8]
	add	x0, sp, #32
	bl	_nitems
	mov	x7, x0
	str	x23, [sp]
	add	x6, sp, #32
	mov	x0, x21
	mov	x1, x20
	mov	x2, x24
	mov	x3, x25
	mov	w4, #4
	mov	x5, x26
	bl	_vm_copy_setup
	mov	x24, x0
	cbnz	w0, LBB0_5
; %bb.1:
	ldr	w8, [x23]
	cbnz	w8, LBB0_5
; %bb.2:
	cbz	w22, LBB0_4
; %bb.3:
	add	x2, sp, #32
	mov	x0, x21
	mov	x1, x20
	mov	x3, x19
	mov	w4, #4
	bl	_vm_copyin
	b	LBB0_5
LBB0_4:
	add	x3, sp, #32
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	w4, #4
	bl	_vm_copyout
LBB0_5:
	ldr	x8, [sp, #40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x24
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_VM_REG_GUEST_LDTR,4,2          ; @VM_REG_GUEST_LDTR
	.comm	_VM_REG_GUEST_GDTR,4,2          ; @VM_REG_GUEST_GDTR
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.no_dead_strip	_desc_table_rw
.subsections_via_symbols
