	.file	"98576365.c"
	.intel_syntax noprefix
	.text
	.local	thread_id
	.comm	thread_id,8,8
	.local	head
	.comm	head,8,8
	.globl	timer_init
	.type	timer_init, @function
timer_init:
.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
	mov	ecx, 0
	lea	rdx, timer_thread[rip]
	mov	esi, 0
	lea	rdi, thread_id[rip]
	call	pthread_create@PLT
	test	eax, eax
	je	.L2
	mov	eax, 0
	jmp	.L3
.L2:
	mov	eax, 1
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	timer_init, .-timer_init
	.globl	start_timer
	.type	start_timer, @function
start_timer:
.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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -56[rbp], 0
	mov	edi, 40
	call	malloc@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	edx, DWORD PTR -68[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 32[rax], edx
	mov	esi, 0
	mov	edi, 0
	call	timerfd_create@PLT
	mov	rdx, QWORD PTR -56[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, -1
	jne	.L5
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	free@PLT
.L5:
	mov	eax, DWORD PTR -68[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 274877907
	shr	rdx, 32
	sar	edx, 6
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	cdqe
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -68[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 274877907
	shr	rdx, 32
	sar	edx, 6
	mov	ecx, eax
	sar	ecx, 31
	sub	edx, ecx
	imul	ecx, edx, 1000
	sub	eax, ecx
	mov	edx, eax
	imul	eax, edx, 1000000
	cdqe
	mov	QWORD PTR -24[rbp], rax
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	lea	rdx, -48[rbp]
	mov	ecx, 0
	mov	esi, 0
	mov	edi, eax
	call	timerfd_settime@PLT
	mov	rdx, QWORD PTR head[rip]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR head[rip], rax
	mov	eax, DWORD PTR -68[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 274877907
	shr	rdx, 32
	sar	edx, 6
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	add	eax, 1
	mov	edi, eax
	call	sleep@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	start_timer, .-start_timer
	.globl	stop_timer
	.type	stop_timer, @function
stop_timer:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -16[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L8
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR head[rip]
	cmp	QWORD PTR -8[rbp], rax
	jne	.L9
	mov	rax, QWORD PTR head[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR head[rip], rax
	jmp	.L8
.L9:
	mov	rax, QWORD PTR head[rip]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L10
.L12:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
.L10:
	cmp	QWORD PTR -16[rbp], 0
	je	.L11
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	cmp	QWORD PTR -8[rbp], rax
	jne	.L12
.L11:
	cmp	QWORD PTR -16[rbp], 0
	je	.L8
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
.L8:
	cmp	QWORD PTR -8[rbp], 0
	je	.L14
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
.L14:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	stop_timer, .-stop_timer
	.globl	timer_destroy
	.type	timer_destroy, @function
timer_destroy:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	jmp	.L16
.L17:
	mov	rax, QWORD PTR head[rip]
	mov	rdi, rax
	call	stop_timer
.L16:
	mov	rax, QWORD PTR head[rip]
	test	rax, rax
	jne	.L17
	mov	rax, QWORD PTR thread_id[rip]
	mov	rdi, rax
	call	pthread_cancel@PLT
	mov	rax, QWORD PTR thread_id[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	timer_destroy, .-timer_destroy
	.globl	get_timer
	.type	get_timer, @function
get_timer:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	rax, QWORD PTR head[rip]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L19
.L22:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jne	.L20
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L21
.L20:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
.L19:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L22
	mov	eax, 0
.L21:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	get_timer, .-get_timer
	.section	.rodata
.LC0:
	.string	"Timer ran for %d\n"
	.text
	.type	timer_thread, @function
timer_thread:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 4048
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -4016[rbp]
	mov	eax, 0
	mov	ecx, 500
	mov	rdi, rdx
	rep stosq
	mov	DWORD PTR -4048[rbp], 0
	mov	QWORD PTR -4024[rbp], 0
	mov	DWORD PTR -4040[rbp], 0
.L32:
	mov	esi, 0
	mov	edi, 0
	call	pthread_setcancelstate@PLT
	call	pthread_testcancel@PLT
	mov	esi, 0
	mov	edi, 1
	call	pthread_setcancelstate@PLT
	mov	DWORD PTR -4048[rbp], 0
	mov	rax, QWORD PTR head[rip]
	mov	QWORD PTR -4024[rbp], rax
	lea	rax, -4016[rbp]
	mov	edx, 4000
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	jmp	.L24
.L25:
	mov	rax, QWORD PTR -4024[rbp]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -4048[rbp]
	cdqe
	mov	DWORD PTR -4016[rbp+rax*8], edx
	mov	eax, DWORD PTR -4048[rbp]
	cdqe
	mov	WORD PTR -4012[rbp+rax*8], 1
	add	DWORD PTR -4048[rbp], 1
	mov	rax, QWORD PTR -4024[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -4024[rbp], rax
.L24:
	cmp	QWORD PTR -4024[rbp], 0
	jne	.L25
	mov	eax, DWORD PTR -4048[rbp]
	movsx	rcx, eax
	lea	rax, -4016[rbp]
	mov	edx, 100
	mov	rsi, rcx
	mov	rdi, rax
	call	poll@PLT
	mov	DWORD PTR -4040[rbp], eax
	cmp	DWORD PTR -4040[rbp], 0
	jle	.L34
	mov	DWORD PTR -4044[rbp], 0
	jmp	.L28
.L31:
	mov	eax, DWORD PTR -4044[rbp]
	cdqe
	movzx	eax, WORD PTR -4010[rbp+rax*8]
	cwde
	and	eax, 1
	test	eax, eax
	je	.L29
	mov	eax, DWORD PTR -4044[rbp]
	cdqe
	mov	eax, DWORD PTR -4016[rbp+rax*8]
	lea	rcx, -4032[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -4036[rbp], eax
	cmp	DWORD PTR -4036[rbp], 8
	jne	.L29
	mov	eax, DWORD PTR -4044[rbp]
	cdqe
	mov	eax, DWORD PTR -4016[rbp+rax*8]
	mov	edi, eax
	call	get_timer
	mov	QWORD PTR -4024[rbp], rax
	cmp	QWORD PTR -4024[rbp], 0
	je	.L30
	mov	rax, QWORD PTR -4024[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	je	.L30
	mov	rax, QWORD PTR -4024[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -4024[rbp]
	mov	rdx, QWORD PTR 24[rax]
	mov	rax, QWORD PTR -4024[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	rcx
.L30:
	mov	rax, QWORD PTR -4024[rbp]
	mov	eax, DWORD PTR 32[rax]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
.L29:
	add	DWORD PTR -4044[rbp], 1
.L28:
	mov	eax, DWORD PTR -4044[rbp]
	cmp	eax, DWORD PTR -4048[rbp]
	jl	.L31
	jmp	.L32
.L34:
	nop
	jmp	.L32
	.cfi_endproc
.LFE11:
	.size	timer_thread, .-timer_thread
	.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	"98576365.c"
	.text
	.local	thread_id
	.comm	thread_id,4,4
	.local	head
	.comm	head,4,4
	.align	2
	.global	timer_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	timer_init, %function
timer_init:
	@ 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]
	mov	r3, #0
	ldr	r2, .L4
	mov	r1, #0
	ldr	r0, .L4+4
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L2
	mov	r3, #0
	b	.L3
.L2:
	mov	r3, #1
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	timer_thread
	.word	thread_id
	.size	timer_init, .-timer_init
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	start_timer
	.syntax unified
	.arm
	.fpu softvfp
	.type	start_timer, %function
start_timer:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r0, #20
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-28]
	str	r2, [r3, #16]
	mov	r1, #0
	mov	r0, #0
	bl	timerfd_create
	mov	r2, r0
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L7
	ldr	r0, [fp, #-28]
	bl	free
.L7:
	ldr	r3, [fp, #-32]
	ldr	r2, .L9+4
	smull	r1, r2, r3, r2
	asr	r2, r2, #6
	asr	r3, r3, #31
	sub	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-32]
	ldr	r3, .L9+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #6
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	sub	r2, r1, r3
	mov	r1, r2
	lsl	r1, r1, #5
	sub	r1, r1, r2
	lsl	r3, r1, #6
	sub	r3, r3, r1
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #6
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-28]
	ldr	r0, [r3]
	sub	r2, fp, #24
	mov	r3, #0
	mov	r1, #0
	bl	timerfd_settime
	ldr	r3, .L9+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r2, .L9+8
	ldr	r3, [fp, #-28]
	str	r3, [r2]
	ldr	r3, [fp, #-32]
	ldr	r2, .L9+4
	smull	r1, r2, r3, r2
	asr	r2, r2, #6
	asr	r3, r3, #31
	sub	r3, r2, r3
	add	r3, r3, #1
	mov	r0, r3
	bl	sleep
	nop
	ldr	r3, .L9
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC0
	.word	274877907
	.word	head
	.size	start_timer, .-start_timer
	.align	2
	.global	stop_timer
	.syntax unified
	.arm
	.fpu softvfp
	.type	stop_timer, %function
stop_timer:
	@ 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, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L12
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r3, .L19
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bne	.L13
	ldr	r3, .L19
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	ldr	r2, .L19
	str	r3, [r2]
	b	.L12
.L13:
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	b	.L14
.L16:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-12]
.L14:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L15
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bne	.L16
.L15:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L12
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	str	r2, [r3, #4]
.L12:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L18
	ldr	r0, [fp, #-8]
	bl	free
.L18:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	head
	.size	stop_timer, .-stop_timer
	.align	2
	.global	timer_destroy
	.syntax unified
	.arm
	.fpu softvfp
	.type	timer_destroy, %function
timer_destroy:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	b	.L22
.L23:
	ldr	r3, .L24
	ldr	r3, [r3]
	mov	r0, r3
	bl	stop_timer
.L22:
	ldr	r3, .L24
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L23
	ldr	r3, .L24+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	pthread_cancel
	ldr	r3, .L24+4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	nop
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	head
	.word	thread_id
	.size	timer_destroy, .-timer_destroy
	.align	2
	.global	get_timer
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_timer, %function
get_timer:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	ldr	r3, .L31
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	b	.L27
.L30:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L28
	ldr	r3, [fp, #-8]
	b	.L29
.L28:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
.L27:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L30
	mov	r3, #0
.L29:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L32:
	.align	2
.L31:
	.word	head
	.size	get_timer, .-get_timer
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Timer ran for %d\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	timer_thread, %function
timer_thread:
	@ args = 0, pretend = 0, frame = 4040
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #4032
	sub	sp, sp, #8
	ldr	r3, .L45
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #4000
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #4000
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-4040]
	mov	r3, #0
	str	r3, [fp, #-4036]
	mov	r3, #0
	str	r3, [fp, #-4028]
.L42:
	mov	r1, #0
	mov	r0, #0
	bl	pthread_setcancelstate
	bl	pthread_testcancel
	mov	r1, #0
	mov	r0, #1
	bl	pthread_setcancelstate
	mov	r3, #0
	str	r3, [fp, #-4040]
	ldr	r3, .L45+4
	ldr	r3, [r3]
	str	r3, [fp, #-4036]
	sub	r3, fp, #4000
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #4000
	mov	r1, #0
	mov	r0, r3
	bl	memset
	b	.L34
.L35:
	ldr	r3, [fp, #-4036]
	ldr	r2, [r3]
	ldr	r3, [fp, #-4040]
	lsl	r3, r3, #3
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-4004]
	sub	r3, fp, #4
	sub	r3, r3, #4000
	sub	r3, r3, #4
	ldr	r2, [fp, #-4040]
	lsl	r2, r2, #3
	add	r3, r3, r2
	add	r3, r3, #4
	mov	r2, #1
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-4040]
	add	r3, r3, #1
	str	r3, [fp, #-4040]
	ldr	r3, [fp, #-4036]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-4036]
.L34:
	ldr	r3, [fp, #-4036]
	cmp	r3, #0
	bne	.L35
	ldr	r1, [fp, #-4040]
	sub	r3, fp, #4000
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #100
	mov	r0, r3
	bl	poll
	str	r0, [fp, #-4028]
	ldr	r3, [fp, #-4028]
	cmp	r3, #0
	ble	.L44
	mov	r3, #0
	str	r3, [fp, #-4032]
	b	.L38
.L41:
	sub	r3, fp, #4
	sub	r3, r3, #4000
	sub	r3, r3, #4
	ldr	r2, [fp, #-4032]
	lsl	r2, r2, #3
	add	r3, r3, r2
	add	r3, r3, #6
	ldrsh	r3, [r3]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L39
	ldr	r3, [fp, #-4032]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-4004]
	sub	r1, fp, #4016
	sub	r1, r1, #4
	mov	r2, #8
	mov	r0, r3
	bl	read
	str	r0, [fp, #-4024]
	ldr	r3, [fp, #-4024]
	cmp	r3, #8
	bne	.L39
	ldr	r3, [fp, #-4032]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-4004]
	mov	r0, r3
	bl	get_timer
	str	r0, [fp, #-4036]
	ldr	r3, [fp, #-4036]
	cmp	r3, #0
	beq	.L40
	ldr	r3, [fp, #-4036]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	beq	.L40
	ldr	r3, [fp, #-4036]
	ldr	r3, [r3, #8]
	ldr	r0, [fp, #-4036]
	ldr	r2, [fp, #-4036]
	ldr	r2, [r2, #12]
	mov	r1, r2
	blx	r3
.L40:
	ldr	r3, [fp, #-4036]
	ldr	r3, [r3, #16]
	mov	r1, r3
	ldr	r0, .L45+8
	bl	printf
.L39:
	ldr	r3, [fp, #-4032]
	add	r3, r3, #1
	str	r3, [fp, #-4032]
.L38:
	ldr	r2, [fp, #-4032]
	ldr	r3, [fp, #-4040]
	cmp	r2, r3
	blt	.L41
	b	.L42
.L44:
	nop
	b	.L42
.L46:
	.align	2
.L45:
	.word	.LC2
	.word	head
	.word	.LC1
	.size	timer_thread, .-timer_thread
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
