	.file	"140927.c"
	.intel_syntax noprefix
	.text
	.local	verbose
	.comm	verbose,1,1
	.local	terminate
	.comm	terminate,1,1
	.local	cmd
	.comm	cmd,1,1
	.local	cmd_asc
	.comm	cmd_asc,8,8
	.local	arg1
	.comm	arg1,8,8
	.local	arg2
	.comm	arg2,8,8
	.local	arg3
	.comm	arg3,8,8
	.local	keyb_buf
	.comm	keyb_buf,80,32
	.data
	.align 8
	.type	cpbuf_sz, @object
	.size	cpbuf_sz, 8
cpbuf_sz:
	.quad	4096
	.globl	cmd_table
	.section	.rodata
.LC0:
	.string	"help"
.LC1:
	.string	"quit"
.LC2:
	.string	"q"
.LC3:
	.string	"exit"
.LC4:
	.string	"ls"
.LC5:
	.string	"dir"
.LC6:
	.string	"md"
.LC7:
	.string	"mkdir"
.LC8:
	.string	"rd"
.LC9:
	.string	"rmdir"
.LC10:
	.string	"cd"
.LC11:
	.string	"chdir"
.LC12:
	.string	"rm"
.LC13:
	.string	"del"
.LC14:
	.string	"cp"
.LC15:
	.string	"copy"
.LC16:
	.string	"mv"
.LC17:
	.string	"ren"
.LC18:
	.string	"pwd"
.LC19:
	.string	"verbose"
	.section	.data.rel.local,"aw"
	.align 32
	.type	cmd_table, @object
	.size	cmd_table, 336
cmd_table:
	.quad	.LC0
	.byte	2
	.zero	7
	.quad	.LC1
	.byte	3
	.zero	7
	.quad	.LC2
	.byte	3
	.zero	7
	.quad	.LC3
	.byte	3
	.zero	7
	.quad	.LC4
	.byte	4
	.zero	7
	.quad	.LC5
	.byte	4
	.zero	7
	.quad	.LC6
	.byte	5
	.zero	7
	.quad	.LC7
	.byte	5
	.zero	7
	.quad	.LC8
	.byte	6
	.zero	7
	.quad	.LC9
	.byte	6
	.zero	7
	.quad	.LC10
	.byte	7
	.zero	7
	.quad	.LC11
	.byte	7
	.zero	7
	.quad	.LC12
	.byte	8
	.zero	7
	.quad	.LC13
	.byte	8
	.zero	7
	.quad	.LC14
	.byte	10
	.zero	7
	.quad	.LC15
	.byte	10
	.zero	7
	.quad	.LC16
	.byte	9
	.zero	7
	.quad	.LC17
	.byte	9
	.zero	7
	.quad	.LC18
	.byte	11
	.zero	7
	.quad	.LC19
	.byte	13
	.zero	7
	.quad	0
	.byte	0
	.zero	7
	.section	.rodata
	.align 8
.LC20:
	.string	"\"tiny\" command line shell, v0.90"
	.align 8
.LC21:
	.string	"written by chris@groessler.org"
.LC22:
	.string	"type 'help' for help\n"
	.text
	.type	banner, @function
banner:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC20[rip]
	call	puts@PLT
	lea	rdi, .LC21[rip]
	call	puts@PLT
	lea	rdi, .LC22[rip]
	call	puts@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	banner, .-banner
	.section	.rodata
.LC23:
	.string	">>> "
.LC24:
	.string	""
.LC25:
	.string	" \t\n"
	.text
	.type	get_command, @function
get_command:
.LFB7:
	.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	BYTE PTR -1[rbp], 0
	mov	QWORD PTR arg3[rip], 0
	mov	rax, QWORD PTR arg3[rip]
	mov	QWORD PTR arg2[rip], rax
	mov	rax, QWORD PTR arg2[rip]
	mov	QWORD PTR arg1[rip], rax
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdx, rax
	mov	esi, 80
	lea	rdi, keyb_buf[rip]
	call	fgets@PLT
	test	rax, rax
	jne	.L3
	lea	rdi, .LC24[rip]
	call	puts@PLT
	mov	BYTE PTR cmd[rip], 3
	jmp	.L2
.L3:
	lea	rsi, .LC25[rip]
	lea	rdi, keyb_buf[rip]
	call	strtok@PLT
	mov	QWORD PTR cmd_asc[rip], rax
	mov	rax, QWORD PTR cmd_asc[rip]
	test	rax, rax
	jne	.L5
	mov	BYTE PTR cmd[rip], 0
	jmp	.L2
.L5:
	mov	BYTE PTR cmd[rip], 1
	jmp	.L6
.L9:
	mov	rdx, QWORD PTR cmd_asc[rip]
	movzx	eax, BYTE PTR -1[rbp]
	cdqe
	sal	rax, 4
	mov	rcx, rax
	lea	rax, cmd_table[rip]
	mov	rax, QWORD PTR [rcx+rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L7
	movzx	eax, BYTE PTR -1[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, cmd_table[rip+8]
	movzx	eax, BYTE PTR [rdx+rax]
	mov	BYTE PTR cmd[rip], al
	jmp	.L8
.L7:
	movzx	eax, BYTE PTR -1[rbp]
	add	eax, 1
	mov	BYTE PTR -1[rbp], al
.L6:
	movzx	eax, BYTE PTR -1[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, cmd_table[rip]
	mov	rax, QWORD PTR [rdx+rax]
	test	rax, rax
	jne	.L9
.L8:
	lea	rsi, .LC25[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR arg1[rip], rax
	mov	rax, QWORD PTR arg1[rip]
	test	rax, rax
	je	.L12
	lea	rsi, .LC25[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR arg2[rip], rax
	mov	rax, QWORD PTR arg2[rip]
	test	rax, rax
	je	.L13
	lea	rsi, .LC25[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR arg3[rip], rax
	jmp	.L2
.L12:
	nop
	jmp	.L2
.L13:
	nop
.L2:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	get_command, .-get_command
	.section	.rodata
.LC26:
	.string	"quit, exit -  exit shell"
	.align 8
.LC27:
	.string	"ls, dir    -  display current directory"
	.align 8
.LC28:
	.string	"              and drive contents"
.LC29:
	.string	"rm, del    -  delete file"
.LC30:
	.string	"cp, copy   -  copy file"
.LC31:
	.string	"mv, ren    -  rename file"
	.align 8
.LC32:
	.string	"cd, chdir  -  change directory or drive"
	.align 8
.LC33:
	.string	"md, mkdir  -  make directory or drive"
	.align 8
.LC34:
	.string	"rd, rmdir  -  remove directory or drive"
	.align 8
.LC35:
	.string	"verbose    -  set verbosity level"
	.align 8
.LC36:
	.string	"sorry, you cannot start programs here"
	.text
	.type	cmd_help, @function
cmd_help:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC26[rip]
	call	puts@PLT
	lea	rdi, .LC27[rip]
	call	puts@PLT
	lea	rdi, .LC28[rip]
	call	puts@PLT
	lea	rdi, .LC29[rip]
	call	puts@PLT
	lea	rdi, .LC30[rip]
	call	puts@PLT
	lea	rdi, .LC31[rip]
	call	puts@PLT
	lea	rdi, .LC32[rip]
	call	puts@PLT
	lea	rdi, .LC33[rip]
	call	puts@PLT
	lea	rdi, .LC34[rip]
	call	puts@PLT
	lea	rdi, .LC35[rip]
	call	puts@PLT
	lea	rdi, .LC36[rip]
	call	puts@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	cmd_help, .-cmd_help
	.section	.rodata
.LC37:
	.string	"usage: ls [dir]"
.LC38:
	.string	"."
.LC39:
	.string	"Buffer addr: %p\n"
.LC40:
	.string	"opendir failed"
	.text
	.type	cmd_ls, @function
cmd_ls:
.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	rax, QWORD PTR arg2[rip]
	test	rax, rax
	je	.L16
	lea	rdi, .LC37[rip]
	call	puts@PLT
	jmp	.L15
.L16:
	mov	rax, QWORD PTR arg1[rip]
	test	rax, rax
	je	.L18
	mov	rax, QWORD PTR arg1[rip]
	mov	QWORD PTR -24[rbp], rax
	jmp	.L19
.L18:
	lea	rax, .LC38[rip]
	mov	QWORD PTR -24[rbp], rax
.L19:
	movzx	eax, BYTE PTR verbose[rip]
	test	al, al
	je	.L20
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC39[rip]
	mov	eax, 0
	call	printf@PLT
.L20:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	opendir@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L22
	lea	rdi, .LC40[rip]
	call	puts@PLT
	jmp	.L15
.L23:
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 19
	mov	rdi, rax
	call	puts@PLT
.L22:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	readdir@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L23
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	closedir@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	cmd_ls, .-cmd_ls
	.section	.rodata
.LC41:
	.string	"usage: rm <file>"
.LC42:
	.string	"remove failed: %s\n"
	.text
	.type	cmd_rm, @function
cmd_rm:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR arg1[rip]
	test	rax, rax
	je	.L25
	mov	rax, QWORD PTR arg2[rip]
	test	rax, rax
	je	.L26
.L25:
	lea	rdi, .LC41[rip]
	call	puts@PLT
	jmp	.L24
.L26:
	mov	rax, QWORD PTR arg1[rip]
	mov	rdi, rax
	call	unlink@PLT
	test	eax, eax
	je	.L24
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC42[rip]
	mov	eax, 0
	call	printf@PLT
.L24:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	cmd_rm, .-cmd_rm
	.section	.rodata
.LC43:
	.string	"usage: mkdir <dir>"
.LC44:
	.string	"mkdir failed: %s\n"
	.text
	.type	cmd_mkdir, @function
cmd_mkdir:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR arg1[rip]
	test	rax, rax
	je	.L29
	mov	rax, QWORD PTR arg2[rip]
	test	rax, rax
	je	.L30
.L29:
	lea	rdi, .LC43[rip]
	call	puts@PLT
	jmp	.L28
.L30:
	mov	rax, QWORD PTR arg1[rip]
	mov	esi, 511
	mov	rdi, rax
	call	mkdir@PLT
	test	eax, eax
	je	.L28
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC44[rip]
	mov	eax, 0
	call	printf@PLT
.L28:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	cmd_mkdir, .-cmd_mkdir
	.section	.rodata
.LC45:
	.string	"usage: rmdir <dir>"
.LC46:
	.string	"rmdir failed: %s\n"
	.text
	.type	cmd_rmdir, @function
cmd_rmdir:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR arg1[rip]
	test	rax, rax
	je	.L33
	mov	rax, QWORD PTR arg2[rip]
	test	rax, rax
	je	.L34
.L33:
	lea	rdi, .LC45[rip]
	call	puts@PLT
	jmp	.L32
.L34:
	mov	rax, QWORD PTR arg1[rip]
	mov	rdi, rax
	call	rmdir@PLT
	test	eax, eax
	je	.L32
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC46[rip]
	mov	eax, 0
	call	printf@PLT
.L32:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	cmd_rmdir, .-cmd_rmdir
	.section	.rodata
.LC47:
	.string	"usage: cddir <dir>"
.LC48:
	.string	"chdir failed: %s\n"
	.text
	.type	cmd_chdir, @function
cmd_chdir:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR arg1[rip]
	test	rax, rax
	je	.L37
	mov	rax, QWORD PTR arg2[rip]
	test	rax, rax
	je	.L38
.L37:
	lea	rdi, .LC47[rip]
	call	puts@PLT
	jmp	.L36
.L38:
	mov	rax, QWORD PTR arg1[rip]
	mov	rdi, rax
	call	chdir@PLT
	test	eax, eax
	je	.L36
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC48[rip]
	mov	eax, 0
	call	printf@PLT
.L36:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	cmd_chdir, .-cmd_chdir
	.section	.rodata
.LC49:
	.string	"usage: pwd"
.LC50:
	.string	"malloc %u bytes failed: %s\n"
.LC51:
	.string	"getcwd failed: %s\n"
	.text
	.type	cmd_pwd, @function
cmd_pwd:
.LFB14:
	.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	rax, QWORD PTR arg1[rip]
	test	rax, rax
	je	.L41
	lea	rdi, .LC49[rip]
	call	puts@PLT
	jmp	.L40
.L41:
	mov	edi, 4096
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L43
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	esi, 4096
	lea	rdi, .LC50[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L40
.L43:
	movzx	eax, BYTE PTR verbose[rip]
	test	al, al
	je	.L44
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC39[rip]
	mov	eax, 0
	call	printf@PLT
.L44:
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 4096
	mov	rdi, rax
	call	getcwd@PLT
	test	rax, rax
	jne	.L45
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC51[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L40
.L45:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
.L40:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	cmd_pwd, .-cmd_pwd
	.section	.rodata
.LC52:
	.string	"usage: mv <oldname> <newname>"
.LC53:
	.string	"rename failed: %s\n"
	.text
	.type	cmd_rename, @function
cmd_rename:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR arg2[rip]
	test	rax, rax
	je	.L47
	mov	rax, QWORD PTR arg3[rip]
	test	rax, rax
	je	.L48
.L47:
	lea	rdi, .LC52[rip]
	call	puts@PLT
	jmp	.L46
.L48:
	mov	rdx, QWORD PTR arg2[rip]
	mov	rax, QWORD PTR arg1[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	rename@PLT
	test	eax, eax
	je	.L46
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC53[rip]
	mov	eax, 0
	call	printf@PLT
.L46:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	cmd_rename, .-cmd_rename
	.section	.rodata
.LC54:
	.string	"usage: cp <src> <dest>"
.LC55:
	.string	"open(%s) failed: %s\n"
.LC56:
	.string	"read error: %s\n"
.LC57:
	.string	"write error: %s\n"
	.text
	.type	cmd_copy, @function
cmd_copy:
.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, 32
	mov	DWORD PTR -24[rbp], -1
	mov	DWORD PTR -20[rbp], -1
	mov	rax, QWORD PTR arg2[rip]
	test	rax, rax
	je	.L51
	mov	rax, QWORD PTR arg3[rip]
	test	rax, rax
	je	.L52
.L51:
	lea	rdi, .LC54[rip]
	call	puts@PLT
	jmp	.L50
.L52:
	mov	rax, QWORD PTR cpbuf_sz[rip]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L54
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR cpbuf_sz[rip]
	mov	rsi, rax
	lea	rdi, .LC50[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L50
.L54:
	movzx	eax, BYTE PTR verbose[rip]
	test	al, al
	je	.L64
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC39[rip]
	mov	eax, 0
	call	printf@PLT
.L64:
	cmp	DWORD PTR -24[rbp], -1
	jne	.L56
	mov	rax, QWORD PTR arg1[rip]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -24[rbp], 0
	jns	.L56
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR arg1[rip]
	mov	rsi, rax
	lea	rdi, .LC55[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L57
.L56:
	mov	rdx, QWORD PTR cpbuf_sz[rip]
	mov	rcx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], 0
	jns	.L58
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC56[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L57
.L58:
	cmp	DWORD PTR -16[rbp], 0
	je	.L66
	cmp	DWORD PTR -20[rbp], -1
	jne	.L60
	mov	rax, QWORD PTR arg2[rip]
	mov	edx, 511
	mov	esi, 577
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jns	.L60
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR arg2[rip]
	mov	rsi, rax
	lea	rdi, .LC55[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L57
.L60:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	js	.L61
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -16[rbp]
	je	.L62
.L61:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC57[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L57
.L62:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR cpbuf_sz[rip]
	cmp	rdx, rax
	jne	.L67
	jmp	.L64
.L66:
	nop
	jmp	.L57
.L67:
	nop
.L57:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	cmp	DWORD PTR -24[rbp], 0
	js	.L65
	mov	eax, DWORD PTR -24[rbp]
	mov	edi, eax
	call	close@PLT
.L65:
	cmp	DWORD PTR -20[rbp], 0
	js	.L50
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	close@PLT
.L50:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	cmd_copy, .-cmd_copy
	.section	.rodata
.LC58:
	.string	"usage: verbose <level>"
.LC59:
	.string	"invalid verbosity level"
.LC60:
	.string	"verbosity level set to %d\n"
	.text
	.type	cmd_verbose, @function
cmd_verbose:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR arg1[rip]
	test	rax, rax
	je	.L69
	mov	rax, QWORD PTR arg2[rip]
	test	rax, rax
	je	.L70
.L69:
	lea	rdi, .LC58[rip]
	call	puts@PLT
	jmp	.L68
.L70:
	mov	rax, QWORD PTR arg1[rip]
	lea	rcx, -24[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	rdi, rax
	call	strtoul@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 255
	ja	.L72
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L73
.L72:
	lea	rdi, .LC59[rip]
	call	puts@PLT
	jmp	.L68
.L73:
	mov	rax, QWORD PTR -16[rbp]
	mov	BYTE PTR verbose[rip], al
	movzx	eax, BYTE PTR verbose[rip]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC60[rip]
	mov	eax, 0
	call	printf@PLT
.L68:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L75
	call	__stack_chk_fail@PLT
.L75:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	cmd_verbose, .-cmd_verbose
	.section	.rodata
.LC61:
	.string	"internal error"
.LC62:
	.string	"invalid command"
	.text
	.type	run_command, @function
run_command:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	movzx	eax, BYTE PTR cmd[rip]
	movzx	eax, al
	cmp	eax, 13
	ja	.L77
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L79[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L79[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L79:
	.long	.L93-.L79
	.long	.L90-.L79
	.long	.L89-.L79
	.long	.L88-.L79
	.long	.L87-.L79
	.long	.L86-.L79
	.long	.L85-.L79
	.long	.L84-.L79
	.long	.L83-.L79
	.long	.L82-.L79
	.long	.L81-.L79
	.long	.L80-.L79
	.long	.L77-.L79
	.long	.L78-.L79
	.text
.L77:
	lea	rdi, .LC61[rip]
	call	puts@PLT
	jmp	.L76
.L90:
	lea	rdi, .LC62[rip]
	call	puts@PLT
	jmp	.L76
.L89:
	call	cmd_help
	jmp	.L76
.L88:
	mov	BYTE PTR terminate[rip], 1
	jmp	.L76
.L87:
	call	cmd_ls
	jmp	.L76
.L83:
	call	cmd_rm
	jmp	.L76
.L84:
	call	cmd_chdir
	jmp	.L76
.L86:
	call	cmd_mkdir
	jmp	.L76
.L85:
	call	cmd_rmdir
	jmp	.L76
.L80:
	call	cmd_pwd
	jmp	.L76
.L82:
	call	cmd_rename
	jmp	.L76
.L81:
	call	cmd_copy
	jmp	.L76
.L78:
	call	cmd_verbose
	jmp	.L76
.L93:
	nop
.L76:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	run_command, .-run_command
	.globl	main
	.type	main, @function
main:
.LFB19:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	call	banner
	jmp	.L95
.L96:
	call	get_command
	call	run_command
.L95:
	movzx	eax, BYTE PTR terminate[rip]
	test	al, al
	je	.L96
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	main, .-main
	.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	"140927.c"
	.text
	.local	verbose
	.comm	verbose,1,1
	.local	terminate
	.comm	terminate,1,1
	.local	cmd
	.comm	cmd,1,1
	.local	cmd_asc
	.comm	cmd_asc,4,4
	.local	arg1
	.comm	arg1,4,4
	.local	arg2
	.comm	arg2,4,4
	.local	arg3
	.comm	arg3,4,4
	.local	keyb_buf
	.comm	keyb_buf,80,4
	.data
	.align	2
	.type	cpbuf_sz, %object
	.size	cpbuf_sz, 4
cpbuf_sz:
	.word	4096
	.global	cmd_table
	.section	.rodata
	.align	2
.LC0:
	.ascii	"help\000"
	.align	2
.LC1:
	.ascii	"quit\000"
	.align	2
.LC2:
	.ascii	"q\000"
	.align	2
.LC3:
	.ascii	"exit\000"
	.align	2
.LC4:
	.ascii	"ls\000"
	.align	2
.LC5:
	.ascii	"dir\000"
	.align	2
.LC6:
	.ascii	"md\000"
	.align	2
.LC7:
	.ascii	"mkdir\000"
	.align	2
.LC8:
	.ascii	"rd\000"
	.align	2
.LC9:
	.ascii	"rmdir\000"
	.align	2
.LC10:
	.ascii	"cd\000"
	.align	2
.LC11:
	.ascii	"chdir\000"
	.align	2
.LC12:
	.ascii	"rm\000"
	.align	2
.LC13:
	.ascii	"del\000"
	.align	2
.LC14:
	.ascii	"cp\000"
	.align	2
.LC15:
	.ascii	"copy\000"
	.align	2
.LC16:
	.ascii	"mv\000"
	.align	2
.LC17:
	.ascii	"ren\000"
	.align	2
.LC18:
	.ascii	"pwd\000"
	.align	2
.LC19:
	.ascii	"verbose\000"
	.data
	.align	2
	.type	cmd_table, %object
	.size	cmd_table, 168
cmd_table:
	.word	.LC0
	.byte	2
	.space	3
	.word	.LC1
	.byte	3
	.space	3
	.word	.LC2
	.byte	3
	.space	3
	.word	.LC3
	.byte	3
	.space	3
	.word	.LC4
	.byte	4
	.space	3
	.word	.LC5
	.byte	4
	.space	3
	.word	.LC6
	.byte	5
	.space	3
	.word	.LC7
	.byte	5
	.space	3
	.word	.LC8
	.byte	6
	.space	3
	.word	.LC9
	.byte	6
	.space	3
	.word	.LC10
	.byte	7
	.space	3
	.word	.LC11
	.byte	7
	.space	3
	.word	.LC12
	.byte	8
	.space	3
	.word	.LC13
	.byte	8
	.space	3
	.word	.LC14
	.byte	10
	.space	3
	.word	.LC15
	.byte	10
	.space	3
	.word	.LC16
	.byte	9
	.space	3
	.word	.LC17
	.byte	9
	.space	3
	.word	.LC18
	.byte	11
	.space	3
	.word	.LC19
	.byte	13
	.space	3
	.word	0
	.byte	0
	.space	3
	.section	.rodata
	.align	2
.LC20:
	.ascii	"\"tiny\" command line shell, v0.90\000"
	.align	2
.LC21:
	.ascii	"written by chris@groessler.org\000"
	.align	2
.LC22:
	.ascii	"type 'help' for help\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	banner, %function
banner:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L2
	bl	puts
	ldr	r0, .L2+4
	bl	puts
	ldr	r0, .L2+8
	bl	puts
	nop
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.size	banner, .-banner
	.section	.rodata
	.align	2
.LC23:
	.ascii	">>> \000"
	.align	2
.LC24:
	.ascii	"\000"
	.align	2
.LC25:
	.ascii	" \011\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_command, %function
get_command:
	@ 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, #0
	strb	r3, [fp, #-5]
	ldr	r3, .L16
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L16
	ldr	r3, [r3]
	ldr	r2, .L16+4
	str	r3, [r2]
	ldr	r3, .L16+4
	ldr	r3, [r3]
	ldr	r2, .L16+8
	str	r3, [r2]
	ldr	r0, .L16+12
	bl	printf
	ldr	r3, .L16+16
	ldr	r3, [r3]
	mov	r2, r3
	mov	r1, #80
	ldr	r0, .L16+20
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L5
	ldr	r0, .L16+24
	bl	puts
	ldr	r3, .L16+28
	mov	r2, #3
	strb	r2, [r3]
	b	.L4
.L5:
	ldr	r1, .L16+32
	ldr	r0, .L16+20
	bl	strtok
	mov	r3, r0
	ldr	r2, .L16+36
	str	r3, [r2]
	ldr	r3, .L16+36
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L7
	ldr	r3, .L16+28
	mov	r2, #0
	strb	r2, [r3]
	b	.L4
.L7:
	ldr	r3, .L16+28
	mov	r2, #1
	strb	r2, [r3]
	b	.L8
.L11:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	ldr	r2, .L16+40
	ldr	r3, [r2, r3, lsl #3]
	ldr	r2, .L16+36
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	ldr	r2, .L16+40
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldrb	r2, [r3, #4]	@ zero_extendqisi2
	ldr	r3, .L16+28
	strb	r2, [r3]
	b	.L10
.L9:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r3, [fp, #-5]
.L8:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	ldr	r2, .L16+40
	ldr	r3, [r2, r3, lsl #3]
	cmp	r3, #0
	bne	.L11
.L10:
	ldr	r1, .L16+32
	mov	r0, #0
	bl	strtok
	mov	r3, r0
	ldr	r2, .L16+8
	str	r3, [r2]
	ldr	r3, .L16+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L14
	ldr	r1, .L16+32
	mov	r0, #0
	bl	strtok
	mov	r3, r0
	ldr	r2, .L16+4
	str	r3, [r2]
	ldr	r3, .L16+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L15
	ldr	r1, .L16+32
	mov	r0, #0
	bl	strtok
	mov	r3, r0
	ldr	r2, .L16
	str	r3, [r2]
	b	.L4
.L14:
	nop
	b	.L4
.L15:
	nop
.L4:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	arg3
	.word	arg2
	.word	arg1
	.word	.LC23
	.word	stdin
	.word	keyb_buf
	.word	.LC24
	.word	cmd
	.word	.LC25
	.word	cmd_asc
	.word	cmd_table
	.size	get_command, .-get_command
	.section	.rodata
	.align	2
.LC26:
	.ascii	"quit, exit -  exit shell\000"
	.align	2
.LC27:
	.ascii	"ls, dir    -  display current directory\000"
	.align	2
.LC28:
	.ascii	"              and drive contents\000"
	.align	2
.LC29:
	.ascii	"rm, del    -  delete file\000"
	.align	2
.LC30:
	.ascii	"cp, copy   -  copy file\000"
	.align	2
.LC31:
	.ascii	"mv, ren    -  rename file\000"
	.align	2
.LC32:
	.ascii	"cd, chdir  -  change directory or drive\000"
	.align	2
.LC33:
	.ascii	"md, mkdir  -  make directory or drive\000"
	.align	2
.LC34:
	.ascii	"rd, rmdir  -  remove directory or drive\000"
	.align	2
.LC35:
	.ascii	"verbose    -  set verbosity level\000"
	.align	2
.LC36:
	.ascii	"sorry, you cannot start programs here\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cmd_help, %function
cmd_help:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L19
	bl	puts
	ldr	r0, .L19+4
	bl	puts
	ldr	r0, .L19+8
	bl	puts
	ldr	r0, .L19+12
	bl	puts
	ldr	r0, .L19+16
	bl	puts
	ldr	r0, .L19+20
	bl	puts
	ldr	r0, .L19+24
	bl	puts
	ldr	r0, .L19+28
	bl	puts
	ldr	r0, .L19+32
	bl	puts
	ldr	r0, .L19+36
	bl	puts
	ldr	r0, .L19+40
	bl	puts
	nop
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC26
	.word	.LC27
	.word	.LC28
	.word	.LC29
	.word	.LC30
	.word	.LC31
	.word	.LC32
	.word	.LC33
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.size	cmd_help, .-cmd_help
	.section	.rodata
	.align	2
.LC37:
	.ascii	"usage: ls [dir]\000"
	.align	2
.LC38:
	.ascii	".\000"
	.align	2
.LC39:
	.ascii	"Buffer addr: %p\012\000"
	.align	2
.LC40:
	.ascii	"opendir failed\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cmd_ls, %function
cmd_ls:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L30
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L22
	ldr	r0, .L30+4
	bl	puts
	b	.L21
.L22:
	ldr	r3, .L30+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L24
	ldr	r3, .L30+8
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	b	.L25
.L24:
	ldr	r3, .L30+12
	str	r3, [fp, #-16]
.L25:
	ldr	r3, .L30+16
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L26
	ldr	r1, [fp, #-16]
	ldr	r0, .L30+20
	bl	printf
.L26:
	ldr	r0, [fp, #-16]
	bl	opendir
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L28
	ldr	r0, .L30+24
	bl	puts
	b	.L21
.L29:
	ldr	r3, [fp, #-8]
	add	r3, r3, #11
	mov	r0, r3
	bl	puts
.L28:
	ldr	r0, [fp, #-12]
	bl	readdir
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L29
	ldr	r0, [fp, #-12]
	bl	closedir
.L21:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	arg2
	.word	.LC37
	.word	arg1
	.word	.LC38
	.word	verbose
	.word	.LC39
	.word	.LC40
	.size	cmd_ls, .-cmd_ls
	.section	.rodata
	.align	2
.LC41:
	.ascii	"usage: rm <file>\000"
	.align	2
.LC42:
	.ascii	"remove failed: %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cmd_rm, %function
cmd_rm:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L36
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L33
	ldr	r3, .L36+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L34
.L33:
	ldr	r0, .L36+8
	bl	puts
	pop	{fp, pc}
.L34:
	ldr	r3, .L36
	ldr	r3, [r3]
	mov	r0, r3
	bl	unlink
	mov	r3, r0
	cmp	r3, #0
	popeq	{fp, pc}
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L36+12
	bl	printf
	pop	{fp, pc}
.L37:
	.align	2
.L36:
	.word	arg1
	.word	arg2
	.word	.LC41
	.word	.LC42
	.size	cmd_rm, .-cmd_rm
	.section	.rodata
	.align	2
.LC43:
	.ascii	"usage: mkdir <dir>\000"
	.align	2
.LC44:
	.ascii	"mkdir failed: %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cmd_mkdir, %function
cmd_mkdir:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L42
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L39
	ldr	r3, .L42+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L40
.L39:
	ldr	r0, .L42+8
	bl	puts
	pop	{fp, pc}
.L40:
	ldr	r3, .L42
	ldr	r3, [r3]
	ldr	r1, .L42+12
	mov	r0, r3
	bl	mkdir
	mov	r3, r0
	cmp	r3, #0
	popeq	{fp, pc}
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L42+16
	bl	printf
	pop	{fp, pc}
.L43:
	.align	2
.L42:
	.word	arg1
	.word	arg2
	.word	.LC43
	.word	511
	.word	.LC44
	.size	cmd_mkdir, .-cmd_mkdir
	.section	.rodata
	.align	2
.LC45:
	.ascii	"usage: rmdir <dir>\000"
	.align	2
.LC46:
	.ascii	"rmdir failed: %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cmd_rmdir, %function
cmd_rmdir:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L48
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L45
	ldr	r3, .L48+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L46
.L45:
	ldr	r0, .L48+8
	bl	puts
	pop	{fp, pc}
.L46:
	ldr	r3, .L48
	ldr	r3, [r3]
	mov	r0, r3
	bl	rmdir
	mov	r3, r0
	cmp	r3, #0
	popeq	{fp, pc}
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L48+12
	bl	printf
	pop	{fp, pc}
.L49:
	.align	2
.L48:
	.word	arg1
	.word	arg2
	.word	.LC45
	.word	.LC46
	.size	cmd_rmdir, .-cmd_rmdir
	.section	.rodata
	.align	2
.LC47:
	.ascii	"usage: cddir <dir>\000"
	.align	2
.LC48:
	.ascii	"chdir failed: %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cmd_chdir, %function
cmd_chdir:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L54
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L51
	ldr	r3, .L54+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L52
.L51:
	ldr	r0, .L54+8
	bl	puts
	pop	{fp, pc}
.L52:
	ldr	r3, .L54
	ldr	r3, [r3]
	mov	r0, r3
	bl	chdir
	mov	r3, r0
	cmp	r3, #0
	popeq	{fp, pc}
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L54+12
	bl	printf
	pop	{fp, pc}
.L55:
	.align	2
.L54:
	.word	arg1
	.word	arg2
	.word	.LC47
	.word	.LC48
	.size	cmd_chdir, .-cmd_chdir
	.section	.rodata
	.align	2
.LC49:
	.ascii	"usage: pwd\000"
	.align	2
.LC50:
	.ascii	"malloc %u bytes failed: %s\012\000"
	.align	2
.LC51:
	.ascii	"getcwd failed: %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cmd_pwd, %function
cmd_pwd:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L62
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L57
	ldr	r0, .L62+4
	bl	puts
	b	.L56
.L57:
	mov	r0, #4096
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L59
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	mov	r1, #4096
	ldr	r0, .L62+8
	bl	printf
	b	.L56
.L59:
	ldr	r3, .L62+12
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L60
	ldr	r1, [fp, #-8]
	ldr	r0, .L62+16
	bl	printf
.L60:
	mov	r1, #4096
	ldr	r0, [fp, #-8]
	bl	getcwd
	mov	r3, r0
	cmp	r3, #0
	bne	.L61
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L62+20
	bl	printf
	ldr	r0, [fp, #-8]
	bl	free
	b	.L56
.L61:
	ldr	r0, [fp, #-8]
	bl	puts
	ldr	r0, [fp, #-8]
	bl	free
.L56:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L63:
	.align	2
.L62:
	.word	arg1
	.word	.LC49
	.word	.LC50
	.word	verbose
	.word	.LC39
	.word	.LC51
	.size	cmd_pwd, .-cmd_pwd
	.section	.rodata
	.align	2
.LC52:
	.ascii	"usage: mv <oldname> <newname>\000"
	.align	2
.LC53:
	.ascii	"rename failed: %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cmd_rename, %function
cmd_rename:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L68
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L65
	ldr	r3, .L68+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L66
.L65:
	ldr	r0, .L68+8
	bl	puts
	pop	{fp, pc}
.L66:
	ldr	r3, .L68+12
	ldr	r3, [r3]
	ldr	r2, .L68
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	rename
	mov	r3, r0
	cmp	r3, #0
	popeq	{fp, pc}
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L68+16
	bl	printf
	pop	{fp, pc}
.L69:
	.align	2
.L68:
	.word	arg2
	.word	arg3
	.word	.LC52
	.word	arg1
	.word	.LC53
	.size	cmd_rename, .-cmd_rename
	.section	.rodata
	.align	2
.LC54:
	.ascii	"usage: cp <src> <dest>\000"
	.align	2
.LC55:
	.ascii	"open(%s) failed: %s\012\000"
	.align	2
.LC56:
	.ascii	"read error: %s\012\000"
	.align	2
.LC57:
	.ascii	"write error: %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cmd_copy, %function
cmd_copy:
	@ 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
	mvn	r3, #0
	str	r3, [fp, #-32]
	mvn	r3, #0
	str	r3, [fp, #-28]
	ldr	r3, .L88
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L71
	ldr	r3, .L88+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L72
.L71:
	ldr	r0, .L88+8
	bl	puts
	b	.L70
.L72:
	ldr	r3, .L88+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L74
	ldr	r3, .L88+12
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L88+16
	bl	printf
	b	.L70
.L74:
	ldr	r3, .L88+20
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L84
	ldr	r1, [fp, #-24]
	ldr	r0, .L88+24
	bl	printf
.L84:
	ldr	r3, [fp, #-32]
	cmn	r3, #1
	bne	.L76
	ldr	r3, .L88+28
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L76
	ldr	r3, .L88+28
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L88+32
	bl	printf
	b	.L77
.L76:
	ldr	r3, .L88+12
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-32]
	bl	read
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bge	.L78
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L88+36
	bl	printf
	b	.L77
.L78:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L86
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L80
	ldr	r3, .L88
	ldr	r3, [r3]
	ldr	r2, .L88+40
	ldr	r1, .L88+44
	mov	r0, r3
	bl	open
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L80
	ldr	r3, .L88
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L88+32
	bl	printf
	b	.L77
.L80:
	ldr	r3, [fp, #-20]
	mov	r2, r3
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-28]
	bl	write
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	blt	.L81
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	beq	.L82
.L81:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L88+48
	bl	printf
	b	.L77
.L82:
	ldr	r2, [fp, #-20]
	ldr	r3, .L88+12
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L87
	b	.L84
.L86:
	nop
	b	.L77
.L87:
	nop
.L77:
	ldr	r0, [fp, #-24]
	bl	free
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	blt	.L85
	ldr	r0, [fp, #-32]
	bl	close
.L85:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	blt	.L70
	ldr	r0, [fp, #-28]
	bl	close
.L70:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L89:
	.align	2
.L88:
	.word	arg2
	.word	arg3
	.word	.LC54
	.word	cpbuf_sz
	.word	.LC50
	.word	verbose
	.word	.LC39
	.word	arg1
	.word	.LC55
	.word	.LC56
	.word	511
	.word	577
	.word	.LC57
	.size	cmd_copy, .-cmd_copy
	.section	.rodata
	.align	2
.LC58:
	.ascii	"usage: verbose <level>\000"
	.align	2
.LC59:
	.ascii	"invalid verbosity level\000"
	.align	2
.LC60:
	.ascii	"verbosity level set to %d\012\000"
	.align	2
.LC61:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cmd_verbose, %function
cmd_verbose:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L98
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L98+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L91
	ldr	r3, .L98+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L92
.L91:
	ldr	r0, .L98+12
	bl	puts
	b	.L90
.L92:
	ldr	r3, .L98+4
	ldr	r3, [r3]
	sub	r1, fp, #16
	mov	r2, #10
	mov	r0, r3
	bl	strtoul
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #255
	bhi	.L94
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L95
.L94:
	ldr	r0, .L98+16
	bl	puts
	b	.L90
.L95:
	ldr	r3, [fp, #-12]
	and	r2, r3, #255
	ldr	r3, .L98+20
	strb	r2, [r3]
	ldr	r3, .L98+20
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L98+24
	bl	printf
.L90:
	ldr	r3, .L98
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L97
	bl	__stack_chk_fail
.L97:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L99:
	.align	2
.L98:
	.word	.LC61
	.word	arg1
	.word	arg2
	.word	.LC58
	.word	.LC59
	.word	verbose
	.word	.LC60
	.size	cmd_verbose, .-cmd_verbose
	.section	.rodata
	.align	2
.LC62:
	.ascii	"internal error\000"
	.align	2
.LC63:
	.ascii	"invalid command\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	run_command, %function
run_command:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L118
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #13
	ldrls	pc, [pc, r3, asl #2]
	b	.L101
.L103:
	.word	.L117
	.word	.L114
	.word	.L113
	.word	.L112
	.word	.L111
	.word	.L110
	.word	.L109
	.word	.L108
	.word	.L107
	.word	.L106
	.word	.L105
	.word	.L104
	.word	.L101
	.word	.L102
.L101:
	ldr	r0, .L118+4
	bl	puts
	pop	{fp, pc}
.L114:
	ldr	r0, .L118+8
	bl	puts
	pop	{fp, pc}
.L113:
	bl	cmd_help
	pop	{fp, pc}
.L112:
	ldr	r3, .L118+12
	mov	r2, #1
	strb	r2, [r3]
	pop	{fp, pc}
.L111:
	bl	cmd_ls
	pop	{fp, pc}
.L107:
	bl	cmd_rm
	pop	{fp, pc}
.L108:
	bl	cmd_chdir
	pop	{fp, pc}
.L110:
	bl	cmd_mkdir
	pop	{fp, pc}
.L109:
	bl	cmd_rmdir
	pop	{fp, pc}
.L104:
	bl	cmd_pwd
	pop	{fp, pc}
.L106:
	bl	cmd_rename
	pop	{fp, pc}
.L105:
	bl	cmd_copy
	pop	{fp, pc}
.L102:
	bl	cmd_verbose
	pop	{fp, pc}
.L117:
	nop
	pop	{fp, pc}
.L119:
	.align	2
.L118:
	.word	cmd
	.word	.LC62
	.word	.LC63
	.word	terminate
	.size	run_command, .-run_command
	.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
	bl	banner
	b	.L121
.L122:
	bl	get_command
	bl	run_command
.L121:
	ldr	r3, .L124
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L122
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L125:
	.align	2
.L124:
	.word	terminate
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
