	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ugidfw_rulecheck
_ugidfw_rulecheck:                      ## @ugidfw_rulecheck
	.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
	movl	%r8d, %r14d
	movq	%rcx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ugidfw_mtx@GOTPCREL(%rip), %rdi
	callq	_mtx_assert
	movl	64(%rbx), %r9d
	movq	_MBS_UID_DEFINED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%r9d, %edx
	je	LBB0_10
## %bb.1:
	movq	(%r12), %rsi
	movq	72(%rbx), %rax
	cmpq	%rax, %rsi
	jg	LBB0_3
## %bb.2:
	cmpq	80(%rbx), %rsi
	jge	LBB0_8
LBB0_3:
	movq	8(%r12), %rsi
	cmpq	%rax, %rsi
	jg	LBB0_5
## %bb.4:
	cmpq	80(%rbx), %rsi
	jge	LBB0_8
LBB0_5:
	movq	16(%r12), %rsi
	cmpq	%rax, %rsi
	jle	LBB0_9
## %bb.6:
	testl	%edx, 88(%rbx)
	jne	LBB0_10
	jmp	LBB0_7
LBB0_8:
	xorl	%eax, %eax
	testl	%edx, 88(%rbx)
	jne	LBB0_90
	jmp	LBB0_10
LBB0_9:
	cmpq	80(%rbx), %rsi
	setge	%cl
	testl	%edx, 88(%rbx)
	setne	%dl
	xorl	%eax, %eax
	cmpb	%dl, %cl
	je	LBB0_90
LBB0_10:
	movq	_MBS_GID_DEFINED@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	testl	%r9d, %r8d
	je	LBB0_22
## %bb.11:
	movq	24(%r12), %rdx
	movq	96(%rbx), %rax
	cmpq	%rax, %rdx
	jg	LBB0_13
## %bb.12:
	cmpq	104(%rbx), %rdx
	jge	LBB0_20
LBB0_13:
	movq	32(%r12), %rdx
	cmpq	%rax, %rdx
	jg	LBB0_15
## %bb.14:
	cmpq	104(%rbx), %rdx
	jge	LBB0_20
LBB0_15:
	movl	40(%r12), %esi
	testl	%esi, %esi
	jle	LBB0_21
## %bb.16:
	movq	48(%r12), %rdi
	xorl	%edx, %edx
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_18 Depth=1
	incq	%rdx
	cmpq	%rdx, %rsi
	je	LBB0_21
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdi,%rdx,8), %rcx
	cmpq	%rax, %rcx
	jg	LBB0_17
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	cmpq	104(%rbx), %rcx
	jl	LBB0_17
LBB0_20:
	xorl	%eax, %eax
	testl	%r8d, 88(%rbx)
	jne	LBB0_90
	jmp	LBB0_22
LBB0_21:
	testl	%r8d, 88(%rbx)
	je	LBB0_7
LBB0_22:
	movq	_MBS_PRISON_DEFINED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r9d, %eax
	je	LBB0_24
## %bb.23:
	movq	56(%r12), %rcx
	movq	(%rcx), %rcx
	cmpq	112(%rbx), %rcx
	sete	%cl
	testl	%eax, 88(%rbx)
	setne	%dl
	xorl	%eax, %eax
	cmpb	%dl, %cl
	je	LBB0_90
LBB0_24:
	movl	8(%rbx), %ecx
	movq	_MBO_UID_DEFINED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ecx, %eax
	je	LBB0_29
## %bb.25:
	movq	(%r15), %rdx
	cmpq	16(%rbx), %rdx
	jle	LBB0_28
## %bb.26:
	testl	%eax, 32(%rbx)
	jne	LBB0_29
	jmp	LBB0_7
LBB0_28:
	cmpq	24(%rbx), %rdx
	setge	%sil
	testl	%eax, 32(%rbx)
	setne	%dl
	xorl	%eax, %eax
	cmpb	%dl, %sil
	je	LBB0_90
LBB0_29:
	movq	_MBO_GID_DEFINED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ecx, %eax
	je	LBB0_34
## %bb.30:
	movq	8(%r15), %rdx
	cmpq	40(%rbx), %rdx
	jle	LBB0_33
## %bb.31:
	testl	%eax, 32(%rbx)
	jne	LBB0_34
	jmp	LBB0_7
LBB0_33:
	cmpq	48(%rbx), %rdx
	setge	%sil
	testl	%eax, 32(%rbx)
	setne	%dl
	xorl	%eax, %eax
	cmpb	%dl, %sil
	je	LBB0_90
LBB0_34:
	movq	_MBO_FSID_DEFINED@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_37
## %bb.35:
	movl	(%rax), %eax
	testl	%eax, 32(%rbx)
	je	LBB0_7
## %bb.36:
	movl	8(%rbx), %ecx
LBB0_37:
	movq	_MBO_SUID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ecx, %eax
	je	LBB0_39
## %bb.38:
	movq	_S_ISUID@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	xorl	%esi, %esi
	andl	16(%r15), %edx
	sete	%sil
	testl	%eax, 32(%rbx)
	cmovel	%edx, %esi
	testl	%esi, %esi
	je	LBB0_7
LBB0_39:
	movq	_MBO_SGID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ecx, %eax
	je	LBB0_41
## %bb.40:
	movq	_S_ISGID@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	xorl	%esi, %esi
	andl	16(%r15), %edx
	sete	%sil
	testl	%eax, 32(%rbx)
	cmovel	%edx, %esi
	testl	%esi, %esi
	je	LBB0_7
LBB0_41:
	movq	_MBO_UID_SUBJECT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%ecx, %edx
	je	LBB0_50
## %bb.42:
	movq	(%r15), %rax
	cmpq	(%r12), %rax
	je	LBB0_44
## %bb.43:
	cmpq	8(%r12), %rax
	jne	LBB0_49
LBB0_44:
	xorl	%eax, %eax
	testl	%edx, 32(%rbx)
	jne	LBB0_90
	jmp	LBB0_50
LBB0_7:
	xorl	%eax, %eax
LBB0_90:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_49:
	cmpq	16(%r12), %rax
	sete	%sil
	testl	%edx, 32(%rbx)
	setne	%dl
	xorl	%eax, %eax
	cmpb	%dl, %sil
	je	LBB0_90
LBB0_50:
	movq	_MBO_GID_SUBJECT@GOTPCREL(%rip), %r13
	testl	%ecx, (%r13)
	je	LBB0_56
## %bb.51:
	movq	8(%r15), %rdi
	movq	%r12, %rsi
	callq	_groupmember
	testq	%rax, %rax
	jne	LBB0_53
## %bb.52:
	movq	8(%r15), %rax
	cmpq	24(%r12), %rax
	jne	LBB0_54
LBB0_53:
	movl	(%r13), %ecx
	xorl	%eax, %eax
	testl	%ecx, 32(%rbx)
	jne	LBB0_90
	jmp	LBB0_55
LBB0_54:
	cmpq	32(%r12), %rax
	sete	%cl
	movl	(%r13), %eax
	testl	%eax, 32(%rbx)
	setne	%dl
	xorl	%eax, %eax
	cmpb	%dl, %cl
	je	LBB0_90
LBB0_55:
	movl	8(%rbx), %ecx
LBB0_56:
	movq	_MBO_TYPE_DEFINED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%ecx, %edx
	je	LBB0_60
## %bb.57:
	movl	20(%r15), %esi
	addl	$-128, %esi
	xorl	%eax, %eax
	movl	$0, %ecx
	cmpl	$6, %esi
	ja	LBB0_59
## %bb.58:
	movslq	%esi, %rcx
	leaq	l_switch.table.ugidfw_rulecheck(%rip), %rsi
	movq	(%rsi,%rcx,8), %rcx
	movl	(%rcx), %ecx
	andl	56(%rbx), %ecx
LBB0_59:
	xorl	%esi, %esi
	testl	%ecx, %ecx
	sete	%sil
	testl	%edx, 32(%rbx)
	cmovel	%ecx, %esi
	testl	%esi, %esi
	je	LBB0_90
LBB0_60:
	movl	(%rbx), %r13d
	movq	_MBI_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	testl	%r14d, %eax
	je	LBB0_64
## %bb.61:
	andl	%r13d, %eax
	jne	LBB0_64
## %bb.62:
	movq	_PRIV_VFS_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_priv_check_cred
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_64
## %bb.63:
	movq	_MBI_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_64:
	movq	_MBI_EXEC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r14d, %eax
	je	LBB0_71
## %bb.65:
	andl	%r13d, %eax
	jne	LBB0_71
## %bb.66:
	cmpl	$132, 20(%r15)
	jne	LBB0_68
## %bb.67:
	movq	_PRIV_VFS_LOOKUP@GOTPCREL(%rip), %rax
	jmp	LBB0_69
LBB0_68:
	movq	_PRIV_VFS_EXEC@GOTPCREL(%rip), %rax
LBB0_69:
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_priv_check_cred
	testq	%rax, %rax
	jne	LBB0_71
## %bb.70:
	movq	_MBI_EXEC@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_71:
	movq	_MBI_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r14d, %eax
	je	LBB0_75
## %bb.72:
	andl	%r13d, %eax
	jne	LBB0_75
## %bb.73:
	movq	_PRIV_VFS_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_priv_check_cred
	testq	%rax, %rax
	jne	LBB0_75
## %bb.74:
	movq	_MBI_READ@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_75:
	movq	_MBI_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r14d, %eax
	je	LBB0_79
## %bb.76:
	andl	%r13d, %eax
	jne	LBB0_79
## %bb.77:
	movq	_PRIV_VFS_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_priv_check_cred
	testq	%rax, %rax
	jne	LBB0_79
## %bb.78:
	movq	_MBI_STAT@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_79:
	movq	_MBI_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r14d, %eax
	je	LBB0_83
## %bb.80:
	andl	%r13d, %eax
	jne	LBB0_83
## %bb.81:
	movq	_PRIV_VFS_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_priv_check_cred
	testq	%rax, %rax
	jne	LBB0_83
## %bb.82:
	movq	_MBI_WRITE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_83:
	orl	%r13d, %ebx
	notl	%ebx
	testl	%ebx, %r14d
	jne	LBB0_86
## %bb.84:
	movq	_ugidfw_firstmatch_enabled@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpq	$0, (%rcx)
	je	LBB0_90
## %bb.85:
	movq	_EJUSTRETURN@GOTPCREL(%rip), %rax
	jmp	LBB0_89
LBB0_86:
	movq	_ugidfw_logging@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_88
## %bb.87:
	movq	_LOG_AUTHPRIV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r12), %rdx
	movq	24(%r12), %rcx
	movq	(%r15), %r9
	movq	8(%r15), %rax
	movq	%rax, (%rsp)
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %r8d
	callq	_log
LBB0_88:
	movq	_EACCES@GOTPCREL(%rip), %rax
LBB0_89:
	movl	(%rax), %eax
	jmp	LBB0_90
	.cfi_endproc
                                        ## -- End function
	.comm	_ugidfw_mtx,4,2                 ## @ugidfw_mtx
	.comm	_MA_OWNED,4,2                   ## @MA_OWNED
	.comm	_MBS_UID_DEFINED,4,2            ## @MBS_UID_DEFINED
	.comm	_MBS_GID_DEFINED,4,2            ## @MBS_GID_DEFINED
	.comm	_MBS_PRISON_DEFINED,4,2         ## @MBS_PRISON_DEFINED
	.comm	_MBO_UID_DEFINED,4,2            ## @MBO_UID_DEFINED
	.comm	_MBO_GID_DEFINED,4,2            ## @MBO_GID_DEFINED
	.comm	_MBO_FSID_DEFINED,4,2           ## @MBO_FSID_DEFINED
	.comm	_MBO_SUID,4,2                   ## @MBO_SUID
	.comm	_S_ISUID,4,2                    ## @S_ISUID
	.comm	_MBO_SGID,4,2                   ## @MBO_SGID
	.comm	_S_ISGID,4,2                    ## @S_ISGID
	.comm	_MBO_UID_SUBJECT,4,2            ## @MBO_UID_SUBJECT
	.comm	_MBO_GID_SUBJECT,4,2            ## @MBO_GID_SUBJECT
	.comm	_MBO_TYPE_DEFINED,4,2           ## @MBO_TYPE_DEFINED
	.comm	_MBO_TYPE_REG,4,2               ## @MBO_TYPE_REG
	.comm	_MBO_TYPE_DIR,4,2               ## @MBO_TYPE_DIR
	.comm	_MBO_TYPE_BLK,4,2               ## @MBO_TYPE_BLK
	.comm	_MBO_TYPE_CHR,4,2               ## @MBO_TYPE_CHR
	.comm	_MBO_TYPE_LNK,4,2               ## @MBO_TYPE_LNK
	.comm	_MBO_TYPE_SOCK,4,2              ## @MBO_TYPE_SOCK
	.comm	_MBO_TYPE_FIFO,4,2              ## @MBO_TYPE_FIFO
	.comm	_MBI_ADMIN,4,2                  ## @MBI_ADMIN
	.comm	_PRIV_VFS_ADMIN,4,2             ## @PRIV_VFS_ADMIN
	.comm	_MBI_EXEC,4,2                   ## @MBI_EXEC
	.comm	_PRIV_VFS_LOOKUP,4,2            ## @PRIV_VFS_LOOKUP
	.comm	_PRIV_VFS_EXEC,4,2              ## @PRIV_VFS_EXEC
	.comm	_MBI_READ,4,2                   ## @MBI_READ
	.comm	_PRIV_VFS_READ,4,2              ## @PRIV_VFS_READ
	.comm	_MBI_STAT,4,2                   ## @MBI_STAT
	.comm	_PRIV_VFS_STAT,4,2              ## @PRIV_VFS_STAT
	.comm	_MBI_WRITE,4,2                  ## @MBI_WRITE
	.comm	_PRIV_VFS_WRITE,4,2             ## @PRIV_VFS_WRITE
	.comm	_ugidfw_logging,8,3             ## @ugidfw_logging
	.comm	_LOG_AUTHPRIV,4,2               ## @LOG_AUTHPRIV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mac_bsdextended: %d:%d request %d on %d:%d failed. \n"

	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_ugidfw_firstmatch_enabled,8,3  ## @ugidfw_firstmatch_enabled
	.comm	_EJUSTRETURN,4,2                ## @EJUSTRETURN
	.no_dead_strip	_ugidfw_rulecheck
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.ugidfw_rulecheck
l_switch.table.ugidfw_rulecheck:
	.quad	_MBO_TYPE_SOCK
	.quad	_MBO_TYPE_REG
	.quad	_MBO_TYPE_LNK
	.quad	_MBO_TYPE_FIFO
	.quad	_MBO_TYPE_DIR
	.quad	_MBO_TYPE_CHR
	.quad	_MBO_TYPE_BLK

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ugidfw_rulecheck
_ugidfw_rulecheck:                      ; @ugidfw_rulecheck
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x4
	mov	x20, x3
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, _ugidfw_mtx@GOTPAGE
Lloh4:
	ldr	x0, [x0, _ugidfw_mtx@GOTPAGEOFF]
	bl	_mtx_assert
	ldr	w8, [x22, #64]
Lloh5:
	adrp	x9, _MBS_UID_DEFINED@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MBS_UID_DEFINED@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.1:
	ldr	x11, [x21]
	ldr	x10, [x22, #72]
	cmp	x11, x10
	b.gt	LBB0_3
; %bb.2:
	ldr	x12, [x22, #80]
	cmp	x11, x12
	b.ge	LBB0_7
LBB0_3:
	ldr	x11, [x21, #8]
	cmp	x11, x10
	b.gt	LBB0_5
; %bb.4:
	ldr	x12, [x22, #80]
	cmp	x11, x12
	b.ge	LBB0_7
LBB0_5:
	ldr	x11, [x21, #16]
	cmp	x11, x10
	b.le	LBB0_8
; %bb.6:
	ldr	w10, [x22, #88]
	tst	w10, w9
	b.ne	LBB0_9
	b	LBB0_75
LBB0_7:
	ldr	w10, [x22, #88]
	tst	w10, w9
	b.ne	LBB0_75
	b	LBB0_9
LBB0_8:
	ldr	x10, [x22, #80]
	cmp	x11, x10
	cset	w10, ge
	ldr	w11, [x22, #88]
	tst	w11, w9
	cset	w9, ne
	cmp	w10, w9
	b.eq	LBB0_75
LBB0_9:
Lloh8:
	adrp	x9, _MBS_GID_DEFINED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MBS_GID_DEFINED@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.10:
	ldr	x11, [x21, #24]
	ldr	x10, [x22, #96]
	cmp	x11, x10
	b.gt	LBB0_12
; %bb.11:
	ldr	x12, [x22, #104]
	cmp	x11, x12
	b.ge	LBB0_19
LBB0_12:
	ldr	x11, [x21, #32]
	cmp	x11, x10
	b.gt	LBB0_14
; %bb.13:
	ldr	x12, [x22, #104]
	cmp	x11, x12
	b.ge	LBB0_19
LBB0_14:
	ldr	w11, [x21, #40]
	cmp	w11, #1
	b.lt	LBB0_20
; %bb.15:
	ldr	x12, [x21, #48]
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	add	x12, x12, #8
	subs	x11, x11, #1
	b.eq	LBB0_20
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x12]
	cmp	x13, x10
	b.gt	LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	x14, [x22, #104]
	cmp	x13, x14
	b.lt	LBB0_16
LBB0_19:
	ldr	w10, [x22, #88]
	tst	w10, w9
	b.ne	LBB0_75
	b	LBB0_21
LBB0_20:
	ldr	w10, [x22, #88]
	tst	w10, w9
	b.eq	LBB0_75
LBB0_21:
Lloh11:
	adrp	x9, _MBS_PRISON_DEFINED@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MBS_PRISON_DEFINED@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_23
; %bb.22:
	ldr	x8, [x21, #56]
	ldr	x8, [x8]
	ldr	x10, [x22, #112]
	cmp	x8, x10
	cset	w8, eq
	ldr	w10, [x22, #88]
	tst	w10, w9
	cset	w9, ne
	cmp	w8, w9
	b.eq	LBB0_75
LBB0_23:
	ldr	w8, [x22, #8]
Lloh14:
	adrp	x9, _MBO_UID_DEFINED@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MBO_UID_DEFINED@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_27
; %bb.24:
	ldr	x10, [x20]
	ldr	x11, [x22, #16]
	cmp	x10, x11
	b.le	LBB0_26
; %bb.25:
	ldr	w10, [x22, #32]
	tst	w10, w9
	b.ne	LBB0_27
	b	LBB0_75
LBB0_26:
	ldr	x11, [x22, #24]
	cmp	x10, x11
	cset	w10, ge
	ldr	w11, [x22, #32]
	tst	w11, w9
	cset	w9, ne
	cmp	w10, w9
	b.eq	LBB0_75
LBB0_27:
Lloh17:
	adrp	x9, _MBO_GID_DEFINED@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MBO_GID_DEFINED@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_31
; %bb.28:
	ldr	x10, [x20, #8]
	ldr	x11, [x22, #40]
	cmp	x10, x11
	b.le	LBB0_30
; %bb.29:
	ldr	w10, [x22, #32]
	tst	w10, w9
	b.ne	LBB0_31
	b	LBB0_75
LBB0_30:
	ldr	x11, [x22, #48]
	cmp	x10, x11
	cset	w10, ge
	ldr	w11, [x22, #32]
	tst	w11, w9
	cset	w9, ne
	cmp	w10, w9
	b.eq	LBB0_75
LBB0_31:
Lloh20:
	adrp	x9, _MBO_FSID_DEFINED@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MBO_FSID_DEFINED@GOTPAGEOFF]
	ldr	w10, [x9]
	tst	w10, w8
	b.eq	LBB0_34
; %bb.32:
	ldr	w8, [x22, #32]
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_75
; %bb.33:
	ldr	w8, [x22, #8]
LBB0_34:
Lloh22:
	adrp	x9, _MBO_SUID@GOTPAGE
Lloh23:
	ldr	x9, [x9, _MBO_SUID@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_36
; %bb.35:
	ldr	w10, [x20, #16]
Lloh25:
	adrp	x11, _S_ISUID@GOTPAGE
Lloh26:
	ldr	x11, [x11, _S_ISUID@GOTPAGEOFF]
Lloh27:
	ldr	w11, [x11]
	ldr	w12, [x22, #32]
	ands	w10, w11, w10
	cset	w11, eq
	tst	w12, w9
	csel	w9, w10, w11, eq
	cbz	w9, LBB0_75
LBB0_36:
Lloh28:
	adrp	x9, _MBO_SGID@GOTPAGE
Lloh29:
	ldr	x9, [x9, _MBO_SGID@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_38
; %bb.37:
	ldr	w10, [x20, #16]
Lloh31:
	adrp	x11, _S_ISGID@GOTPAGE
Lloh32:
	ldr	x11, [x11, _S_ISGID@GOTPAGEOFF]
Lloh33:
	ldr	w11, [x11]
	ldr	w12, [x22, #32]
	ands	w10, w11, w10
	cset	w11, eq
	tst	w12, w9
	csel	w9, w10, w11, eq
	cbz	w9, LBB0_75
LBB0_38:
Lloh34:
	adrp	x9, _MBO_UID_SUBJECT@GOTPAGE
Lloh35:
	ldr	x9, [x9, _MBO_UID_SUBJECT@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_43
; %bb.39:
	ldr	x10, [x20]
	ldr	x11, [x21]
	cmp	x10, x11
	b.eq	LBB0_41
; %bb.40:
	ldr	x11, [x21, #8]
	cmp	x10, x11
	b.ne	LBB0_42
LBB0_41:
	ldr	w10, [x22, #32]
	tst	w10, w9
	b.ne	LBB0_75
	b	LBB0_43
LBB0_42:
	ldr	x11, [x21, #16]
	cmp	x10, x11
	cset	w10, eq
	ldr	w11, [x22, #32]
	tst	w11, w9
	cset	w9, ne
	cmp	w10, w9
	b.eq	LBB0_75
LBB0_43:
Lloh37:
	adrp	x23, _MBO_GID_SUBJECT@GOTPAGE
Lloh38:
	ldr	x23, [x23, _MBO_GID_SUBJECT@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_49
; %bb.44:
	ldr	x0, [x20, #8]
	mov	x1, x21
	bl	_groupmember
	cbnz	x0, LBB0_46
; %bb.45:
	ldr	x8, [x20, #8]
	ldr	x9, [x21, #24]
	cmp	x8, x9
	b.ne	LBB0_47
LBB0_46:
	ldr	w8, [x22, #32]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_75
	b	LBB0_48
LBB0_47:
	ldr	x9, [x21, #32]
	cmp	x8, x9
	cset	w8, eq
	ldr	w9, [x22, #32]
	ldr	w10, [x23]
	tst	w10, w9
	cset	w9, ne
	cmp	w8, w9
	b.eq	LBB0_75
LBB0_48:
	ldr	w8, [x22, #8]
LBB0_49:
Lloh39:
	adrp	x9, _MBO_TYPE_DEFINED@GOTPAGE
Lloh40:
	ldr	x9, [x9, _MBO_TYPE_DEFINED@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_54
; %bb.50:
	ldr	w8, [x20, #20]
	sub	w8, w8, #128
	cmp	w8, #6
	b.hi	LBB0_52
; %bb.51:
Lloh42:
	adrp	x10, l_switch.table.ugidfw_rulecheck@PAGE
Lloh43:
	add	x10, x10, l_switch.table.ugidfw_rulecheck@PAGEOFF
	ldr	x8, [x10, w8, sxtw #3]
	ldr	w10, [x22, #56]
	ldr	w8, [x8]
	and	w8, w8, w10
	b	LBB0_53
LBB0_52:
	mov	w8, #0
LBB0_53:
	ldr	w10, [x22, #32]
	cmp	w8, #0
	cset	w11, eq
	tst	w10, w9
	csel	w8, w8, w11, eq
	cbz	w8, LBB0_75
LBB0_54:
	mov	w23, #0
	ldr	w22, [x22]
Lloh44:
	adrp	x24, _MBI_ADMIN@GOTPAGE
Lloh45:
	ldr	x24, [x24, _MBI_ADMIN@GOTPAGEOFF]
	ldr	w8, [x24]
	tst	w8, w19
	b.eq	LBB0_57
; %bb.55:
	and	w8, w8, w22
	cbnz	w8, LBB0_57
; %bb.56:
Lloh46:
	adrp	x8, _PRIV_VFS_ADMIN@GOTPAGE
Lloh47:
	ldr	x8, [x8, _PRIV_VFS_ADMIN@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_priv_check_cred
	ldr	w8, [x24]
	cmp	x0, #0
	csel	w23, w8, wzr, eq
LBB0_57:
Lloh49:
	adrp	x24, _MBI_EXEC@GOTPAGE
Lloh50:
	ldr	x24, [x24, _MBI_EXEC@GOTPAGEOFF]
	ldr	w8, [x24]
	tst	w8, w19
	b.eq	LBB0_61
; %bb.58:
	and	w8, w8, w22
	cbnz	w8, LBB0_61
; %bb.59:
Lloh51:
	adrp	x8, _PRIV_VFS_LOOKUP@GOTPAGE
Lloh52:
	ldr	x8, [x8, _PRIV_VFS_LOOKUP@GOTPAGEOFF]
	ldr	w9, [x20, #20]
Lloh53:
	adrp	x10, _PRIV_VFS_EXEC@GOTPAGE
Lloh54:
	ldr	x10, [x10, _PRIV_VFS_EXEC@GOTPAGEOFF]
	cmp	w9, #132
	csel	x8, x8, x10, eq
	ldr	w1, [x8]
	mov	x0, x21
	bl	_priv_check_cred
	cbnz	x0, LBB0_61
; %bb.60:
	ldr	w8, [x24]
	orr	w23, w8, w23
LBB0_61:
Lloh55:
	adrp	x24, _MBI_READ@GOTPAGE
Lloh56:
	ldr	x24, [x24, _MBI_READ@GOTPAGEOFF]
	ldr	w8, [x24]
	tst	w8, w19
	b.eq	LBB0_65
; %bb.62:
	and	w8, w8, w22
	cbnz	w8, LBB0_65
; %bb.63:
Lloh57:
	adrp	x8, _PRIV_VFS_READ@GOTPAGE
Lloh58:
	ldr	x8, [x8, _PRIV_VFS_READ@GOTPAGEOFF]
Lloh59:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_priv_check_cred
	cbnz	x0, LBB0_65
; %bb.64:
	ldr	w8, [x24]
	orr	w23, w8, w23
LBB0_65:
Lloh60:
	adrp	x24, _MBI_STAT@GOTPAGE
Lloh61:
	ldr	x24, [x24, _MBI_STAT@GOTPAGEOFF]
	ldr	w8, [x24]
	tst	w8, w19
	b.eq	LBB0_69
; %bb.66:
	and	w8, w8, w22
	cbnz	w8, LBB0_69
; %bb.67:
Lloh62:
	adrp	x8, _PRIV_VFS_STAT@GOTPAGE
Lloh63:
	ldr	x8, [x8, _PRIV_VFS_STAT@GOTPAGEOFF]
Lloh64:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_priv_check_cred
	cbnz	x0, LBB0_69
; %bb.68:
	ldr	w8, [x24]
	orr	w23, w8, w23
LBB0_69:
Lloh65:
	adrp	x24, _MBI_WRITE@GOTPAGE
Lloh66:
	ldr	x24, [x24, _MBI_WRITE@GOTPAGEOFF]
	ldr	w8, [x24]
	tst	w8, w19
	b.eq	LBB0_73
; %bb.70:
	and	w8, w8, w22
	cbnz	w8, LBB0_73
; %bb.71:
Lloh67:
	adrp	x8, _PRIV_VFS_WRITE@GOTPAGE
Lloh68:
	ldr	x8, [x8, _PRIV_VFS_WRITE@GOTPAGEOFF]
Lloh69:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_priv_check_cred
	cbnz	x0, LBB0_73
; %bb.72:
	ldr	w8, [x24]
	orr	w23, w8, w23
LBB0_73:
	orr	w8, w23, w22
	bics	wzr, w19, w8
	b.ne	LBB0_77
; %bb.74:
Lloh70:
	adrp	x8, _ugidfw_firstmatch_enabled@GOTPAGE
Lloh71:
	ldr	x8, [x8, _ugidfw_firstmatch_enabled@GOTPAGEOFF]
Lloh72:
	ldr	x8, [x8]
Lloh73:
	adrp	x9, _EJUSTRETURN@GOTPAGE
Lloh74:
	ldr	x9, [x9, _EJUSTRETURN@GOTPAGEOFF]
Lloh75:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w0, wzr, w9, eq
	b	LBB0_76
LBB0_75:
	mov	w0, #0
LBB0_76:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_77:
Lloh76:
	adrp	x8, _ugidfw_logging@GOTPAGE
Lloh77:
	ldr	x8, [x8, _ugidfw_logging@GOTPAGEOFF]
Lloh78:
	ldr	x8, [x8]
	cbz	x8, LBB0_79
; %bb.78:
Lloh79:
	adrp	x8, _LOG_AUTHPRIV@GOTPAGE
Lloh80:
	ldr	x8, [x8, _LOG_AUTHPRIV@GOTPAGEOFF]
Lloh81:
	ldr	w0, [x8]
	ldr	x2, [x21, #8]
	ldr	x3, [x21, #24]
	ldp	x5, x6, [x20]
Lloh82:
	adrp	x1, l_.str@PAGE
Lloh83:
	add	x1, x1, l_.str@PAGEOFF
	mov	x4, x19
	bl	_log
LBB0_79:
Lloh84:
	adrp	x8, _EACCES@GOTPAGE
Lloh85:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
Lloh86:
	ldr	w0, [x8]
	b	LBB0_76
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGot	Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGot	Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpAdd	Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.loh AdrpLdrGotLdr	Lloh84, Lloh85, Lloh86
	.cfi_endproc
                                        ; -- End function
	.comm	_ugidfw_mtx,4,2                 ; @ugidfw_mtx
	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.comm	_MBS_UID_DEFINED,4,2            ; @MBS_UID_DEFINED
	.comm	_MBS_GID_DEFINED,4,2            ; @MBS_GID_DEFINED
	.comm	_MBS_PRISON_DEFINED,4,2         ; @MBS_PRISON_DEFINED
	.comm	_MBO_UID_DEFINED,4,2            ; @MBO_UID_DEFINED
	.comm	_MBO_GID_DEFINED,4,2            ; @MBO_GID_DEFINED
	.comm	_MBO_FSID_DEFINED,4,2           ; @MBO_FSID_DEFINED
	.comm	_MBO_SUID,4,2                   ; @MBO_SUID
	.comm	_S_ISUID,4,2                    ; @S_ISUID
	.comm	_MBO_SGID,4,2                   ; @MBO_SGID
	.comm	_S_ISGID,4,2                    ; @S_ISGID
	.comm	_MBO_UID_SUBJECT,4,2            ; @MBO_UID_SUBJECT
	.comm	_MBO_GID_SUBJECT,4,2            ; @MBO_GID_SUBJECT
	.comm	_MBO_TYPE_DEFINED,4,2           ; @MBO_TYPE_DEFINED
	.comm	_MBO_TYPE_REG,4,2               ; @MBO_TYPE_REG
	.comm	_MBO_TYPE_DIR,4,2               ; @MBO_TYPE_DIR
	.comm	_MBO_TYPE_BLK,4,2               ; @MBO_TYPE_BLK
	.comm	_MBO_TYPE_CHR,4,2               ; @MBO_TYPE_CHR
	.comm	_MBO_TYPE_LNK,4,2               ; @MBO_TYPE_LNK
	.comm	_MBO_TYPE_SOCK,4,2              ; @MBO_TYPE_SOCK
	.comm	_MBO_TYPE_FIFO,4,2              ; @MBO_TYPE_FIFO
	.comm	_MBI_ADMIN,4,2                  ; @MBI_ADMIN
	.comm	_PRIV_VFS_ADMIN,4,2             ; @PRIV_VFS_ADMIN
	.comm	_MBI_EXEC,4,2                   ; @MBI_EXEC
	.comm	_PRIV_VFS_LOOKUP,4,2            ; @PRIV_VFS_LOOKUP
	.comm	_PRIV_VFS_EXEC,4,2              ; @PRIV_VFS_EXEC
	.comm	_MBI_READ,4,2                   ; @MBI_READ
	.comm	_PRIV_VFS_READ,4,2              ; @PRIV_VFS_READ
	.comm	_MBI_STAT,4,2                   ; @MBI_STAT
	.comm	_PRIV_VFS_STAT,4,2              ; @PRIV_VFS_STAT
	.comm	_MBI_WRITE,4,2                  ; @MBI_WRITE
	.comm	_PRIV_VFS_WRITE,4,2             ; @PRIV_VFS_WRITE
	.comm	_ugidfw_logging,8,3             ; @ugidfw_logging
	.comm	_LOG_AUTHPRIV,4,2               ; @LOG_AUTHPRIV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mac_bsdextended: %d:%d request %d on %d:%d failed. \n"

	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_ugidfw_firstmatch_enabled,8,3  ; @ugidfw_firstmatch_enabled
	.comm	_EJUSTRETURN,4,2                ; @EJUSTRETURN
	.no_dead_strip	_ugidfw_rulecheck
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.ugidfw_rulecheck
l_switch.table.ugidfw_rulecheck:
	.quad	_MBO_TYPE_SOCK
	.quad	_MBO_TYPE_REG
	.quad	_MBO_TYPE_LNK
	.quad	_MBO_TYPE_FIFO
	.quad	_MBO_TYPE_DIR
	.quad	_MBO_TYPE_CHR
	.quad	_MBO_TYPE_BLK

.subsections_via_symbols
