	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ima_open_policy                ## -- Begin function ima_open_policy
	.p2align	4, 0x90
_ima_open_policy:                       ## @ima_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
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rsi)
	je	LBB0_1
## %bb.2:
	movq	_policy_opencount@GOTPCREL(%rip), %rdi
	callq	_atomic_dec_and_test
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.5:
	popq	%rbp
	retq
LBB0_1:
	movq	_EACCES@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_3:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_policy_opencount,4,2           ## @policy_opencount
	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ima_open_policy                ; -- Begin function ima_open_policy
	.p2align	2
_ima_open_policy:                       ; @ima_open_policy
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _O_WRONLY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _O_WRONLY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
Lloh3:
	adrp	x0, _policy_opencount@GOTPAGE
Lloh4:
	ldr	x0, [x0, _policy_opencount@GOTPAGEOFF]
	bl	_atomic_dec_and_test
	cbz	x0, LBB0_4
; %bb.2:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh5:
	adrp	x8, _EACCES@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_policy_opencount,4,2           ; @policy_opencount
	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
