	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function code_segment_valid
_code_segment_valid:                    ## @code_segment_valid
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$32, %rsp
	movq	_VCPU_SREG_CS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-32(%rbp), %rsi
	callq	_vmx_get_segment
	xorl	%eax, %eax
	cmpq	$0, -8(%rbp)
	je	LBB0_1
LBB0_7:
	addq	$32, %rsp
	popq	%rbp
	retq
LBB0_1:
	movl	-28(%rbp), %ecx
	movl	%ecx, %edx
	notl	%edx
	movq	_AR_TYPE_CODE_MASK@GOTPCREL(%rip), %rsi
	movq	_AR_TYPE_ACCESSES_MASK@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	orl	(%rsi), %edi
	testl	%edx, %edi
	jne	LBB0_7
## %bb.2:
	cmpl	$0, -16(%rbp)
	je	LBB0_7
## %bb.3:
	movq	_SELECTOR_RPL_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	-32(%rbp), %edx
	movq	_AR_TYPE_WRITEABLE_MASK@GOTPCREL(%rip), %rdi
	movl	-24(%rbp), %esi
	testl	%ecx, (%rdi)
	je	LBB0_5
## %bb.4:
	cmpl	%edx, %esi
	ja	LBB0_7
	jmp	LBB0_6
LBB0_5:
	cmpl	%edx, %esi
	jne	LBB0_7
LBB0_6:
	xorl	%eax, %eax
	cmpl	$0, -20(%rbp)
	setne	%al
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_VCPU_SREG_CS,4,2               ## @VCPU_SREG_CS
	.comm	_SELECTOR_RPL_MASK,4,2          ## @SELECTOR_RPL_MASK
	.comm	_AR_TYPE_CODE_MASK,4,2          ## @AR_TYPE_CODE_MASK
	.comm	_AR_TYPE_ACCESSES_MASK,4,2      ## @AR_TYPE_ACCESSES_MASK
	.comm	_AR_TYPE_WRITEABLE_MASK,4,2     ## @AR_TYPE_WRITEABLE_MASK
	.no_dead_strip	_code_segment_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function code_segment_valid
_code_segment_valid:                    ; @code_segment_valid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _VCPU_SREG_CS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VCPU_SREG_CS@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x1, sp
	bl	_vmx_get_segment
	ldr	x8, [sp, #24]
	cbnz	x8, LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _AR_TYPE_CODE_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR_TYPE_CODE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _AR_TYPE_ACCESSES_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AR_TYPE_ACCESSES_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w9, w9, w8
	ldr	w8, [sp, #4]
	ldr	w10, [sp, #16]
	bic	w9, w9, w8
	cmp	w9, #0
	ccmp	w10, #0, #4, eq
	b.eq	LBB0_4
; %bb.2:
Lloh9:
	adrp	x9, _SELECTOR_RPL_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SELECTOR_RPL_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x9]
	ldr	w11, [sp]
	ldr	w9, [sp, #8]
	and	w10, w10, w11
Lloh12:
	adrp	x11, _AR_TYPE_WRITEABLE_MASK@GOTPAGE
Lloh13:
	ldr	x11, [x11, _AR_TYPE_WRITEABLE_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	tst	w11, w8
	b.eq	LBB0_6
; %bb.3:
	cmp	w9, w10
	b.ls	LBB0_7
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_6:
	cmp	w9, w10
	b.ne	LBB0_4
LBB0_7:
	ldr	w8, [sp, #12]
	cmp	w8, #0
	cset	w0, ne
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_VCPU_SREG_CS,4,2               ; @VCPU_SREG_CS
	.comm	_SELECTOR_RPL_MASK,4,2          ; @SELECTOR_RPL_MASK
	.comm	_AR_TYPE_CODE_MASK,4,2          ; @AR_TYPE_CODE_MASK
	.comm	_AR_TYPE_ACCESSES_MASK,4,2      ; @AR_TYPE_ACCESSES_MASK
	.comm	_AR_TYPE_WRITEABLE_MASK,4,2     ; @AR_TYPE_WRITEABLE_MASK
	.no_dead_strip	_code_segment_valid
.subsections_via_symbols
