	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tui_getc                       ## -- Begin function tui_getc
	.p2align	4, 0x90
_tui_getc:                              ## @tui_getc
	.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
	movq	_TUI_CMD_WIN@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	16(%rax), %r14
	movq	%r14, %rdi
	callq	_wgetch
	movl	%eax, %edi
	callq	_tui_handle_resize_during_io
	movl	%eax, %ebx
	cmpl	$10, %eax
	jne	LBB0_4
## %bb.1:
	movq	_rl_end@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	(%r15), %rax
	movl	8(%rax), %esi
	je	LBB0_2
## %bb.3:
	movq	(%rax), %rdx
	movq	%r14, %rdi
	callq	_wmove
	movq	%r14, %rdi
	movl	$10, %esi
	callq	_waddch
	jmp	LBB0_4
LBB0_2:
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_wmove
	movq	%r14, %rdi
	callq	_wclrtoeol
	movq	%r14, %rdi
	callq	_wrefresh
	movl	$20, %edi
	callq	_napms
LBB0_4:
	movl	%ebx, %edi
	callq	_key_is_command_char
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	%ebx, %edi
	callq	_tui_dispatch_ctrl_char
	movl	%eax, %ebx
LBB0_6:
	cmpl	$13, %ebx
	ja	LBB0_9
## %bb.7:
	movl	$13312, %eax                    ## imm = 0x3400
	btl	%ebx, %eax
	jae	LBB0_9
## %bb.8:
	movq	(%r15), %rax
	movq	$0, (%rax)
LBB0_9:
	movq	_KEY_BACKSPACE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	movl	$8, %eax
	cmovnel	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TUI_CMD_WIN,8,3                ## @TUI_CMD_WIN
	.comm	_rl_end,8,3                     ## @rl_end
	.comm	_KEY_BACKSPACE,4,2              ## @KEY_BACKSPACE
	.comm	_GDB_READABLE,4,2               ## @GDB_READABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tui_getc                       ; -- Begin function tui_getc
	.p2align	2
_tui_getc:                              ; @tui_getc
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x21, _TUI_CMD_WIN@GOTPAGE
Lloh1:
	ldr	x21, [x21, _TUI_CMD_WIN@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x20, [x8, #16]
	mov	x0, x20
	bl	_wgetch
	bl	_tui_handle_resize_during_io
	mov	x19, x0
	cmp	w0, #10
	b.ne	LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _rl_end@GOTPAGE
Lloh3:
	ldr	x8, [x8, _rl_end@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x8]
	ldr	x8, [x21]
	ldr	w1, [x8, #8]
	cbz	x9, LBB0_3
; %bb.2:
	ldr	x2, [x8]
	mov	x0, x20
	bl	_wmove
	mov	x0, x20
	mov	w1, #10
	bl	_waddch
	b	LBB0_4
LBB0_3:
	mov	x0, x20
	mov	x2, #0
	bl	_wmove
	mov	x0, x20
	bl	_wclrtoeol
	mov	x0, x20
	bl	_wrefresh
	mov	w0, #20
	bl	_napms
LBB0_4:
	mov	x0, x19
	bl	_key_is_command_char
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_tui_dispatch_ctrl_char
	mov	x19, x0
LBB0_6:
	cmp	w19, #13
	mov	w8, #1
	lsl	w8, w8, w19
	mov	w9, #13312
	and	w8, w8, w9
	ccmp	w8, #0, #4, ls
	b.eq	LBB0_8
; %bb.7:
	ldr	x8, [x21]
	str	xzr, [x8]
LBB0_8:
Lloh5:
	adrp	x8, _KEY_BACKSPACE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _KEY_BACKSPACE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	mov	w9, #8
	cmp	w19, w8
	csel	w0, w9, w19, eq
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_TUI_CMD_WIN,8,3                ; @TUI_CMD_WIN
	.comm	_rl_end,8,3                     ; @rl_end
	.comm	_KEY_BACKSPACE,4,2              ; @KEY_BACKSPACE
	.comm	_GDB_READABLE,4,2               ; @GDB_READABLE
.subsections_via_symbols
