	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EventLoop                      ## -- Begin function EventLoop
	.p2align	4, 0x90
_EventLoop:                             ## @EventLoop
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$312, %rsp                      ## imm = 0x138
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -328(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_work_done@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_die@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_16
## %bb.1:
	movq	%rdi, %r15
	leaq	-332(%rbp), %rbx
	movq	_STDIN_FILENO@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	$0, -344(%rbp)
	movl	$100000, -352(%rbp)             ## imm = 0x186A0
	movq	%rbx, %rdi
	callq	_FD_ZERO
	movq	(%r12), %rdi
	movq	%rbx, %rsi
	callq	_FD_SET
	movq	(%r12), %rdi
	incq	%rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	leaq	-352(%rbp), %r8
	callq	_select
	testl	%eax, %eax
	jle	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r12), %rdi
	leaq	(%r14,%rbp), %r13
	addq	$-320, %r13                     ## imm = 0xFEC0
	movq	%r13, %rsi
	movl	$1, %edx
	callq	_read
	testq	%rax, %rax
	jle	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpb	$10, (%r13)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	incq	%r14
	cmpq	$256, %r14                      ## imm = 0x100
	jne	LBB0_4
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$10, -320(%rbp,%r14)
	jne	LBB0_14
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movsbl	-320(%rbp), %eax
	addl	$-104, %eax
	cmpl	$10, %eax
	ja	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_ShowCommands
	jmp	LBB0_14
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_fprintf
	movq	%r15, %rdi
	callq	_hb_pause
	movq	%r15, %rdi
	callq	_hb_system_sleep_allow
	jmp	LBB0_14
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movq	_HB_ERROR_CANCELED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_done_error@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_die@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	jmp	LBB0_14
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_hb_system_sleep_prevent
	movq	%r15, %rdi
	callq	_hb_resume
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$200, %edi
	callq	_hb_snooze
	movq	%r15, %rdi
	movq	-328(%rbp), %rsi                ## 8-byte Reload
	callq	_HandleEvents
	movq	_die@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_work_done@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
LBB0_16:
	movq	_job_running@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	addq	$312, %rsp                      ## imm = 0x138
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
LJTI0_0:
	.long	L0_0_set_13
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_14
	.long	L0_0_set_11
	.long	L0_0_set_10
	.long	L0_0_set_12
	.end_data_region
                                        ## -- End function
	.comm	_work_done,8,3                  ## @work_done
	.comm	_die,4,2                        ## @die
	.comm	_STDIN_FILENO,8,3               ## @STDIN_FILENO
	.comm	_stdout,4,2                     ## @stdout
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\nEncoding Quit by user command\n"

	.comm	_HB_ERROR_CANCELED,4,2          ## @HB_ERROR_CANCELED
	.comm	_done_error,4,2                 ## @done_error
L_.str.1:                               ## @.str.1
	.asciz	"\nEncoding Paused by user command, 'r' to resume\n"

	.comm	_job_running,8,3                ## @job_running
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EventLoop                      ; -- Begin function EventLoop
	.p2align	2
_EventLoop:                             ; @EventLoop
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #400
	.cfi_def_cfa_offset 400
	stp	x28, x27, [sp, #304]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #320]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #336]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #352]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #368]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #384]            ; 16-byte Folded Spill
	add	x29, sp, #384
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
Lloh3:
	adrp	x24, _work_done@GOTPAGE
Lloh4:
	ldr	x24, [x24, _work_done@GOTPAGEOFF]
	str	xzr, [x24]
Lloh5:
	adrp	x25, _die@GOTPAGE
Lloh6:
	ldr	x25, [x25, _die@GOTPAGEOFF]
	ldr	w8, [x25]
	cbz	w8, LBB0_3
LBB0_1:
Lloh7:
	adrp	x8, _job_running@GOTPAGE
Lloh8:
	ldr	x8, [x8, _job_running@GOTPAGEOFF]
Lloh9:
	str	xzr, [x8]
	ldur	x8, [x29, #-96]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.2:
	ldp	x29, x30, [sp, #384]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #368]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #352]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #336]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #320]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #304]            ; 16-byte Folded Reload
	add	sp, sp, #400
	ret
LBB0_3:
	mov	x19, x1
	mov	x20, x0
	mov	w26, #34464
	movk	w26, #1, lsl #16
Lloh13:
	adrp	x27, _STDIN_FILENO@GOTPAGE
Lloh14:
	ldr	x27, [x27, _STDIN_FILENO@GOTPAGEOFF]
	add	x28, sp, #31
Lloh15:
	adrp	x21, lJTI0_0@PAGE
Lloh16:
	add	x21, x21, lJTI0_0@PAGEOFF
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	bl	_ShowCommands
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #200
	bl	_hb_snooze
	mov	x0, x20
	mov	x1, x19
	bl	_HandleEvents
	ldr	w8, [x25]
	ldr	x9, [x24]
	cmp	w8, #0
	ccmp	x9, #0, #0, eq
	b.ne	LBB0_1
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	str	xzr, [sp, #16]
	str	w26, [sp, #8]
	add	x0, sp, #24
	bl	_FD_ZERO
	ldr	x0, [x27]
	add	x1, sp, #24
	bl	_FD_SET
	ldr	x8, [x27]
	add	x0, x8, #1
	add	x1, sp, #24
	add	x4, sp, #8
	mov	x2, #0
	mov	x3, #0
	bl	_select
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x22, #0
LBB0_8:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [x27]
	add	x23, x28, x22
	mov	x1, x23
	mov	w2, #1
	bl	_read
	cmp	x0, #1
	b.lt	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	ldrb	w8, [x23]
	cmp	w8, #10
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	add	x22, x22, #1
	cmp	x22, #256
	b.ne	LBB0_8
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x28, x22]
	cmp	w8, #10
	b.ne	LBB0_5
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrsb	w8, [sp, #31]
	sub	w8, w8, #104
	cmp	w8, #10
	b.hi	LBB0_5
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	adr	x9, LBB0_4
	ldrb	w10, [x21, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh17:
	adrp	x8, _stdout@GOTPAGE
Lloh18:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	mov	x0, x20
	bl	_hb_pause
	mov	x0, x20
	bl	_hb_system_sleep_allow
	b	LBB0_5
LBB0_15:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh22:
	adrp	x8, _stdout@GOTPAGE
Lloh23:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
Lloh27:
	adrp	x8, _HB_ERROR_CANCELED@GOTPAGE
Lloh28:
	ldr	x8, [x8, _HB_ERROR_CANCELED@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
Lloh30:
	adrp	x9, _done_error@GOTPAGE
Lloh31:
	ldr	x9, [x9, _done_error@GOTPAGEOFF]
Lloh32:
	str	w8, [x9]
	mov	w8, #1
	str	w8, [x25]
	b	LBB0_5
LBB0_16:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	bl	_hb_system_sleep_prevent
	mov	x0, x20
	bl	_hb_resume
	b	LBB0_5
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_14-LBB0_4)>>2
	.byte	(LBB0_15-LBB0_4)>>2
	.byte	(LBB0_16-LBB0_4)>>2
                                        ; -- End function
	.comm	_work_done,8,3                  ; @work_done
	.comm	_die,4,2                        ; @die
	.comm	_STDIN_FILENO,8,3               ; @STDIN_FILENO
	.comm	_stdout,4,2                     ; @stdout
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\nEncoding Quit by user command\n"

	.comm	_HB_ERROR_CANCELED,4,2          ; @HB_ERROR_CANCELED
	.comm	_done_error,4,2                 ; @done_error
l_.str.1:                               ; @.str.1
	.asciz	"\nEncoding Paused by user command, 'r' to resume\n"

	.comm	_job_running,8,3                ; @job_running
.subsections_via_symbols
