	.file	"extr_test.c_EventLoop.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"\nEncoding Quit by user command\n"
	.align 8
.LC1:
	.string	"\nEncoding Paused by user command, 'r' to resume\n"
	.text
	.p2align 4
	.globl	EventLoop
	.type	EventLoop, @function
EventLoop:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 312
	.cfi_def_cfa_offset 368
	mov	edx, DWORD PTR die[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 296[rsp], rax
	xor	eax, eax
	mov	QWORD PTR work_done[rip], 0
	test	edx, edx
	jne	.L2
	mov	r12, rdi
	lea	rbp, 12[rsp]
	lea	r14, 16[rsp]
	mov	r13, rsi
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, 200
	call	hb_snooze@PLT
	mov	rsi, r13
	mov	rdi, r12
	call	HandleEvents@PLT
	mov	eax, DWORD PTR die[rip]
	test	eax, eax
	jne	.L2
	cmp	QWORD PTR work_done[rip], 0
	jne	.L2
.L14:
	mov	rdi, rbp
	mov	DWORD PTR 16[rsp], 100000
	lea	rbx, 32[rsp]
	xor	r15d, r15d
	mov	QWORD PTR 24[rsp], 0
	call	FD_ZERO@PLT
	mov	rdi, QWORD PTR STDIN_FILENO[rip]
	mov	rsi, rbp
	call	FD_SET@PLT
	mov	rax, QWORD PTR STDIN_FILENO[rip]
	xor	ecx, ecx
	xor	edx, edx
	mov	r8, r14
	mov	rsi, rbp
	lea	rdi, 1[rax]
	call	select@PLT
	test	eax, eax
	jle	.L5
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	cmp	BYTE PTR [rbx], 10
	je	.L6
	add	r15d, 1
	add	rbx, 1
	cmp	r15d, 256
	je	.L6
.L4:
	mov	rdi, QWORD PTR STDIN_FILENO[rip]
	mov	edx, 1
	mov	rsi, rbx
	call	read@PLT
	test	rax, rax
	jg	.L7
	movsx	rcx, r15d
	cmp	BYTE PTR 32[rsp+rcx], 10
	jne	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	movzx	eax, BYTE PTR 32[rsp]
	cmp	al, 113
	je	.L9
	jg	.L10
	cmp	al, 104
	je	.L11
	cmp	al, 112
	jne	.L5
	mov	edi, DWORD PTR stdout[rip]
	lea	rsi, .LC1[rip]
	call	fprintf@PLT
	mov	rdi, r12
	call	hb_pause@PLT
	mov	rdi, r12
	call	hb_system_sleep_allow@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	cmp	al, 114
	jne	.L5
	mov	rdi, r12
	call	hb_system_sleep_prevent@PLT
	mov	rdi, r12
	call	hb_resume@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	mov	QWORD PTR job_running[rip], 0
	mov	rax, QWORD PTR 296[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L24
	add	rsp, 312
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	mov	edi, DWORD PTR stdout[rip]
	lea	rsi, .LC0[rip]
	call	fprintf@PLT
	mov	eax, DWORD PTR HB_ERROR_CANCELED[rip]
	mov	DWORD PTR die[rip], 1
	mov	DWORD PTR done_error[rip], eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L11:
	xor	eax, eax
	call	ShowCommands@PLT
	jmp	.L5
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	EventLoop, .-EventLoop
	.comm	work_done,8,8
	.comm	stdout,4,4
	.comm	job_running,8,8
	.comm	done_error,4,4
	.comm	die,4,4
	.comm	STDIN_FILENO,8,8
	.comm	HB_ERROR_CANCELED,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_test.c_EventLoop.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"\012Encoding Quit by user command\012\000"
	.align	2
.LC1:
	.ascii	"\012Encoding Paused by user command, 'r' to resume\012"
	.ascii	"\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	EventLoop
	.syntax unified
	.arm
	.fpu softvfp
	.type	EventLoop, %function
EventLoop:
	@ args = 0, pretend = 0, frame = 280
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r7, .L34
	ldr	r8, .L34+4
	ldr	r2, [r7]
	sub	sp, sp, #292
	cmp	r2, r3
	ldr	r2, .L34+8
	ldr	r2, [r2]
	str	r2, [sp, #284]
	mov	r2,#0
	str	r3, [r8]
	bne	.L2
	mov	r5, r0
	mov	r6, r1
	ldr	r4, .L34+12
	ldr	r10, .L34+16
	b	.L14
.L5:
	mov	r0, #200
	bl	hb_snooze
	mov	r1, r6
	mov	r0, r5
	bl	HandleEvents
	ldr	r2, [r7]
	ldr	r3, [r8]
	orrs	r3, r2, r3
	bne	.L2
.L14:
	mov	fp, #0
	add	r0, sp, #12
	str	r10, [sp, #16]
	str	fp, [sp, #20]
	bl	FD_ZERO
	add	r1, sp, #12
	ldr	r0, [r4]
	bl	FD_SET
	ldr	r0, [r4]
	add	r3, sp, #16
	str	r3, [sp]
	mov	r2, fp
	mov	r3, fp
	add	r0, r0, #1
	add	r1, sp, #12
	bl	select
	cmp	r0, fp
	addgt	r9, sp, #24
	ble	.L5
	b	.L4
.L7:
	ldrb	r3, [r3]	@ zero_extendqisi2
	add	r9, r9, #1
	cmp	r3, #10
	beq	.L6
	add	fp, fp, #1
	cmp	fp, #256
	beq	.L6
.L4:
	mov	r2, #1
	mov	r1, r9
	ldr	r0, [r4]
	bl	read
	cmp	r0, #0
	mov	r3, r9
	bgt	.L7
	add	r3, sp, #288
	add	fp, r3, fp
	ldrb	r3, [fp, #-264]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L5
.L6:
	ldrb	r3, [sp, #24]	@ zero_extendqisi2
	sub	r3, r3, #104
	cmp	r3, #10
	ldrls	pc, [pc, r3, asl #2]
	b	.L5
.L10:
	.word	.L13
	.word	.L5
	.word	.L5
	.word	.L5
	.word	.L5
	.word	.L5
	.word	.L5
	.word	.L5
	.word	.L12
	.word	.L11
	.word	.L9
.L2:
	mov	r2, #0
	ldr	r3, .L34+20
	str	r2, [r3]
	ldr	r3, .L34+8
	ldr	r2, [r3]
	ldr	r3, [sp, #284]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L33
	add	sp, sp, #292
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L9:
	mov	r0, r5
	bl	hb_system_sleep_prevent
	mov	r0, r5
	bl	hb_resume
	b	.L5
.L11:
	ldr	r3, .L34+24
	ldr	r1, .L34+28
	ldr	r0, [r3]
	bl	fprintf
	mov	r2, #1
	ldr	r3, .L34+32
	str	r2, [r7]
	ldr	r3, [r3]
	ldr	r2, .L34+36
	str	r3, [r2]
	b	.L5
.L12:
	ldr	r3, .L34+24
	ldr	r1, .L34+40
	ldr	r0, [r3]
	bl	fprintf
	mov	r0, r5
	bl	hb_pause
	mov	r0, r5
	bl	hb_system_sleep_allow
	b	.L5
.L13:
	bl	ShowCommands
	b	.L5
.L33:
	bl	__stack_chk_fail
.L35:
	.align	2
.L34:
	.word	die
	.word	work_done
	.word	.LC2
	.word	STDIN_FILENO
	.word	100000
	.word	job_running
	.word	stdout
	.word	.LC0
	.word	HB_ERROR_CANCELED
	.word	done_error
	.word	.LC1
	.size	EventLoop, .-EventLoop
	.comm	work_done,4,4
	.comm	stdout,4,4
	.comm	job_running,4,4
	.comm	done_error,4,4
	.comm	die,4,4
	.comm	STDIN_FILENO,4,4
	.comm	HB_ERROR_CANCELED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
