	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function selinux_file_mprotect
_selinux_file_mprotect:                 ## @selinux_file_mprotect
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_current_cred
	movq	_selinux_checkreqprot@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	cmoveq	%rbx, %r15
	movq	_PROT_EXEC@GOTPCREL(%rip), %rcx
	testq	%r15, (%rcx)
	je	LBB0_13
## %bb.1:
	movq	_VM_EXEC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r14)
	je	LBB0_2
LBB0_13:
	movl	24(%r14), %edi
	movq	_VM_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	(%r14), %edx
	movq	%r15, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_file_map_prot_check            ## TAILCALL
LBB0_2:
	movq	8(%r14), %rcx
	movq	40(%r14), %rdx
	cmpq	(%rdx), %rcx
	jl	LBB0_5
## %bb.3:
	movq	16(%r14), %rsi
	cmpq	8(%rdx), %rsi
	jle	LBB0_4
LBB0_5:
	movl	24(%r14), %esi
	testl	%esi, %esi
	je	LBB0_6
## %bb.9:
	cmpq	$0, 32(%r14)
	je	LBB0_13
## %bb.10:
	movq	_FILE__EXECMOD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	callq	_file_has_perm
	jmp	LBB0_11
LBB0_6:
	movq	16(%rdx), %rax
	cmpq	%rax, %rcx
	jg	LBB0_13
## %bb.7:
	cmpq	%rax, 16(%r14)
	jl	LBB0_13
## %bb.8:
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PROCESS__EXECSTACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_current_has_perm
	jmp	LBB0_11
LBB0_4:
	movq	_PROCESS__EXECHEAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	movq	%rax, %rsi
	callq	_cred_has_perm
LBB0_11:
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_selinux_checkreqprot,8,3       ## @selinux_checkreqprot
	.comm	_PROT_EXEC,8,3                  ## @PROT_EXEC
	.comm	_VM_EXEC,4,2                    ## @VM_EXEC
	.comm	_PROCESS__EXECHEAP,4,2          ## @PROCESS__EXECHEAP
	.comm	_current,4,2                    ## @current
	.comm	_PROCESS__EXECSTACK,4,2         ## @PROCESS__EXECSTACK
	.comm	_FILE__EXECMOD,4,2              ## @FILE__EXECMOD
	.comm	_VM_SHARED,4,2                  ## @VM_SHARED
	.no_dead_strip	_selinux_file_mprotect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function selinux_file_mprotect
_selinux_file_mprotect:                 ; @selinux_file_mprotect
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_current_cred
Lloh0:
	adrp	x8, _selinux_checkreqprot@GOTPAGE
Lloh1:
	ldr	x8, [x8, _selinux_checkreqprot@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, #0
	csel	x20, x20, x21, eq
Lloh3:
	adrp	x8, _PROT_EXEC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PROT_EXEC@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	tst	x20, x8
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [x19]
Lloh6:
	adrp	x9, _VM_EXEC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _VM_EXEC@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
LBB0_2:
	ldr	w0, [x19, #24]
Lloh9:
	adrp	x8, _VM_SHARED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VM_SHARED@GOTPAGEOFF]
	ldr	w9, [x19]
Lloh11:
	ldr	w8, [x8]
	and	w2, w8, w9
	mov	x1, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_file_map_prot_check
LBB0_3:
	ldr	x8, [x19, #8]
	ldr	x9, [x19, #40]
	ldr	x10, [x9]
	cmp	x8, x10
	b.lt	LBB0_5
; %bb.4:
	ldr	x10, [x19, #16]
	ldr	x11, [x9, #8]
	cmp	x10, x11
	b.le	LBB0_11
LBB0_5:
	ldr	w1, [x19, #24]
	cbz	w1, LBB0_8
; %bb.6:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_2
; %bb.7:
Lloh12:
	adrp	x8, _FILE__EXECMOD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FILE__EXECMOD@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	bl	_file_has_perm
	b	LBB0_12
LBB0_8:
	ldr	x9, [x9, #16]
	cmp	x8, x9
	b.gt	LBB0_2
; %bb.9:
	ldr	x8, [x19, #16]
	cmp	x8, x9
	b.lt	LBB0_2
; %bb.10:
Lloh15:
	adrp	x8, _current@GOTPAGE
Lloh16:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x8, _PROCESS__EXECSTACK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PROCESS__EXECSTACK@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	bl	_current_has_perm
	b	LBB0_12
LBB0_11:
Lloh21:
	adrp	x8, _PROCESS__EXECHEAP@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PROCESS__EXECHEAP@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x1, x0
	bl	_cred_has_perm
LBB0_12:
	cbz	w0, LBB0_2
; %bb.13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_selinux_checkreqprot,8,3       ; @selinux_checkreqprot
	.comm	_PROT_EXEC,8,3                  ; @PROT_EXEC
	.comm	_VM_EXEC,4,2                    ; @VM_EXEC
	.comm	_PROCESS__EXECHEAP,4,2          ; @PROCESS__EXECHEAP
	.comm	_current,4,2                    ; @current
	.comm	_PROCESS__EXECSTACK,4,2         ; @PROCESS__EXECSTACK
	.comm	_FILE__EXECMOD,4,2              ; @FILE__EXECMOD
	.comm	_VM_SHARED,4,2                  ; @VM_SHARED
	.no_dead_strip	_selinux_file_mprotect
.subsections_via_symbols
