	.file	"extr_data.c_open_file_read.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"failed to open %s: %s"
.LC1:
	.string	"perf.data"
.LC2:
	.string	"  (try 'perf record' first)"
.LC3:
	.string	"\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC4:
	.string	"File %s not owned by current user or root (use -f to override)\n"
	.align 8
.LC5:
	.string	"zero-sized data (%s), nothing to do!\n"
	.text
	.p2align 4
	.type	open_file_read, @function
open_file_read:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	push	r12
	push	rbx
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 40
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR STRERR_BUFSIZE[rip]
	mov	rcx, rsp
	mov	r13, rax
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L22:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L22
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L23
.L4:
	mov	edi, DWORD PTR 8[rbx]
	mov	esi, DWORD PTR O_RDONLY[rip]
	call	open@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L24
	lea	rsi, -64[rbp]
	mov	edi, eax
	call	fstat@PLT
	test	rax, rax
	js	.L10
	mov	eax, DWORD PTR 16[rbx]
	test	eax, eax
	jne	.L11
	mov	r13, QWORD PTR -64[rbp]
	test	r13, r13
	jne	.L25
.L11:
	mov	rax, QWORD PTR -56[rbp]
	test	rax, rax
	je	.L26
	mov	QWORD PTR [rbx], rax
.L1:
	mov	rax, QWORD PTR -40[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L27
	lea	rsp, -24[rbp]
	mov	eax, r12d
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	mov	r12d, DWORD PTR errno[rip]
	mov	edx, r13d
	mov	rsi, rsp
	mov	edi, r12d
	call	str_error_r@PLT
	mov	esi, DWORD PTR 8[rbx]
	lea	rdi, .LC0[rip]
	mov	edx, eax
	xor	eax, eax
	call	pr_err@PLT
	cmp	DWORD PTR ENOENT[rip], r12d
	je	.L28
.L7:
	lea	rdi, .LC3[rip]
	xor	eax, eax
	neg	r12d
	call	pr_err@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L25:
	xor	eax, eax
	call	geteuid@PLT
	cmp	r13, rax
	je	.L11
	mov	esi, DWORD PTR 8[rbx]
	lea	rdi, .LC4[rip]
	xor	eax, eax
	call	pr_err@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	mov	edi, r12d
	mov	r12d, -1
	call	close@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L28:
	mov	edi, DWORD PTR 8[rbx]
	lea	rsi, .LC1[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L7
	lea	rdi, .LC2[rip]
	call	pr_err@PLT
	jmp	.L7
.L26:
	mov	esi, DWORD PTR 8[rbx]
	lea	rdi, .LC5[rip]
	call	pr_info@PLT
	jmp	.L10
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	open_file_read, .-open_file_read
	.comm	errno,4,4
	.comm	STRERR_BUFSIZE,4,4
	.comm	O_RDONLY,4,4
	.comm	ENOENT,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_data.c_open_file_read.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"failed to open %s: %s\000"
	.align	2
.LC1:
	.ascii	"perf.data\000"
	.align	2
.LC2:
	.ascii	"  (try 'perf record' first)\000"
	.align	2
.LC3:
	.ascii	"\012\000"
	.align	2
.LC4:
	.ascii	"File %s not owned by current user or root (use -f t"
	.ascii	"o override)\012\000"
	.align	2
.LC5:
	.ascii	"zero-sized data (%s), nothing to do!\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_file_read, %function
open_file_read:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #20
	ldr	r3, .L21
	ldr	r2, .L21+4
	ldr	r6, [r3]
	mov	r5, r0
	add	r3, r6, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L21+8
	ldr	r0, [r0, #4]
	ldr	r1, [r2]
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	bl	open
	subs	r4, r0, #0
	blt	.L16
	sub	r1, fp, #32
	bl	fstat
	cmp	r0, #0
	blt	.L7
	ldr	r3, [r5, #8]
	cmp	r3, #0
	beq	.L17
.L8:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	strne	r3, [r5]
	beq	.L18
.L1:
	ldr	r3, .L21+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	mov	r0, r4
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L17:
	ldr	r6, [fp, #-32]
	cmp	r6, #0
	beq	.L8
	bl	geteuid
	cmp	r6, r0
	beq	.L8
	ldr	r1, [r5, #4]
	ldr	r0, .L21+12
	bl	pr_err
.L7:
	mov	r0, r4
	bl	close
	mvn	r4, #0
	b	.L1
.L16:
	ldr	r3, .L21+16
	mov	r2, r6
	ldr	r4, [r3]
	mov	r1, sp
	mov	r0, r4
	ldr	r6, [r5, #4]
	bl	str_error_r
	mov	r1, r6
	mov	r2, r0
	ldr	r0, .L21+20
	bl	pr_err
	ldr	r3, .L21+24
	ldr	r3, [r3]
	cmp	r3, r4
	beq	.L20
.L4:
	ldr	r0, .L21+28
	rsb	r4, r4, #0
	bl	pr_err
	b	.L1
.L20:
	ldr	r0, [r5, #4]
	ldr	r1, .L21+32
	bl	strcmp
	cmp	r0, #0
	bne	.L4
	ldr	r0, .L21+36
	bl	pr_err
	b	.L4
.L18:
	ldr	r1, [r5, #4]
	ldr	r0, .L21+40
	bl	pr_info
	b	.L7
.L19:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	STRERR_BUFSIZE
	.word	O_RDONLY
	.word	.LC6
	.word	.LC4
	.word	errno
	.word	.LC0
	.word	ENOENT
	.word	.LC3
	.word	.LC1
	.word	.LC2
	.word	.LC5
	.size	open_file_read, .-open_file_read
	.comm	errno,4,4
	.comm	STRERR_BUFSIZE,4,4
	.comm	O_RDONLY,4,4
	.comm	ENOENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
