	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sscr_insert
_sscr_insert:                           ## @sscr_insert
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	callq	_EXP
	movq	%rax, %rbx
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	callq	_db_last
	movl	$1, %r14d
	testq	%rax, %rax
	jne	LBB0_17
## %bb.1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movl	$1024, %ecx                     ## imm = 0x400
	callq	_GET_SPACE_RETC
	movq	16(%r13), %r14
	leaq	-64(%rbp), %r12
	leaq	-68(%rbp), %rbx
	leaq	-88(%rbp), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_read
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	testl	%eax, %eax
	je	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rcx
	callq	_sscr_matchprompt
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, -64(%rbp)
	je	LBB0_10
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	$0, -80(%rbp)
	movl	$100000, -88(%rbp)              ## imm = 0x186A0
	movq	%rbx, %rdi
	callq	_FD_ZERO
	movq	(%r14), %rdi
	movq	%rbx, %rsi
	callq	_FD_SET
	movq	(%r14), %rdi
	incq	%rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%r15, %r8
	callq	_select
	cmpl	$1, %eax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	callq	_memmove
	jmp	LBB0_2
LBB0_10:
	movq	%r13, %rdi
	callq	_sscr_setprompt
	testq	%rax, %rax
	movl	$1, %r14d
	jne	LBB0_17
## %bb.11:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%r9d, %r9d
	callq	_CHAR2INT5
	testq	%rax, %rax
	je	LBB0_12
## %bb.14:
	movq	_M_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_15
LBB0_5:
	movq	_M_SYSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
LBB0_15:
	movq	%r13, %rdi
	callq	_msgq
	movl	$1, %r14d
	jmp	LBB0_16
LBB0_4:
	callq	_sscr_end
	xorl	%r14d, %r14d
LBB0_16:
	movq	%r13, %rdi
	callq	_FREE_SPACE
LBB0_17:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	-48(%rbp), %rdx
	leaq	1(%rdx), %rax
	movq	%rax, -48(%rbp)
	movl	$1, %r14d
	movq	%r13, %rdi
	movl	$1, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%r8d, %r8d
	callq	_db_append
	testq	%rax, %rax
	jne	LBB0_16
## %bb.13:
	movq	-48(%rbp), %rax
	movq	%rax, 8(%r13)
	movq	$0, (%r13)
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_vs_refresh
	movl	%eax, %r14d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_M_SYSERR,4,2                   ## @M_SYSERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"shell"

	.comm	_M_ERR,4,2                      ## @M_ERR
L_.str.1:                               ## @.str.1
	.asciz	"323|Invalid input. Truncated."

	.comm	_MINREAD,4,2                    ## @MINREAD
	.no_dead_strip	_sscr_insert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sscr_insert
_sscr_insert:                           ; @sscr_insert
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x0
	bl	_EXP
	mov	x20, x0
	add	x1, sp, #16
	mov	x0, x19
	bl	_db_last
	cbz	x0, LBB0_2
LBB0_1:
	mov	w20, #1
	b	LBB0_16
LBB0_2:
	mov	x0, x19
	mov	w3, #1024
	bl	_GET_SPACE_RETC
	ldr	x21, [x19, #16]
	mov	w22, #34464
	movk	w22, #1, lsl #16
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	mov	w2, #1024
	bl	_read
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	w0, LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x3, sp, #8
	mov	x0, x19
	bl	_sscr_matchprompt
	cbz	w0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	str	xzr, [sp, #40]
	str	w22, [sp, #32]
	add	x0, sp, #28
	bl	_FD_ZERO
	ldr	x0, [x21]
	add	x1, sp, #28
	bl	_FD_SET
	ldr	x8, [x21]
	add	x0, x8, #1
	add	x1, sp, #28
	add	x4, sp, #32
	mov	x2, #0
	mov	x3, #0
	bl	_select
	cmp	w0, #1
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_memmove
	b	LBB0_3
LBB0_9:
	mov	x0, x19
	bl	_sscr_setprompt
	cbnz	x0, LBB0_1
; %bb.10:
	ldr	w1, [x20]
	mov	x0, x19
	mov	x5, #0
	bl	_CHAR2INT5
	cbz	x0, LBB0_17
; %bb.11:
Lloh0:
	adrp	x8, _M_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _M_ERR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str.1@PAGE
Lloh4:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_12:
Lloh5:
	adrp	x8, _M_SYSERR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _M_SYSERR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
LBB0_13:
	mov	x0, x19
	bl	_msgq
	mov	w20, #1
	b	LBB0_15
LBB0_14:
	mov	x0, x19
	bl	_sscr_end
	mov	w20, #0
LBB0_15:
	mov	x0, x19
	bl	_FREE_SPACE
LBB0_16:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_17:
	ldr	x2, [sp, #16]
	add	x8, x2, #1
	str	x8, [sp, #16]
	mov	w20, #1
	mov	x0, x19
	mov	w1, #1
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	x4, #0
	bl	_db_append
	cbnz	x0, LBB0_15
; %bb.18:
	ldr	x8, [sp, #16]
	stp	xzr, x8, [x19]
	mov	x0, x19
	mov	w1, #1
	bl	_vs_refresh
	mov	x20, x0
	b	LBB0_15
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_M_SYSERR,4,2                   ; @M_SYSERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"shell"

	.comm	_M_ERR,4,2                      ; @M_ERR
l_.str.1:                               ; @.str.1
	.asciz	"323|Invalid input. Truncated."

	.comm	_MINREAD,4,2                    ; @MINREAD
	.no_dead_strip	_sscr_insert
.subsections_via_symbols
