	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function shell
_shell:                                 ## @shell
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %r14d
	xorl	%eax, %eax
	callq	_setcommandmode
	leaq	-48(%rbp), %rdi
	leaq	-40(%rbp), %rsi
	callq	_TerminalWindowSize
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_fork
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	cmpl	$-1, %eax
	je	LBB0_2
## %bb.4:
	xorl	%edi, %edi
	callq	_wait
	leaq	-32(%rbp), %rdi
	leaq	-24(%rbp), %rsi
	callq	_TerminalWindowSize
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	movq	_connected@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_10
## %bb.6:
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.7:
	movq	-48(%rbp), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	movq	-40(%rbp), %rax
	cmpq	-24(%rbp), %rax
	je	LBB0_10
LBB0_9:
	xorl	%eax, %eax
	callq	_sendnaws
LBB0_10:
	movl	$1, %eax
LBB0_11:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movl	%r14d, %edi
	callq	_shell.cold.1
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_perror
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function shell.cold.1
_shell.cold.1:                          ## @shell.cold.1
	.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
	movl	%edi, %r14d
	leaq	L_.str.1(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	leaq	L_.str.2(%rip), %rbx
	cmovneq	%rax, %rbx
	pushq	$47
	popq	%rsi
	movq	%rbx, %rdi
	callq	_strrchr
	leaq	1(%rax), %rsi
	testq	%rax, %rax
	cmoveq	%rbx, %rsi
	cmpl	$1, %r14d
	jle	LBB1_1
## %bb.2:
	movq	_saveline@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	addq	$4, %rcx
	leaq	L_.str.3(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%r8d, %r8d
	xorl	%eax, %eax
	callq	_execl
	jmp	LBB1_3
LBB1_1:
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	_execl
LBB1_3:
	leaq	L_.str.4(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	__exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Fork failed\r\n"

L_.str.1:                               ## @.str.1
	.asciz	"SHELL"

L_.str.2:                               ## @.str.2
	.asciz	"/bin/sh"

L_.str.3:                               ## @.str.3
	.asciz	"-c"

	.comm	_saveline,8,3                   ## @saveline
L_.str.4:                               ## @.str.4
	.asciz	"Execl"

	.comm	_connected,4,2                  ## @connected
	.no_dead_strip	_shell
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function shell
_shell:                                 ; @shell
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_setcommandmode
	add	x0, sp, #24
	add	x1, sp, #16
	bl	_TerminalWindowSize
	mov	x19, x0
	bl	_fork
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.1:
	cbz	w0, LBB0_10
; %bb.2:
	mov	x0, #0
	bl	_wait
	add	x0, sp, #8
	mov	x1, sp
	bl	_TerminalWindowSize
	cbz	x0, LBB0_8
; %bb.3:
Lloh0:
	adrp	x8, _connected@GOTPAGE
Lloh1:
	ldr	x8, [x8, _connected@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_8
; %bb.4:
	cbz	x19, LBB0_7
; %bb.5:
	ldr	x8, [sp, #24]
	ldr	x9, [sp, #8]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	ldr	x8, [sp, #16]
	ldr	x9, [sp]
	cmp	x8, x9
	b.eq	LBB0_8
LBB0_7:
	bl	_sendnaws
LBB0_8:
	mov	w0, #1
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_9:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
	b	LBB0_8
LBB0_10:
	mov	x0, x20
	bl	_shell.cold.1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function shell.cold.1
_shell.cold.1:                          ; @shell.cold.1
	.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
	mov	x20, x0
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_getenv
Lloh7:
	adrp	x8, l_.str.2@PAGE
Lloh8:
	add	x8, x8, l_.str.2@PAGEOFF
	cmp	x0, #0
	csel	x19, x8, x0, eq
	mov	x0, x19
	mov	w1, #47
	bl	_strrchr
	cmp	x0, #0
	csinc	x1, x19, x0, eq
	cmp	w20, #1
	b.le	LBB1_2
; %bb.1:
Lloh9:
	adrp	x8, _saveline@GOTPAGE
Lloh10:
	ldr	x8, [x8, _saveline@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	add	x8, x8, #4
	stp	x8, xzr, [sp]
Lloh12:
	adrp	x2, l_.str.3@PAGE
Lloh13:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	b	LBB1_3
LBB1_2:
	mov	x0, x19
	mov	x2, #0
LBB1_3:
	bl	_execl
Lloh14:
	adrp	x0, l_.str.4@PAGE
Lloh15:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_perror
	mov	w0, #1
	bl	__exit
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Fork failed\r\n"

l_.str.1:                               ; @.str.1
	.asciz	"SHELL"

l_.str.2:                               ; @.str.2
	.asciz	"/bin/sh"

l_.str.3:                               ; @.str.3
	.asciz	"-c"

	.comm	_saveline,8,3                   ; @saveline
l_.str.4:                               ; @.str.4
	.asciz	"Execl"

	.comm	_connected,4,2                  ; @connected
	.no_dead_strip	_shell
.subsections_via_symbols
