	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sepgsql_check_perms            ## -- Begin function sepgsql_check_perms
	.p2align	4, 0x90
_sepgsql_check_perms:                   ## @sepgsql_check_perms
	.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	%r9d, -48(%rbp)                 ## 4-byte Spill
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movl	%ecx, %ebx
	movq	%rdi, %r14
	leaq	-64(%rbp), %rcx
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	callq	_sepgsql_compute_avd
	movl	-64(%rbp), %r12d
	notl	%r12d
	andl	%ebx, %r12d
	xorl	%eax, %eax
	callq	_sepgsql_get_debug_audit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	testl	%r12d, %r12d
	cmovnel	%r12d, %ebx
	jmp	LBB0_3
LBB0_2:
	movl	-60(%rbp), %eax
	andl	-56(%rbp), %ebx
	andl	%r12d, %eax
	testl	%r12d, %r12d
	cmovnel	%eax, %ebx
LBB0_3:
	movl	$1, %r15d
	xorl	%r13d, %r13d
	testl	%r12d, %r12d
	je	LBB0_6
## %bb.4:
	xorl	%eax, %eax
	callq	_sepgsql_getenforce
	testq	%rax, %rax
	jle	LBB0_6
## %bb.5:
	movq	_SELINUX_AVD_FLAGS_PERMISSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r15d, %r15d
	testl	%eax, -52(%rbp)
	sete	%r13b
	setne	%r15b
LBB0_6:
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.7:
	movq	_sepgsql_mode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_SEPGSQL_MODE_INTERNAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.8:
	movl	%r12d, %edi
	movq	%r14, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ebx, %r8d
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	callq	_sepgsql_audit_log
LBB0_9:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	sete	%al
	xorb	$1, %r13b
	orb	%al, %r13b
	jne	LBB0_11
## %bb.10:
	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_11:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SELINUX_AVD_FLAGS_PERMISSIVE,4,2 ## @SELINUX_AVD_FLAGS_PERMISSIVE
	.comm	_sepgsql_mode,8,3               ## @sepgsql_mode
	.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_check_perms            ; -- Begin function sepgsql_check_perms
	.p2align	2
_sepgsql_check_perms:                   ; @sepgsql_check_perms
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x5
	mov	x20, x4
	mov	x25, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	mov	x3, sp
	bl	_sepgsql_compute_avd
	ldr	w8, [sp]
	bic	w24, w25, w8
	bl	_sepgsql_get_debug_audit
	cbz	x0, LBB0_2
; %bb.1:
	cmp	w24, #0
	csel	w26, w25, w24, eq
	cbnz	w24, LBB0_3
	b	LBB0_5
LBB0_2:
	ldp	w8, w9, [sp, #4]
	and	w8, w8, w24
	and	w9, w9, w25
	cmp	w24, #0
	csel	w26, w9, w8, eq
	cbz	w24, LBB0_5
LBB0_3:
	bl	_sepgsql_getenforce
	cmp	x0, #1
	b.lt	LBB0_5
; %bb.4:
	ldr	w8, [sp, #12]
Lloh0:
	adrp	x9, _SELINUX_AVD_FLAGS_PERMISSIVE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SELINUX_AVD_FLAGS_PERMISSIVE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w27, eq
	cset	w25, ne
	cbnz	w26, LBB0_6
	b	LBB0_8
LBB0_5:
	mov	w27, #0
	mov	w25, #1
	cbz	w26, LBB0_8
LBB0_6:
Lloh3:
	adrp	x8, _sepgsql_mode@GOTPAGE
Lloh4:
	ldr	x8, [x8, _sepgsql_mode@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _SEPGSQL_MODE_INTERNAL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SEPGSQL_MODE_INTERNAL@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, x26
	mov	x5, x20
	bl	_sepgsql_audit_log
LBB0_8:
	cmp	w19, #0
	cset	w8, eq
	eor	w9, w27, #0x1
	orr	w8, w8, w9
	tbnz	w8, #0, LBB0_10
; %bb.9:
Lloh9:
	adrp	x8, _ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w19, [x8]
Lloh12:
	adrp	x8, _ERRCODE_INSUFFICIENT_PRIVILEGE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ERRCODE_INSUFFICIENT_PRIVILEGE@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_errcode
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x19
	bl	_ereport
LBB0_10:
	mov	x0, x25
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SELINUX_AVD_FLAGS_PERMISSIVE,4,2 ; @SELINUX_AVD_FLAGS_PERMISSIVE
	.comm	_sepgsql_mode,8,3               ; @sepgsql_mode
	.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
