	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sepgsql_avc_compute
_sepgsql_avc_compute:                   ## @sepgsql_avc_compute
	.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
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	callq	_sepgsql_avc_hash
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_AVC_NUM_SLOTS@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%r12d, %edi
	callq	_security_check_context_raw
	testq	%rax, %rax
	movl	%r13d, -60(%rbp)                ## 4-byte Spill
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_sepgsql_avc_unlabeled
	testq	%rax, %rax
	je	LBB0_2
## %bb.5:
	movq	%rax, %r14
	leaq	-80(%rbp), %rcx
	movq	%r15, %rdi
	movq	%rax, %rsi
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_sepgsql_compute_avd
	movq	_SEPG_CLASS_DB_PROCEDURE@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_6
## %bb.8:
	movq	_SEPG_CLASS_PROCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	callq	_sepgsql_compute_create
	movq	%rax, %r13
	jmp	LBB0_9
LBB0_2:
	leaq	-80(%rbp), %rcx
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_sepgsql_compute_avd
	movq	_SEPG_CLASS_DB_PROCEDURE@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_3
## %bb.7:
	movq	_SEPG_CLASS_PROCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	callq	_sepgsql_compute_create
	movq	%rax, %r13
	movb	$1, %al
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_9:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	movq	%r13, %rdi
	callq	_pfree
	xorl	%r13d, %r13d
	jmp	LBB0_11
LBB0_3:
	movb	$1, %al
	jmp	LBB0_4
LBB0_6:
	xorl	%eax, %eax
LBB0_4:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_11:
	movq	_avc_mem_cxt@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MemoryContextSwitchTo
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	$56, %edi
	callq	_palloc0
	movq	%rax, %r14
	movl	%ebx, (%rax)
	movq	%r15, %rdi
	callq	_pstrdup
	movq	%rax, 48(%r14)
	movq	%r12, %rdi
	callq	_pstrdup
	movq	%rax, 40(%r14)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 36(%r14)
	movl	-68(%rbp), %eax
	movl	%eax, 32(%r14)
	movl	-72(%rbp), %eax
	movl	%eax, 28(%r14)
	movl	-76(%rbp), %eax
	movl	%eax, 24(%r14)
	movl	$1, 4(%r14)
	movq	_SELINUX_AVD_FLAGS_PERMISSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -80(%rbp)
	je	LBB0_13
## %bb.12:
	movl	$1, 8(%r14)
LBB0_13:
	cmpb	$0, -56(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_15
## %bb.14:
	movl	$1, 12(%r14)
LBB0_15:
	testq	%r13, %r13
	je	LBB0_17
## %bb.16:
	movq	%r13, %rdi
	callq	_pstrdup
	movq	%rax, 16(%r14)
LBB0_17:
	movq	_avc_num_caches@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	1(%rcx), %rdx
	movq	%rdx, (%rax)
	movq	_avc_threshold@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jl	LBB0_19
## %bb.18:
	xorl	%eax, %eax
	callq	_sepgsql_avc_reclaim
LBB0_19:
	movl	%ebx, %eax
	cltd
	idivl	-60(%rbp)                       ## 4-byte Folded Reload
	movq	_avc_slots@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movslq	%edx, %rbx
	movl	(%rax,%rbx,4), %esi
	movq	%r14, %rdi
	callq	_lcons
	movq	(%r15), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_MemoryContextSwitchTo
	movq	%r14, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVC_NUM_SLOTS,4,2              ## @AVC_NUM_SLOTS
	.comm	_SEPG_CLASS_DB_PROCEDURE,4,2    ## @SEPG_CLASS_DB_PROCEDURE
	.comm	_SEPG_CLASS_PROCESS,4,2         ## @SEPG_CLASS_PROCESS
	.comm	_avc_mem_cxt,4,2                ## @avc_mem_cxt
	.comm	_SELINUX_AVD_FLAGS_PERMISSIVE,4,2 ## @SELINUX_AVD_FLAGS_PERMISSIVE
	.comm	_avc_num_caches,8,3             ## @avc_num_caches
	.comm	_avc_threshold,8,3              ## @avc_threshold
	.comm	_avc_slots,8,3                  ## @avc_slots
	.no_dead_strip	_sepgsql_avc_compute
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sepgsql_avc_compute
_sepgsql_avc_compute:                   ; @sepgsql_avc_compute
	.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	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_sepgsql_avc_hash
	mov	x19, x0
Lloh0:
	adrp	x8, _AVC_NUM_SLOTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVC_NUM_SLOTS@GOTPAGEOFF]
Lloh2:
	ldr	w26, [x8]
	mov	x0, x21
	bl	_security_check_context_raw
	cbz	x0, LBB0_4
; %bb.1:
	bl	_sepgsql_avc_unlabeled
	cbz	x0, LBB0_4
; %bb.2:
	mov	x23, x0
	mov	x3, sp
	mov	x0, x22
	mov	x1, x23
	mov	x2, x20
	bl	_sepgsql_compute_avd
Lloh3:
	adrp	x8, _SEPG_CLASS_DB_PROCEDURE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEPG_CLASS_DB_PROCEDURE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_9
; %bb.3:
Lloh6:
	adrp	x8, _SEPG_CLASS_PROCESS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SEPG_CLASS_PROCESS@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x23
	mov	x3, #0
	bl	_sepgsql_compute_create
	mov	x23, x0
	mov	w27, #0
	b	LBB0_6
LBB0_4:
	mov	x3, sp
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_sepgsql_compute_avd
Lloh9:
	adrp	x8, _SEPG_CLASS_DB_PROCEDURE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SEPG_CLASS_DB_PROCEDURE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_8
; %bb.5:
Lloh12:
	adrp	x8, _SEPG_CLASS_PROCESS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SEPG_CLASS_PROCESS@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x21
	mov	x3, #0
	bl	_sepgsql_compute_create
	mov	x23, x0
	mov	w27, #1
LBB0_6:
	mov	x0, x22
	mov	x1, x23
	bl	_strcmp
	cbnz	x0, LBB0_11
; %bb.7:
	mov	x0, x23
	bl	_pfree
	b	LBB0_10
LBB0_8:
	mov	x23, #0
	mov	w27, #1
	b	LBB0_11
LBB0_9:
	mov	w27, #0
LBB0_10:
	mov	x23, #0
LBB0_11:
Lloh15:
	adrp	x8, _avc_mem_cxt@GOTPAGE
Lloh16:
	ldr	x8, [x8, _avc_mem_cxt@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_MemoryContextSwitchTo
	mov	x24, x0
	mov	w0, #56
	bl	_palloc0
	mov	x25, x0
	str	w19, [x0]
	mov	x0, x22
	bl	_pstrdup
	str	x0, [x25, #48]
	mov	x0, x21
	bl	_pstrdup
	str	x0, [x25, #40]
	ldr	w8, [sp, #12]
	stp	w8, w20, [x25, #32]
	ldur	d0, [sp, #4]
	str	d0, [x25, #24]
	mov	w8, #1
	str	w8, [x25, #4]
	ldr	w9, [sp]
Lloh18:
	adrp	x10, _SELINUX_AVD_FLAGS_PERMISSIVE@GOTPAGE
Lloh19:
	ldr	x10, [x10, _SELINUX_AVD_FLAGS_PERMISSIVE@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_13
; %bb.12:
	str	w8, [x25, #8]
LBB0_13:
	cbz	w27, LBB0_15
; %bb.14:
	mov	w8, #1
	str	w8, [x25, #12]
LBB0_15:
	cbz	x23, LBB0_17
; %bb.16:
	mov	x0, x23
	bl	_pstrdup
	str	x0, [x25, #16]
LBB0_17:
Lloh21:
	adrp	x8, _avc_num_caches@GOTPAGE
Lloh22:
	ldr	x8, [x8, _avc_num_caches@GOTPAGEOFF]
	ldr	x9, [x8]
	add	x10, x9, #1
	str	x10, [x8]
Lloh23:
	adrp	x8, _avc_threshold@GOTPAGE
Lloh24:
	ldr	x8, [x8, _avc_threshold@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	cmp	x9, x8
	b.lt	LBB0_19
; %bb.18:
	bl	_sepgsql_avc_reclaim
LBB0_19:
	sdiv	w8, w19, w26
	msub	w8, w8, w26, w19
Lloh26:
	adrp	x19, _avc_slots@GOTPAGE
Lloh27:
	ldr	x19, [x19, _avc_slots@GOTPAGEOFF]
	ldr	x9, [x19]
	sbfiz	x20, x8, #2, #32
	ldr	w1, [x9, x20]
	mov	x0, x25
	bl	_lcons
	ldr	x8, [x19]
	str	w0, [x8, x20]
	mov	x0, x24
	bl	_MemoryContextSwitchTo
	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	Lloh3, Lloh4, Lloh5
	.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	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_AVC_NUM_SLOTS,4,2              ; @AVC_NUM_SLOTS
	.comm	_SEPG_CLASS_DB_PROCEDURE,4,2    ; @SEPG_CLASS_DB_PROCEDURE
	.comm	_SEPG_CLASS_PROCESS,4,2         ; @SEPG_CLASS_PROCESS
	.comm	_avc_mem_cxt,4,2                ; @avc_mem_cxt
	.comm	_SELINUX_AVD_FLAGS_PERMISSIVE,4,2 ; @SELINUX_AVD_FLAGS_PERMISSIVE
	.comm	_avc_num_caches,8,3             ; @avc_num_caches
	.comm	_avc_threshold,8,3              ; @avc_threshold
	.comm	_avc_slots,8,3                  ; @avc_slots
	.no_dead_strip	_sepgsql_avc_compute
.subsections_via_symbols
