	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_security_read_policy           ## -- Begin function security_read_policy
	.p2align	4, 0x90
_security_read_policy:                  ## @security_read_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_ss_initialized@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_4
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_security_policydb_len
	movq	%rax, (%r15)
	movq	%rax, %rdi
	callq	_vmalloc_user
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%rax, -40(%rbp)
	movq	(%r15), %rax
	movq	%rax, -48(%rbp)
	movq	_policy_rwlock@GOTPCREL(%rip), %r12
	movq	%r12, %rdi
	callq	_read_lock
	movq	_policydb@GOTPCREL(%rip), %rdi
	leaq	-48(%rbp), %rsi
	callq	_policydb_write
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_read_unlock
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.3:
	movq	-40(%rbp), %rax
	subq	(%r14), %rax
	movq	%rax, (%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_6:
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ss_initialized,4,2             ## @ss_initialized
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_policy_rwlock,4,2              ## @policy_rwlock
	.comm	_policydb,4,2                   ## @policydb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_security_read_policy           ; -- Begin function security_read_policy
	.p2align	2
_security_read_policy:                  ; @security_read_policy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
Lloh0:
	adrp	x8, _ss_initialized@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ss_initialized@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	bl	_security_policydb_len
	str	x0, [x19]
	bl	_vmalloc_user
	str	x0, [x20]
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x8, [x19]
	stp	x8, x0, [sp]
Lloh3:
	adrp	x22, _policy_rwlock@GOTPAGE
Lloh4:
	ldr	x22, [x22, _policy_rwlock@GOTPAGEOFF]
	mov	x0, x22
	bl	_read_lock
Lloh5:
	adrp	x0, _policydb@GOTPAGE
Lloh6:
	ldr	x0, [x0, _policydb@GOTPAGEOFF]
	mov	x1, sp
	bl	_policydb_write
	mov	x21, x0
	mov	x0, x22
	bl	_read_unlock
	cbnz	w21, LBB0_7
; %bb.3:
	ldr	x8, [sp, #8]
	ldr	x9, [x20]
	sub	x8, x8, x9
	str	x8, [x19]
	b	LBB0_7
LBB0_4:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_7:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ss_initialized,4,2             ; @ss_initialized
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_policy_rwlock,4,2              ; @policy_rwlock
	.comm	_policydb,4,2                   ; @policydb
.subsections_via_symbols
