	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function Terminal
_Terminal:                              ## @Terminal
	.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, %r12
	movq	$0, -72(%rbp)
	leaq	L_.str(%rip), %rax
	movl	%eax, -64(%rbp)
	movq	_InputHandler@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	leaq	-52(%rbp), %rdi
	callq	_sigemptyset
	movq	_SA_RESTART@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_SIGUSR1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-56(%rbp), %rsi
	leaq	-88(%rbp), %rdx
	callq	_sigaction
	movq	_want_sem_post@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	leaq	-44(%rbp), %r14
	leaq	-72(%rbp), %r15
	movq	_REC_SHOW@GOTPCREL(%rip), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r12), %edi
	movq	%rbx, %rsi
	callq	_write
	movl	(%r12), %edi
	movl	(%r13), %esi
	callq	_Receive
	testq	%rax, %rax
	jne	LBB0_5
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edx
	movl	8(%r12), %edi
	movq	%r14, %rsi
	callq	_SmartGets
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %rbx
	movl	-44(%rbp), %edx
	cmpl	$2, %edx
	jl	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	4(%r12), %edi
	movq	_H_ENTER@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdx
	movq	%r15, %rsi
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_history
	movl	-44(%rbp), %edx
	jmp	LBB0_4
LBB0_5:
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_InputHandler,4,2               ## @InputHandler
	.comm	_SA_RESTART,4,2                 ## @SA_RESTART
	.comm	_SIGUSR1,4,2                    ## @SIGUSR1
	.comm	_want_sem_post,4,2              ## @want_sem_post
	.comm	_H_ENTER,4,2                    ## @H_ENTER
	.comm	_REC_SHOW,4,2                   ## @REC_SHOW
	.no_dead_strip	_Terminal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function Terminal
_Terminal:                              ; @Terminal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	str	w8, [sp, #16]
Lloh2:
	adrp	x8, _InputHandler@GOTPAGE
Lloh3:
	ldr	x8, [x8, _InputHandler@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #56]
	add	x8, sp, #48
	orr	x0, x8, #0x4
	bl	_sigemptyset
Lloh5:
	adrp	x8, _SA_RESTART@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SA_RESTART@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [sp, #48]
Lloh8:
	adrp	x8, _SIGUSR1@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SIGUSR1@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	add	x1, sp, #48
	add	x2, sp, #32
	bl	_sigaction
Lloh11:
	adrp	x8, _want_sem_post@GOTPAGE
Lloh12:
	ldr	x8, [x8, _want_sem_post@GOTPAGEOFF]
	mov	w9, #1
Lloh13:
	str	w9, [x8]
Lloh14:
	adrp	x21, _H_ENTER@GOTPAGE
Lloh15:
	ldr	x21, [x21, _H_ENTER@GOTPAGEOFF]
Lloh16:
	adrp	x22, _REC_SHOW@GOTPAGE
Lloh17:
	ldr	x22, [x22, _REC_SHOW@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19]
	mov	x1, x20
	bl	_write
	ldr	w0, [x19]
	ldr	w1, [x22]
	bl	_Receive
	cbnz	x0, LBB0_5
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #8]
	ldr	w2, [x19]
	add	x1, sp, #28
	bl	_SmartGets
	cbz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x20, x0
	ldr	w2, [sp, #28]
	cmp	w2, #2
	b.lt	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #4]
	ldrsw	x2, [x21]
	str	x20, [sp]
	add	x1, sp, #8
	bl	_history
	ldr	w2, [sp, #28]
	b	LBB0_1
LBB0_5:
	mov	x0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_InputHandler,4,2               ; @InputHandler
	.comm	_SA_RESTART,4,2                 ; @SA_RESTART
	.comm	_SIGUSR1,4,2                    ; @SIGUSR1
	.comm	_want_sem_post,4,2              ; @want_sem_post
	.comm	_H_ENTER,4,2                    ; @H_ENTER
	.comm	_REC_SHOW,4,2                   ; @REC_SHOW
	.no_dead_strip	_Terminal
.subsections_via_symbols
