	.file	"extr_trace-event-read.c_get_next_page.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"failed to lseek"
.LC1:
	.string	"failed to read page"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"failed to mmap cpu %d at offset 0x%llx"
	.text
	.p2align 4
	.type	get_next_page, @function
get_next_page:
.LFB0:
	.cfi_startproc
	endbr64
	movsx	rax, edi
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rax
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	lea	rbx, [rax+rax*2]
	mov	rax, QWORD PTR cpu_data[rip]
	sal	rbx, 3
	add	rax, rbx
	mov	rdi, QWORD PTR 16[rax]
	test	rdi, rdi
	je	.L1
	cmp	QWORD PTR read_page[rip], 0
	mov	rsi, QWORD PTR page_size[rip]
	je	.L4
	cmp	QWORD PTR [rax], rsi
	jle	.L11
	mov	edi, ebp
	call	update_cpu_data_index@PLT
	mov	edx, DWORD PTR SEEK_CUR[rip]
	mov	edi, DWORD PTR input_fd[rip]
	xor	esi, esi
	call	lseek@PLT
	mov	edx, DWORD PTR SEEK_SET[rip]
	mov	edi, DWORD PTR input_fd[rip]
	mov	rbp, rax
	mov	rax, QWORD PTR cpu_data[rip]
	mov	rsi, QWORD PTR 8[rax+rbx]
	call	lseek@PLT
	cmp	rax, -1
	je	.L12
.L6:
	mov	rax, QWORD PTR cpu_data[rip]
	mov	rdx, QWORD PTR page_size[rip]
	mov	edi, DWORD PTR input_fd[rip]
	mov	rsi, QWORD PTR 16[rax+rbx]
	call	read@PLT
	test	rax, rax
	js	.L13
.L7:
	mov	edx, DWORD PTR SEEK_SET[rip]
	mov	edi, DWORD PTR input_fd[rip]
	mov	rsi, rbp
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	lseek@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	call	free@PLT
	mov	rax, QWORD PTR cpu_data[rip]
	mov	QWORD PTR 16[rax+rbx], 0
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	call	munmap@PLT
	mov	rax, QWORD PTR cpu_data[rip]
	mov	rcx, QWORD PTR page_size[rip]
	add	rax, rbx
	mov	QWORD PTR 16[rax], 0
	cmp	QWORD PTR [rax], rcx
	jle	.L1
	mov	edi, ebp
	call	update_cpu_data_index@PLT
	mov	r12, QWORD PTR cpu_data[rip]
	xor	edi, edi
	mov	r8d, DWORD PTR input_fd[rip]
	mov	ecx, DWORD PTR MAP_PRIVATE[rip]
	mov	edx, DWORD PTR PROT_READ[rip]
	add	r12, rbx
	mov	rsi, QWORD PTR page_size[rip]
	mov	r9, QWORD PTR 8[r12]
	call	mmap@PLT
	add	rbx, QWORD PTR cpu_data[rip]
	mov	QWORD PTR 16[r12], rax
	mov	rax, QWORD PTR MAP_FAILED[rip]
	cmp	QWORD PTR 16[rbx], rax
	jne	.L1
	mov	rdx, QWORD PTR 8[rbx]
	mov	esi, ebp
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	lea	rdi, .LC2[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	xor	eax, eax
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	die@PLT
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	die@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L12:
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	die@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	get_next_page, .-get_next_page
	.comm	read_page,8,8
	.comm	page_size,8,8
	.comm	input_fd,4,4
	.comm	cpu_data,8,8
	.comm	SEEK_SET,4,4
	.comm	SEEK_CUR,4,4
	.comm	PROT_READ,4,4
	.comm	MAP_PRIVATE,4,4
	.comm	MAP_FAILED,8,8
	.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_trace-event-read.c_get_next_page.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"failed to lseek\000"
	.align	2
.LC1:
	.ascii	"failed to read page\000"
	.align	2
.LC2:
	.ascii	"failed to mmap cpu %d at offset 0x%llx\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_next_page, %function
get_next_page:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r5, .L14
	add	r3, r0, r0, lsl #1
	ldr	r2, [r5]
	lsl	r6, r3, #2
	add	r3, r2, r3, lsl #2
	ldr	r3, [r3, #8]
	sub	sp, sp, #12
	cmp	r3, #0
	beq	.L1
	ldr	r1, .L14+4
	ldr	r7, .L14+8
	ldr	r8, [r1]
	ldr	r1, [r7]
	cmp	r8, #0
	beq	.L4
	ldr	r2, [r2, r6]
	cmp	r2, r1
	ble	.L11
	bl	update_cpu_data_index
	ldr	r4, .L14+12
	ldr	r3, .L14+16
	mov	r1, #0
	ldr	r2, [r3]
	ldr	r0, [r4]
	bl	lseek
	ldr	r3, [r5]
	ldr	r9, .L14+20
	add	r3, r3, r6
	mov	r8, r0
	ldr	r1, [r3, #4]
	ldr	r0, [r4]
	ldr	r2, [r9]
	bl	lseek
	cmn	r0, #1
	beq	.L12
.L6:
	ldr	r3, [r5]
	ldr	r2, [r7]
	add	r6, r3, r6
	ldr	r1, [r6, #8]
	ldr	r0, [r4]
	bl	read
	cmp	r0, #0
	blt	.L13
.L7:
	mov	r1, r8
	ldr	r2, [r9]
	ldr	r0, [r4]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, lr}
	b	lseek
.L11:
	mov	r0, r3
	bl	free
	mov	r2, #0
	ldr	r3, [r5]
	add	r6, r3, r6
	str	r2, [r6, #8]
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L4:
	mov	r4, r0
	mov	r0, r3
	bl	munmap
	ldr	r3, [r5]
	ldr	r2, [r7]
	ldr	r1, [r3, r6]
	add	r3, r3, r6
	cmp	r1, r2
	str	r8, [r3, #8]
	ble	.L1
	mov	r0, r4
	bl	update_cpu_data_index
	ldr	r9, [r5]
	ldr	r3, .L14+12
	add	r9, r9, r6
	ldr	r2, [r9, #4]
	ldr	ip, [r3]
	str	r2, [sp, #4]
	ldr	r3, .L14+24
	ldr	r2, .L14+28
	str	ip, [sp]
	ldr	r1, [r7]
	ldr	r3, [r3]
	ldr	r2, [r2]
	mov	r0, r8
	bl	mmap
	ldr	r3, [r5]
	ldr	r1, .L14+32
	add	r6, r3, r6
	str	r0, [r9, #8]
	ldr	r2, [r6, #8]
	ldr	r3, [r1]
	cmp	r2, r3
	bne	.L1
	mov	r1, r4
	ldr	r2, [r6, #4]
	ldr	r0, .L14+36
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, lr}
	b	die
.L13:
	ldr	r0, .L14+40
	bl	die
	b	.L7
.L12:
	ldr	r0, .L14+44
	bl	die
	b	.L6
.L15:
	.align	2
.L14:
	.word	cpu_data
	.word	read_page
	.word	page_size
	.word	input_fd
	.word	SEEK_CUR
	.word	SEEK_SET
	.word	MAP_PRIVATE
	.word	PROT_READ
	.word	MAP_FAILED
	.word	.LC2
	.word	.LC1
	.word	.LC0
	.size	get_next_page, .-get_next_page
	.comm	read_page,4,4
	.comm	page_size,4,4
	.comm	input_fd,4,4
	.comm	cpu_data,4,4
	.comm	SEEK_SET,4,4
	.comm	SEEK_CUR,4,4
	.comm	PROT_READ,4,4
	.comm	MAP_PRIVATE,4,4
	.comm	MAP_FAILED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
