	.file	"extr_p4.c_p4_validate_raw_event.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	p4_validate_raw_event, @function
p4_validate_raw_event:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	edi, DWORD PTR [rdi]
	call	p4_config_unpack_event@PLT
	mov	rdi, QWORD PTR p4_event_bind_map[rip]
	mov	ebx, eax
	call	ARRAY_SIZE@PLT
	cmp	eax, ebx
	ja	.L2
.L16:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edi, ebx
	call	p4_event_match_cpu_model@PLT
	test	eax, eax
	je	.L16
	xor	eax, eax
	sal	rbx, 4
	call	p4_ht_active@PLT
	test	rax, rax
	je	.L5
	mov	rax, QWORD PTR p4_event_bind_map[rip]
	cmp	QWORD PTR 8[rax+rbx], 0
	je	.L5
	xor	eax, eax
	call	perf_paranoid_cpu@PLT
	test	rax, rax
	jne	.L18
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, DWORD PTR 0[rbp]
	call	p4_config_unpack_escr@PLT
	mov	r8d, eax
	mov	rax, QWORD PTR p4_event_bind_map[rip]
	mov	eax, DWORD PTR [rax+rbx]
	not	eax
	and	eax, DWORD PTR P4_ESCR_EVENTMASK_MASK[rip]
	test	eax, r8d
	jne	.L16
	mov	esi, DWORD PTR P4_PEBS_CONFIG_ENABLE[rip]
	mov	edi, DWORD PTR 0[rbp]
	call	p4_config_pebs_has@PLT
	test	rax, rax
	jne	.L16
	mov	edi, DWORD PTR 0[rbp]
	call	p4_config_unpack_metric@PLT
	mov	rdi, QWORD PTR p4_pebs_bind_map[rip]
	mov	ebx, eax
	call	ARRAY_SIZE@PLT
	mov	r8d, eax
	xor	eax, eax
	cmp	r8d, ebx
	ja	.L1
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L18:
	mov	edi, DWORD PTR CAP_SYS_ADMIN[rip]
	call	capable@PLT
	test	eax, eax
	jne	.L5
	mov	eax, DWORD PTR EACCES[rip]
	neg	eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	p4_validate_raw_event, .-p4_validate_raw_event
	.comm	p4_pebs_bind_map,8,8
	.comm	p4_event_bind_map,8,8
	.comm	P4_PEBS_CONFIG_ENABLE,4,4
	.comm	P4_ESCR_EVENTMASK_MASK,4,4
	.comm	EINVAL,4,4
	.comm	EACCES,4,4
	.comm	CAP_SYS_ADMIN,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_p4.c_p4_validate_raw_event.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	p4_validate_raw_event, %function
p4_validate_raw_event:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r0
	ldr	r0, [r0]
	bl	p4_config_unpack_event
	ldr	r6, .L21
	mov	r4, r0
	ldr	r0, [r6]
	bl	ARRAY_SIZE
	cmp	r0, r4
	bhi	.L2
.L18:
	ldr	r3, .L21+4
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L2:
	mov	r0, r4
	bl	p4_event_match_cpu_model
	cmp	r0, #0
	beq	.L18
	bl	p4_ht_active
	cmp	r0, #0
	lsl	r2, r4, #3
	beq	.L5
	ldr	r3, [r6]
	add	r3, r3, r2
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L5
	bl	perf_paranoid_cpu
	cmp	r0, #0
	bne	.L20
.L5:
	ldr	r0, [r5]
	bl	p4_config_unpack_escr
	ldr	r2, [r6]
	ldr	r3, .L21+8
	ldr	r2, [r2, r4, lsl #3]
	ldr	r3, [r3]
	bic	r3, r3, r2
	tst	r3, r0
	bne	.L18
	ldr	r3, .L21+12
	ldr	r0, [r5]
	ldr	r1, [r3]
	bl	p4_config_pebs_has
	subs	r4, r0, #0
	bne	.L18
	ldr	r0, [r5]
	bl	p4_config_unpack_metric
	ldr	r3, .L21+16
	mov	r5, r0
	ldr	r0, [r3]
	bl	ARRAY_SIZE
	cmp	r0, r5
	bhi	.L1
	b	.L18
.L20:
	ldr	r3, .L21+20
	ldr	r0, [r3]
	bl	capable
	cmp	r0, #0
	bne	.L5
	ldr	r3, .L21+24
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L22:
	.align	2
.L21:
	.word	p4_event_bind_map
	.word	EINVAL
	.word	P4_ESCR_EVENTMASK_MASK
	.word	P4_PEBS_CONFIG_ENABLE
	.word	p4_pebs_bind_map
	.word	CAP_SYS_ADMIN
	.word	EACCES
	.size	p4_validate_raw_event, .-p4_validate_raw_event
	.comm	p4_pebs_bind_map,4,4
	.comm	p4_event_bind_map,4,4
	.comm	P4_PEBS_CONFIG_ENABLE,4,4
	.comm	P4_ESCR_EVENTMASK_MASK,4,4
	.comm	EINVAL,4,4
	.comm	EACCES,4,4
	.comm	CAP_SYS_ADMIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
