	.file	"1001671.c"
	.intel_syntax noprefix
	.text
	.globl	prompt
	.bss
	.align 32
	.type	prompt, @object
	.size	prompt, 256
prompt:
	.zero	256
	.globl	count
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.zero	4
	.globl	sigint_flag
	.align 4
	.type	sigint_flag, @object
	.size	sigint_flag, 4
sigint_flag:
	.zero	4
	.globl	inpbuf
	.align 32
	.type	inpbuf, @object
	.size	inpbuf, 1024
inpbuf:
	.zero	1024
	.globl	tokbuf
	.align 32
	.type	tokbuf, @object
	.size	tokbuf, 2048
tokbuf:
	.zero	2048
	.globl	ptr
	.section	.data.rel.local,"aw"
	.align 8
	.type	ptr, @object
	.size	ptr, 8
ptr:
	.quad	inpbuf
	.globl	tok
	.align 8
	.type	tok, @object
	.size	tok, 8
tok:
	.quad	tokbuf
	.globl	special
	.data
	.align 8
	.type	special, @object
	.size	special, 9
special:
	.string	" \t&;\n><|"
	.globl	history_fd
	.bss
	.align 4
	.type	history_fd, @object
	.size	history_fd, 4
history_fd:
	.zero	4
	.globl	history_begin
	.align 4
	.type	history_begin, @object
	.size	history_begin, 4
history_begin:
	.zero	4
	.globl	history_end
	.align 4
	.type	history_end, @object
	.size	history_end, 4
history_end:
	.zero	4
	.globl	history_index
	.align 4
	.type	history_index, @object
	.size	history_index, 4
history_index:
	.zero	4
	.globl	history
	.align 32
	.type	history, @object
	.size	history, 4000
history:
	.zero	4000
	.text
	.globl	signal_handler
	.type	signal_handler, @function
signal_handler:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR sigint_flag[rip], 1
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	signal_handler, .-signal_handler
	.local	act
	.comm	act,152,32
	.local	oact
	.comm	oact,152,32
	.local	set1
	.comm	set1,128,32
	.local	set2
	.comm	set2,128,32
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdx, oact[rip]
	mov	esi, 0
	mov	edi, 2
	call	sigaction@PLT
	lea	rax, signal_handler[rip]
	mov	QWORD PTR act[rip], rax
	mov	DWORD PTR act[rip+136], 0
	mov	edx, 0
	lea	rsi, act[rip]
	mov	edi, 2
	call	sigaction@PLT
	lea	rdi, set1[rip]
	call	sigfillset@PLT
	lea	rdi, set2[rip]
	call	sigemptyset@PLT
	mov	esi, 2
	lea	rdi, set1[rip]
	call	sigdelset@PLT
	mov	edx, 0
	lea	rsi, set1[rip]
	mov	edi, 2
	call	sigprocmask@PLT
	call	open_history_file
	call	setprompt
	jmp	.L3
.L4:
	lea	rdi, set1[rip]
	call	sigfillset@PLT
	mov	edx, 0
	lea	rsi, set1[rip]
	mov	edi, 2
	call	sigprocmask@PLT
	mov	rax, QWORD PTR ptr[rip]
	mov	rdi, rax
	call	add_command_into_history
	call	procline
	mov	esi, 2
	lea	rdi, set1[rip]
	call	sigdelset@PLT
	mov	edx, 0
	lea	rsi, set1[rip]
	mov	edi, 2
	call	sigprocmask@PLT
.L3:
	lea	rdi, prompt[rip]
	call	userin
	cmp	eax, -1
	jne	.L4
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.section	.rodata
.LC0:
	.string	"%3d\t%s"
	.text
	.globl	show_history
	.type	show_history, @function
show_history:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -8[rbp], 1
	mov	eax, DWORD PTR history_begin[rip]
	mov	DWORD PTR -4[rbp], eax
	jmp	.L7
.L10:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, history[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	eax, DWORD PTR history_index[rip]
	lea	ecx, -500[rax]
	mov	eax, DWORD PTR -8[rbp]
	add	eax, ecx
	test	eax, eax
	jle	.L8
	mov	eax, DWORD PTR history_index[rip]
	lea	ecx, -500[rax]
	mov	eax, DWORD PTR -8[rbp]
	add	eax, ecx
	jmp	.L9
.L8:
	mov	eax, DWORD PTR -8[rbp]
.L9:
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
	add	DWORD PTR -8[rbp], 1
.L7:
	mov	eax, DWORD PTR history_end[rip]
	cmp	DWORD PTR -4[rbp], eax
	jne	.L10
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	show_history, .-show_history
	.section	.rodata
.LC1:
	.string	"write error"
	.text
	.globl	add_command_into_history
	.type	add_command_into_history, @function
add_command_into_history:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -16[rbp], 1
	mov	DWORD PTR -12[rbp], 0
	jmp	.L12
.L15:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	je	.L13
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L13
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 9
	je	.L13
	mov	DWORD PTR -16[rbp], 0
	jmp	.L14
.L13:
	add	DWORD PTR -12[rbp], 1
.L12:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L15
.L14:
	cmp	DWORD PTR -16[rbp], 0
	jne	.L20
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	eax, DWORD PTR history_fd[rip]
	mov	rcx, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jns	.L18
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L18:
	mov	edi, 4
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR history_end[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR history_end[rip], edx
	cdqe
	lea	rcx, 0[0+rax*8]
	lea	rdx, history[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rcx+rdx], rax
	mov	eax, DWORD PTR history_end[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, history[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rdi, rax
	call	free@PLT
	mov	edx, DWORD PTR history_end[rip]
	movsx	rax, edx
	imul	rax, rax, 274877907
	shr	rax, 32
	sar	eax, 5
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	imul	ecx, eax, 500
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR history_end[rip], eax
	mov	edx, DWORD PTR history_end[rip]
	mov	eax, DWORD PTR history_begin[rip]
	cmp	edx, eax
	jne	.L19
	mov	eax, DWORD PTR history_begin[rip]
	lea	edx, 1[rax]
	movsx	rax, edx
	imul	rax, rax, 274877907
	shr	rax, 32
	sar	eax, 5
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	imul	ecx, eax, 500
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR history_begin[rip], eax
.L19:
	mov	eax, DWORD PTR history_index[rip]
	add	eax, 1
	mov	DWORD PTR history_index[rip], eax
	jmp	.L11
.L20:
	nop
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	add_command_into_history, .-add_command_into_history
	.section	.rodata
.LC2:
	.string	"/.smsh_history"
.LC3:
	.string	"%s/%s"
.LC4:
	.string	"r"
	.text
	.globl	open_history_file
	.type	open_history_file, @function
open_history_file:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1328
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	getuid@PLT
	mov	DWORD PTR -1328[rbp], eax
	mov	eax, DWORD PTR -1328[rbp]
	mov	edi, eax
	call	getpwuid@PLT
	mov	QWORD PTR -1320[rbp], rax
	mov	rax, QWORD PTR -1320[rbp]
	mov	rdx, QWORD PTR 32[rax]
	lea	rax, -1296[rbp]
	lea	rcx, .LC2[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	DWORD PTR history_index[rip], 0
	mov	DWORD PTR -1324[rbp], 384
	mov	DWORD PTR history_begin[rip], 0
	mov	DWORD PTR history_begin[rip], 0
	mov	eax, DWORD PTR history_begin[rip]
	mov	DWORD PTR history_end[rip], eax
	mov	edx, DWORD PTR -1324[rbp]
	lea	rax, -1296[rbp]
	mov	esi, 66
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR history_fd[rip], eax
	mov	eax, DWORD PTR history_fd[rip]
	lea	rsi, .LC4[rip]
	mov	edi, eax
	call	fdopen@PLT
	mov	QWORD PTR -1312[rbp], rax
	jmp	.L22
.L24:
	mov	edi, 1024
	call	malloc@PLT
	mov	QWORD PTR -1304[rbp], rax
	lea	rdx, -1040[rbp]
	mov	rax, QWORD PTR -1304[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR history_end[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR history_end[rip], edx
	cdqe
	lea	rcx, 0[0+rax*8]
	lea	rdx, history[rip]
	mov	rax, QWORD PTR -1304[rbp]
	mov	QWORD PTR [rcx+rdx], rax
	mov	edx, DWORD PTR history_end[rip]
	movsx	rax, edx
	imul	rax, rax, 274877907
	shr	rax, 32
	sar	eax, 5
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	imul	ecx, eax, 500
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR history_end[rip], eax
	mov	edx, DWORD PTR history_end[rip]
	mov	eax, DWORD PTR history_begin[rip]
	cmp	edx, eax
	jne	.L23
	mov	eax, DWORD PTR history_begin[rip]
	lea	edx, 1[rax]
	movsx	rax, edx
	imul	rax, rax, 274877907
	shr	rax, 32
	sar	eax, 5
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	imul	ecx, eax, 500
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR history_begin[rip], eax
.L23:
	mov	eax, DWORD PTR history_index[rip]
	add	eax, 1
	mov	DWORD PTR history_index[rip], eax
.L22:
	mov	rdx, QWORD PTR -1312[rbp]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L24
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	open_history_file, .-open_history_file
	.section	.rodata
.LC5:
	.string	"%s "
.LC6:
	.string	"\nBye"
.LC7:
	.string	"\n%s "
.LC8:
	.string	"smsh:input line too long"
	.text
	.globl	userin
	.type	userin, @function
userin:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	eax, DWORD PTR history_end[rip]
	mov	DWORD PTR -8[rbp], eax
	lea	rax, inpbuf[rip]
	mov	QWORD PTR ptr[rip], rax
	lea	rax, tokbuf[rip]
	mov	QWORD PTR tok[rip], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR count[rip], 0
	mov	DWORD PTR sigint_flag[rip], 0
.L34:
	call	getchar@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L28
	mov	eax, DWORD PTR sigint_flag[rip]
	test	eax, eax
	jne	.L28
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L29
.L28:
	mov	eax, DWORD PTR sigint_flag[rip]
	cmp	eax, 1
	jne	.L30
	mov	DWORD PTR count[rip], 0
	lea	rsi, prompt[rip]
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L31
.L30:
	mov	eax, DWORD PTR count[rip]
	cmp	eax, 1023
	jg	.L32
	mov	eax, DWORD PTR count[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR count[rip], edx
	mov	edx, DWORD PTR -4[rbp]
	mov	ecx, edx
	cdqe
	lea	rdx, inpbuf[rip]
	mov	BYTE PTR [rax+rdx], cl
.L32:
	cmp	DWORD PTR -4[rbp], 10
	jne	.L33
	mov	eax, DWORD PTR count[rip]
	cmp	eax, 1023
	jg	.L33
	mov	eax, DWORD PTR count[rip]
	cdqe
	lea	rdx, inpbuf[rip]
	mov	BYTE PTR [rax+rdx], 0
	mov	eax, DWORD PTR count[rip]
	jmp	.L29
.L33:
	cmp	DWORD PTR -4[rbp], 10
	jne	.L31
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	DWORD PTR count[rip], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L31:
	mov	DWORD PTR sigint_flag[rip], 0
	jmp	.L34
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	userin, .-userin
	.globl	gettok
	.type	gettok, @function
gettok:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	rdx, QWORD PTR tok[rip]
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L36
.L37:
	mov	rax, QWORD PTR ptr[rip]
	add	rax, 1
	mov	QWORD PTR ptr[rip], rax
.L36:
	mov	rax, QWORD PTR ptr[rip]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L37
	mov	rax, QWORD PTR ptr[rip]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 9
	je	.L37
	mov	rdx, QWORD PTR ptr[rip]
	mov	rax, QWORD PTR tok[rip]
	lea	rcx, 1[rax]
	mov	QWORD PTR tok[rip], rcx
	movzx	edx, BYTE PTR [rdx]
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR tok[rip]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR ptr[rip]
	add	rax, 1
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR ptr[rip]
	lea	rdx, 1[rax]
	mov	QWORD PTR ptr[rip], rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cmp	eax, 124
	je	.L38
	cmp	eax, 124
	jg	.L39
	cmp	eax, 10
	je	.L40
	cmp	eax, 10
	jl	.L39
	cmp	eax, 62
	jg	.L39
	cmp	eax, 34
	jl	.L39
	sub	eax, 34
	cmp	eax, 28
	ja	.L39
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L42[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L42[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L42:
	.long	.L46-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L45-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L39-.L42
	.long	.L44-.L42
	.long	.L43-.L42
	.long	.L39-.L42
	.long	.L41-.L42
	.text
.L40:
	mov	DWORD PTR -24[rbp], 1
	jmp	.L47
.L45:
	mov	DWORD PTR -24[rbp], 3
	jmp	.L47
.L44:
	mov	DWORD PTR -24[rbp], 4
	jmp	.L47
.L41:
	mov	rax, QWORD PTR ptr[rip]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 124
	jne	.L48
	mov	rax, QWORD PTR ptr[rip]
	add	rax, 1
	mov	QWORD PTR ptr[rip], rax
	mov	DWORD PTR -24[rbp], 6
	jmp	.L47
.L48:
	mov	rax, QWORD PTR ptr[rip]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 62
	jne	.L50
	mov	rax, QWORD PTR ptr[rip]
	add	rax, 1
	mov	QWORD PTR ptr[rip], rax
	mov	DWORD PTR -24[rbp], 7
	jmp	.L47
.L50:
	mov	DWORD PTR -24[rbp], 5
	jmp	.L47
.L43:
	mov	DWORD PTR -24[rbp], 8
	jmp	.L47
.L38:
	mov	DWORD PTR -24[rbp], 9
	jmp	.L47
.L46:
	mov	DWORD PTR -24[rbp], 2
	mov	DWORD PTR -20[rbp], 0
	jmp	.L51
.L53:
	mov	rdx, QWORD PTR ptr[rip]
	lea	rax, 1[rdx]
	mov	QWORD PTR ptr[rip], rax
	mov	rax, QWORD PTR tok[rip]
	lea	rcx, 1[rax]
	mov	QWORD PTR tok[rip], rcx
	movzx	edx, BYTE PTR [rdx]
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR ptr[rip]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L51
	mov	DWORD PTR -20[rbp], 1
	jmp	.L52
.L51:
	mov	rax, QWORD PTR ptr[rip]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 34
	jne	.L53
.L52:
	cmp	DWORD PTR -20[rbp], 1
	jne	.L54
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR tok[rip], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR ptr[rip], rax
	jmp	.L39
.L54:
	mov	rax, QWORD PTR ptr[rip]
	add	rax, 1
	mov	QWORD PTR ptr[rip], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L47
.L39:
	mov	DWORD PTR -24[rbp], 2
	jmp	.L55
.L56:
	mov	rdx, QWORD PTR ptr[rip]
	lea	rax, 1[rdx]
	mov	QWORD PTR ptr[rip], rax
	mov	rax, QWORD PTR tok[rip]
	lea	rcx, 1[rax]
	mov	QWORD PTR tok[rip], rcx
	movzx	edx, BYTE PTR [rdx]
	mov	BYTE PTR [rax], dl
.L55:
	mov	rax, QWORD PTR ptr[rip]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	inarg
	test	eax, eax
	jne	.L56
.L47:
	mov	rax, QWORD PTR tok[rip]
	lea	rdx, 1[rax]
	mov	QWORD PTR tok[rip], rdx
	mov	BYTE PTR [rax], 0
	mov	eax, DWORD PTR -24[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	gettok, .-gettok
	.globl	inarg
	.type	inarg, @function
inarg:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, edi
	mov	BYTE PTR -20[rbp], al
	lea	rax, special[rip]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L59
.L62:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	BYTE PTR -20[rbp], al
	jne	.L60
	mov	eax, 0
	jmp	.L61
.L60:
	add	QWORD PTR -8[rbp], 1
.L59:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L62
	mov	eax, 1
.L61:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	inarg, .-inarg
	.globl	procline
	.type	procline, @function
procline:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	r11, -16384[rsp]
.LPSRL0:
	sub	rsp, 4096
	or	DWORD PTR [rsp], 0
	cmp	rsp, r11
	jne	.LPSRL0
	sub	rsp, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -16448[rbp], 0
	mov	DWORD PTR -16444[rbp], 0
	mov	QWORD PTR -16440[rbp], 0
	mov	QWORD PTR -16432[rbp], 0
	mov	DWORD PTR -16460[rbp], 0
	lea	rax, -16416[rbp]
	mov	QWORD PTR -8208[rbp], rax
	mov	DWORD PTR -16464[rbp], 0
.L79:
	lea	rdx, -16416[rbp]
	mov	eax, DWORD PTR -16464[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rdi, rax
	call	gettok
	mov	DWORD PTR -16456[rbp], eax
	cmp	DWORD PTR -16456[rbp], 9
	ja	.L79
	mov	eax, DWORD PTR -16456[rbp]
	lea	rdx, 0[0+rax*4]
	lea	rax, .L66[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L66[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L66:
	.long	.L79-.L66
	.long	.L71-.L66
	.long	.L72-.L66
	.long	.L71-.L66
	.long	.L71-.L66
	.long	.L70-.L66
	.long	.L69-.L66
	.long	.L68-.L66
	.long	.L67-.L66
	.long	.L65-.L66
	.text
.L72:
	mov	eax, DWORD PTR -16448[rbp]
	test	eax, eax
	je	.L73
	mov	rax, QWORD PTR -16440[rbp]
	test	rax, rax
	jne	.L73
	mov	eax, DWORD PTR -16464[rbp]
	cdqe
	mov	rax, QWORD PTR -16416[rbp+rax*8]
	mov	QWORD PTR -16440[rbp], rax
	jmp	.L74
.L73:
	mov	eax, DWORD PTR -16444[rbp]
	test	eax, eax
	je	.L75
	mov	rax, QWORD PTR -16432[rbp]
	test	rax, rax
	jne	.L75
	mov	eax, DWORD PTR -16464[rbp]
	cdqe
	mov	rax, QWORD PTR -16416[rbp+rax*8]
	mov	QWORD PTR -16432[rbp], rax
	jmp	.L74
.L75:
	cmp	DWORD PTR -16464[rbp], 1023
	jg	.L82
	add	DWORD PTR -16464[rbp], 1
	jmp	.L82
.L74:
	jmp	.L82
.L70:
	mov	DWORD PTR -16444[rbp], 5
	jmp	.L64
.L69:
	mov	DWORD PTR -16444[rbp], 6
	jmp	.L64
.L68:
	mov	DWORD PTR -16444[rbp], 7
	jmp	.L64
.L67:
	mov	DWORD PTR -16448[rbp], 8
	jmp	.L64
.L65:
	mov	eax, DWORD PTR -16464[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -16464[rbp], edx
	cdqe
	mov	QWORD PTR -16416[rbp+rax*8], 0
	add	DWORD PTR -16460[rbp], 1
	lea	rdx, -16416[rbp]
	mov	eax, DWORD PTR -16464[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	mov	eax, DWORD PTR -16460[rbp]
	cdqe
	mov	QWORD PTR -8208[rbp+rax*8], rdx
	jmp	.L64
.L71:
	cmp	DWORD PTR -16456[rbp], 3
	sete	al
	movzx	eax, al
	mov	DWORD PTR -16452[rbp], eax
	cmp	DWORD PTR -16464[rbp], 0
	je	.L76
	mov	eax, DWORD PTR -16464[rbp]
	cdqe
	mov	QWORD PTR -16416[rbp+rax*8], 0
	mov	ecx, DWORD PTR -16460[rbp]
	lea	rdx, -16448[rbp]
	mov	esi, DWORD PTR -16452[rbp]
	lea	rax, -8208[rbp]
	mov	rdi, rax
	call	runcommand
.L76:
	cmp	DWORD PTR -16456[rbp], 1
	je	.L83
	mov	DWORD PTR -16464[rbp], 0
	jmp	.L64
.L82:
	nop
.L64:
	jmp	.L79
.L83:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L80
	call	__stack_chk_fail@PLT
.L80:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	procline, .-procline
	.section	.rodata
.LC9:
	.string	"cd"
.LC10:
	.string	"smsh"
	.align 8
.LC11:
	.string	"%s: No such file or directory\n"
	.align 8
.LC12:
	.string	"%s: cannot overwrite existing file\n"
.LC13:
	.string	"history"
.LC14:
	.string	"[Process id %d]\n"
	.text
	.globl	runcommand
	.type	runcommand, @function
runcommand:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 104
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	QWORD PTR -120[rbp], rdi
	mov	DWORD PTR -124[rbp], esi
	mov	QWORD PTR -136[rbp], rdx
	mov	DWORD PTR -128[rbp], ecx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -96[rbp], 0
	mov	rax, QWORD PTR -120[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L85
	mov	rax, QWORD PTR -120[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	change_directory
	mov	DWORD PTR -84[rbp], eax
	call	setprompt
	mov	eax, DWORD PTR -84[rbp]
	jmp	.L116
.L85:
	call	fork@PLT
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 0
	jns	.L87
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L116
.L87:
	cmp	DWORD PTR -88[rbp], 0
	jne	.L88
	mov	edx, 0
	lea	rsi, oact[rip]
	mov	edi, 2
	call	sigaction@PLT
	mov	edx, 0
	lea	rsi, set2[rip]
	mov	edi, 2
	call	sigprocmask@PLT
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L89
	mov	rax, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -80[rbp], eax
	cmp	DWORD PTR -80[rbp], 0
	jns	.L90
	mov	rax, QWORD PTR -136[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L116
.L90:
	mov	edi, 0
	call	close@PLT
	mov	eax, DWORD PTR -80[rbp]
	mov	edi, eax
	call	dup@PLT
	mov	eax, DWORD PTR -80[rbp]
	mov	edi, eax
	call	close@PLT
.L89:
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR 4[rax]
	test	eax, eax
	je	.L91
	mov	DWORD PTR -100[rbp], 65
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, 6
	je	.L92
	cmp	eax, 7
	jne	.L93
	or	DWORD PTR -100[rbp], 1024
	jmp	.L94
.L92:
	or	DWORD PTR -100[rbp], 512
	jmp	.L94
.L93:
	or	DWORD PTR -100[rbp], 128
	nop
.L94:
	mov	rax, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	ecx, DWORD PTR -100[rbp]
	mov	edx, 420
	mov	esi, ecx
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], 0
	jns	.L95
	mov	rax, QWORD PTR -136[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L116
.L95:
	mov	edi, 1
	call	close@PLT
	mov	eax, DWORD PTR -76[rbp]
	mov	edi, eax
	call	dup@PLT
	mov	eax, DWORD PTR -76[rbp]
	mov	edi, eax
	call	close@PLT
.L91:
	cmp	DWORD PTR -128[rbp], 0
	jle	.L96
	mov	rax, rsp
	mov	rbx, rax
	mov	eax, DWORD PTR -128[rbp]
	movsx	rdx, eax
	sub	rdx, 1
	mov	QWORD PTR -72[rbp], rdx
	movsx	rdx, eax
	mov	r14, rdx
	mov	r15d, 0
	movsx	rdx, eax
	mov	r12, rdx
	mov	r13d, 0
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	ecx, 16
	mov	edx, 0
	div	rcx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L97:
	cmp	rsp, rdx
	je	.L98
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L97
.L98:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L99
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L99:
	mov	rax, rsp
	add	rax, 3
	shr	rax, 2
	sal	rax, 2
	mov	QWORD PTR -64[rbp], rax
	mov	DWORD PTR -104[rbp], 0
	jmp	.L100
.L101:
	mov	eax, DWORD PTR -104[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	pipe@PLT
	add	DWORD PTR -104[rbp], 1
.L100:
	mov	eax, DWORD PTR -104[rbp]
	cmp	eax, DWORD PTR -128[rbp]
	jl	.L101
	mov	DWORD PTR -96[rbp], 0
	jmp	.L102
.L107:
	call	fork@PLT
	test	eax, eax
	jne	.L103
	mov	edi, 1
	call	close@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -96[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR 4[rax+rdx*8]
	mov	edi, eax
	call	dup@PLT
	cmp	DWORD PTR -96[rbp], 0
	je	.L104
	mov	edi, 0
	call	close@PLT
	mov	eax, DWORD PTR -96[rbp]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -64[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*8]
	mov	edi, eax
	call	dup@PLT
.L104:
	mov	DWORD PTR -108[rbp], 0
	jmp	.L105
.L106:
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -108[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*8]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -108[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR 4[rax+rdx*8]
	mov	edi, eax
	call	close@PLT
	add	DWORD PTR -108[rbp], 1
.L105:
	mov	eax, DWORD PTR -108[rbp]
	cmp	eax, DWORD PTR -128[rbp]
	jl	.L106
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 127
	call	exit@PLT
.L103:
	add	DWORD PTR -96[rbp], 1
.L102:
	mov	eax, DWORD PTR -96[rbp]
	cmp	eax, DWORD PTR -128[rbp]
	jl	.L107
	mov	edi, 0
	call	close@PLT
	mov	eax, DWORD PTR -96[rbp]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -64[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*8]
	mov	edi, eax
	call	dup@PLT
	mov	DWORD PTR -92[rbp], 0
	jmp	.L108
.L109:
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -92[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR [rax+rdx*8]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR -92[rbp]
	movsx	rdx, edx
	mov	eax, DWORD PTR 4[rax+rdx*8]
	mov	edi, eax
	call	close@PLT
	add	DWORD PTR -92[rbp], 1
.L108:
	mov	eax, DWORD PTR -92[rbp]
	cmp	eax, DWORD PTR -128[rbp]
	jl	.L109
	mov	rsp, rbx
.L96:
	mov	rax, QWORD PTR -120[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L110
	call	show_history
	mov	edi, 127
	call	exit@PLT
.L110:
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	mov	eax, DWORD PTR -96[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 127
	call	exit@PLT
.L88:
	cmp	DWORD PTR -124[rbp], 1
	jne	.L118
	mov	eax, DWORD PTR -88[rbp]
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	jmp	.L116
.L118:
	nop
.L113:
	lea	rax, -112[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	wait@PLT
	mov	DWORD PTR -84[rbp], eax
	mov	eax, DWORD PTR -84[rbp]
	cmp	eax, DWORD PTR -88[rbp]
	je	.L112
	cmp	DWORD PTR -84[rbp], -1
	jne	.L113
.L112:
	cmp	DWORD PTR -84[rbp], -1
	je	.L114
	mov	eax, DWORD PTR -112[rbp]
	jmp	.L116
.L114:
	mov	eax, -1
.L116:
	mov	rbx, QWORD PTR -56[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L117
	call	__stack_chk_fail@PLT
.L117:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	runcommand, .-runcommand
	.section	.rodata
.LC15:
	.string	"%s$"
	.text
	.globl	setprompt
	.type	setprompt, @function
setprompt:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 288
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	getuid@PLT
	mov	DWORD PTR -284[rbp], eax
	mov	eax, DWORD PTR -284[rbp]
	mov	edi, eax
	call	getpwuid@PLT
	mov	QWORD PTR -280[rbp], rax
	lea	rax, -272[rbp]
	mov	esi, 256
	mov	rdi, rax
	call	getcwd@PLT
	mov	rax, QWORD PTR -280[rbp]
	mov	rdx, QWORD PTR 32[rax]
	lea	rax, -272[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	js	.L120
	mov	BYTE PTR prompt[rip], 126
	mov	rax, QWORD PTR -280[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -272[rbp]
	add	rdx, rax
	lea	rax, prompt[rip+1]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	jmp	.L121
.L120:
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, prompt[rip]
	call	strcpy@PLT
.L121:
	lea	rdx, prompt[rip]
	lea	rsi, .LC15[rip]
	lea	rdi, prompt[rip]
	mov	eax, 0
	call	sprintf@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L122
	call	__stack_chk_fail@PLT
.L122:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	setprompt, .-setprompt
	.section	.rodata
.LC16:
	.string	"cd: too many arguments\n"
	.text
	.globl	change_directory
	.type	change_directory, @function
change_directory:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L124
	call	getuid@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	getpwuid@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	chdir@PLT
	jmp	.L125
.L124:
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L126
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 23
	mov	esi, 1
	lea	rdi, .LC16[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L125
.L126:
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	chdir@PLT
	test	eax, eax
	jns	.L127
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L125
.L127:
	mov	eax, 0
.L125:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	change_directory, .-change_directory
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"1001671.c"
	.text
	.comm	prompt,256,4
	.comm	count,4,4
	.global	sigint_flag
	.bss
	.align	2
	.type	sigint_flag, %object
	.size	sigint_flag, 4
sigint_flag:
	.space	4
	.comm	inpbuf,1024,4
	.comm	tokbuf,2048,4
	.global	ptr
	.data
	.align	2
	.type	ptr, %object
	.size	ptr, 4
ptr:
	.word	inpbuf
	.global	tok
	.align	2
	.type	tok, %object
	.size	tok, 4
tok:
	.word	tokbuf
	.global	special
	.align	2
	.type	special, %object
	.size	special, 9
special:
	.ascii	" \011&;\012><|\000"
	.comm	history_fd,4,4
	.comm	history_begin,4,4
	.comm	history_end,4,4
	.comm	history_index,4,4
	.comm	history,2000,4
	.text
	.align	2
	.global	signal_handler
	.syntax unified
	.arm
	.fpu softvfp
	.type	signal_handler, %function
signal_handler:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, .L2
	mov	r2, #1
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L3:
	.align	2
.L2:
	.word	sigint_flag
	.size	signal_handler, .-signal_handler
	.local	act
	.comm	act,140,4
	.local	oact
	.comm	oact,140,4
	.local	set1
	.comm	set1,128,4
	.local	set2
	.comm	set2,128,4
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r2, .L8
	mov	r1, #0
	mov	r0, #2
	bl	sigaction
	ldr	r3, .L8+4
	ldr	r2, .L8+8
	str	r2, [r3]
	ldr	r3, .L8+4
	mov	r2, #0
	str	r2, [r3, #132]
	mov	r2, #0
	ldr	r1, .L8+4
	mov	r0, #2
	bl	sigaction
	ldr	r0, .L8+12
	bl	sigfillset
	ldr	r0, .L8+16
	bl	sigemptyset
	mov	r1, #2
	ldr	r0, .L8+12
	bl	sigdelset
	mov	r2, #0
	ldr	r1, .L8+12
	mov	r0, #2
	bl	sigprocmask
	bl	open_history_file
	bl	setprompt
	b	.L5
.L6:
	ldr	r0, .L8+12
	bl	sigfillset
	mov	r2, #0
	ldr	r1, .L8+12
	mov	r0, #2
	bl	sigprocmask
	ldr	r3, .L8+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	add_command_into_history
	bl	procline
	mov	r1, #2
	ldr	r0, .L8+12
	bl	sigdelset
	mov	r2, #0
	ldr	r1, .L8+12
	mov	r0, #2
	bl	sigprocmask
.L5:
	ldr	r0, .L8+24
	bl	userin
	mov	r3, r0
	cmn	r3, #1
	bne	.L6
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	oact
	.word	act
	.word	signal_handler
	.word	set1
	.word	set2
	.word	ptr
	.word	prompt
	.size	main, .-main
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%3d\011%s\000"
	.text
	.align	2
	.global	show_history
	.syntax unified
	.arm
	.fpu softvfp
	.type	show_history, %function
show_history:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #1
	str	r3, [fp, #-12]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	b	.L11
.L14:
	ldr	r3, .L15+4
	ldr	r3, [r3]
	sub	r2, r3, #500
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	cmp	r3, #0
	ble	.L12
	ldr	r3, .L15+4
	ldr	r3, [r3]
	sub	r2, r3, #500
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	b	.L13
.L12:
	ldr	r3, [fp, #-12]
.L13:
	ldr	r1, .L15+8
	ldr	r2, [fp, #-8]
	ldr	r2, [r1, r2, lsl #2]
	mov	r1, r3
	ldr	r0, .L15+12
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L11:
	ldr	r3, .L15+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bne	.L14
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	history_begin
	.word	history_index
	.word	history
	.word	.LC0
	.word	history_end
	.size	show_history, .-show_history
	.section	.rodata
	.align	2
.LC1:
	.ascii	"write error\000"
	.text
	.align	2
	.global	add_command_into_history
	.syntax unified
	.arm
	.fpu softvfp
	.type	add_command_into_history, %function
add_command_into_history:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-32]
	mov	r3, #1
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L18
.L21:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L19
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L19
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #9
	beq	.L19
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L20
.L19:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L18:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L21
.L20:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L26
	ldr	r3, .L27
	ldr	r4, [r3]
	ldr	r0, [fp, #-32]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-32]
	mov	r0, r4
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bge	.L24
	ldr	r0, .L27+4
	bl	perror
	mov	r0, #1
	bl	exit
.L24:
	mov	r0, #4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-16]
	bl	strcpy
	ldr	r3, .L27+8
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L27+8
	str	r2, [r1]
	ldr	r1, .L27+12
	ldr	r2, [fp, #-16]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, .L27+8
	ldr	r3, [r3]
	ldr	r2, .L27+12
	ldr	r3, [r2, r3, lsl #2]
	mov	r0, r3
	bl	free
	ldr	r3, .L27+8
	ldr	r1, [r3]
	ldr	r3, .L27+16
	smull	r2, r3, r1, r3
	asr	r2, r3, #5
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	ldr	r3, .L27+8
	str	r2, [r3]
	ldr	r3, .L27+8
	ldr	r2, [r3]
	ldr	r3, .L27+20
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L25
	ldr	r3, .L27+20
	ldr	r3, [r3]
	add	r1, r3, #1
	ldr	r3, .L27+16
	smull	r2, r3, r1, r3
	asr	r2, r3, #5
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	ldr	r3, .L27+20
	str	r2, [r3]
.L25:
	ldr	r3, .L27+24
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L27+24
	str	r3, [r2]
	b	.L17
.L26:
	nop
.L17:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L28:
	.align	2
.L27:
	.word	history_fd
	.word	.LC1
	.word	history_end
	.word	history
	.word	274877907
	.word	history_begin
	.word	history_index
	.size	add_command_into_history, .-add_command_into_history
	.section	.rodata
	.align	2
.LC2:
	.ascii	"/.smsh_history\000"
	.align	2
.LC3:
	.ascii	"%s/%s\000"
	.align	2
.LC4:
	.ascii	"r\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	open_history_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_history_file, %function
open_history_file:
	@ args = 0, pretend = 0, frame = 1304
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1296
	sub	sp, sp, #8
	ldr	r3, .L35
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	getuid
	str	r0, [fp, #-1308]
	ldr	r0, [fp, #-1308]
	bl	getpwuid
	str	r0, [fp, #-1304]
	ldr	r3, [fp, #-1304]
	ldr	r2, [r3, #20]
	sub	r0, fp, #1280
	sub	r0, r0, #4
	sub	r0, r0, #4
	ldr	r3, .L35+4
	ldr	r1, .L35+8
	bl	sprintf
	ldr	r3, .L35+12
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #384
	str	r3, [fp, #-1300]
	ldr	r3, .L35+16
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L35+16
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L35+16
	ldr	r3, [r3]
	ldr	r2, .L35+20
	str	r3, [r2]
	sub	r3, fp, #1280
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1300]
	mov	r1, #66
	mov	r0, r3
	bl	open
	mov	r3, r0
	ldr	r2, .L35+24
	str	r3, [r2]
	ldr	r3, .L35+24
	ldr	r3, [r3]
	ldr	r1, .L35+28
	mov	r0, r3
	bl	fdopen
	str	r0, [fp, #-1296]
	b	.L30
.L32:
	mov	r0, #1024
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-1292]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-1292]
	bl	strcpy
	ldr	r3, .L35+20
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L35+20
	str	r2, [r1]
	ldr	r1, .L35+32
	ldr	r2, [fp, #-1292]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, .L35+20
	ldr	r1, [r3]
	ldr	r3, .L35+36
	smull	r2, r3, r1, r3
	asr	r2, r3, #5
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	ldr	r3, .L35+20
	str	r2, [r3]
	ldr	r3, .L35+20
	ldr	r2, [r3]
	ldr	r3, .L35+16
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L31
	ldr	r3, .L35+16
	ldr	r3, [r3]
	add	r1, r3, #1
	ldr	r3, .L35+36
	smull	r2, r3, r1, r3
	asr	r2, r3, #5
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	ldr	r3, .L35+16
	str	r2, [r3]
.L31:
	ldr	r3, .L35+12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L35+12
	str	r3, [r2]
.L30:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1296]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L32
	nop
	ldr	r3, .L35
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L34
	bl	__stack_chk_fail
.L34:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L36:
	.align	2
.L35:
	.word	.LC5
	.word	.LC2
	.word	.LC3
	.word	history_index
	.word	history_begin
	.word	history_end
	.word	history_fd
	.word	.LC4
	.word	history
	.word	274877907
	.size	open_history_file, .-open_history_file
	.section	.rodata
	.align	2
.LC6:
	.ascii	"%s \000"
	.align	2
.LC7:
	.ascii	"\012Bye\000"
	.align	2
.LC8:
	.ascii	"\012%s \000"
	.align	2
.LC9:
	.ascii	"smsh:input line too long\000"
	.text
	.align	2
	.global	userin
	.syntax unified
	.arm
	.fpu softvfp
	.type	userin, %function
userin:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, .L45
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, .L45+4
	ldr	r2, .L45+8
	str	r2, [r3]
	ldr	r3, .L45+12
	ldr	r2, .L45+16
	str	r2, [r3]
	ldr	r1, [fp, #-16]
	ldr	r0, .L45+20
	bl	printf
	ldr	r3, .L45+24
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L45+28
	mov	r2, #0
	str	r2, [r3]
.L44:
	bl	getchar
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L38
	ldr	r3, .L45+28
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L38
	ldr	r0, .L45+32
	bl	puts
	mvn	r3, #0
	b	.L39
.L38:
	ldr	r3, .L45+28
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L40
	ldr	r3, .L45+24
	mov	r2, #0
	str	r2, [r3]
	ldr	r1, .L45+36
	ldr	r0, .L45+40
	bl	printf
	b	.L41
.L40:
	ldr	r3, .L45+24
	ldr	r3, [r3]
	cmp	r3, #1024
	bge	.L42
	ldr	r3, .L45+24
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L45+24
	str	r2, [r1]
	ldr	r2, [fp, #-8]
	and	r1, r2, #255
	ldr	r2, .L45+8
	strb	r1, [r2, r3]
.L42:
	ldr	r3, [fp, #-8]
	cmp	r3, #10
	bne	.L43
	ldr	r3, .L45+24
	ldr	r3, [r3]
	cmp	r3, #1024
	bge	.L43
	ldr	r3, .L45+24
	ldr	r3, [r3]
	ldr	r2, .L45+8
	mov	r1, #0
	strb	r1, [r2, r3]
	ldr	r3, .L45+24
	ldr	r3, [r3]
	b	.L39
.L43:
	ldr	r3, [fp, #-8]
	cmp	r3, #10
	bne	.L41
	ldr	r0, .L45+44
	bl	puts
	ldr	r3, .L45+24
	mov	r2, #0
	str	r2, [r3]
	ldr	r1, [fp, #-16]
	ldr	r0, .L45+20
	bl	printf
.L41:
	ldr	r3, .L45+28
	mov	r2, #0
	str	r2, [r3]
	b	.L44
.L39:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	history_end
	.word	ptr
	.word	inpbuf
	.word	tok
	.word	tokbuf
	.word	.LC6
	.word	count
	.word	sigint_flag
	.word	.LC7
	.word	prompt
	.word	.LC8
	.word	.LC9
	.size	userin, .-userin
	.align	2
	.global	gettok
	.syntax unified
	.arm
	.fpu softvfp
	.type	gettok, %function
gettok:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, .L70
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	b	.L48
.L49:
	ldr	r3, .L70+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L70+4
	str	r3, [r2]
.L48:
	ldr	r3, .L70+4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L49
	ldr	r3, .L70+4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #9
	beq	.L49
	ldr	r3, .L70+4
	ldr	r2, [r3]
	ldr	r3, .L70
	ldr	r3, [r3]
	add	r1, r3, #1
	ldr	r0, .L70
	str	r1, [r0]
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, .L70
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, .L70+4
	ldr	r3, [r3]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, .L70+4
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L70+4
	str	r2, [r1]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #124
	beq	.L50
	cmp	r3, #124
	bgt	.L51
	cmp	r3, #10
	beq	.L52
	cmp	r3, #10
	blt	.L51
	cmp	r3, #62
	bgt	.L51
	cmp	r3, #34
	blt	.L51
	sub	r3, r3, #34
	cmp	r3, #28
	ldrls	pc, [pc, r3, asl #2]
	b	.L51
.L54:
	.word	.L58
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L57
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L51
	.word	.L56
	.word	.L55
	.word	.L51
	.word	.L53
.L52:
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L59
.L57:
	mov	r3, #3
	str	r3, [fp, #-20]
	b	.L59
.L56:
	mov	r3, #4
	str	r3, [fp, #-20]
	b	.L59
.L53:
	ldr	r3, .L70+4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #124
	bne	.L60
	ldr	r3, .L70+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L70+4
	str	r3, [r2]
	mov	r3, #6
	str	r3, [fp, #-20]
	b	.L59
.L60:
	ldr	r3, .L70+4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #62
	bne	.L62
	ldr	r3, .L70+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L70+4
	str	r3, [r2]
	mov	r3, #7
	str	r3, [fp, #-20]
	b	.L59
.L62:
	mov	r3, #5
	str	r3, [fp, #-20]
	b	.L59
.L55:
	mov	r3, #8
	str	r3, [fp, #-20]
	b	.L59
.L50:
	mov	r3, #9
	str	r3, [fp, #-20]
	b	.L59
.L58:
	mov	r3, #2
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L63
.L65:
	ldr	r3, .L70+4
	ldr	r2, [r3]
	add	r3, r2, #1
	ldr	r1, .L70+4
	str	r3, [r1]
	ldr	r3, .L70
	ldr	r3, [r3]
	add	r1, r3, #1
	ldr	r0, .L70
	str	r1, [r0]
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, .L70+4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L63
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L64
.L63:
	ldr	r3, .L70+4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #34
	bne	.L65
.L64:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L66
	ldr	r2, .L70
	ldr	r3, [fp, #-12]
	str	r3, [r2]
	ldr	r2, .L70+4
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	b	.L51
.L66:
	ldr	r3, .L70+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L70+4
	str	r3, [r2]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	b	.L59
.L51:
	mov	r3, #2
	str	r3, [fp, #-20]
	b	.L67
.L68:
	ldr	r3, .L70+4
	ldr	r2, [r3]
	add	r3, r2, #1
	ldr	r1, .L70+4
	str	r3, [r1]
	ldr	r3, .L70
	ldr	r3, [r3]
	add	r1, r3, #1
	ldr	r0, .L70
	str	r1, [r0]
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
.L67:
	ldr	r3, .L70+4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	inarg
	mov	r3, r0
	cmp	r3, #0
	bne	.L68
.L59:
	ldr	r3, .L70
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L70
	str	r2, [r1]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-20]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L71:
	.align	2
.L70:
	.word	tok
	.word	ptr
	.size	gettok, .-gettok
	.align	2
	.global	inarg
	.syntax unified
	.arm
	.fpu softvfp
	.type	inarg, %function
inarg:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	mov	r3, r0
	strb	r3, [fp, #-13]
	ldr	r3, .L77
	str	r3, [fp, #-8]
	b	.L73
.L76:
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-13]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L74
	mov	r3, #0
	b	.L75
.L74:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L73:
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L76
	mov	r3, #1
.L75:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L78:
	.align	2
.L77:
	.word	special
	.size	inarg, .-inarg
	.section	.rodata
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	procline
	.syntax unified
	.arm
	.fpu softvfp
	.type	procline, %function
procline:
	@ args = 0, pretend = 0, frame = 8240
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #8192
	sub	sp, sp, #52
	ldr	r3, .L100
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-28]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-24]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-20]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-16]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-40]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #12
	str	r3, [r2, #-8]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-44]
.L95:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #12
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-44]
	lsl	r2, r2, #2
	add	r3, r3, r2
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r4, r2
	mov	r0, r3
	bl	gettok
	str	r0, [r4, #-36]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-36]
	sub	r3, r3, #1
	cmp	r3, #8
	ldrls	pc, [pc, r3, asl #2]
	b	.L95
.L82:
	.word	.L87
	.word	.L88
	.word	.L87
	.word	.L87
	.word	.L86
	.word	.L85
	.word	.L84
	.word	.L83
	.word	.L81
.L88:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-28]
	cmp	r3, #0
	beq	.L89
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	cmp	r3, #0
	bne	.L89
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-44]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #-12]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-20]
	b	.L90
.L89:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-24]
	cmp	r3, #0
	beq	.L91
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	cmp	r3, #0
	bne	.L91
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-44]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #-12]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-16]
	b	.L90
.L91:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-44]
	cmp	r3, #1024
	bge	.L98
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-44]
	add	r3, r3, #1
	str	r3, [r2, #-44]
	b	.L98
.L90:
	b	.L98
.L86:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #5
	str	r3, [r2, #-24]
	b	.L80
.L85:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #6
	str	r3, [r2, #-24]
	b	.L80
.L84:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #7
	str	r3, [r2, #-24]
	b	.L80
.L83:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #8
	str	r3, [r2, #-28]
	b	.L80
.L81:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-44]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	mov	r1, r2
	add	r2, r3, #1
	str	r2, [r1, #-44]
	sub	r2, fp, #8192
	sub	r2, r2, #12
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #-12]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-40]
	add	r3, r3, #1
	str	r3, [r2, #-40]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #12
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-44]
	lsl	r2, r2, #2
	add	r2, r3, r2
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-40]
	lsl	r3, r3, #2
	add	r3, r1, r3
	str	r2, [r3, #-8]
	b	.L80
.L87:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-36]
	cmp	r3, #3
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	sub	r2, fp, #8192
	sub	r2, r2, #12
	str	r3, [r2, #-32]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-44]
	cmp	r3, #0
	beq	.L92
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-44]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #-12]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r2, fp, #8192
	sub	r2, r2, #12
	sub	r2, r2, #28
	sub	r1, fp, #8192
	sub	r1, r1, #12
	sub	r0, fp, #4096
	sub	r0, r0, #12
	sub	r0, r0, #8
	ldr	r3, [r3, #-40]
	ldr	r1, [r1, #-32]
	bl	runcommand
.L92:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-36]
	cmp	r3, #1
	beq	.L99
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-44]
	b	.L80
.L98:
	nop
.L80:
	b	.L95
.L99:
	nop
	ldr	r3, .L100
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L96
	bl	__stack_chk_fail
.L96:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L101:
	.align	2
.L100:
	.word	.LC10
	.size	procline, .-procline
	.section	.rodata
	.align	2
.LC11:
	.ascii	"cd\000"
	.align	2
.LC12:
	.ascii	"smsh\000"
	.align	2
.LC13:
	.ascii	"%s: No such file or directory\012\000"
	.align	2
.LC14:
	.ascii	"%s: cannot overwrite existing file\012\000"
	.align	2
.LC15:
	.ascii	"history\000"
	.align	2
.LC16:
	.ascii	"[Process id %d]\012\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	runcommand
	.syntax unified
	.arm
	.fpu softvfp
	.type	runcommand, %function
runcommand:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #76
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	str	r2, [fp, #-80]
	str	r3, [fp, #-84]
	ldr	r3, .L134
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r1, .L134+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L103
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	mov	r0, r3
	bl	change_directory
	str	r0, [fp, #-36]
	bl	setprompt
	ldr	r3, [fp, #-36]
	b	.L131
.L103:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bge	.L105
	ldr	r0, .L134+8
	bl	perror
	mvn	r3, #0
	b	.L131
.L105:
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L106
	mov	r2, #0
	ldr	r1, .L134+12
	mov	r0, #2
	bl	sigaction
	mov	r2, #0
	ldr	r1, .L134+16
	mov	r0, #2
	bl	sigprocmask
	ldr	r3, [fp, #-80]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L107
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #8]
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L108
	ldr	r3, .L134+20
	ldr	r0, [r3]
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #8]
	mov	r2, r3
	ldr	r1, .L134+24
	bl	fprintf
	mvn	r3, #0
	b	.L131
.L108:
	mov	r0, #0
	bl	close
	ldr	r0, [fp, #-32]
	bl	dup
	ldr	r0, [fp, #-32]
	bl	close
.L107:
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L109
	mov	r3, #65
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #4]
	cmp	r3, #6
	beq	.L110
	cmp	r3, #7
	bne	.L111
	ldr	r3, [fp, #-52]
	orr	r3, r3, #1024
	str	r3, [fp, #-52]
	b	.L112
.L110:
	ldr	r3, [fp, #-52]
	orr	r3, r3, #512
	str	r3, [fp, #-52]
	b	.L112
.L111:
	ldr	r3, [fp, #-52]
	orr	r3, r3, #128
	str	r3, [fp, #-52]
	nop
.L112:
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #12]
	mov	r2, #420
	ldr	r1, [fp, #-52]
	mov	r0, r3
	bl	open
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L113
	ldr	r3, .L134+20
	ldr	r0, [r3]
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #12]
	mov	r2, r3
	ldr	r1, .L134+28
	bl	fprintf
	mvn	r3, #0
	b	.L131
.L113:
	mov	r0, #1
	bl	close
	ldr	r0, [fp, #-28]
	bl	dup
	ldr	r0, [fp, #-28]
	bl	close
.L109:
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	ble	.L114
	mov	r3, sp
	mov	r4, r3
	ldr	ip, [fp, #-84]
	sub	r3, ip, #1
	str	r3, [fp, #-24]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #6
	orr	r3, r3, r0, lsr #26
	lsl	r2, r0, #6
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #6
	orr	r3, r3, r0, lsr #26
	lsl	r2, r0, #6
	mov	r3, ip
	lsl	r3, r3, #3
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L115
.L116:
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	mov	r0, r3
	bl	pipe
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L115:
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-84]
	cmp	r2, r3
	blt	.L116
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L117
.L122:
	bl	fork
	mov	r3, r0
	cmp	r3, #0
	bne	.L118
	mov	r0, #1
	bl	close
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	dup
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	beq	.L119
	mov	r0, #0
	bl	close
	ldr	r3, [fp, #-48]
	sub	r2, r3, #1
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, r2, lsl #3]
	mov	r0, r3
	bl	dup
.L119:
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L120
.L121:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-60]
	ldr	r3, [r3, r2, lsl #3]
	mov	r0, r3
	bl	close
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L120:
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-84]
	cmp	r2, r3
	blt	.L121
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-72]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r0, [r3]
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-72]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	bl	execvp
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-72]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	mov	r0, #127
	bl	exit
.L118:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L117:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-84]
	cmp	r2, r3
	blt	.L122
	mov	r0, #0
	bl	close
	ldr	r3, [fp, #-48]
	sub	r2, r3, #1
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, r2, lsl #3]
	mov	r0, r3
	bl	dup
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L123
.L124:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-44]
	ldr	r3, [r3, r2, lsl #3]
	mov	r0, r3
	bl	close
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L123:
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-84]
	cmp	r2, r3
	blt	.L124
	mov	sp, r4
.L114:
	ldr	r3, [fp, #-72]
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r1, .L134+32
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L125
	bl	show_history
	mov	r0, #127
	bl	exit
.L125:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-72]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r0, [r3]
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-72]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	bl	execvp
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-72]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	mov	r0, #127
	bl	exit
.L106:
	ldr	r3, [fp, #-76]
	cmp	r3, #1
	bne	.L133
	ldr	r1, [fp, #-40]
	ldr	r0, .L134+36
	bl	printf
	mov	r3, #0
	b	.L131
.L133:
	nop
.L128:
	sub	r3, fp, #64
	mov	r0, r3
	bl	wait
	str	r0, [fp, #-36]
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	beq	.L127
	ldr	r3, [fp, #-36]
	cmn	r3, #1
	bne	.L128
.L127:
	ldr	r3, [fp, #-36]
	cmn	r3, #1
	beq	.L129
	ldr	r3, [fp, #-64]
	b	.L131
.L129:
	mvn	r3, #0
.L131:
	ldr	r2, .L134
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L132
	bl	__stack_chk_fail
.L132:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L135:
	.align	2
.L134:
	.word	.LC17
	.word	.LC11
	.word	.LC12
	.word	oact
	.word	set2
	.word	stderr
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.size	runcommand, .-runcommand
	.section	.rodata
	.align	2
.LC18:
	.ascii	"%s$\000"
	.align	2
.LC19:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	setprompt
	.syntax unified
	.arm
	.fpu softvfp
	.type	setprompt, %function
setprompt:
	@ args = 0, pretend = 0, frame = 272
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #276
	ldr	r3, .L140
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	bl	getuid
	str	r0, [fp, #-280]
	ldr	r0, [fp, #-280]
	bl	getpwuid
	str	r0, [fp, #-276]
	sub	r3, fp, #272
	mov	r1, #256
	mov	r0, r3
	bl	getcwd
	ldr	r3, [fp, #-276]
	ldr	r2, [r3, #20]
	sub	r3, fp, #272
	mov	r1, r2
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	blt	.L137
	ldr	r3, .L140+4
	mov	r2, #126
	strb	r2, [r3]
	ldr	r4, .L140+8
	ldr	r3, [fp, #-276]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #272
	add	r3, r3, r2
	mov	r1, r3
	mov	r0, r4
	bl	strcpy
	b	.L138
.L137:
	sub	r3, fp, #272
	mov	r1, r3
	ldr	r0, .L140+4
	bl	strcpy
.L138:
	ldr	r2, .L140+4
	ldr	r1, .L140+12
	ldr	r0, .L140+4
	bl	sprintf
	nop
	ldr	r3, .L140
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L139
	bl	__stack_chk_fail
.L139:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L141:
	.align	2
.L140:
	.word	.LC19
	.word	prompt
	.word	prompt+1
	.word	.LC18
	.size	setprompt, .-setprompt
	.section	.rodata
	.align	2
.LC20:
	.ascii	"cd: too many arguments\012\000"
	.text
	.align	2
	.global	change_directory
	.syntax unified
	.arm
	.fpu softvfp
	.type	change_directory, %function
change_directory:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L143
	bl	getuid
	str	r0, [fp, #-12]
	ldr	r0, [fp, #-12]
	bl	getpwuid
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	chdir
	mov	r3, r0
	b	.L144
.L143:
	ldr	r3, [fp, #-16]
	add	r3, r3, #8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L145
	ldr	r3, .L147
	ldr	r3, [r3]
	mov	r2, #23
	mov	r1, #1
	ldr	r0, .L147+4
	bl	fwrite
	mvn	r3, #0
	b	.L144
.L145:
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	chdir
	mov	r3, r0
	cmp	r3, #0
	bge	.L146
	ldr	r0, .L147+8
	bl	perror
	mvn	r3, #0
	b	.L144
.L146:
	mov	r3, #0
.L144:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L148:
	.align	2
.L147:
	.word	stderr
	.word	.LC20
	.word	.LC11
	.size	change_directory, .-change_directory
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
