	.file	"672127.c"
	.intel_syntax noprefix
	.text
	.globl	called
	.bss
	.align 4
	.type	called, @object
	.size	called, 4
called:
	.zero	4
	.globl	ev
	.align 32
	.type	ev, @object
	.size	ev, 160000
ev:
	.zero	160000
	.text
	.type	rand_int, @function
rand_int:
.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	DWORD PTR -4[rbp], edi
	call	random@PLT
	mov	edx, DWORD PTR -4[rbp]
	movsx	rcx, edx
	cqo
	idiv	rcx
	mov	rax, rdx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	rand_int, .-rand_int
	.type	time_cb, @function
time_cb:
.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	eax, esi
	mov	QWORD PTR -64[rbp], rdx
	mov	WORD PTR -56[rbp], ax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR called[rip]
	add	eax, 1
	mov	DWORD PTR called[rip], eax
	mov	eax, DWORD PTR called[rip]
	cmp	eax, 199999
	jg	.L10
	mov	DWORD PTR -40[rbp], 0
	jmp	.L5
.L8:
	mov	edi, 20000
	call	rand_int
	mov	DWORD PTR -36[rbp], eax
	mov	QWORD PTR -32[rbp], 0
	mov	edi, 50000
	call	rand_int
	cdqe
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	and	eax, 1
	test	rax, rax
	je	.L6
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, ev[rip]
	mov	rax, QWORD PTR [rdx+rax]
	lea	rdx, -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	event_add@PLT
	jmp	.L7
.L6:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, ev[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rdi, rax
	call	event_del@PLT
.L7:
	add	DWORD PTR -40[rbp], 1
.L5:
	cmp	DWORD PTR -40[rbp], 9
	jle	.L8
.L10:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	time_cb, .-time_cb
	.globl	main
	.type	main, @function
main:
.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	event_init@PLT
	mov	DWORD PTR -36[rbp], 0
	jmp	.L12
.L13:
	mov	edi, 128
	call	malloc@PLT
	mov	rcx, rax
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, ev[rip]
	mov	QWORD PTR [rdx+rax], rcx
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, ev[rip]
	mov	rcx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, ev[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	r8, rcx
	lea	rcx, time_cb[rip]
	mov	edx, 0
	mov	esi, -1
	mov	rdi, rax
	call	event_set@PLT
	mov	QWORD PTR -32[rbp], 0
	mov	edi, 50000
	call	rand_int
	cdqe
	mov	QWORD PTR -24[rbp], rax
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, ev[rip]
	mov	rax, QWORD PTR [rdx+rax]
	lea	rdx, -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	event_add@PLT
	add	DWORD PTR -36[rbp], 1
.L12:
	cmp	DWORD PTR -36[rbp], 19999
	jle	.L13
	call	event_dispatch@PLT
	mov	eax, DWORD PTR called[rip]
	cmp	eax, 19999
	setle	al
	movzx	eax, al
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.globl	custom_timeout_handling
	.type	custom_timeout_handling, @function
custom_timeout_handling:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	custom_timeout_handling, .-custom_timeout_handling
	.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	"672127.c"
	.text
	.global	called
	.bss
	.align	2
	.type	called, %object
	.size	called, 4
called:
	.space	4
	.comm	ev,80000,4
	.global	__aeabi_idivmod
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rand_int, %function
rand_int:
	@ 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	random
	mov	r3, r0
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	rand_int, .-rand_int
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	time_cb, %function
time_cb:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-32]
	mov	r3, r1
	str	r2, [fp, #-40]
	strh	r3, [fp, #-34]	@ movhi
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L11+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L11+4
	str	r3, [r2]
	ldr	r3, .L11+4
	ldr	r3, [r3]
	ldr	r2, .L11+8
	cmp	r3, r2
	bge	.L10
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L5
.L8:
	ldr	r0, .L11+12
	bl	rand_int
	str	r0, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r0, .L11+16
	bl	rand_int
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L6
	ldr	r2, .L11+20
	ldr	r3, [fp, #-20]
	ldr	r3, [r2, r3, lsl #2]
	sub	r2, fp, #16
	mov	r1, r2
	mov	r0, r3
	bl	event_add
	b	.L7
.L6:
	ldr	r2, .L11+20
	ldr	r3, [fp, #-20]
	ldr	r3, [r2, r3, lsl #2]
	mov	r0, r3
	bl	event_del
.L7:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L5:
	ldr	r3, [fp, #-24]
	cmp	r3, #9
	ble	.L8
.L10:
	nop
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC0
	.word	called
	.word	200000
	.word	20000
	.word	50000
	.word	ev
	.size	time_cb, .-time_cb
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	event_init
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L14
.L15:
	mov	r0, #64
	bl	malloc
	mov	r3, r0
	mov	r1, r3
	ldr	r2, .L18+4
	ldr	r3, [fp, #-20]
	str	r1, [r2, r3, lsl #2]
	ldr	r2, .L18+4
	ldr	r3, [fp, #-20]
	ldr	r0, [r2, r3, lsl #2]
	ldr	r2, .L18+4
	ldr	r3, [fp, #-20]
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [sp]
	ldr	r3, .L18+8
	mov	r2, #0
	mvn	r1, #0
	bl	event_set
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r0, .L18+12
	bl	rand_int
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r2, .L18+4
	ldr	r3, [fp, #-20]
	ldr	r3, [r2, r3, lsl #2]
	sub	r2, fp, #16
	mov	r1, r2
	mov	r0, r3
	bl	event_add
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L14:
	ldr	r3, [fp, #-20]
	ldr	r2, .L18+16
	cmp	r3, r2
	ble	.L15
	bl	event_dispatch
	ldr	r3, .L18+20
	ldr	r3, [r3]
	ldr	r2, .L18+16
	cmp	r3, r2
	movle	r3, #1
	movgt	r3, #0
	and	r3, r3, #255
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC1
	.word	ev
	.word	time_cb
	.word	50000
	.word	19999
	.word	called
	.size	main, .-main
	.align	2
	.global	custom_timeout_handling
	.syntax unified
	.arm
	.fpu softvfp
	.type	custom_timeout_handling, %function
custom_timeout_handling:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	custom_timeout_handling, .-custom_timeout_handling
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
