	.file	"extr_header.c_perf_session__read_header.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"WARNING: The %s file's data size field is 0 which is unexpected.\nWas the 'perf record' command properly terminated?\n"
	.align 8
.LC1:
	.string	"ERROR: The %s file's attr size field is 0 which is unexpected.\nWas the 'perf record' command properly terminated?\n"
	.text
	.p2align 4
	.globl	perf_session__read_header
	.type	perf_session__read_header, @function
perf_session__read_header:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	rbx, QWORD PTR 40[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	mov	rdi, rbx
	call	perf_data__fd@PLT
	mov	r12d, eax
	xor	eax, eax
	call	evlist__new@PLT
	mov	QWORD PTR 0[rbp], rax
	test	rax, rax
	je	.L25
	lea	rdx, 32[rbp]
	mov	rdi, rbx
	lea	r13, 24[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	QWORD PTR 16[rbp], rdx
	call	perf_data__is_pipe@PLT
	test	rax, rax
	jne	.L28
	lea	rdi, 48[rsp]
	mov	edx, r12d
	mov	rsi, r13
	call	perf_file_header__read@PLT
	test	rax, rax
	js	.L26
	cmp	QWORD PTR 64[rsp], 0
	je	.L29
.L6:
	mov	ecx, DWORD PTR 48[rsp]
	test	ecx, ecx
	je	.L30
	mov	eax, DWORD PTR 52[rsp]
	mov	esi, DWORD PTR 56[rsp]
	mov	edi, r12d
	cdq
	idiv	ecx
	mov	edx, DWORD PTR SEEK_SET[rip]
	mov	DWORD PTR 24[rsp], eax
	call	lseek@PLT
	mov	eax, DWORD PTR 24[rsp]
	test	eax, eax
	jle	.L8
	lea	rax, 36[rsp]
	mov	DWORD PTR 4[rsp], 0
	mov	QWORD PTR 16[rsp], rax
	lea	rax, 44[rsp]
	mov	QWORD PTR 8[rsp], rax
.L14:
	mov	rdx, QWORD PTR 16[rsp]
	mov	rsi, r13
	mov	edi, r12d
	call	read_attr@PLT
	test	rax, rax
	js	.L9
	cmp	QWORD PTR 24[rbp], 0
	jne	.L31
.L10:
	mov	edx, DWORD PTR SEEK_CUR[rip]
	xor	esi, esi
	mov	edi, r12d
	call	lseek@PLT
	mov	rdi, QWORD PTR 8[rsp]
	mov	DWORD PTR 28[rsp], eax
	call	evsel__new@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L11
	mov	rax, QWORD PTR 24[rbp]
	mov	rdi, QWORD PTR 0[rbp]
	mov	rsi, rbx
	mov	QWORD PTR 8[rbx], rax
	call	evlist__add@PLT
	movsx	r14, DWORD PTR 36[rsp]
	mov	esi, 1
	mov	rdi, rbx
	shr	r14, 2
	mov	edx, r14d
	mov	DWORD PTR [rsp], r14d
	call	perf_evsel__alloc_id@PLT
	test	rax, rax
	jne	.L11
	mov	edx, DWORD PTR SEEK_SET[rip]
	mov	esi, DWORD PTR 40[rsp]
	mov	edi, r12d
	call	lseek@PLT
	test	r14d, r14d
	jle	.L12
	xor	r15d, r15d
	lea	r14, 32[rsp]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L32:
	mov	r8d, DWORD PTR 32[rsp]
	mov	rdi, QWORD PTR 0[rbp]
	mov	ecx, r15d
	xor	edx, edx
	mov	rsi, rbx
	add	r15d, 1
	call	perf_evlist__id_add@PLT
	cmp	DWORD PTR [rsp], r15d
	je	.L12
.L13:
	mov	ecx, 4
	mov	rdx, r14
	mov	esi, r12d
	mov	rdi, r13
	call	perf_header__getbuffer64@PLT
	test	rax, rax
	je	.L32
.L9:
	mov	eax, DWORD PTR errno[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L28:
	mov	rdi, rbp
	call	perf_header__read_pipe@PLT
.L1:
	mov	rcx, QWORD PTR 72[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L33
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	edx, DWORD PTR SEEK_SET[rip]
	mov	esi, DWORD PTR 28[rsp]
	mov	edi, r12d
	call	lseek@PLT
	add	DWORD PTR 4[rsp], 1
	mov	eax, DWORD PTR 4[rsp]
	cmp	DWORD PTR 24[rsp], eax
	jne	.L14
.L8:
	mov	ecx, DWORD PTR perf_file_section__process[rip]
	mov	esi, r12d
	mov	rdi, r13
	lea	rdx, 8[rbp]
	call	perf_header__process_sections@PLT
	mov	esi, DWORD PTR 8[rbp]
	mov	rdi, QWORD PTR 0[rbp]
	call	perf_evlist__prepare_tracepoint_events@PLT
	test	rax, rax
	je	.L1
.L11:
	mov	rdi, QWORD PTR 0[rbp]
	call	evlist__delete@PLT
	mov	QWORD PTR 0[rbp], 0
	.p2align 4,,10
	.p2align 3
.L25:
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L30:
	mov	esi, DWORD PTR [rbx]
	lea	rdi, .LC1[rip]
	call	pr_err@PLT
.L26:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L31:
	mov	edi, DWORD PTR 36[rsp]
	call	bswap_64@PLT
	mov	edi, DWORD PTR 40[rsp]
	mov	DWORD PTR 36[rsp], eax
	call	bswap_64@PLT
	mov	rdi, QWORD PTR 8[rsp]
	mov	DWORD PTR 40[rsp], eax
	call	perf_event__attr_swap@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L29:
	mov	esi, DWORD PTR [rbx]
	lea	rdi, .LC0[rip]
	call	pr_warning@PLT
	jmp	.L6
.L33:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	perf_session__read_header, .-perf_session__read_header
	.comm	perf_file_section__process,4,4
	.comm	errno,4,4
	.comm	SEEK_SET,4,4
	.comm	SEEK_CUR,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,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_header.c_perf_session__read_header.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"WARNING: The %s file's data size field is 0 which i"
	.ascii	"s unexpected.\012Was the 'perf record' command prop"
	.ascii	"erly terminated?\012\000"
	.align	2
.LC1:
	.ascii	"ERROR: The %s file's attr size field is 0 which is "
	.ascii	"unexpected.\012Was the 'perf record' command proper"
	.ascii	"ly terminated?\012\000"
	.global	__aeabi_idiv
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	perf_session__read_header
	.syntax unified
	.arm
	.fpu softvfp
	.type	perf_session__read_header, %function
perf_session__read_header:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r4, [r0, #20]
	ldr	r3, .L38
	sub	sp, sp, #60
	mov	r5, r0
	mov	r0, r4
	ldr	r3, [r3]
	str	r3, [sp, #52]
	mov	r3,#0
	bl	perf_data__fd
	mov	r6, r0
	bl	evlist__new
	cmp	r0, #0
	str	r0, [r5]
	beq	.L31
	add	r3, r5, #16
	str	r3, [r0, #4]
	mov	r0, r4
	str	r3, [r5, #8]
	bl	perf_data__is_pipe
	subs	r10, r0, #0
	add	r9, r5, #12
	bne	.L32
	mov	r2, r6
	mov	r1, r9
	add	r0, sp, #36
	bl	perf_file_header__read
	cmp	r0, #0
	blt	.L29
	ldr	r3, [sp, #48]
	cmp	r3, #0
	beq	.L33
.L6:
	ldr	r1, [sp, #36]
	cmp	r1, #0
	beq	.L34
	ldr	r0, [sp, #40]
	bl	__aeabi_idiv
	mov	r4, r0
	ldr	r3, .L38+4
	str	r0, [sp, #12]
	ldr	r1, [sp, #44]
	mov	r0, r6
	ldr	r2, [r3]
	bl	lseek
	cmp	r4, #0
	ble	.L8
.L14:
	mov	r1, r9
	mov	r0, r6
	add	r2, sp, #24
	bl	read_attr
	cmp	r0, #0
	blt	.L9
	ldr	r3, [r5, #12]
	cmp	r3, #0
	bne	.L35
.L10:
	ldr	r3, .L38+8
	mov	r1, #0
	ldr	r2, [r3]
	mov	r0, r6
	bl	lseek
	mov	fp, r0
	add	r0, sp, #32
	bl	evsel__new
	subs	r7, r0, #0
	beq	.L11
	ldr	r3, [r5, #12]
	mov	r1, r7
	str	r3, [r7, #4]
	ldr	r0, [r5]
	bl	evlist__add
	ldr	r8, [sp, #24]
	mov	r1, #1
	lsr	r8, r8, #2
	mov	r2, r8
	mov	r0, r7
	bl	perf_evsel__alloc_id
	subs	r4, r0, #0
	bne	.L11
	ldr	r3, .L38+4
	mov	r0, r6
	ldr	r2, [r3]
	ldr	r1, [sp, #28]
	bl	lseek
	cmp	r8, #0
	bne	.L13
	b	.L12
.L36:
	ldr	r3, [sp, #20]
	mov	r1, r7
	str	r3, [sp]
	ldr	r0, [r5]
	mov	r3, r4
	add	r4, r4, #1
	bl	perf_evlist__id_add
	cmp	r8, r4
	beq	.L12
.L13:
	add	r2, sp, #20
	mov	r3, #4
	mov	r1, r6
	mov	r0, r9
	bl	perf_header__getbuffer64
	subs	r2, r0, #0
	beq	.L36
.L9:
	ldr	r3, .L38+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L32:
	mov	r0, r5
	bl	perf_header__read_pipe
.L1:
	ldr	r3, .L38
	ldr	r2, [r3]
	ldr	r3, [sp, #52]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L37
	add	sp, sp, #60
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L31:
	ldr	r3, .L38+16
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L34:
	ldr	r1, [r4]
	ldr	r0, .L38+20
	bl	pr_err
.L29:
	ldr	r3, .L38+24
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L12:
	ldr	r3, .L38+4
	mov	r1, fp
	ldr	r2, [r3]
	mov	r0, r6
	bl	lseek
	ldr	r3, [sp, #12]
	add	r10, r10, #1
	cmp	r3, r10
	bne	.L14
.L8:
	ldr	r3, .L38+28
	mov	r1, r6
	ldr	r3, [r3]
	add	r2, r5, #4
	mov	r0, r9
	bl	perf_header__process_sections
	ldm	r5, {r0, r1}
	bl	perf_evlist__prepare_tracepoint_events
	cmp	r0, #0
	beq	.L1
.L11:
	ldr	r0, [r5]
	bl	evlist__delete
	mov	r2, #0
	ldr	r3, .L38+16
	str	r2, [r5]
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L35:
	ldr	r0, [sp, #24]
	bl	bswap_64
	mov	r3, r0
	ldr	r0, [sp, #28]
	str	r3, [sp, #24]
	bl	bswap_64
	mov	r3, r0
	add	r0, sp, #32
	str	r3, [sp, #28]
	bl	perf_event__attr_swap
	b	.L10
.L33:
	ldr	r1, [r4]
	ldr	r0, .L38+32
	bl	pr_warning
	b	.L6
.L37:
	bl	__stack_chk_fail
.L39:
	.align	2
.L38:
	.word	.LC2
	.word	SEEK_SET
	.word	SEEK_CUR
	.word	errno
	.word	ENOMEM
	.word	.LC1
	.word	EINVAL
	.word	perf_file_section__process
	.word	.LC0
	.size	perf_session__read_header, .-perf_session__read_header
	.comm	perf_file_section__process,4,4
	.comm	errno,4,4
	.comm	SEEK_SET,4,4
	.comm	SEEK_CUR,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
