	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function keyboard_dispatch
_keyboard_dispatch:                     ## @keyboard_dispatch
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $edi killed $edi def $rdi
	movq	_ERR@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jne	LBB0_3
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINTR@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	je	LBB0_38
## %bb.2:
	movl	$1, %edi
	callq	_exit
LBB0_3:
	leal	-65(%rdi), %eax
	leal	32(%rdi), %r14d
	cmpl	$26, %eax
	cmovael	%edi, %r14d
	movq	_col@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	je	LBB0_9
LBB0_4:
	xorl	%eax, %eax
	callq	_erasechar
	cmpl	%eax, %r14d
	jne	LBB0_11
## %bb.5:
	movl	(%r15), %esi
	testl	%esi, %esi
	jle	LBB0_11
## %bb.6:
	cmpl	$1, %esi
	jne	LBB0_8
## %bb.7:
	movq	_line@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%ebx, %ebx
	cmpb	$58, (%rax)
	je	LBB0_38
LBB0_8:
	decl	%esi
	jmp	LBB0_37
LBB0_9:
	movl	$108, %edi
	callq	_CTRL
	cmpl	%eax, %r14d
	jne	LBB0_16
## %bb.10:
	movq	_curscr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_wrefresh
	xorl	%ebx, %ebx
	jmp	LBB0_38
LBB0_11:
	movl	$119, %edi
	callq	_CTRL
	cmpl	%eax, %r14d
	jne	LBB0_18
## %bb.12:
	movl	(%r15), %esi
	testl	%esi, %esi
	jle	LBB0_18
## %bb.13:
	decl	%esi
	movl	%esi, (%r15)
	movq	_line@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	movl	%esi, %ecx
	movsbl	(%rax,%rcx), %edi
	callq	_isspace
	movl	(%r15), %ecx
	testq	%rax, %rax
	je	LBB0_23
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	leal	-1(%rcx), %esi
	movl	%esi, (%r15)
	testl	%ecx, %ecx
	jg	LBB0_14
	jmp	LBB0_36
LBB0_16:
	movl	$103, %edi
	callq	_CTRL
	xorl	%ebx, %ebx
	cmpl	%eax, %r14d
	jne	LBB0_21
## %bb.17:
	xorl	%eax, %eax
	callq	_status
	jmp	LBB0_38
LBB0_18:
	xorl	%eax, %eax
	callq	_killchar
	cmpl	%eax, %r14d
	jne	LBB0_27
## %bb.19:
	cmpl	$0, (%r15)
	jle	LBB0_27
## %bb.20:
	movl	$0, (%r15)
	movq	_line@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%esi, %esi
	cmpb	$58, (%rax)
	sete	%sil
	jmp	LBB0_37
LBB0_21:
	cmpl	$58, %r14d
	jne	LBB0_38
## %bb.22:
	movq	_CMDLINE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_move
	xorl	%eax, %eax
	callq	_clrtoeol
	jmp	LBB0_4
LBB0_23:
	movl	%ecx, %esi
	testl	%ecx, %ecx
	js	LBB0_36
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	movl	%esi, %ecx
	movsbl	(%rax,%rcx), %edi
	callq	_isspace
	movl	(%r15), %ecx
	testq	%rax, %rax
	jne	LBB0_34
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=1
	testl	%ecx, %ecx
	je	LBB0_35
## %bb.26:                              ##   in Loop: Header=BB0_24 Depth=1
	leal	-1(%rcx), %esi
	movl	%esi, (%r15)
	testl	%ecx, %ecx
	jg	LBB0_24
	jmp	LBB0_36
LBB0_27:
	movl	%r14d, %edi
	callq	_isprint
	testq	%rax, %rax
	jne	LBB0_30
## %bb.28:
	cmpl	$32, %r14d
	je	LBB0_30
## %bb.29:
	movl	(%r15), %eax
	jmp	LBB0_31
LBB0_30:
	movq	_line@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%r15), %rcx
	movb	%r14b, (%rax,%rcx)
	movq	_CMDLINE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	movl	%r14d, %edx
	callq	_mvaddch
	movl	(%r15), %eax
	incl	%eax
	movl	%eax, (%r15)
LBB0_31:
	testl	%eax, %eax
	je	LBB0_33
## %bb.32:
	cmpl	$13, %r14d
	sete	%al
	cmpl	$10, %r14d
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %ebx
	jmp	LBB0_38
LBB0_33:
	xorl	%ebx, %ebx
	jmp	LBB0_38
LBB0_34:
	movl	%ecx, %esi
	jmp	LBB0_36
LBB0_35:
	movq	(%rbx), %rax
	movl	$-1, %esi
	movl	$1, %ebx
	cmpb	$58, (%rax)
	je	LBB0_38
LBB0_36:
	incl	%esi
LBB0_37:
	movl	%esi, (%r15)
	movq	_CMDLINE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_move
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_clrtoeol
LBB0_38:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERR,4,2                        ## @ERR
	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
	.comm	_col,4,2                        ## @col
	.comm	_curscr,4,2                     ## @curscr
	.comm	_CMDLINE,4,2                    ## @CMDLINE
	.comm	_line,8,3                       ## @line
	.no_dead_strip	_keyboard_dispatch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function keyboard_dispatch
_keyboard_dispatch:                     ; @keyboard_dispatch
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.ne	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _EINTR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EINTR@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_38
; %bb.2:
	mov	w0, #1
	bl	_exit
LBB0_3:
	sub	w8, w0, #65
	add	w9, w0, #32
	cmp	w8, #26
	csel	w19, w9, w0, lo
Lloh9:
	adrp	x20, _col@GOTPAGE
Lloh10:
	ldr	x20, [x20, _col@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_8
LBB0_4:
	bl	_erasechar
	cmp	w19, w0
	b.ne	LBB0_10
; %bb.5:
	ldr	w8, [x20]
	subs	w1, w8, #1
	b.lt	LBB0_10
; %bb.6:
	b.ne	LBB0_37
; %bb.7:
Lloh11:
	adrp	x8, _line@GOTPAGE
Lloh12:
	ldr	x8, [x8, _line@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldrb	w8, [x8]
	cmp	w8, #58
	b.ne	LBB0_37
	b	LBB0_38
LBB0_8:
	mov	w0, #108
	bl	_CTRL
	cmp	w19, w0
	b.ne	LBB0_15
; %bb.9:
Lloh14:
	adrp	x8, _curscr@GOTPAGE
Lloh15:
	ldr	x8, [x8, _curscr@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_wrefresh
	b	LBB0_38
LBB0_10:
	mov	w0, #119
	bl	_CTRL
	cmp	w19, w0
	b.ne	LBB0_17
; %bb.11:
	ldr	w8, [x20]
	subs	w8, w8, #1
	b.lt	LBB0_17
; %bb.12:
	str	w8, [x20]
Lloh17:
	adrp	x19, _line@GOTPAGE
Lloh18:
	ldr	x19, [x19, _line@GOTPAGEOFF]
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19]
	ldrsb	w0, [x9, w8, uxtw]
	bl	_isspace
	ldr	w8, [x20]
	cbz	x0, LBB0_22
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	subs	w8, w8, #1
	str	w8, [x20]
	b.ge	LBB0_13
	b	LBB0_36
LBB0_15:
	mov	w0, #103
	bl	_CTRL
	cmp	w19, w0
	b.ne	LBB0_20
; %bb.16:
	bl	_status
	b	LBB0_38
LBB0_17:
	bl	_killchar
	cmp	w19, w0
	b.ne	LBB0_26
; %bb.18:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_26
; %bb.19:
	str	wzr, [x20]
Lloh19:
	adrp	x8, _line@GOTPAGE
Lloh20:
	ldr	x8, [x8, _line@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	ldrb	w8, [x8]
	cmp	w8, #58
	cset	w1, eq
	b	LBB0_37
LBB0_20:
	cmp	w19, #58
	b.ne	LBB0_38
; %bb.21:
Lloh22:
	adrp	x8, _CMDLINE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CMDLINE@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_move
	bl	_clrtoeol
	b	LBB0_4
LBB0_22:
	tbnz	w8, #31, LBB0_36
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19]
	ldrsb	w0, [x9, w8, uxtw]
	bl	_isspace
	ldr	w9, [x20]
	cbnz	x0, LBB0_32
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	cbz	w9, LBB0_33
; %bb.25:                               ;   in Loop: Header=BB0_23 Depth=1
	sub	w8, w9, #1
	str	w8, [x20]
	cmp	w9, #0
	b.gt	LBB0_23
	b	LBB0_36
LBB0_26:
	mov	x0, x19
	bl	_isprint
	cbnz	x0, LBB0_29
; %bb.27:
	cmp	w19, #32
	b.eq	LBB0_29
; %bb.28:
	ldr	w8, [x20]
	b	LBB0_30
LBB0_29:
Lloh25:
	adrp	x8, _line@GOTPAGE
Lloh26:
	ldr	x8, [x8, _line@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	ldrsw	x9, [x20]
	strb	w19, [x8, x9]
Lloh28:
	adrp	x8, _CMDLINE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CMDLINE@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	ldr	w1, [x20]
	mov	x2, x19
	bl	_mvaddch
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
LBB0_30:
	cbz	w8, LBB0_38
; %bb.31:
	cmp	w19, #13
	ccmp	w19, #10, #4, ne
	cset	w0, eq
	b	LBB0_39
LBB0_32:
	mov	x8, x9
	add	w1, w9, #1
	b	LBB0_37
LBB0_33:
	ldr	x8, [x19]
	ldrb	w8, [x8]
	cmp	w8, #58
	b.ne	LBB0_35
; %bb.34:
	mov	w0, #1
	b	LBB0_39
LBB0_35:
	mov	w8, #-1
LBB0_36:
	add	w1, w8, #1
LBB0_37:
	str	w1, [x20]
Lloh31:
	adrp	x8, _CMDLINE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _CMDLINE@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	bl	_move
	bl	_clrtoeol
LBB0_38:
	mov	w0, #0
LBB0_39:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_ERR,4,2                        ; @ERR
	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
	.comm	_col,4,2                        ; @col
	.comm	_curscr,4,2                     ; @curscr
	.comm	_CMDLINE,4,2                    ; @CMDLINE
	.comm	_line,8,3                       ; @line
	.no_dead_strip	_keyboard_dispatch
.subsections_via_symbols
