// File: /workspace/github_cpp_makefile_star2_O3/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 0x8142
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 0x773c
leaq 0x190f(%rip), %rsi      # 0x9344
movq %r14, %rdi
callq 0x30b0
testl %eax, %eax
je 0x8154
leaq 0x191e(%rip), %rsi      # 0x936a
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x7b9e
leaq 0x190c(%rip), %rsi      # 0x9370
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x7c2a
leaq 0x18f9(%rip), %rsi      # 0x9375
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x7cb6
leaq 0x18e9(%rip), %rsi      # 0x937d
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x7da0
leaq 0x18d7(%rip), %rsi      # 0x9383
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x7e73
leaq 0x18c4(%rip), %rsi      # 0x9388
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x8007
leaq 0x18b2(%rip), %rsi      # 0x938e
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x804b
leaq 0x18a0(%rip), %rsi      # 0x9394
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x808f
leaq 0x188b(%rip), %rsi      # 0x9397
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x80d0
leaq 0x1876(%rip), %rsi      # 0x939a
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x80de
leaq 0x1861(%rip), %rsi      # 0x939d
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x81a8
leaq 0x1575(%rip), %rsi      # 0x90c9
leaq -0x48(%rbp), %rdi
callq 0x30b0
testl %eax, %eax
je 0x812d
movq 0x545c(%rip), %rdi      # 0xcfc8
leaq 0x182f(%rip), %rsi      # 0x93a2
movl $0x10, %edx
callq 0x3260
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq 0x543c(%rip), %rdi      # 0xcfc8
callq 0x3260
movq %rax, %rdi
callq 0x3110
jmp 0x812d
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 0x773c
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 0x773c
leaq 0x15fe8(%rip), %rdi     # 0x1dbd8
leaq -0x2c8(%rbp), %rsi
leaq -0x188(%rbp), %rdx
callq 0x687a
movq -0x188(%rbp), %rdi
cmpq %r12, %rdi
je 0x7c1e
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x2c8(%rbp), %rdi
jmp 0x811d
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 0x773c
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 0x773c
leaq 0x15f5c(%rip), %rdi     # 0x1dbd8
leaq -0x2a8(%rbp), %rsi
leaq -0x168(%rbp), %rdx
callq 0x6a9c
movq -0x168(%rbp), %rdi
cmpq %r12, %rdi
je 0x7caa
movq -0x158(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x2a8(%rbp), %rdi
jmp 0x811d
movq (%rbx), %rdi
addq $0x40, %rdi
leaq 0x16b6(%rip), %rsi      # 0x937a
callq 0x30b0
movq (%rbx), %rcx
testl %eax, %eax
je 0x7f31
leaq -0x258(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rcx), %rsi
movq 0x28(%rcx), %rdx
addq %rsi, %rdx
leaq -0x268(%rbp), %rdi
callq 0x773c
leaq -0xf8(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x13c0(%rip), %rdx      # 0x90c9
leaq -0x108(%rbp), %rdi
movq %rdx, %rsi
callq 0x8540
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 0x773c
leaq 0x15e94(%rip), %rdi     # 0x1dbd8
leaq -0x268(%rbp), %rsi
leaq -0x108(%rbp), %rdx
leaq -0xe8(%rbp), %rcx
callq 0x724a
movq -0xe8(%rbp), %rdi
cmpq %r13, %rdi
je 0x7d79
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x108(%rbp), %rdi
cmpq %r12, %rdi
je 0x7d94
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x268(%rbp), %rdi
jmp 0x811d
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 0x773c
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 0x773c
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 0x773c
leaq 0x15dc1(%rip), %rdi     # 0x1dbd8
leaq -0x248(%rbp), %rsi
leaq -0xc8(%rbp), %rdx
leaq -0xa8(%rbp), %rcx
callq 0x6f6e
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0x7e4c
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0x7e67
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x248(%rbp), %rdi
jmp 0x811d
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 0x773c
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 0x773c
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 0x773c
leaq 0x15cf7(%rip), %rdi     # 0x1dbd8
leaq -0x228(%rbp), %rsi
leaq -0x88(%rbp), %rdx
leaq -0x68(%rbp), %rcx
callq 0x6d56
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0x7f0d
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x7f25
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x228(%rbp), %rdi
jmp 0x811d
leaq -0x278(%rbp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rcx), %rsi
movq 0x28(%rcx), %rdx
addq %rsi, %rdx
leaq -0x288(%rbp), %rdi
callq 0x773c
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 0x773c
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 0x773c
leaq 0x15c2d(%rip), %rdi     # 0x1dbd8
leaq -0x288(%rbp), %rsi
leaq -0x148(%rbp), %rdx
leaq -0x128(%rbp), %rcx
callq 0x724a
movq -0x128(%rbp), %rdi
cmpq %r13, %rdi
je 0x7fe0
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x148(%rbp), %rdi
cmpq %r12, %rdi
je 0x7ffb
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x288(%rbp), %rdi
jmp 0x811d
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 0x773c
leaq 0x15ba5(%rip), %rdi     # 0x1dbd8
leaq -0x208(%rbp), %rsi
callq 0x6c76
movq -0x208(%rbp), %rdi
jmp 0x811d
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 0x773c
leaq 0x15b61(%rip), %rdi     # 0x1dbd8
leaq -0x1e8(%rbp), %rsi
callq 0x6400
movq -0x1e8(%rbp), %rdi
jmp 0x811d
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 0x773c
leaq 0x15b1d(%rip), %rdi     # 0x1dbd8
leaq -0x1c8(%rbp), %rsi
callq 0x6a04
movq -0x1c8(%rbp), %rdi
jmp 0x811d
leaq 0x15b01(%rip), %rdi     # 0x1dbd8
callq 0x6310
jmp 0x812d
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 0x773c
leaq 0x15ace(%rip), %rdi     # 0x1dbd8
leaq -0x1a8(%rbp), %rsi
callq 0x67e2
movq -0x1a8(%rbp), %rdi
cmpq %r14, %rdi
je 0x812d
movq (%r14), %rsi
incq %rsi
callq 0x3220
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x8142
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 0x4e6d(%rip), %rdi      # 0xcfc8
leaq 0x11e9(%rip), %rsi      # 0x934b
movl $0x1e, %edx
callq 0x3260
movq 0x4e55(%rip), %rdi      # 0xcfc8
callq 0x3110
leaq 0x12f09(%rip), %rdi     # 0x1b088
callq 0x603a
leaq 0x13c75(%rip), %rdi     # 0x1be00
callq 0x607e
leaq 0x50c9(%rip), %rdi      # 0xd260
callq 0x3b38
leaq 0x13c45(%rip), %rdi     # 0x1bde8
callq 0x4ed2
xorl %edi, %edi
callq 0x3280
movq %rax, %rbx
movq -0x1a8(%rbp), %rdi
cmpq %r14, %rdi
je 0x8416
movq -0x198(%rbp), %rsi
jmp 0x8409
movq %rax, %rbx
movq -0x1c8(%rbp), %rdi
cmpq %r14, %rdi
je 0x8416
movq -0x1b8(%rbp), %rsi
jmp 0x8409
movq %rax, %rbx
movq -0x1e8(%rbp), %rdi
cmpq %r14, %rdi
je 0x8416
movq -0x1d8(%rbp), %rsi
jmp 0x8409
movq %rax, %rbx
movq -0x208(%rbp), %rdi
cmpq %r14, %rdi
je 0x8416
movq -0x1f8(%rbp), %rsi
jmp 0x8409
movq %rax, %rbx
movq -0x128(%rbp), %rdi
cmpq %r13, %rdi
je 0x824e
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x824e
movq %rax, %rbx
movq -0x148(%rbp), %rdi
cmpq %r12, %rdi
je 0x826e
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x826e
movq %rax, %rbx
movq -0x288(%rbp), %rdi
cmpq %r14, %rdi
je 0x8416
movq -0x278(%rbp), %rsi
jmp 0x8409
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0x82a7
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x82a7
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r12, %rdi
je 0x82c4
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x82c4
movq %rax, %rbx
movq -0x228(%rbp), %rdi
cmpq %r14, %rdi
je 0x8416
movq -0x218(%rbp), %rsi
jmp 0x8409
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0x8323
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x8323
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
cmpq %r13, %rdi
je 0x8343
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x8343
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0x8363
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x8363
movq %rax, %rbx
movq -0x108(%rbp), %rdi
cmpq %r12, %rdi
je 0x8382
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x8382
movq %rax, %rbx
movq -0x248(%rbp), %rdi
cmpq %r14, %rdi
je 0x8416
movq -0x238(%rbp), %rsi
jmp 0x8409
movq %rax, %rbx
movq -0x268(%rbp), %rdi
cmpq %r14, %rdi
je 0x8416
movq -0x258(%rbp), %rsi
jmp 0x8409
movq %rax, %rbx
movq -0x168(%rbp), %rdi
cmpq %r12, %rdi
je 0x83be
movq -0x158(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x83be
movq %rax, %rbx
movq -0x2a8(%rbp), %rdi
cmpq %r14, %rdi
je 0x8416
movq -0x298(%rbp), %rsi
jmp 0x8409
movq %rax, %rbx
movq -0x188(%rbp), %rdi
cmpq %r12, %rdi
je 0x83f6
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x83f6
movq %rax, %rbx
movq -0x2c8(%rbp), %rdi
cmpq %r14, %rdi
je 0x8416
movq -0x2b8(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x8416
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x842b
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x33e0
nop