// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x2b0, %rsp            # imm = 0x2B0
movq (%rdi), %rsi
cmpq %rsi, 0x8(%rdi)
je 0x71c3
movq %rdi, %rbx
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x3310
leaq 0x11f0(%rip), %rsi      # 0x82cf
movq %r14, %rdi
callq 0x6e4a
testb %al, %al
jne 0x7566
leaq 0x11ff(%rip), %rsi      # 0x82f5
leaq -0x38(%rbp), %rdi
callq 0x6e4a
testb %al, %al
je 0x714f
movq (%rbx), %rsi
addq $0x20, %rsi
leaq -0x238(%rbp), %rdi
callq 0x3310
movq (%rbx), %rsi
addq $0x40, %rsi
leaq -0x178(%rbp), %rdi
callq 0x3310
leaq 0x15aa8(%rip), %rdi     # 0x1cbd8
leaq -0x238(%rbp), %rbx
leaq -0x178(%rbp), %rdx
movq %rbx, %rsi
callq 0x655c
leaq -0x178(%rbp), %rdi
jmp 0x71ad
leaq 0x11a5(%rip), %rsi      # 0x82fb
leaq -0x38(%rbp), %rdi
callq 0x6e4a
testb %al, %al
je 0x71cf
movq (%rbx), %rsi
addq $0x20, %rsi
leaq -0x218(%rbp), %rdi
callq 0x3310
movq (%rbx), %rsi
addq $0x40, %rsi
leaq -0x158(%rbp), %rdi
callq 0x3310
leaq 0x15a48(%rip), %rdi     # 0x1cbd8
leaq -0x218(%rbp), %rbx
leaq -0x158(%rbp), %rdx
movq %rbx, %rsi
callq 0x66ec
leaq -0x158(%rbp), %rdi
callq 0x3448
movq %rbx, %rdi
callq 0x3448
leaq -0x38(%rbp), %rdi
callq 0x3448
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x112a(%rip), %rsi      # 0x8300
leaq -0x38(%rbp), %rdi
callq 0x6e4a
testb %al, %al
je 0x7277
movq (%rbx), %rdi
addq $0x40, %rdi
leaq 0x1110(%rip), %rsi      # 0x8305
callq 0x6e4a
movq (%rbx), %rsi
addq $0x20, %rsi
testb %al, %al
je 0x7304
leaq -0x1f8(%rbp), %rdi
callq 0x3310
movq (%rbx), %rsi
addq $0x60, %rsi
leaq -0x138(%rbp), %rdi
callq 0x3310
movq (%rbx), %rsi
subq $-0x80, %rsi
leaq -0x118(%rbp), %rdi
callq 0x3310
leaq 0x15996(%rip), %rdi     # 0x1cbd8
leaq -0x1f8(%rbp), %rbx
leaq -0x138(%rbp), %rdx
leaq -0x118(%rbp), %rcx
movq %rbx, %rsi
callq 0x6b12
leaq -0x118(%rbp), %rdi
callq 0x3448
leaq -0x138(%rbp), %rdi
jmp 0x71ad
leaq 0x108a(%rip), %rsi      # 0x8308
leaq -0x38(%rbp), %rdi
callq 0x6e4a
testb %al, %al
je 0x7376
movq (%rbx), %rsi
addq $0x20, %rsi
leaq -0x1b8(%rbp), %rdi
callq 0x3310
movq (%rbx), %rsi
addq $0x40, %rsi
leaq -0xb8(%rbp), %rdi
callq 0x3310
movq (%rbx), %rsi
addq $0x60, %rsi
leaq -0x98(%rbp), %rdi
callq 0x3310
leaq 0x15909(%rip), %rdi     # 0x1cbd8
leaq -0x1b8(%rbp), %rbx
leaq -0xb8(%rbp), %rdx
leaq -0x98(%rbp), %rcx
movq %rbx, %rsi
callq 0x6956
leaq -0x98(%rbp), %rdi
callq 0x3448
leaq -0xb8(%rbp), %rdi
jmp 0x71ad
leaq -0x1d8(%rbp), %rdi
callq 0x3310
leaq 0xdb2(%rip), %rsi       # 0x80c9
leaq -0xf8(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x7772
movq (%rbx), %rsi
addq $0x40, %rsi
leaq -0xd8(%rbp), %rdi
callq 0x3310
leaq 0x15897(%rip), %rdi     # 0x1cbd8
leaq -0x1d8(%rbp), %rbx
leaq -0xf8(%rbp), %rdx
leaq -0xd8(%rbp), %rcx
movq %rbx, %rsi
callq 0x6b12
leaq -0xd8(%rbp), %rdi
callq 0x3448
leaq -0xf8(%rbp), %rdi
jmp 0x71ad
leaq 0xf91(%rip), %rsi       # 0x830e
leaq -0x38(%rbp), %rdi
callq 0x6e4a
testb %al, %al
je 0x73ed
movq (%rbx), %rsi
addq $0x20, %rsi
leaq -0x198(%rbp), %rdi
callq 0x3310
movq (%rbx), %rsi
addq $0x40, %rsi
leaq -0x78(%rbp), %rdi
callq 0x3310
movq (%rbx), %rsi
addq $0x60, %rsi
leaq -0x58(%rbp), %rdi
callq 0x3310
leaq 0x15814(%rip), %rdi     # 0x1cbd8
leaq -0x198(%rbp), %rbx
leaq -0x78(%rbp), %rdx
leaq -0x58(%rbp), %rcx
movq %rbx, %rsi
callq 0x6898
leaq -0x58(%rbp), %rdi
callq 0x3448
leaq -0x78(%rbp), %rdi
jmp 0x71ad
leaq 0xf1f(%rip), %rsi       # 0x8313
leaq -0x38(%rbp), %rdi
callq 0x6e4a
testb %al, %al
je 0x742b
movq (%rbx), %rsi
addq $0x20, %rsi
leaq -0x2b8(%rbp), %rbx
movq %rbx, %rdi
callq 0x3310
leaq 0x157ba(%rip), %rdi     # 0x1cbd8
movq %rbx, %rsi
callq 0x683a
jmp 0x71b2
leaq 0xee7(%rip), %rsi       # 0x8319
leaq -0x38(%rbp), %rdi
callq 0x6e4a
testb %al, %al
je 0x7469
movq (%rbx), %rsi
addq $0x20, %rsi
leaq -0x298(%rbp), %rbx
movq %rbx, %rdi
callq 0x3310
leaq 0x1577c(%rip), %rdi     # 0x1cbd8
movq %rbx, %rsi
callq 0x623c
jmp 0x71b2
leaq 0xeaf(%rip), %rsi       # 0x831f
leaq -0x38(%rbp), %rdi
callq 0x6e4a
testb %al, %al
je 0x74a7
movq (%rbx), %rsi
addq $0x20, %rsi
leaq -0x278(%rbp), %rbx
movq %rbx, %rdi
callq 0x3310
leaq 0x1573e(%rip), %rdi     # 0x1cbd8
movq %rbx, %rsi
callq 0x6684
jmp 0x71b2
leaq 0xe74(%rip), %rsi       # 0x8322
leaq -0x38(%rbp), %rdi
callq 0x6e4a
testb %al, %al
je 0x74cc
leaq 0x15716(%rip), %rdi     # 0x1cbd8
callq 0x618a
jmp 0x71ba
leaq 0xe52(%rip), %rsi       # 0x8325
leaq -0x38(%rbp), %rdi
callq 0x6e4a
testb %al, %al
je 0x750a
movq (%rbx), %rsi
addq $0x20, %rsi
leaq -0x258(%rbp), %rbx
movq %rbx, %rdi
callq 0x3310
leaq 0x156db(%rip), %rdi     # 0x1cbd8
movq %rbx, %rsi
callq 0x64f4
jmp 0x71b2
leaq 0xe17(%rip), %rsi       # 0x8328
leaq -0x38(%rbp), %rdi
callq 0x6e4a
testb %al, %al
jne 0x75b1
leaq 0xba0(%rip), %rsi       # 0x80c9
leaq -0x38(%rbp), %rdi
callq 0x6e4a
testb %al, %al
jne 0x71ba
movq 0x4a7f(%rip), %rdi      # 0xbfc0
leaq 0xde5(%rip), %rsi       # 0x832d
callq 0x31e0
leaq -0x38(%rbp), %rsi
movq %rax, %rdi
callq 0x31c0
movq %rax, %rdi
callq 0x3100
jmp 0x71ba
movq 0x4a53(%rip), %rdi      # 0xbfc0
leaq 0xd62(%rip), %rsi       # 0x82d6
callq 0x31e0
movq %rax, %rdi
callq 0x3100
leaq 0x12b00(%rip), %rdi     # 0x1a088
callq 0x5f4e
leaq 0x1386c(%rip), %rdi     # 0x1ae00
callq 0x5f94
leaq 0x4cc0(%rip), %rdi      # 0xc260
callq 0x3ac6
leaq 0x1383c(%rip), %rdi     # 0x1ade8
callq 0x4ef0
xorl %edi, %edi
callq 0x3270
movq %rax, %rbx
leaq -0x258(%rbp), %rdi
jmp 0x76e1
movq %rax, %rbx
leaq -0x278(%rbp), %rdi
jmp 0x76e1
movq %rax, %rbx
leaq -0x298(%rbp), %rdi
jmp 0x76e1
movq %rax, %rbx
leaq -0x2b8(%rbp), %rdi
jmp 0x76e1
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x3448
jmp 0x7605
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x3448
jmp 0x7613
movq %rax, %rbx
leaq -0x198(%rbp), %rdi
jmp 0x76e1
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x3448
jmp 0x7655
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x3448
jmp 0x7666
movq %rax, %rbx
leaq -0x118(%rbp), %rdi
callq 0x3448
jmp 0x7677
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
callq 0x3448
jmp 0x7688
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x3448
jmp 0x7694
movq %rax, %rbx
leaq -0x138(%rbp), %rdi
callq 0x3448
jmp 0x76a0
movq %rax, %rbx
leaq -0x1d8(%rbp), %rdi
jmp 0x76e1
movq %rax, %rbx
leaq -0x1b8(%rbp), %rdi
jmp 0x76e1
movq %rax, %rbx
leaq -0x1f8(%rbp), %rdi
jmp 0x76e1
movq %rax, %rbx
leaq -0x158(%rbp), %rdi
callq 0x3448
jmp 0x76bd
movq %rax, %rbx
leaq -0x218(%rbp), %rdi
jmp 0x76e1
movq %rax, %rbx
leaq -0x178(%rbp), %rdi
callq 0x3448
jmp 0x76da
movq %rax, %rbx
leaq -0x238(%rbp), %rdi
callq 0x3448
jmp 0x76eb
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x3448
movq %rbx, %rdi
callq 0x33c0