	.file	"extr_bts.c_bts_update.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	bts_update, @function
bts_update:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xor	eax, eax
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	raw_smp_processor_id@PLT
	mov	edi, DWORD PTR cpu_hw_events[rip]
	mov	esi, eax
	call	per_cpu@PLT
	mov	rdi, r13
	mov	rbx, rax
	call	perf_get_aux@PLT
	test	rax, rax
	je	.L1
	mov	r14, QWORD PTR 8[rbx]
	mov	r12, QWORD PTR [rbx]
	mov	rdi, rax
	mov	rbp, rax
	mov	esi, DWORD PTR 12[rax]
	sub	r12, r14
	call	bts_buffer_offset@PLT
	lea	rdi, 8[rbp]
	add	r12, rax
	mov	rsi, r12
	call	local_xchg@PLT
	mov	r14, rax
	mov	eax, DWORD PTR 4[rbp]
	test	eax, eax
	jne	.L4
	cmp	r12, r14
	je	.L1
	mov	rax, QWORD PTR 16[rbx]
	cmp	QWORD PTR [rbx], rax
	jnb	.L9
.L6:
	mov	rdi, r12
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rsi, rbp
	pop	rbp
	.cfi_def_cfa_offset 32
	sub	rdi, r14
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	local_add@PLT
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rsi, r12
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	local_set@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	.cfi_restore_state
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	esi, DWORD PTR PERF_AUX_FLAG_TRUNCATED[rip]
	mov	rdi, r13
	call	perf_aux_output_flag@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	bts_update, .-bts_update
	.comm	cpu_hw_events,4,4
	.comm	PERF_AUX_FLAG_TRUNCATED,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_bts.c_bts_update.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bts_update, %function
bts_update:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r8, r0
	bl	raw_smp_processor_id
	ldr	r3, .L10
	mov	r1, r0
	ldr	r0, [r3]
	bl	per_cpu
	mov	r7, r0
	mov	r0, r8
	bl	perf_get_aux
	subs	r4, r0, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r1, [r4, #12]
	ldr	r6, [r7]
	ldr	r5, [r7, #4]
	bl	bts_buffer_offset
	sub	r5, r6, r5
	add	r5, r5, r0
	mov	r1, r5
	add	r0, r4, #8
	bl	local_xchg
	ldr	r3, [r4, #4]
	mov	r6, r0
	cmp	r3, #0
	bne	.L4
	cmp	r5, r0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r2, [r7]
	ldr	r3, [r7, #8]
	cmp	r2, r3
	bcs	.L9
	mov	r1, r4
	sub	r0, r5, r6
	pop	{r4, r5, r6, r7, r8, lr}
	b	local_add
.L4:
	mov	r1, r5
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	local_set
.L9:
	ldr	r3, .L10+4
	mov	r0, r8
	ldr	r1, [r3]
	bl	perf_aux_output_flag
	mov	r1, r4
	sub	r0, r5, r6
	pop	{r4, r5, r6, r7, r8, lr}
	b	local_add
.L11:
	.align	2
.L10:
	.word	cpu_hw_events
	.word	PERF_AUX_FLAG_TRUNCATED
	.size	bts_update, .-bts_update
	.comm	cpu_hw_events,4,4
	.comm	PERF_AUX_FLAG_TRUNCATED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
