	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sel_open_policy
_sel_open_policy:                       ## @sel_open_policy
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rsi), %rdi
	callq	_BUG_ON
	movq	_sel_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SECURITY__READ_POLICY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_task_has_security
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	movq	_policy_opened@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	je	LBB0_4
## %bb.2:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_3:
	movq	_sel_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	xorl	%r12d, %r12d
LBB0_10:
	movq	%r12, %rdi
	callq	_kfree
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_i_size_read
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_security_policydb_len
	cmpq	%rax, %rbx
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	_mutex_lock
	xorl	%eax, %eax
	callq	_security_policydb_len
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_i_size_write
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_7:
	movq	%r12, %rsi
	addq	$4, %rsi
	movq	%r12, %rdi
	callq	_security_read_policy
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movl	%eax, %ebx
	movq	_sel_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	(%r12), %edi
	callq	_vfree
	jmp	LBB0_10
LBB0_8:
	movl	$1, (%r13)
	movq	%r12, (%r15)
	movq	_sel_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_sel_mutex,4,2                  ## @sel_mutex
	.comm	_current,4,2                    ## @current
	.comm	_SECURITY__READ_POLICY,4,2      ## @SECURITY__READ_POLICY
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_policy_opened,4,2              ## @policy_opened
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_sel_open_policy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sel_open_policy
_sel_open_policy:                       ; @sel_open_policy
	.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, x1
	mov	x20, x0
	ldr	x0, [x1]
	bl	_BUG_ON
Lloh0:
	adrp	x0, _sel_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _sel_mutex@GOTPAGEOFF]
	bl	_mutex_lock
Lloh2:
	adrp	x8, _current@GOTPAGE
Lloh3:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _SECURITY__READ_POLICY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SECURITY__READ_POLICY@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_task_has_security
	mov	x22, x0
	cbnz	w0, LBB0_3
; %bb.1:
Lloh8:
	adrp	x23, _policy_opened@GOTPAGE
Lloh9:
	ldr	x23, [x23, _policy_opened@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	w8, LBB0_6
; %bb.2:
Lloh10:
	adrp	x8, _EBUSY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_3:
Lloh13:
	adrp	x0, _sel_mutex@GOTPAGE
Lloh14:
	ldr	x0, [x0, _sel_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x21, #0
LBB0_4:
	mov	x0, x21
	bl	_kfree
LBB0_5:
	mov	x0, x22
	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_6:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w22, [x8]
Lloh18:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_kzalloc
	cbz	x0, LBB0_11
; %bb.7:
	mov	x21, x0
	mov	x0, x20
	bl	_i_size_read
	mov	x22, x0
	bl	_security_policydb_len
	cmp	x22, x0
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_mutex_lock
	bl	_security_policydb_len
	mov	x1, x0
	mov	x0, x20
	bl	_i_size_write
	mov	x0, x20
	bl	_mutex_unlock
LBB0_9:
	add	x1, x21, #4
	mov	x0, x21
	bl	_security_read_policy
	mov	x22, x0
	cbz	w0, LBB0_12
; %bb.10:
Lloh21:
	adrp	x0, _sel_mutex@GOTPAGE
Lloh22:
	ldr	x0, [x0, _sel_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	ldr	w0, [x21]
	bl	_vfree
	b	LBB0_4
LBB0_11:
	neg	w22, w22
	b	LBB0_3
LBB0_12:
	mov	w8, #1
	str	w8, [x23]
	str	x21, [x19]
Lloh23:
	adrp	x0, _sel_mutex@GOTPAGE
Lloh24:
	ldr	x0, [x0, _sel_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_sel_mutex,4,2                  ; @sel_mutex
	.comm	_current,4,2                    ; @current
	.comm	_SECURITY__READ_POLICY,4,2      ; @SECURITY__READ_POLICY
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_policy_opened,4,2              ; @policy_opened
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_sel_open_policy
.subsections_via_symbols
