	.file	"extr_pkeys.c_pkey_access_permitted.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	pkey_access_permitted, @function
pkey_access_permitted:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, edx
	call	is_pkey_enabled@PLT
	test	eax, eax
	jne	.L2
.L7:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, 1
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edi, ebp
	call	pkeyshift@PLT
	mov	ebp, eax
	test	ebx, ebx
	je	.L8
	xor	eax, eax
	call	read_iamr@PLT
	mov	ecx, ebp
	mov	r8d, eax
	mov	eax, DWORD PTR IAMR_EX_BIT[rip]
	sal	eax, cl
	test	eax, r8d
	je	.L7
.L8:
	xor	eax, eax
	call	read_amr@PLT
	mov	edx, DWORD PTR AMR_RD_BIT[rip]
	test	r12d, r12d
	je	.L14
	mov	edx, DWORD PTR AMR_WR_BIT[rip]
.L14:
	mov	ecx, ebp
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	sal	edx, cl
	pop	r12
	.cfi_def_cfa_offset 8
	test	edx, eax
	sete	al
	movzx	eax, al
	ret
	.cfi_endproc
.LFE0:
	.size	pkey_access_permitted, .-pkey_access_permitted
	.comm	IAMR_EX_BIT,4,4
	.comm	AMR_WR_BIT,4,4
	.comm	AMR_RD_BIT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_pkeys.c_pkey_access_permitted.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pkey_access_permitted, %function
pkey_access_permitted:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r6, r1
	mov	r4, r2
	mov	r5, r0
	bl	is_pkey_enabled
	cmp	r0, #0
	bne	.L2
.L7:
	mov	r0, #1
	pop	{r4, r5, r6, pc}
.L2:
	mov	r0, r5
	bl	pkeyshift
	cmp	r4, #0
	mov	r4, r0
	beq	.L8
	bl	read_iamr
	ldr	r3, .L15
	ldr	r3, [r3]
	ands	r3, r0, r3, lsl r4
	beq	.L7
.L8:
	bl	read_amr
	cmp	r6, #0
	beq	.L5
	ldr	r3, .L15+4
	ldr	r3, [r3]
	ands	r3, r0, r3, lsl r4
	moveq	r0, #1
	movne	r0, #0
	pop	{r4, r5, r6, pc}
.L5:
	ldr	r3, .L15+8
	ldr	r3, [r3]
	ands	r3, r0, r3, lsl r4
	moveq	r0, #1
	movne	r0, #0
	pop	{r4, r5, r6, pc}
.L16:
	.align	2
.L15:
	.word	IAMR_EX_BIT
	.word	AMR_WR_BIT
	.word	AMR_RD_BIT
	.size	pkey_access_permitted, .-pkey_access_permitted
	.comm	IAMR_EX_BIT,4,4
	.comm	AMR_WR_BIT,4,4
	.comm	AMR_RD_BIT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
