	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function process_cmd
_process_cmd:                           ## @process_cmd
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_currbuf_valid@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_cmdbuf_len@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	je	LBB0_1
## %bb.2:
	movl	$10, %edi
	callq	_putchar
	movq	_cmdbuf@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	(%rbx), %rcx
	movb	$0, (%rax,%rcx)
	movq	(%r14), %rdi
	callq	_history_add
	movq	_cmdbuf_pos@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	$0, (%rbx)
	movq	_edit_cb_ctx@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r14), %rsi
	callq	_edit_cmd_cb
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rdi
LBB0_3:
	movq	_ps2@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	leaq	L_.str.1(%rip), %rsi
	cmovneq	%rax, %rsi
	xorl	%eax, %eax
	callq	_printf
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_fflush                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_currbuf_valid,8,3              ## @currbuf_valid
	.comm	_cmdbuf_len,8,3                 ## @cmdbuf_len
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n%s> "

	.comm	_ps2,8,3                        ## @ps2
L_.str.1:                               ## @.str.1
	.space	1

	.comm	_stdout,4,2                     ## @stdout
	.comm	_cmdbuf,8,3                     ## @cmdbuf
	.comm	_cmdbuf_pos,8,3                 ## @cmdbuf_pos
	.comm	_edit_cb_ctx,4,2                ## @edit_cb_ctx
L_.str.3:                               ## @.str.3
	.asciz	"%s> "

	.no_dead_strip	_process_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function process_cmd
_process_cmd:                           ; @process_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
Lloh0:
	adrp	x8, _currbuf_valid@GOTPAGE
Lloh1:
	ldr	x8, [x8, _currbuf_valid@GOTPAGEOFF]
Lloh2:
	str	xzr, [x8]
Lloh3:
	adrp	x19, _cmdbuf_len@GOTPAGE
Lloh4:
	ldr	x19, [x19, _cmdbuf_len@GOTPAGEOFF]
	ldr	x8, [x19]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w0, #10
	bl	_putchar
Lloh5:
	adrp	x20, _cmdbuf@GOTPAGE
Lloh6:
	ldr	x20, [x20, _cmdbuf@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x9, [x19]
	strb	wzr, [x8, x9]
	ldr	x0, [x20]
	bl	_history_add
Lloh7:
	adrp	x8, _cmdbuf_pos@GOTPAGE
Lloh8:
	ldr	x8, [x8, _cmdbuf_pos@GOTPAGEOFF]
Lloh9:
	str	xzr, [x8]
	str	xzr, [x19]
Lloh10:
	adrp	x8, _edit_cb_ctx@GOTPAGE
Lloh11:
	ldr	x8, [x8, _edit_cb_ctx@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	ldr	x1, [x20]
	bl	_edit_cmd_cb
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_3
LBB0_2:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
LBB0_3:
Lloh17:
	adrp	x8, _ps2@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ps2@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
Lloh20:
	adrp	x9, l_.str.1@PAGE
Lloh21:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	x8, #0
	csel	x8, x9, x8, eq
	str	x8, [sp]
	bl	_printf
Lloh22:
	adrp	x8, _stdout@GOTPAGE
Lloh23:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_fflush
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_currbuf_valid,8,3              ; @currbuf_valid
	.comm	_cmdbuf_len,8,3                 ; @cmdbuf_len
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n%s> "

	.comm	_ps2,8,3                        ; @ps2
l_.str.1:                               ; @.str.1
	.space	1

	.comm	_stdout,4,2                     ; @stdout
	.comm	_cmdbuf,8,3                     ; @cmdbuf
	.comm	_cmdbuf_pos,8,3                 ; @cmdbuf_pos
	.comm	_edit_cb_ctx,4,2                ; @edit_cb_ctx
l_.str.3:                               ; @.str.3
	.asciz	"%s> "

	.no_dead_strip	_process_cmd
.subsections_via_symbols
