	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function console
_console:                               ## @console
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_uart_available
	testl	%eax, %eax
	je	LBB0_12
## %bb.1:
	xorl	%eax, %eax
	callq	_uart_getchar
	movl	%eax, %ebx
	movsbl	%bl, %edi
	callq	_uart_putchar
	cmpl	$13, %ebx
	je	LBB0_6
## %bb.2:
	cmpl	$8, %ebx
	je	LBB0_7
## %bb.3:
	testl	%ebx, %ebx
	jne	LBB0_8
## %bb.4:
	movl	$1, %ebx
	cmpb	$0, _console.breaked(%rip)
	jne	LBB0_12
## %bb.5:
	leaq	L_.str(%rip), %rdi
	callq	_print
	movb	$1, _console.breaked(%rip)
	jmp	LBB0_12
LBB0_6:
	movl	$10, %edi
	callq	_uart_putchar
	xorl	%eax, %eax
	callq	_iwrap_buf_send
	jmp	LBB0_11
LBB0_7:
	xorl	%eax, %eax
	callq	_iwrap_buf_del
	jmp	LBB0_11
LBB0_8:
	cmpb	$1, _console.breaked(%rip)
	jne	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rdi
	callq	_print
	movl	%ebx, %edi
	callq	_console_command
	movb	$0, _console.breaked(%rip)
	jmp	LBB0_11
LBB0_10:
	movl	%ebx, %edi
	callq	_iwrap_buf_add
LBB0_11:
	movl	$1, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_console.breaked,1,2 ## @console.breaked
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"break(? for help): "

L_.str.1:                               ## @.str.1
	.asciz	"\n"

	.no_dead_strip	_console
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function console
_console:                               ; @console
	.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
	bl	_uart_available
	cbz	w0, LBB0_6
; %bb.1:
	bl	_uart_getchar
	mov	x19, x0
	sxtb	w0, w0
	bl	_uart_putchar
	cmp	w19, #13
	b.eq	LBB0_7
; %bb.2:
	cmp	w19, #8
	b.eq	LBB0_8
; %bb.3:
	adrp	x20, _console.breaked@PAGE
	cbnz	w19, LBB0_9
; %bb.4:
	ldrb	w8, [x20, _console.breaked@PAGEOFF]
	mov	w19, #1
	tbnz	w8, #0, LBB0_13
; %bb.5:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_print
	strb	w19, [x20, _console.breaked@PAGEOFF]
	b	LBB0_13
LBB0_6:
	mov	w19, #0
	b	LBB0_13
LBB0_7:
	mov	w0, #10
	bl	_uart_putchar
	bl	_iwrap_buf_send
	b	LBB0_12
LBB0_8:
	bl	_iwrap_buf_del
	b	LBB0_12
LBB0_9:
	ldrb	w8, [x20, _console.breaked@PAGEOFF]
	cmp	w8, #1
	b.ne	LBB0_11
; %bb.10:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_print
	mov	x0, x19
	bl	_console_command
	strb	wzr, [x20, _console.breaked@PAGEOFF]
	b	LBB0_12
LBB0_11:
	mov	x0, x19
	bl	_iwrap_buf_add
LBB0_12:
	mov	w19, #1
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_console.breaked,1,2 ; @console.breaked
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"break(? for help): "

l_.str.1:                               ; @.str.1
	.asciz	"\n"

	.no_dead_strip	_console
.subsections_via_symbols
