	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tomoyo_check_rewrite_permission ## -- Begin function tomoyo_check_rewrite_permission
	.p2align	4, 0x90
_tomoyo_check_rewrite_permission:       ## @tomoyo_check_rewrite_permission
	.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, %r12
	movq	%rdi, %r14
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	movq	_TOMOYO_MAC_FOR_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_tomoyo_check_flags
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	cmpl	$0, (%r12)
	je	LBB0_7
## %bb.2:
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_tomoyo_get_path
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%r12, %rdi
	callq	_tomoyo_is_no_rewrite_file
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	_TOMOYO_TYPE_REWRITE_ACL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r12, %rdx
	movl	%r15d, %ecx
	callq	_tomoyo_check_single_path_permission2
	movl	%eax, %r13d
	jmp	LBB0_6
LBB0_4:
	xorl	%r13d, %r13d
LBB0_6:
	movq	%r12, %rdi
	callq	_tomoyo_free
	xorl	%ebx, %ebx
	cmpl	$3, %r15d
	cmovel	%r13d, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_TOMOYO_MAC_FOR_FILE,4,2        ## @TOMOYO_MAC_FOR_FILE
	.comm	_TOMOYO_TYPE_REWRITE_ACL,4,2    ## @TOMOYO_TYPE_REWRITE_ACL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tomoyo_check_rewrite_permission ; -- Begin function tomoyo_check_rewrite_permission
	.p2align	2
_tomoyo_check_rewrite_permission:       ; @tomoyo_check_rewrite_permission
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
Lloh3:
	adrp	x8, _TOMOYO_MAC_FOR_FILE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TOMOYO_MAC_FOR_FILE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_tomoyo_check_flags
	cbz	w0, LBB0_9
; %bb.1:
	ldr	w8, [x20]
	cbz	w8, LBB0_5
; %bb.2:
	mov	x19, x0
	mov	x0, x20
	bl	_tomoyo_get_path
	mov	x20, x0
	cbz	x0, LBB0_6
; %bb.3:
	mov	x0, x20
	bl	_tomoyo_is_no_rewrite_file
	cbz	w0, LBB0_7
; %bb.4:
Lloh6:
	adrp	x8, _TOMOYO_TYPE_REWRITE_ACL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TOMOYO_TYPE_REWRITE_ACL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x20
	mov	x3, x19
	bl	_tomoyo_check_single_path_permission2
	mov	x21, x0
	b	LBB0_8
LBB0_5:
	mov	w0, #0
	b	LBB0_9
LBB0_6:
	neg	w21, w22
	b	LBB0_8
LBB0_7:
	mov	w21, #0
LBB0_8:
	mov	x0, x20
	bl	_tomoyo_free
	cmp	w19, #3
	csel	w0, w21, wzr, eq
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_TOMOYO_MAC_FOR_FILE,4,2        ; @TOMOYO_MAC_FOR_FILE
	.comm	_TOMOYO_TYPE_REWRITE_ACL,4,2    ; @TOMOYO_TYPE_REWRITE_ACL
.subsections_via_symbols
