	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_key_task_permission            ## -- Begin function key_task_permission
	.p2align	4, 0x90
_key_task_permission:                   ## @key_task_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
	movl	%edx, %r15d
	movq	%rsi, %r14
	movl	%edi, %r12d
	callq	_key_ref_to_ptr
	movq	%rax, %r13
	movq	16(%rax), %rax
	movq	(%rax), %rax
	movq	16(%r14), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.1:
	movq	(%r13), %rax
	cmpq	(%r14), %rax
	jne	LBB0_3
## %bb.2:
	movswl	10(%r13), %ebx
	jmp	LBB0_10
LBB0_3:
	movl	12(%r13), %esi
	cmpl	$-1, %esi
	je	LBB0_9
## %bb.4:
	movl	8(%r13), %ebx
	movq	_KEY_GRP_ALL@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_9
## %bb.5:
	cmpl	8(%r14), %esi
	jne	LBB0_7
## %bb.6:
	sarl	$8, %ebx
	jmp	LBB0_10
LBB0_7:
	movl	12(%r14), %edi
	callq	_groups_search
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	8(%r13), %ebx
	sarl	$8, %ebx
	jmp	LBB0_10
LBB0_9:
	movl	8(%r13), %ebx
LBB0_10:
	movl	%r12d, %edi
	callq	_is_key_possessed
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movsbl	11(%r13), %eax
	orl	%eax, %ebx
LBB0_12:
	andl	%r15d, %ebx
	movq	_KEY_ALL@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	cmpl	%r15d, %ebx
	jne	LBB0_13
## %bb.14:
	movl	%r12d, %edi
	movq	%r14, %rsi
	movl	%r15d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_security_key_permission        ## TAILCALL
LBB0_13:
	movq	_EACCES@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KEY_GRP_ALL,4,2                ## @KEY_GRP_ALL
	.comm	_KEY_ALL,4,2                    ## @KEY_ALL
	.comm	_EACCES,4,2                     ## @EACCES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_key_task_permission            ; -- Begin function key_task_permission
	.p2align	2
_key_task_permission:                   ; @key_task_permission
	.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, x2
	mov	x20, x1
	mov	x21, x0
	bl	_key_ref_to_ptr
	mov	x22, x0
	ldr	x8, [x0, #16]
	ldr	x8, [x8]
	ldr	x9, [x20, #16]
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.1:
	ldr	x8, [x22]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldrsh	w23, [x22, #10]
	b	LBB0_10
LBB0_3:
	ldr	w1, [x22, #12]
	cmn	w1, #1
	b.eq	LBB0_9
; %bb.4:
	ldr	w8, [x22, #8]
Lloh0:
	adrp	x9, _KEY_GRP_ALL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _KEY_GRP_ALL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.5:
	ldr	w9, [x20, #8]
	cmp	w1, w9
	b.ne	LBB0_7
; %bb.6:
	asr	w23, w8, #8
	b	LBB0_10
LBB0_7:
	ldr	w0, [x20, #12]
	bl	_groups_search
	cbz	w0, LBB0_9
; %bb.8:
	ldr	w8, [x22, #8]
	asr	w23, w8, #8
	b	LBB0_10
LBB0_9:
	ldr	w23, [x22, #8]
LBB0_10:
	mov	x0, x21
	bl	_is_key_possessed
	cbz	x0, LBB0_12
; %bb.11:
	ldrsb	w8, [x22, #11]
	orr	w23, w8, w23
LBB0_12:
	and	w8, w23, w19
Lloh3:
	adrp	x9, _KEY_ALL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _KEY_ALL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w8, w9
	cmp	w8, w19
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	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
	b	_security_key_permission
LBB0_14:
Lloh6:
	adrp	x8, _EACCES@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_KEY_GRP_ALL,4,2                ; @KEY_GRP_ALL
	.comm	_KEY_ALL,4,2                    ; @KEY_ALL
	.comm	_EACCES,4,2                     ; @EACCES
.subsections_via_symbols
