	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tui_dispatch_ctrl_char         ## -- Begin function tui_dispatch_ctrl_char
	.p2align	4, 0x90
_tui_dispatch_ctrl_char:                ## @tui_dispatch_ctrl_char
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	xorl	%eax, %eax
	callq	_tui_win_with_focus
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %r12
	movq	_TUI_CMD_WIN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %r12
	je	LBB0_11
## %bb.2:
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movb	(%r15), %al
	testb	%al, %al
	je	LBB0_6
## %bb.4:
	movq	%r15, %rbx
	incq	%rbx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	%al, %edi
	callq	_toupper
	movb	%al, -1(%rbx)
	movzbl	(%rbx), %eax
	incq	%rbx
	testb	%al, %al
	jne	LBB0_5
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_13
LBB0_7:
	movl	%r14d, %ebx
LBB0_8:
	leal	-128(%rbx), %eax
	cmpl	$7, %eax
	ja	LBB0_21
## %bb.9:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_10:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_tui_scroll_backward
	jmp	LBB0_29
LBB0_13:
	movl	%r14d, %edi
	callq	_key_is_start_sequence
	testq	%rax, %rax
	je	LBB0_7
## %bb.14:
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	callq	_key_is_end_sequence
	testl	%eax, %eax
	jne	LBB0_30
## %bb.15:
	xorl	%r15d, %r15d
	movq	_ERR@GOTPCREL(%rip), %r13
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	%eax, %edi
	callq	_key_is_end_sequence
	movl	%ebx, %r15d
	testl	%eax, %eax
	jne	LBB0_8
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_wgetch
	cmpl	%eax, (%r13)
	je	LBB0_11
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	$132, %ebx
	cmpl	$53, %eax
	je	LBB0_16
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	cmpl	$54, %eax
	jne	LBB0_32
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	$133, %ebx
	jmp	LBB0_16
LBB0_11:
	movl	%r14d, %r13d
	jmp	LBB0_30
LBB0_21:
	movl	%ebx, %r13d
	cmpl	$12, %ebx
	jne	LBB0_30
## %bb.22:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_tui_refresh_all_win
	jmp	LBB0_30
LBB0_23:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_tui_scroll_forward
	jmp	LBB0_29
LBB0_25:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_tui_scroll_left
	jmp	LBB0_29
LBB0_26:
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_tui_scroll_backward
	jmp	LBB0_30
LBB0_27:
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_tui_scroll_forward
	jmp	LBB0_30
LBB0_28:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_tui_scroll_right
LBB0_29:
	xorl	%r13d, %r13d
LBB0_30:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_32:
	xorl	%r13d, %r13d
	movl	%r15d, %ebx
	testl	%eax, %eax
	je	LBB0_8
	jmp	LBB0_30
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_25, LBB0_25-LJTI0_0
.set L0_0_set_26, LBB0_26-LJTI0_0
.set L0_0_set_27, LBB0_27-LJTI0_0
.set L0_0_set_28, LBB0_28-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_23
	.long	L0_0_set_25
	.long	L0_0_set_26
	.long	L0_0_set_27
	.long	L0_0_set_28
	.long	L0_0_set_23
	.end_data_region
                                        ## -- End function
	.comm	_TUI_CMD_WIN,8,3                ## @TUI_CMD_WIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TERM"

L_.str.1:                               ## @.str.1
	.asciz	"XTERM"

	.comm	_ERR,4,2                        ## @ERR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tui_dispatch_ctrl_char         ; -- Begin function tui_dispatch_ctrl_char
	.p2align	2
_tui_dispatch_ctrl_char:                ; @tui_dispatch_ctrl_char
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
	bl	_tui_win_with_focus
	cbz	x0, LBB0_19
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _TUI_CMD_WIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TUI_CMD_WIN@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_19
; %bb.2:
	ldr	x21, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	mov	x22, x0
	cbz	x0, LBB0_6
; %bb.3:
	ldrb	w8, [x22]
	cbz	w8, LBB0_6
; %bb.4:
	add	x23, x22, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	sxtb	w0, w8
	bl	_toupper
	sturb	w0, [x23, #-1]
	ldrb	w8, [x23], #1
	cbnz	w8, LBB0_5
LBB0_6:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_strcmp
	cbz	x0, LBB0_11
LBB0_7:
	mov	x22, x20
LBB0_8:
	sub	w8, w22, #128
	cmp	w8, #7
	b.hi	LBB0_20
; %bb.9:
Lloh7:
	adrp	x9, lJTI0_0@PAGE
Lloh8:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_10
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_10:
	mov	x0, x19
	mov	w1, #1
	bl	_tui_scroll_backward
	b	LBB0_27
LBB0_11:
	mov	x0, x20
	bl	_key_is_start_sequence
	cbz	x0, LBB0_7
; %bb.12:
	mov	w0, #0
	bl	_key_is_end_sequence
	mov	w22, #0
	cbnz	w0, LBB0_28
; %bb.13:
	mov	w22, #0
Lloh9:
	adrp	x23, _ERR@GOTPAGE
Lloh10:
	ldr	x23, [x23, _ERR@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	w22, #132
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_key_is_end_sequence
	cbnz	w0, LBB0_8
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_wgetch
	ldr	w8, [x23]
	cmp	w8, w0
	b.eq	LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	cmp	w0, #53
	b.eq	LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	cmp	w0, #54
	b.ne	LBB0_29
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	w22, #133
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_key_is_end_sequence
	cbz	w0, LBB0_15
	b	LBB0_8
LBB0_19:
	mov	x22, x20
	b	LBB0_28
LBB0_20:
	cmp	w22, #12
	b.ne	LBB0_28
; %bb.21:
	bl	_tui_refresh_all_win
	b	LBB0_27
LBB0_22:
	mov	x0, x19
	mov	w1, #1
	bl	_tui_scroll_forward
	b	LBB0_27
LBB0_23:
	mov	x0, x19
	mov	w1, #1
	bl	_tui_scroll_left
	b	LBB0_27
LBB0_24:
	mov	x0, x19
	mov	w1, #0
	bl	_tui_scroll_backward
	b	LBB0_27
LBB0_25:
	mov	x0, x19
	mov	w1, #0
	bl	_tui_scroll_forward
	b	LBB0_27
LBB0_26:
	mov	x0, x19
	mov	w1, #1
	bl	_tui_scroll_right
LBB0_27:
	mov	w22, #0
LBB0_28:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_29:
	cbz	w0, LBB0_8
	b	LBB0_27
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_10-LBB0_10)>>2
	.byte	(LBB0_10-LBB0_10)>>2
	.byte	(LBB0_22-LBB0_10)>>2
	.byte	(LBB0_23-LBB0_10)>>2
	.byte	(LBB0_24-LBB0_10)>>2
	.byte	(LBB0_25-LBB0_10)>>2
	.byte	(LBB0_26-LBB0_10)>>2
	.byte	(LBB0_22-LBB0_10)>>2
                                        ; -- End function
	.comm	_TUI_CMD_WIN,8,3                ; @TUI_CMD_WIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TERM"

l_.str.1:                               ; @.str.1
	.asciz	"XTERM"

	.comm	_ERR,4,2                        ; @ERR
.subsections_via_symbols
