	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ExecCheckRTEPerms
_ExecCheckRTEPerms:                     ## @ExecCheckRTEPerms
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	_RTE_RELATION@GOTPCREL(%rip), %rcx
	movl	$1, %r14d
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.1:
	movq	%rdi, %r12
	movl	8(%rdi), %ebx
	testl	%ebx, %ebx
	je	LBB0_21
## %bb.2:
	movq	24(%r12), %rax
	movq	32(%r12), %r15
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_GetUserId
LBB0_4:
	movq	_ACLMASK_ALL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r15, %rdi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	movl	%ebx, %edx
	callq	_pg_class_aclmask
	movl	%eax, %r13d
	notl	%r13d
	andl	%ebx, %r13d
	je	LBB0_21
## %bb.5:
	movq	_ACL_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_ACL_INSERT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%eax, %ecx
	movq	_ACL_UPDATE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	notl	%ecx
	xorl	%r14d, %r14d
	testl	%ecx, %r13d
	je	LBB0_6
LBB0_21:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r15, %rbx
	testl	%r13d, %eax
	je	LBB0_16
## %bb.7:
	movl	20(%r12), %edi
	callq	_bms_is_empty
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_ACL_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ACLMASK_ANY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_pg_attribute_aclcheck_all
	movq	_ACLCHECK_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
LBB0_9:
	movl	20(%r12), %edi
	movl	$-1, %esi
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	callq	_bms_next_member
	movl	%eax, %r15d
	testl	%eax, %eax
	movq	_ACL_SELECT@GOTPCREL(%rip), %rax
	js	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%r15d, %esi
	movq	_FirstLowInvalidHeapAttributeNumber@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rsi
	movl	(%rax), %ecx
	movq	_InvalidAttrNumber@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_ACLMASK_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%ecx, %edx
	movl	%eax, %ecx
	callq	_pg_attribute_aclcheck_all
	jmp	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%rbx, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_pg_attribute_aclcheck
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	_ACLCHECK_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	20(%r12), %edi
	movl	%r15d, %esi
	jmp	LBB0_10
LBB0_16:
	movq	_ACL_INSERT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%r13d, %ecx
	je	LBB0_18
## %bb.17:
	movl	16(%r12), %edx
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_ExecCheckRTEPermsModified
	testl	%eax, %eax
	je	LBB0_21
LBB0_18:
	movq	_ACL_UPDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%r13d, %ecx
	je	LBB0_20
## %bb.19:
	movl	12(%r12), %edx
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_ExecCheckRTEPermsModified
	testl	%eax, %eax
	je	LBB0_21
LBB0_20:
	movl	$1, %r14d
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_RTE_RELATION,8,3               ## @RTE_RELATION
	.comm	_ACLMASK_ALL,4,2                ## @ACLMASK_ALL
	.comm	_ACL_SELECT,4,2                 ## @ACL_SELECT
	.comm	_ACL_INSERT,4,2                 ## @ACL_INSERT
	.comm	_ACL_UPDATE,4,2                 ## @ACL_UPDATE
	.comm	_ACLMASK_ANY,4,2                ## @ACLMASK_ANY
	.comm	_ACLCHECK_OK,8,3                ## @ACLCHECK_OK
	.comm	_FirstLowInvalidHeapAttributeNumber,8,3 ## @FirstLowInvalidHeapAttributeNumber
	.comm	_InvalidAttrNumber,8,3          ## @InvalidAttrNumber
	.no_dead_strip	_ExecCheckRTEPerms
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ExecCheckRTEPerms
_ExecCheckRTEPerms:                     ; @ExecCheckRTEPerms
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _RTE_RELATION@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RTE_RELATION@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_21
; %bb.1:
	mov	x19, x0
	ldr	w22, [x0, #8]
	cbz	w22, LBB0_21
; %bb.2:
	ldp	x21, x20, [x19, #24]
	cbnz	x21, LBB0_4
; %bb.3:
	bl	_GetUserId
	mov	x21, x0
LBB0_4:
Lloh3:
	adrp	x25, _ACLMASK_ALL@GOTPAGE
Lloh4:
	ldr	x25, [x25, _ACLMASK_ALL@GOTPAGEOFF]
	ldr	w3, [x25]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_pg_class_aclmask
	bics	w23, w22, w0
	b.eq	LBB0_21
; %bb.5:
Lloh5:
	adrp	x26, _ACL_SELECT@GOTPAGE
Lloh6:
	ldr	x26, [x26, _ACL_SELECT@GOTPAGEOFF]
	ldr	w8, [x26]
Lloh7:
	adrp	x9, _ACL_INSERT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ACL_INSERT@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w9, w9, w8
Lloh10:
	adrp	x10, _ACL_UPDATE@GOTPAGE
Lloh11:
	ldr	x10, [x10, _ACL_UPDATE@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	orr	w9, w9, w10
	bics	wzr, w23, w9
	b.eq	LBB0_7
LBB0_6:
	mov	w0, #0
	b	LBB0_22
LBB0_7:
	tst	w8, w23
	b.eq	LBB0_17
; %bb.8:
	ldr	w0, [x19, #20]
	bl	_bms_is_empty
Lloh13:
	adrp	x28, _ACLCHECK_OK@GOTPAGE
Lloh14:
	ldr	x28, [x28, _ACLCHECK_OK@GOTPAGEOFF]
	cbz	x0, LBB0_10
; %bb.9:
	ldr	w2, [x26]
Lloh15:
	adrp	x8, _ACLMASK_ANY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ACLMASK_ANY@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_pg_attribute_aclcheck_all
	ldr	x8, [x28]
	cmp	x0, x8
	b.ne	LBB0_6
LBB0_10:
	ldr	w0, [x19, #20]
	mov	w1, #-1
	bl	_bms_next_member
	tbnz	w0, #31, LBB0_17
; %bb.11:
	mov	x22, x0
Lloh18:
	adrp	x24, _FirstLowInvalidHeapAttributeNumber@GOTPAGE
Lloh19:
	ldr	x24, [x24, _FirstLowInvalidHeapAttributeNumber@GOTPAGEOFF]
Lloh20:
	adrp	x27, _InvalidAttrNumber@GOTPAGE
Lloh21:
	ldr	x27, [x27, _InvalidAttrNumber@GOTPAGEOFF]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	add	x1, x8, w22, uxtw
	ldr	x9, [x27]
	ldr	w8, [x26]
	cmp	x1, x9
	b.ne	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w3, [x25]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x8
	bl	_pg_attribute_aclcheck_all
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x20
	mov	x2, x21
	mov	x3, x8
	bl	_pg_attribute_aclcheck
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x28]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w0, [x19, #20]
	mov	x1, x22
	bl	_bms_next_member
	mov	x22, x0
	tbz	w0, #31, LBB0_12
LBB0_17:
Lloh22:
	adrp	x8, _ACL_INSERT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ACL_INSERT@GOTPAGEOFF]
Lloh24:
	ldr	w3, [x8]
	tst	w3, w23
	b.eq	LBB0_19
; %bb.18:
	ldr	w2, [x19, #16]
	mov	x0, x20
	mov	x1, x21
	bl	_ExecCheckRTEPermsModified
	cbz	w0, LBB0_22
LBB0_19:
Lloh25:
	adrp	x8, _ACL_UPDATE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ACL_UPDATE@GOTPAGEOFF]
Lloh27:
	ldr	w3, [x8]
	tst	w3, w23
	b.eq	LBB0_21
; %bb.20:
	ldr	w2, [x19, #12]
	mov	x0, x20
	mov	x1, x21
	bl	_ExecCheckRTEPermsModified
	cbz	w0, LBB0_22
LBB0_21:
	mov	w0, #1
LBB0_22:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_RTE_RELATION,8,3               ; @RTE_RELATION
	.comm	_ACLMASK_ALL,4,2                ; @ACLMASK_ALL
	.comm	_ACL_SELECT,4,2                 ; @ACL_SELECT
	.comm	_ACL_INSERT,4,2                 ; @ACL_INSERT
	.comm	_ACL_UPDATE,4,2                 ; @ACL_UPDATE
	.comm	_ACLMASK_ANY,4,2                ; @ACLMASK_ANY
	.comm	_ACLCHECK_OK,8,3                ; @ACLCHECK_OK
	.comm	_FirstLowInvalidHeapAttributeNumber,8,3 ; @FirstLowInvalidHeapAttributeNumber
	.comm	_InvalidAttrNumber,8,3          ; @InvalidAttrNumber
	.no_dead_strip	_ExecCheckRTEPerms
.subsections_via_symbols
