	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function selinux_file_fcntl
_selinux_file_fcntl:                    ## @selinux_file_fcntl
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r15
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_current_cred
	addl	$-128, %ebx
	cmpl	$11, %ebx
	ja	LBB0_7
## %bb.1:
	movl	$2435, %ecx                     ## imm = 0x983
	btl	%ebx, %ecx
	jae	LBB0_2
LBB0_12:
	movq	%rax, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	jmp	LBB0_13
LBB0_2:
	movl	$1064, %ecx                     ## imm = 0x428
	btl	%ebx, %ecx
	jae	LBB0_3
## %bb.14:
	movq	8(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.15:
	cmpl	$0, (%rcx)
	je	LBB0_6
## %bb.16:
	movq	_FILE__LOCK@GOTPCREL(%rip), %rcx
LBB0_11:
	movl	(%rcx), %edx
	movq	%rax, %rdi
	movq	%r15, %rsi
LBB0_13:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_file_has_perm                  ## TAILCALL
LBB0_3:
	cmpl	$6, %ebx
	jne	LBB0_7
## %bb.4:
	movq	8(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.5:
	cmpl	$0, (%rcx)
	je	LBB0_6
## %bb.8:
	movq	_O_APPEND@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	testq	%rcx, (%r15)
	je	LBB0_12
## %bb.9:
	andq	%r14, %rcx
	jne	LBB0_12
## %bb.10:
	movq	_FILE__WRITE@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_7:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_O_APPEND,8,3                   ## @O_APPEND
	.comm	_FILE__WRITE,4,2                ## @FILE__WRITE
	.comm	_FILE__LOCK,4,2                 ## @FILE__LOCK
	.no_dead_strip	_selinux_file_fcntl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function selinux_file_fcntl
_selinux_file_fcntl:                    ; @selinux_file_fcntl
	.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, x2
	mov	x22, x1
	mov	x19, x0
	mov	w21, #0
	bl	_current_cred
	sub	w8, w22, #128
	cmp	w8, #11
	b.hi	LBB0_15
; %bb.1:
	mov	w9, #1
	lsl	w9, w9, w8
	mov	w10, #2435
	tst	w9, w10
	b.eq	LBB0_3
LBB0_2:
	mov	x1, x19
	mov	w2, #0
	b	LBB0_8
LBB0_3:
	mov	w10, #1064
	tst	w9, w10
	b.eq	LBB0_9
; %bb.4:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_14
; %bb.5:
	ldr	w8, [x8]
	cbz	w8, LBB0_14
; %bb.6:
Lloh0:
	adrp	x8, _FILE__LOCK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FILE__LOCK@GOTPAGEOFF]
LBB0_7:
	ldr	w2, [x8]
	mov	x1, x19
LBB0_8:
	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
	b	_file_has_perm
LBB0_9:
	cmp	w8, #6
	b.ne	LBB0_15
; %bb.10:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_14
; %bb.11:
	ldr	w8, [x8]
	cbz	w8, LBB0_14
; %bb.12:
Lloh2:
	adrp	x8, _O_APPEND@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_APPEND@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh4:
	ldr	x8, [x8]
	and	x9, x8, x9
	and	x8, x8, x20
	cmp	x9, #0
	ccmp	x8, #0, #0, ne
	b.ne	LBB0_2
; %bb.13:
Lloh5:
	adrp	x8, _FILE__WRITE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FILE__WRITE@GOTPAGEOFF]
	b	LBB0_7
LBB0_14:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_15:
	mov	x0, x21
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_O_APPEND,8,3                   ; @O_APPEND
	.comm	_FILE__WRITE,4,2                ; @FILE__WRITE
	.comm	_FILE__LOCK,4,2                 ; @FILE__LOCK
	.no_dead_strip	_selinux_file_fcntl
.subsections_via_symbols
