	.file	"extr_rapl.c_rapl_pmu_event_stop.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	rapl_pmu_event_stop, @function
rapl_pmu_event_stop:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	xor	esi, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rbp, QWORD PTR 8[rdi]
	lea	r13, 8[rbp]
	mov	rdi, r13
	call	raw_spin_lock_irqsave@PLT
	mov	eax, DWORD PTR 4[rbx]
	test	DWORD PTR PERF_HES_STOPPED[rip], eax
	je	.L10
.L2:
	test	DWORD PTR PERF_EF_UPDATE[rip], r12d
	je	.L4
	mov	eax, DWORD PTR 4[rbx]
	test	DWORD PTR PERF_HES_UPTODATE[rip], eax
	je	.L11
.L4:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, r13
	xor	esi, esi
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	raw_spin_unlock_irqrestore@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	xor	edi, edi
	cmp	QWORD PTR 0[rbp], 0
	setle	dil
	call	WARN_ON_ONCE@PLT
	sub	QWORD PTR 0[rbp], 1
	je	.L12
.L3:
	mov	rdi, rbx
	call	list_del@PLT
	mov	edi, DWORD PTR 4[rbx]
	and	edi, DWORD PTR PERF_HES_STOPPED[rip]
	call	WARN_ON_ONCE@PLT
	mov	eax, DWORD PTR PERF_HES_STOPPED[rip]
	or	DWORD PTR 4[rbx], eax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdi, rbx
	call	rapl_event_update@PLT
	mov	eax, DWORD PTR PERF_HES_UPTODATE[rip]
	or	DWORD PTR 4[rbx], eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L12:
	lea	rdi, 12[rbp]
	call	hrtimer_cancel@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	rapl_pmu_event_stop, .-rapl_pmu_event_stop
	.comm	PERF_HES_UPTODATE,4,4
	.comm	PERF_HES_STOPPED,4,4
	.comm	PERF_EF_UPDATE,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_rapl.c_rapl_pmu_event_stop.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rapl_pmu_event_stop, %function
rapl_pmu_event_stop:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r5, [r0, #8]
	ldr	r8, .L13
	add	r6, r5, #4
	mov	r7, r1
	mov	r0, r6
	mov	r1, #0
	bl	raw_spin_lock_irqsave
	ldr	r3, [r4, #4]
	ldr	r2, [r8]
	tst	r3, r2
	beq	.L10
.L2:
	ldr	r2, .L13+4
	ldr	r2, [r2]
	tst	r7, r2
	beq	.L4
	ldr	r5, .L13+8
	ldr	r2, [r5]
	tst	r3, r2
	beq	.L11
.L4:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, lr}
	mov	r1, #0
	b	raw_spin_unlock_irqrestore
.L10:
	ldr	r0, [r5]
	cmp	r0, #0
	movgt	r0, #0
	movle	r0, #1
	bl	WARN_ON_ONCE
	ldr	r3, [r5]
	sub	r3, r3, #1
	cmp	r3, #0
	str	r3, [r5]
	beq	.L12
.L3:
	mov	r0, r4
	bl	list_del
	ldr	r3, [r8]
	ldr	r0, [r4, #4]
	and	r0, r0, r3
	bl	WARN_ON_ONCE
	ldr	r3, [r4, #4]
	ldr	r2, [r8]
	orr	r3, r3, r2
	str	r3, [r4, #4]
	b	.L2
.L11:
	mov	r0, r4
	bl	rapl_event_update
	ldr	r3, [r4, #4]
	ldr	r2, [r5]
	mov	r0, r6
	orr	r3, r3, r2
	str	r3, [r4, #4]
	mov	r1, #0
	pop	{r4, r5, r6, r7, r8, lr}
	b	raw_spin_unlock_irqrestore
.L12:
	add	r0, r5, #8
	bl	hrtimer_cancel
	b	.L3
.L14:
	.align	2
.L13:
	.word	PERF_HES_STOPPED
	.word	PERF_EF_UPDATE
	.word	PERF_HES_UPTODATE
	.size	rapl_pmu_event_stop, .-rapl_pmu_event_stop
	.comm	PERF_HES_UPTODATE,4,4
	.comm	PERF_HES_STOPPED,4,4
	.comm	PERF_EF_UPDATE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
