	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sepgsql_avc_check_perms_label  ## -- Begin function sepgsql_avc_check_perms_label
	.p2align	4, 0x90
_sepgsql_avc_check_perms_label:         ## @sepgsql_avc_check_perms_label
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -56(%rbp)                 ## 4-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %r15d
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_sepgsql_get_client_label
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_sepgsql_avc_check_valid
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	orl	%r15d, (%rbx)
	movb	$1, %al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	$1, %r13d
	movl	$1, -48(%rbp)                   ## 4-byte Folded Spill
LBB0_14:                                ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_sepgsql_avc_check_valid
	testl	%eax, %eax
	jne	LBB0_15
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	testq	%r14, %r14
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_sepgsql_avc_unlabeled
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rsi
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_sepgsql_avc_lookup
	movq	%rax, %rbx
	movl	(%rax), %r12d
	notl	%r12d
	andl	%r15d, %r12d
	xorl	%eax, %eax
	callq	_sepgsql_get_debug_audit
	testq	%rax, %rax
	je	LBB0_5
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	testl	%r12d, %r12d
	jne	LBB0_7
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, -48(%rbp)                   ## 4-byte Folded Spill
	movb	$1, %al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%r13d, %r13d
	movl	%r15d, %r12d
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	testl	%r12d, %r12d
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	andl	4(%rbx), %r12d
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_sepgsql_getenforce
	testl	%eax, %eax
	je	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	$0, 48(%rbx)
	jne	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$1, %r13d
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_14
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	8(%rbx), %r12d
	andl	%r15d, %r12d
	movl	$1, -48(%rbp)                   ## 4-byte Folded Spill
	movb	$1, %al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%r13d, %r13d
	jmp	LBB0_14
LBB0_15:
	testl	%r12d, %r12d
	je	LBB0_22
## %bb.16:
	movq	_SEPGSQL_AVC_NOAUDIT@GOTPCREL(%rip), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, (%rax)
	je	LBB0_22
## %bb.17:
	xorl	%eax, %eax
	callq	_sepgsql_get_mode
	movq	_SEPGSQL_MODE_INTERNAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_22
## %bb.18:
	movl	40(%rbx), %r14d
	cmpq	$0, 32(%rbx)
	je	LBB0_20
## %bb.19:
	movq	16(%rbx), %rdx
	jmp	LBB0_21
LBB0_20:
	xorl	%eax, %eax
	callq	_sepgsql_avc_unlabeled
	movq	%rax, %rdx
LBB0_21:
	movl	24(%rbx), %ecx
	movl	%r13d, %edi
	movl	%r14d, %esi
	movl	%r12d, %r8d
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	callq	_sepgsql_audit_log
LBB0_22:
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	sete	%al
	orb	-44(%rbp), %al                  ## 1-byte Folded Reload
	jne	LBB0_24
## %bb.23:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ERRCODE_INSUFFICIENT_PRIVILEGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_24:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEPGSQL_AVC_NOAUDIT,8,3        ## @SEPGSQL_AVC_NOAUDIT
	.comm	_SEPGSQL_MODE_INTERNAL,8,3      ## @SEPGSQL_MODE_INTERNAL
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_INSUFFICIENT_PRIVILEGE,4,2 ## @ERRCODE_INSUFFICIENT_PRIVILEGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SELinux: security policy violation"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sepgsql_avc_check_perms_label  ; -- Begin function sepgsql_avc_check_perms_label
	.p2align	2
_sepgsql_avc_check_perms_label:         ; @sepgsql_avc_check_perms_label
	.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
	mov	x19, x4
	mov	x20, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
	bl	_sepgsql_get_client_label
	mov	x26, x0
	bl	_sepgsql_avc_check_valid
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w28, #0
	mov	w27, #1
	mov	x25, x22
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_sepgsql_avc_check_valid
	cbnz	w0, LBB0_16
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x24, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x26
	mov	x1, x24
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_sepgsql_avc_unlabeled
	mov	x1, x0
	mov	x0, x26
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x2, x23
	bl	_sepgsql_avc_lookup
	mov	x21, x0
	ldr	w8, [x0]
	bic	w25, w22, w8
	bl	_sepgsql_get_debug_audit
	cbz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	w25, LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_sepgsql_getenforce
	cbnz	w0, LBB0_11
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbz	w25, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x21, #4]
	and	w25, w8, w25
	bl	_sepgsql_getenforce
	cbz	w0, LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x21, #48]
	cbz	x8, LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x21]
	orr	w8, w8, w22
	str	w8, [x21]
	mov	w28, #1
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w27, #0
	mov	w28, #1
	b	LBB0_2
LBB0_14:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w28, #0
	ldr	w8, [x21, #8]
	and	w25, w8, w22
LBB0_15:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w27, #1
	b	LBB0_2
LBB0_16:
	cbz	w25, LBB0_23
; %bb.17:
Lloh0:
	adrp	x8, _SEPGSQL_AVC_NOAUDIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEPGSQL_AVC_NOAUDIT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x20
	b.eq	LBB0_23
; %bb.18:
	bl	_sepgsql_get_mode
Lloh3:
	adrp	x8, _SEPGSQL_MODE_INTERNAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEPGSQL_MODE_INTERNAL@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_23
; %bb.19:
	ldr	w22, [x21, #40]
	ldr	x8, [x21, #32]
	cbz	x8, LBB0_21
; %bb.20:
	ldr	x2, [x21, #16]
	b	LBB0_22
LBB0_21:
	bl	_sepgsql_avc_unlabeled
	mov	x2, x0
LBB0_22:
	ldr	w3, [x21, #24]
	mov	x0, x28
	mov	x1, x22
	mov	x4, x25
	mov	x5, x20
	bl	_sepgsql_audit_log
LBB0_23:
	cmp	w19, #0
	cset	w8, eq
	orr	w8, w8, w27
	tbnz	w8, #0, LBB0_25
; %bb.24:
Lloh6:
	adrp	x8, _ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w19, [x8]
Lloh9:
	adrp	x8, _ERRCODE_INSUFFICIENT_PRIVILEGE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ERRCODE_INSUFFICIENT_PRIVILEGE@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_errcode
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x19
	bl	_ereport
LBB0_25:
	mov	x0, x27
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SEPGSQL_AVC_NOAUDIT,8,3        ; @SEPGSQL_AVC_NOAUDIT
	.comm	_SEPGSQL_MODE_INTERNAL,8,3      ; @SEPGSQL_MODE_INTERNAL
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_INSUFFICIENT_PRIVILEGE,4,2 ; @ERRCODE_INSUFFICIENT_PRIVILEGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SELinux: security policy violation"

.subsections_via_symbols
