// File: /workspace/github_cpp_makefile_star2_O1/ljl0222[P]SecondFileSystem/common.cpp
// Function: exeCmd(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
void exeCmd(vector<string> cmdList)
{
	if (cmdList.size() == 0) {
		return;
	}

	string cmd = cmdList[0];

	if (cmd == "format") {
		cout << "��ʽ���������̿ռ䣬����������" << endl;
		globalOpenFileTable.Format();
		globalINodeTable.Format();
		globalBufferManager.Bformat();
		globalFileSystem.FormatFileSystem();
		exit(0);
	}
	else if (cmd == "creat") {
		// globalUser.Mkdir(cmdList[1]);
		// cout << cmdList[1] << " " << cmdList[2] << endl;
		globalUser.Create(cmdList[1], cmdList[2]);
	}
	else if (cmd == "open") {
		globalUser.Open(cmdList[1], cmdList[2]);
	}
	else if (cmd == "read") {
		if (cmdList[2] == "-o") {
			globalUser.Read(cmdList[1], cmdList[3], cmdList[4]);
		}
		else {
			globalUser.Read(cmdList[1], "", cmdList[2]);
		}
	}
	else if (cmd == "write") {
		globalUser.Write(cmdList[1], cmdList[2], cmdList[3]);
	}
	else if (cmd == "seek") {
		globalUser.Seek(cmdList[1], cmdList[2], cmdList[3]);
	}
	else if (cmd == "close") {
		globalUser.Close(cmdList[1]);
	}
	else if (cmd == "mkdir") {
		globalUser.Mkdir(cmdList[1]);
	}
	else if (cmd == "rm") {
		globalUser.Delete(cmdList[1]);
	}
	else if (cmd == "ls") {
		globalUser.Ls();
	}
	else if (cmd == "cd") {
		globalUser.Cd(cmdList[1]);
	}
	else if (cmd == "exit") {
		exit(0);
	}
	else if (cmd == "") {
		return;
	}
	else {
		cout << "δʶ�𵽵ķ���: " << cmd << endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp            # imm = 0x2A8
movq (%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x81a6
movq %rdi, %rbx
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %r14
movq %r14, %rdi
callq 0x77a6
leaq 0x18ab(%rip), %rsi      # 0x9344
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
je 0x81b8
leaq 0x18ba(%rip), %rsi      # 0x936a
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x7c02
leaq 0x18a8(%rip), %rsi      # 0x9370
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x7c8e
leaq 0x1895(%rip), %rsi      # 0x9375
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x7d1a
leaq 0x1885(%rip), %rsi      # 0x937d
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x7e04
leaq 0x1873(%rip), %rsi      # 0x9383
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x7ed7
leaq 0x1860(%rip), %rsi      # 0x9388
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x806b
leaq 0x184e(%rip), %rsi      # 0x938e
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x80af
leaq 0x183c(%rip), %rsi      # 0x9394
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x80f3
leaq 0x1827(%rip), %rsi      # 0x9397
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x8134
leaq 0x1812(%rip), %rsi      # 0x939a
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x8142
leaq 0x17fd(%rip), %rsi      # 0x939d
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x820c
leaq 0x1511(%rip), %rsi      # 0x90c9
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x8191
movq 0x53f8(%rip), %rdi      # 0xcfc8
leaq 0x17cb(%rip), %rsi      # 0x93a2
movl $0x10, %edx
callq 0x3260
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq 0x53d8(%rip), %rdi      # 0xcfc8
callq 0x3260
movq %rax, %rdi
callq 0x3110
jmp 0x8191
movq (%rbx), %rax
leaq -0x2b8(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x2c8(%rbp), %rdi
callq 0x77a6
movq (%rbx), %rax
leaq -0x178(%rbp), %r12
movq %r12, -0x10(%r12)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq -0x188(%rbp), %rdi
callq 0x77a6
leaq 0x15f84(%rip), %rdi     # 0x1dbd8
leaq -0x2c8(%rbp), %rsi
leaq -0x188(%rbp), %rdx
callq 0x68fa
movq -0x188(%rbp), %rdi
cmpq %r12, %rdi
je 0x7c82
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x2c8(%rbp), %rdi
jmp 0x8181
movq (%rbx), %rax
leaq -0x298(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x2a8(%rbp), %rdi
callq 0x77a6
movq (%rbx), %rax
leaq -0x158(%rbp), %r12
movq %r12, -0x10(%r12)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq -0x168(%rbp), %rdi
callq 0x77a6
leaq 0x15ef8(%rip), %rdi     # 0x1dbd8
leaq -0x2a8(%rbp), %rsi
leaq -0x168(%rbp), %rdx
callq 0x6b1c
movq -0x168(%rbp), %rdi
cmpq %r12, %rdi
je 0x7d0e
movq -0x158(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x2a8(%rbp), %rdi
jmp 0x8181
movq (%rbx), %rdi
addq $0x40, %rdi
leaq 0x1652(%rip), %rsi      # 0x937a
callq 0x30b0
movq (%rbx), %rcx
testl %eax, %eax
je 0x7f95
leaq -0x258(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rcx), %rsi
movq 0x28(%rcx), %rdx
addq %rsi, %rdx
leaq -0x268(%rbp), %rdi
callq 0x77a6
leaq -0xf8(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x135c(%rip), %rdx      # 0x90c9
leaq -0x108(%rbp), %rdi
movq %rdx, %rsi
callq 0x85a0
movq (%rbx), %rax
leaq -0xd8(%rbp), %r13
movq %r13, -0x10(%r13)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq -0xe8(%rbp), %rdi
callq 0x77a6
leaq 0x15e30(%rip), %rdi     # 0x1dbd8
leaq -0x268(%rbp), %rsi
leaq -0x108(%rbp), %rdx
leaq -0xe8(%rbp), %rcx
callq 0x72c4
movq -0xe8(%rbp), %rdi
cmpq %r13, %rdi
je 0x7ddd
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x108(%rbp), %rdi
cmpq %r12, %rdi
je 0x7df8
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x268(%rbp), %rdi
jmp 0x8181
movq (%rbx), %rax
leaq -0x238(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x248(%rbp), %rdi
callq 0x77a6
movq (%rbx), %rax
leaq -0xb8(%rbp), %r12
movq %r12, -0x10(%r12)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq -0xc8(%rbp), %rdi
callq 0x77a6
movq (%rbx), %rax
leaq -0x98(%rbp), %r13
movq %r13, -0x10(%r13)
movq 0x60(%rax), %rsi
movq 0x68(%rax), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %rdi
callq 0x77a6
leaq 0x15d5d(%rip), %rdi     # 0x1dbd8
leaq -0x248(%rbp), %rsi
leaq -0xc8(%rbp), %rdx
leaq -0xa8(%rbp), %rcx
callq 0x6fee
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0x7eb0
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0x7ecb
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x248(%rbp), %rdi
jmp 0x8181
movq (%rbx), %rax
leaq -0x218(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x228(%rbp), %rdi
callq 0x77a6
movq (%rbx), %rax
leaq -0x78(%rbp), %r12
movq %r12, -0x10(%r12)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x77a6
movq (%rbx), %rax
leaq -0x58(%rbp), %r13
movq %r13, -0x10(%r13)
movq 0x60(%rax), %rsi
movq 0x68(%rax), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x77a6
leaq 0x15c93(%rip), %rdi     # 0x1dbd8
leaq -0x228(%rbp), %rsi
leaq -0x88(%rbp), %rdx
leaq -0x68(%rbp), %rcx
callq 0x6dd6
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0x7f71
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x7f89
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x228(%rbp), %rdi
jmp 0x8181
leaq -0x278(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rcx), %rsi
movq 0x28(%rcx), %rdx
addq %rsi, %rdx
leaq -0x288(%rbp), %rdi
callq 0x77a6
movq (%rbx), %rax
leaq -0x138(%rbp), %r12
movq %r12, -0x10(%r12)
movq 0x60(%rax), %rsi
movq 0x68(%rax), %rdx
addq %rsi, %rdx
leaq -0x148(%rbp), %rdi
callq 0x77a6
movq (%rbx), %rax
leaq -0x118(%rbp), %r13
movq %r13, -0x10(%r13)
movq 0x80(%rax), %rsi
movq 0x88(%rax), %rdx
addq %rsi, %rdx
leaq -0x128(%rbp), %rdi
callq 0x77a6
leaq 0x15bc9(%rip), %rdi     # 0x1dbd8
leaq -0x288(%rbp), %rsi
leaq -0x148(%rbp), %rdx
leaq -0x128(%rbp), %rcx
callq 0x72c4
movq -0x128(%rbp), %rdi
cmpq %r13, %rdi
je 0x8044
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x148(%rbp), %rdi
cmpq %r12, %rdi
je 0x805f
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x288(%rbp), %rdi
jmp 0x8181
movq (%rbx), %rax
leaq -0x1f8(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x208(%rbp), %rdi
callq 0x77a6
leaq 0x15b41(%rip), %rdi     # 0x1dbd8
leaq -0x208(%rbp), %rsi
callq 0x6cf6
movq -0x208(%rbp), %rdi
jmp 0x8181
movq (%rbx), %rax
leaq -0x1d8(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x1e8(%rbp), %rdi
callq 0x77a6
leaq 0x15afd(%rip), %rdi     # 0x1dbd8
leaq -0x1e8(%rbp), %rsi
callq 0x644c
movq -0x1e8(%rbp), %rdi
jmp 0x8181
movq (%rbx), %rax
leaq -0x1b8(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x1c8(%rbp), %rdi
callq 0x77a6
leaq 0x15ab9(%rip), %rdi     # 0x1dbd8
leaq -0x1c8(%rbp), %rsi
callq 0x6a84
movq -0x1c8(%rbp), %rdi
jmp 0x8181
leaq 0x15a9d(%rip), %rdi     # 0x1dbd8
callq 0x635c
jmp 0x8191
movq (%rbx), %rax
leaq -0x198(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x1a8(%rbp), %rdi
callq 0x77a6
leaq 0x15a6a(%rip), %rdi     # 0x1dbd8
leaq -0x1a8(%rbp), %rsi
callq 0x6862
movq -0x1a8(%rbp), %rdi
cmpq %r14, %rdi
je 0x8191
movq (%r14), %rsi
incq %rsi
callq 0x3220
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x81a6
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3220
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4e09(%rip), %rdi      # 0xcfc8
leaq 0x1185(%rip), %rsi      # 0x934b
movl $0x1e, %edx
callq 0x3260
movq 0x4df1(%rip), %rdi      # 0xcfc8
callq 0x3110
leaq 0x12ea5(%rip), %rdi     # 0x1b088
callq 0x6086
leaq 0x13c11(%rip), %rdi     # 0x1be00
callq 0x60ca
leaq 0x5065(%rip), %rdi      # 0xd260
callq 0x3b88
leaq 0x13be1(%rip), %rdi     # 0x1bde8
callq 0x4ed6
xorl %edi, %edi
callq 0x3280
movq %rax, %rbx
movq -0x1a8(%rbp), %rdi
cmpq %r14, %rdi
je 0x847a
movq -0x198(%rbp), %rsi
jmp 0x846d
movq %rax, %rbx
movq -0x1c8(%rbp), %rdi
cmpq %r14, %rdi
je 0x847a
movq -0x1b8(%rbp), %rsi
jmp 0x846d
movq %rax, %rbx
movq -0x1e8(%rbp), %rdi
cmpq %r14, %rdi
je 0x847a
movq -0x1d8(%rbp), %rsi
jmp 0x846d
movq %rax, %rbx
movq -0x208(%rbp), %rdi
cmpq %r14, %rdi
je 0x847a
movq -0x1f8(%rbp), %rsi
jmp 0x846d
movq %rax, %rbx
movq -0x128(%rbp), %rdi
cmpq %r13, %rdi
je 0x82b2
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x82b2
movq %rax, %rbx
movq -0x148(%rbp), %rdi
cmpq %r12, %rdi
je 0x82d2
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x82d2
movq %rax, %rbx
movq -0x288(%rbp), %rdi
cmpq %r14, %rdi
je 0x847a
movq -0x278(%rbp), %rsi
jmp 0x846d
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0x830b
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x830b
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x8328
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x8328
movq %rax, %rbx
movq -0x228(%rbp), %rdi
cmpq %r14, %rdi
je 0x847a
movq -0x218(%rbp), %rsi
jmp 0x846d
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0x8387
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x8387
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
cmpq %r13, %rdi
je 0x83a7
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x83a7
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0x83c7
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x83c7
movq %rax, %rbx
movq -0x108(%rbp), %rdi
cmpq %r12, %rdi
je 0x83e6
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x83e6
movq %rax, %rbx
movq -0x248(%rbp), %rdi
cmpq %r14, %rdi
je 0x847a
movq -0x238(%rbp), %rsi
jmp 0x846d
movq %rax, %rbx
movq -0x268(%rbp), %rdi
cmpq %r14, %rdi
je 0x847a
movq -0x258(%rbp), %rsi
jmp 0x846d
movq %rax, %rbx
movq -0x168(%rbp), %rdi
cmpq %r12, %rdi
je 0x8422
movq -0x158(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x8422
movq %rax, %rbx
movq -0x2a8(%rbp), %rdi
cmpq %r14, %rdi
je 0x847a
movq -0x298(%rbp), %rsi
jmp 0x846d
movq %rax, %rbx
movq -0x188(%rbp), %rdi
cmpq %r12, %rdi
je 0x845a
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x845a
movq %rax, %rbx
movq -0x2c8(%rbp), %rdi
cmpq %r14, %rdi
je 0x847a
movq -0x2b8(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x847a
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x848f
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x33e0
nop