// File: 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
subq $0x320, %rsp            # imm = 0x320
movq %rdi, -0x2d0(%rbp)
movq %rdi, -0x8(%rbp)
callq 0xb9e0
cmpq $0x0, %rax
jne 0xae96
jmp 0xb90e
movq -0x2d0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xba00
movq %rax, %rsi
leaq -0x28(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
callq 0x3140
movq -0x2e0(%rbp), %rdi
leaq 0x3440(%rip), %rsi      # 0xe307
callq 0xa9b0
movb %al, -0x2d1(%rbp)
jmp 0xaed4
movb -0x2d1(%rbp), %al
testb $0x1, %al
jne 0xaee3
jmp 0xaf64
movq 0x90de(%rip), %rdi      # 0x13fc8
leaq 0x341d(%rip), %rsi      # 0xe30e
callq 0x32e0
movq %rax, -0x2e8(%rbp)
jmp 0xaeff
movq -0x2e8(%rbp), %rdi
movq 0x90a3(%rip), %rsi      # 0x13fb0
callq 0x3330
jmp 0xaf14
leaq 0x1725d(%rip), %rdi     # 0x22178
callq 0x9130
jmp 0xaf22
leaq 0x17fc7(%rip), %rdi     # 0x22ef0
callq 0x91a0
jmp 0xaf30
leaq 0x9419(%rip), %rdi      # 0x14350
callq 0x4010
jmp 0xaf3e
leaq 0x17f93(%rip), %rdi     # 0x22ed8
callq 0x7430
jmp 0xaf4c
xorl %edi, %edi
callq 0x33b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xb917
leaq 0x33c2(%rip), %rsi      # 0xe32d
leaq -0x28(%rbp), %rdi
callq 0xa9b0
movb %al, -0x2e9(%rbp)
jmp 0xaf7c
movb -0x2e9(%rbp), %al
testb $0x1, %al
jne 0xaf8b
jmp 0xb027
movq -0x2d0(%rbp), %rdi
movl $0x1, %esi
callq 0xba00
movq %rax, %rsi
leaq -0x58(%rbp), %rdi
callq 0x3140
jmp 0xafaa
movq -0x2d0(%rbp), %rdi
movl $0x2, %esi
callq 0xba00
movq %rax, %rsi
leaq -0x78(%rbp), %rdi
callq 0x3140
jmp 0xafc9
leaq 0x19cf8(%rip), %rdi     # 0x24cc8
leaq -0x58(%rbp), %rsi
leaq -0x78(%rbp), %rdx
callq 0x9ad0
jmp 0xafdf
leaq -0x78(%rbp), %rdi
callq 0x3628
leaq -0x58(%rbp), %rdi
callq 0x3628
jmp 0xb8f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xb019
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x3628
leaq -0x58(%rbp), %rdi
callq 0x3628
jmp 0xb917
leaq 0x3305(%rip), %rsi      # 0xe333
leaq -0x28(%rbp), %rdi
callq 0xa9b0
movb %al, -0x2ea(%rbp)
jmp 0xb03f
movb -0x2ea(%rbp), %al
testb $0x1, %al
jne 0xb04e
jmp 0xb102
movq -0x2d0(%rbp), %rdi
movl $0x1, %esi
callq 0xba00
movq %rax, %rsi
leaq -0x98(%rbp), %rdi
callq 0x3140
jmp 0xb070
movq -0x2d0(%rbp), %rdi
movl $0x2, %esi
callq 0xba00
movq %rax, %rsi
leaq -0xb8(%rbp), %rdi
callq 0x3140
jmp 0xb092
leaq 0x19c2f(%rip), %rdi     # 0x24cc8
leaq -0x98(%rbp), %rsi
leaq -0xb8(%rbp), %rdx
callq 0x9d40
jmp 0xb0ae
leaq -0xb8(%rbp), %rdi
callq 0x3628
leaq -0x98(%rbp), %rdi
callq 0x3628
jmp 0xb8f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xb0f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x3628
leaq -0x98(%rbp), %rdi
callq 0x3628
jmp 0xb917
leaq 0x322f(%rip), %rsi      # 0xe338
leaq -0x28(%rbp), %rdi
callq 0xa9b0
movb %al, -0x2eb(%rbp)
jmp 0xb11a
movb -0x2eb(%rbp), %al
testb $0x1, %al
jne 0xb129
jmp 0xb38d
movq -0x2d0(%rbp), %rdi
movl $0x2, %esi
callq 0xba00
movq %rax, %rdi
leaq 0x31f9(%rip), %rsi      # 0xe33d
callq 0xa9b0
movb %al, -0x2ec(%rbp)
jmp 0xb151
movb -0x2ec(%rbp), %al
testb $0x1, %al
jne 0xb160
jmp 0xb263
movq -0x2d0(%rbp), %rdi
movl $0x1, %esi
callq 0xba00
movq %rax, %rsi
leaq -0xd8(%rbp), %rdi
callq 0x3140
jmp 0xb182
movq -0x2d0(%rbp), %rdi
movl $0x3, %esi
callq 0xba00
movq %rax, %rsi
leaq -0xf8(%rbp), %rdi
callq 0x3140
jmp 0xb1a4
movq -0x2d0(%rbp), %rdi
movl $0x4, %esi
callq 0xba00
movq %rax, %rsi
leaq -0x118(%rbp), %rdi
callq 0x3140
jmp 0xb1c6
leaq 0x19afb(%rip), %rdi     # 0x24cc8
leaq -0xd8(%rbp), %rsi
leaq -0xf8(%rbp), %rdx
leaq -0x118(%rbp), %rcx
callq 0xa440
jmp 0xb1e9
leaq -0x118(%rbp), %rdi
callq 0x3628
leaq -0xf8(%rbp), %rdi
callq 0x3628
leaq -0xd8(%rbp), %rdi
callq 0x3628
jmp 0xb388
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xb252
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xb246
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x3628
leaq -0xf8(%rbp), %rdi
callq 0x3628
leaq -0xd8(%rbp), %rdi
callq 0x3628
jmp 0xb917
movq -0x2d0(%rbp), %rdi
movl $0x1, %esi
callq 0xba00
movq %rax, %rsi
leaq -0x138(%rbp), %rdi
callq 0x3140
jmp 0xb285
leaq -0x159(%rbp), %rdi
movq %rdi, -0x2f8(%rbp)
callq 0x3590
movq -0x2f8(%rbp), %rdx
leaq 0x2e5b(%rip), %rsi      # 0xe101
leaq -0x158(%rbp), %rdi
callq 0xba80
jmp 0xb2b4
movq -0x2d0(%rbp), %rdi
movl $0x2, %esi
callq 0xba00
movq %rax, %rsi
leaq -0x180(%rbp), %rdi
callq 0x3140
jmp 0xb2d6
leaq 0x199eb(%rip), %rdi     # 0x24cc8
leaq -0x138(%rbp), %rsi
leaq -0x158(%rbp), %rdx
leaq -0x180(%rbp), %rcx
callq 0xa440
jmp 0xb2f9
leaq -0x180(%rbp), %rdi
callq 0x3628
leaq -0x158(%rbp), %rdi
callq 0x3628
leaq -0x159(%rbp), %rdi
callq 0x3350
leaq -0x138(%rbp), %rdi
callq 0x3628
jmp 0xb388
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xb36b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xb35f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x3628
leaq -0x158(%rbp), %rdi
callq 0x3628
leaq -0x159(%rbp), %rdi
callq 0x3350
leaq -0x138(%rbp), %rdi
callq 0x3628
jmp 0xb917
jmp 0xb8f5
leaq 0x2fac(%rip), %rsi      # 0xe340
leaq -0x28(%rbp), %rdi
callq 0xa9b0
movb %al, -0x2f9(%rbp)
jmp 0xb3a5
movb -0x2f9(%rbp), %al
testb $0x1, %al
jne 0xb3b4
jmp 0xb4b7
movq -0x2d0(%rbp), %rdi
movl $0x1, %esi
callq 0xba00
movq %rax, %rsi
leaq -0x1a0(%rbp), %rdi
callq 0x3140
jmp 0xb3d6
movq -0x2d0(%rbp), %rdi
movl $0x2, %esi
callq 0xba00
movq %rax, %rsi
leaq -0x1c0(%rbp), %rdi
callq 0x3140
jmp 0xb3f8
movq -0x2d0(%rbp), %rdi
movl $0x3, %esi
callq 0xba00
movq %rax, %rsi
leaq -0x1e0(%rbp), %rdi
callq 0x3140
jmp 0xb41a
leaq 0x198a7(%rip), %rdi     # 0x24cc8
leaq -0x1a0(%rbp), %rsi
leaq -0x1c0(%rbp), %rdx
leaq -0x1e0(%rbp), %rcx
callq 0xa140
jmp 0xb43d
leaq -0x1e0(%rbp), %rdi
callq 0x3628
leaq -0x1c0(%rbp), %rdi
callq 0x3628
leaq -0x1a0(%rbp), %rdi
callq 0x3628
jmp 0xb8f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xb4a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xb49a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x3628
leaq -0x1c0(%rbp), %rdi
callq 0x3628
leaq -0x1a0(%rbp), %rdi
callq 0x3628
jmp 0xb917
leaq 0x2e88(%rip), %rsi      # 0xe346
leaq -0x28(%rbp), %rdi
callq 0xa9b0
movb %al, -0x2fa(%rbp)
jmp 0xb4cf
movb -0x2fa(%rbp), %al
testb $0x1, %al
jne 0xb4de
jmp 0xb5e1
movq -0x2d0(%rbp), %rdi
movl $0x1, %esi
callq 0xba00
movq %rax, %rsi
leaq -0x200(%rbp), %rdi
callq 0x3140
jmp 0xb500
movq -0x2d0(%rbp), %rdi
movl $0x2, %esi
callq 0xba00
movq %rax, %rsi
leaq -0x220(%rbp), %rdi
callq 0x3140
jmp 0xb522
movq -0x2d0(%rbp), %rdi
movl $0x3, %esi
callq 0xba00
movq %rax, %rsi
leaq -0x240(%rbp), %rdi
callq 0x3140
jmp 0xb544
leaq 0x1977d(%rip), %rdi     # 0x24cc8
leaq -0x200(%rbp), %rsi
leaq -0x220(%rbp), %rdx
leaq -0x240(%rbp), %rcx
callq 0x9ff0
jmp 0xb567
leaq -0x240(%rbp), %rdi
callq 0x3628
leaq -0x220(%rbp), %rdi
callq 0x3628
leaq -0x200(%rbp), %rdi
callq 0x3628
jmp 0xb8f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xb5d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0xb5c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x3628
leaq -0x220(%rbp), %rdi
callq 0x3628
leaq -0x200(%rbp), %rdi
callq 0x3628
jmp 0xb917
leaq 0x2d63(%rip), %rsi      # 0xe34b
leaq -0x28(%rbp), %rdi
callq 0xa9b0
movb %al, -0x2fb(%rbp)
jmp 0xb5f9
movb -0x2fb(%rbp), %al
testb $0x1, %al
jne 0xb605
jmp 0xb66a
movq -0x2d0(%rbp), %rdi
movl $0x1, %esi
callq 0xba00
movq %rax, %rsi
leaq -0x260(%rbp), %rdi
callq 0x3140
jmp 0xb627
leaq 0x1969a(%rip), %rdi     # 0x24cc8
leaq -0x260(%rbp), %rsi
callq 0x9f50
jmp 0xb63c
leaq -0x260(%rbp), %rdi
callq 0x3628
jmp 0xb8ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x260(%rbp), %rdi
callq 0x3628
jmp 0xb917
leaq 0x2ce0(%rip), %rsi      # 0xe351
leaq -0x28(%rbp), %rdi
callq 0xa9b0
movb %al, -0x2fc(%rbp)
jmp 0xb682
movb -0x2fc(%rbp), %al
testb $0x1, %al
jne 0xb68e
jmp 0xb6f3
movq -0x2d0(%rbp), %rdi
movl $0x1, %esi
callq 0xba00
movq %rax, %rsi
leaq -0x280(%rbp), %rdi
callq 0x3140
jmp 0xb6b0
leaq 0x19611(%rip), %rdi     # 0x24cc8
leaq -0x280(%rbp), %rsi
callq 0x94d0
jmp 0xb6c5
leaq -0x280(%rbp), %rdi
callq 0x3628
jmp 0xb8ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x280(%rbp), %rdi
callq 0x3628
jmp 0xb917
leaq 0x2c5d(%rip), %rsi      # 0xe357
leaq -0x28(%rbp), %rdi
callq 0xa9b0
movb %al, -0x2fd(%rbp)
jmp 0xb70b
movb -0x2fd(%rbp), %al
testb $0x1, %al
jne 0xb717
jmp 0xb77c
movq -0x2d0(%rbp), %rdi
movl $0x1, %esi
callq 0xba00
movq %rax, %rsi
leaq -0x2a0(%rbp), %rdi
callq 0x3140
jmp 0xb739
leaq 0x19588(%rip), %rdi     # 0x24cc8
leaq -0x2a0(%rbp), %rsi
callq 0x9ca0
jmp 0xb74e
leaq -0x2a0(%rbp), %rdi
callq 0x3628
jmp 0xb8eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x2a0(%rbp), %rdi
callq 0x3628
jmp 0xb917
leaq 0x2bd7(%rip), %rsi      # 0xe35a
leaq -0x28(%rbp), %rdi
callq 0xa9b0
movb %al, -0x2fe(%rbp)
jmp 0xb794
movb -0x2fe(%rbp), %al
testb $0x1, %al
jne 0xb7a0
jmp 0xb7b3
leaq 0x19521(%rip), %rdi     # 0x24cc8
callq 0x93e0
jmp 0xb7ae
jmp 0xb8e9
leaq 0x2ba3(%rip), %rsi      # 0xe35d
leaq -0x28(%rbp), %rdi
callq 0xa9b0
movb %al, -0x2ff(%rbp)
jmp 0xb7cb
movb -0x2ff(%rbp), %al
testb $0x1, %al
jne 0xb7d7
jmp 0xb83c
movq -0x2d0(%rbp), %rdi
movl $0x1, %esi
callq 0xba00
movq %rax, %rsi
leaq -0x2c0(%rbp), %rdi
callq 0x3140
jmp 0xb7f9
leaq 0x194c8(%rip), %rdi     # 0x24cc8
leaq -0x2c0(%rbp), %rsi
callq 0x9a30
jmp 0xb80e
leaq -0x2c0(%rbp), %rdi
callq 0x3628
jmp 0xb8e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x2c0(%rbp), %rdi
callq 0x3628
jmp 0xb917
leaq 0x2b1d(%rip), %rsi      # 0xe360
leaq -0x28(%rbp), %rdi
callq 0xa9b0
movb %al, -0x300(%rbp)
jmp 0xb854
movb -0x300(%rbp), %al
testb $0x1, %al
jne 0xb860
jmp 0xb867
xorl %edi, %edi
callq 0x33b0
leaq 0x2893(%rip), %rsi      # 0xe101
leaq -0x28(%rbp), %rdi
callq 0xa9b0
movb %al, -0x301(%rbp)
jmp 0xb87f
movb -0x301(%rbp), %al
testb $0x1, %al
jne 0xb88b
jmp 0xb897
movl $0x1, -0x2c4(%rbp)
jmp 0xb905
movq 0x872a(%rip), %rdi      # 0x13fc8
leaq 0x2ac0(%rip), %rsi      # 0xe365
callq 0x32e0
movq %rax, -0x310(%rbp)
jmp 0xb8b3
movq -0x310(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x32a0
movq %rax, -0x318(%rbp)
jmp 0xb8cc
movq -0x318(%rbp), %rdi
movq 0x86d6(%rip), %rsi      # 0x13fb0
callq 0x3330
jmp 0xb8e1
jmp 0xb8e3
jmp 0xb8e5
jmp 0xb8e7
jmp 0xb8e9
jmp 0xb8eb
jmp 0xb8ed
jmp 0xb8ef
jmp 0xb8f1
jmp 0xb8f3
jmp 0xb8f5
jmp 0xb8f7
jmp 0xb8f9
jmp 0xb8fb
movl $0x0, -0x2c4(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3628
addq $0x320, %rsp            # imm = 0x320
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0x3628
movq -0x30(%rbp), %rdi
callq 0x3580
nopl (%rax)