	.file	"893933.c"
	.intel_syntax noprefix
	.text
	.type	start_cpu_usage_timer, @function
start_cpu_usage_timer:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	call	clock@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	start_cpu_usage_timer, .-start_cpu_usage_timer
	.type	get_cpu_usage, @function
get_cpu_usage:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 112
	mov	QWORD PTR -88[rbp], rdi
	mov	QWORD PTR -96[rbp], rsi
	mov	QWORD PTR -104[rbp], rdx
	mov	QWORD PTR -112[rbp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	clock@PLT
	mov	QWORD PTR -72[rbp], rax
	mov	rax, QWORD PTR -88[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -72[rbp]
	sub	rax, rdx
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	movsd	xmm1, QWORD PTR .LC0[rip]
	divsd	xmm0, xmm1
	movsd	QWORD PTR -64[rbp], xmm0
	lea	rax, -48[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -88[rbp]
	mov	rcx, QWORD PTR 8[rax]
	mov	rax, rdx
	sub	rax, rcx
	mov	QWORD PTR -32[rbp], rax
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -88[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	rax, rdx
	sub	rax, rcx
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	test	rax, rax
	jns	.L3
	mov	rax, QWORD PTR -32[rbp]
	sub	rax, 1
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1000000
	mov	QWORD PTR -24[rbp], rax
.L3:
	mov	rax, QWORD PTR -32[rbp]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	mov	rax, QWORD PTR -24[rbp]
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	movsd	xmm2, QWORD PTR .LC0[rip]
	divsd	xmm0, xmm2
	addsd	xmm0, xmm1
	movsd	QWORD PTR -56[rbp], xmm0
	mov	rax, QWORD PTR -96[rbp]
	movsd	xmm0, QWORD PTR -56[rbp]
	movsd	QWORD PTR [rax], xmm0
	mov	rax, QWORD PTR -104[rbp]
	movsd	xmm0, QWORD PTR -64[rbp]
	movsd	QWORD PTR [rax], xmm0
	movsd	xmm0, QWORD PTR -64[rbp]
	divsd	xmm0, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -112[rbp]
	movsd	QWORD PTR [rax], xmm0
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	get_cpu_usage, .-get_cpu_usage
	.section	.rodata
	.align 8
.LC1:
	.string	"write callback. should only see this once"
	.text
	.type	write_cb, @function
write_cb:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	eax, esi
	mov	QWORD PTR -16[rbp], rdx
	mov	WORD PTR -8[rbp], ax
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	event_del@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	call	event_add@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	event_del@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	write_cb, .-write_cb
	.section	.rodata
	.align 8
.LC2:
	.string	"timeout fired, time to end test"
	.text
	.type	timeout_cb, @function
timeout_cb:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	eax, esi
	mov	QWORD PTR -16[rbp], rdx
	mov	WORD PTR -8[rbp], ax
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	event_del@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	timeout_cb, .-timeout_cb
	.section	.rodata
	.align 8
.LC4:
	.string	"usec used=%d, usec passed=%d, cpu usage=%.2f%%\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -16[rbp]
	mov	rcx, rax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 1
	call	evutil_socketpair@PLT
	cmp	eax, -1
	jne	.L9
	mov	eax, 1
	jmp	.L13
.L9:
	call	event_base_new@PLT
	mov	QWORD PTR -72[rbp], rax
	lea	rdx, -104[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	r8, rdx
	lea	rcx, timeout_cb[rip]
	mov	edx, 0
	mov	esi, -1
	mov	rdi, rax
	call	event_new@PLT
	mov	QWORD PTR -104[rbp], rax
	mov	esi, DWORD PTR -12[rbp]
	lea	rdx, -112[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	r8, rdx
	lea	rcx, write_cb[rip]
	mov	edx, 20
	mov	rdi, rax
	call	event_new@PLT
	mov	QWORD PTR -112[rbp], rax
	mov	QWORD PTR -64[rbp], 1
	mov	QWORD PTR -56[rbp], 500000
	mov	rax, QWORD PTR -104[rbp]
	lea	rdx, -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	event_add@PLT
	mov	rax, QWORD PTR -112[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	event_add@PLT
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	start_cpu_usage_timer
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	event_base_dispatch@PLT
	mov	rax, QWORD PTR -112[rbp]
	mov	rdi, rax
	call	event_free@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	event_free@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	event_base_free@PLT
	lea	rcx, -96[rbp]
	lea	rdx, -80[rbp]
	lea	rsi, -88[rbp]
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	get_cpu_usage
	movsd	xmm1, QWORD PTR -96[rbp]
	movsd	xmm0, QWORD PTR .LC3[rip]
	mulsd	xmm1, xmm0
	movq	rcx, xmm1
	movsd	xmm1, QWORD PTR -88[rbp]
	movsd	xmm0, QWORD PTR .LC0[rip]
	mulsd	xmm0, xmm1
	cvttsd2si	edx, xmm0
	movsd	xmm1, QWORD PTR -80[rbp]
	movsd	xmm0, QWORD PTR .LC0[rip]
	mulsd	xmm0, xmm1
	cvttsd2si	eax, xmm0
	movq	xmm0, rcx
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 1
	call	printf@PLT
	movsd	xmm0, QWORD PTR -96[rbp]
	comisd	xmm0, QWORD PTR .LC5[rip]
	jbe	.L16
	mov	eax, 1
	jmp	.L13
.L16:
	mov	eax, 0
.L13:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	0
	.long	1093567616
	.align 8
.LC3:
	.long	0
	.long	1079574528
	.align 8
.LC5:
	.long	0
	.long	1078525952
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"893933.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	start_cpu_usage_timer, %function
start_cpu_usage_timer:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	bl	clock
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	start_cpu_usage_timer, .-start_cpu_usage_timer
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.global	__aeabi_dadd
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_cpu_usage, %function
get_cpu_usage:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #64
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	str	r2, [fp, #-72]
	str	r3, [fp, #-76]
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	bl	clock
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-64]
	ldr	r3, [r3]
	ldr	r2, [fp, #-56]
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L5+4
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	sub	r3, fp, #32
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-64]
	ldr	r3, [r3, #4]
	sub	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-64]
	ldr	r3, [r3, #8]
	sub	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bge	.L3
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-20]
	add	r3, r3, #999424
	add	r3, r3, #576
	str	r3, [fp, #-20]
.L3:
	ldr	r3, [fp, #-24]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r3, [fp, #-20]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L5+4
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-44]
	str	r3, [fp, #-40]
	ldr	r1, [fp, #-68]
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	stm	r1, {r2-r3}
	ldr	r1, [fp, #-72]
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	stm	r1, {r2-r3}
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	sub	r1, fp, #52
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #-76]
	stm	r1, {r2-r3}
	nop
	ldr	r3, .L5
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	1093567616
	.size	get_cpu_usage, .-get_cpu_usage
	.section	.rodata
	.align	2
.LC1:
	.ascii	"write callback. should only see this once\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_cb, %function
write_cb:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-8]
	mov	r3, r1
	str	r2, [fp, #-16]
	strh	r3, [fp, #-10]	@ movhi
	ldr	r0, .L8
	bl	puts
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r0, r3
	bl	event_del
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	event_add
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r0, r3
	bl	event_del
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC1
	.size	write_cb, .-write_cb
	.section	.rodata
	.align	2
.LC2:
	.ascii	"timeout fired, time to end test\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	timeout_cb, %function
timeout_cb:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-8]
	mov	r3, r1
	str	r2, [fp, #-16]
	strh	r3, [fp, #-10]	@ movhi
	ldr	r0, .L12
	bl	puts
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r0, r3
	bl	event_del
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC2
	.size	timeout_cb, .-timeout_cb
	.global	__aeabi_dmul
	.global	__aeabi_d2iz
	.section	.rodata
	.align	2
.LC3:
	.ascii	"usec used=%d, usec passed=%d, cpu usage=%.2f%%\012\000"
	.global	__aeabi_dcmpgt
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #88
	str	r0, [fp, #-88]
	str	r1, [fp, #-92]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #24
	mov	r2, #0
	mov	r1, #1
	mov	r0, #1
	bl	evutil_socketpair
	mov	r3, r0
	cmn	r3, #1
	bne	.L15
	mov	r3, #1
	b	.L19
.L15:
	bl	event_base_new
	str	r0, [fp, #-72]
	sub	r3, fp, #76
	str	r3, [sp]
	ldr	r3, .L23+4
	mov	r2, #0
	mvn	r1, #0
	ldr	r0, [fp, #-72]
	bl	event_new
	mov	r3, r0
	str	r3, [fp, #-76]
	ldr	r1, [fp, #-20]
	sub	r3, fp, #80
	str	r3, [sp]
	ldr	r3, .L23+8
	mov	r2, #20
	ldr	r0, [fp, #-72]
	bl	event_new
	mov	r3, r0
	str	r3, [fp, #-80]
	mov	r3, #1
	str	r3, [fp, #-44]
	ldr	r3, .L23+12
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-76]
	sub	r2, fp, #44
	mov	r1, r2
	mov	r0, r3
	bl	event_add
	ldr	r3, [fp, #-80]
	mov	r1, #0
	mov	r0, r3
	bl	event_add
	sub	r3, fp, #36
	mov	r0, r3
	bl	start_cpu_usage_timer
	ldr	r0, [fp, #-72]
	bl	event_base_dispatch
	ldr	r3, [fp, #-80]
	mov	r0, r3
	bl	event_free
	ldr	r3, [fp, #-76]
	mov	r0, r3
	bl	event_free
	ldr	r0, [fp, #-72]
	bl	event_base_free
	sub	r3, fp, #68
	sub	r2, fp, #52
	sub	r1, fp, #60
	sub	r0, fp, #36
	bl	get_cpu_usage
	sub	r1, fp, #52
	ldmia	r1, {r0-r1}
	mov	r2, #0
	ldr	r3, .L23+16
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r4, r0
	sub	r1, fp, #60
	ldmia	r1, {r0-r1}
	mov	r2, #0
	ldr	r3, .L23+16
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r5, r0
	sub	r1, fp, #68
	ldmia	r1, {r0-r1}
	mov	r2, #0
	ldr	r3, .L23+20
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	stm	sp, {r2-r3}
	mov	r2, r5
	mov	r1, r4
	ldr	r0, .L23+24
	bl	printf
	sub	r1, fp, #68
	ldmia	r1, {r0-r1}
	mov	r2, #0
	ldr	r3, .L23+28
	bl	__aeabi_dcmpgt
	mov	r3, r0
	cmp	r3, #0
	beq	.L22
	mov	r3, #1
	b	.L19
.L22:
	mov	r3, #0
.L19:
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC4
	.word	timeout_cb
	.word	write_cb
	.word	500000
	.word	1093567616
	.word	1079574528
	.word	.LC3
	.word	1078525952
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
