// File: girdhari9[P]mTORRENT/ClientServer.cpp
// Function: main
int main(int arg, char * args[]){
	getcwd(root_path,1000);
	string cmd, ClientLog = "clientlog.txt";

	MYIP = args[1];
	MYPORT = args[2];
	TRACKER1IP = args[3];
	TRACKER1PORT = args[4];
	DOWNLOADLOG = args[5];
	PORT = stoi(MYPORT);

	ReadLogFile(ClientLog);
	UpdateToTracker();

	while(1){

		cout<<"Enter Command: ";
		cin>>cmd;

		if(cmd == "share"){
			string filename, mtorrentfilename;
			cin>>filename;
			cin>>mtorrentfilename;
			TotalSharedFile.push_back(mtorrentfilename);
			string SHA = mtorrentFile(filename,mtorrentfilename,TRACKER1IP,TRACKER1PORT);
			UpdateDownloadLog(1,filename);

			CreateLog.push_back(mtorrentfilename);
			CreateLog.push_back(SHA);
			CreateLog.push_back(root_path);
			UpdateLogFile(ClientLog);
			ClientLog.erase(ClientLog.begin(),ClientLog.end());
			
			thread client (FunctionCalling, cref(mtorrentfilename),1,SHA,root_path);
			thread server (ServerConnection);
			client.join();
			server.detach();
		}
		else if(cmd == "remove"){
			string mtorrentfilename;
			cin>>mtorrentfilename;
			if(mtorrentfilename.size() > 9 && mtorrentfilename.substr(mtorrentfilename.size()-9) != ".mtorrent"){
        		cout<<"\n> Please give correct name of mtorrent file!\n";
		        return 0;
		    }

		    thread client (FunctionCalling, cref(mtorrentfilename),2,"No",root_path);
		    client.join();
		}
		else if(cmd == "get" || cmd == "Get"){
			string mtorrentfilename;
			cin>>mtorrentfilename;

			if(mtorrentfilename.size() > 9 && mtorrentfilename.substr(mtorrentfilename.size()-9) != ".mtorrent"){
        		cout<<"\n> Please give correct name of mtorrent file!\n";
		        return 0;
		    }

			thread client (FunctionCalling, cref(mtorrentfilename),0,"No",root_path);
			UpdateDownloadLog(0,mtorrentfilename);

			thread server (ServerConnection);
		    client.join();
		    server.detach();
		}
		else if(cmd == "show" || cmd == "Show"){
			string dw; cin>>dw;
			ShowDownloadDetail();
		}
		else{
			cout<<"Error: Command not found!\n";
		}

	    Jump:
		    cout<<"Do you want to continue? [Y/N]: ";
		    char c;
		    cin>>c;
		    if((c == 'N') || (c == 'n')){
		    	UpdateLogFile(ClientLog);
		    	for(unsigned int i = 0; i < TotalSharedFile.size(); i++){
		    		thread client (FunctionCalling, cref(TotalSharedFile[i]),2,"No",root_path);
		    		client.join();
		    	}
		        cout<<"Connection Closed!\n";
		        break;
		    }
		    else if((c == 'Y') || (c == 'y'))
		    	continue;
		    else{
		    	cout<<"Plese enter correct...\n";
			    goto Jump;
		    }
	}
    return 0; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3f0, %rsp            # imm = 0x3F0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x1c7e0(%rip), %rdi     # 0x21530
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x4240
leaq -0x30(%rbp), %rdi
callq 0x45a0
leaq -0x51(%rbp), %rdi
movq %rdi, -0x370(%rbp)
callq 0x4710
movq -0x370(%rbp), %rdx
leaq 0x11283(%rip), %rsi     # 0x16004
leaq -0x50(%rbp), %rdi
callq 0x6d90
jmp 0x4d8c
leaq -0x51(%rbp), %rdi
callq 0x4450
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x1c6a4(%rip), %rdi     # 0x21448
callq 0x4590
jmp 0x4dab
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0x1c6ae(%rip), %rdi     # 0x21468
callq 0x4590
jmp 0x4dc1
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
leaq 0x1c6b8(%rip), %rdi     # 0x21488
callq 0x4590
jmp 0x4dd7
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
leaq 0x1c6c2(%rip), %rdi     # 0x214a8
callq 0x4590
jmp 0x4ded
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
leaq 0x1c6cc(%rip), %rdi     # 0x214c8
callq 0x4590
jmp 0x4e03
leaq 0x1c65e(%rip), %rdi     # 0x21468
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x6e40
movl %eax, -0x374(%rbp)
jmp 0x4e20
movl -0x374(%rbp), %eax
movl %eax, 0x1c614(%rip)     # 0x21440
leaq -0x88(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4200
jmp 0x4e3e
leaq -0x88(%rbp), %rdi
callq 0x5b50
jmp 0x4e4c
leaq -0x88(%rbp), %rdi
callq 0x47e8
callq 0x5dd0
jmp 0x4e5f
jmp 0x4e61
jmp 0x4e63
movq 0x1c15e(%rip), %rdi     # 0x20fc8
leaq 0x111a1(%rip), %rsi     # 0x16012
callq 0x43f0
jmp 0x4e78
movq 0x1c161(%rip), %rdi     # 0x20fe0
leaq -0x30(%rbp), %rsi
callq 0x4540
jmp 0x4e8a
leaq 0x11191(%rip), %rsi     # 0x16022
leaq -0x30(%rbp), %rdi
callq 0x6e80
movb %al, -0x375(%rbp)
jmp 0x4ea2
movb -0x375(%rbp), %al
testb $0x1, %al
jne 0x4eb1
jmp 0x537f
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x380(%rbp)
callq 0x45a0
leaq -0xc8(%rbp), %rdi
callq 0x45a0
movq -0x380(%rbp), %rsi
movq 0x1c102(%rip), %rdi     # 0x20fe0
callq 0x4540
jmp 0x4ee5
movq 0x1c0f4(%rip), %rdi     # 0x20fe0
leaq -0xc8(%rbp), %rsi
callq 0x4540
jmp 0x4efa
leaq 0x1c617(%rip), %rdi     # 0x21518
leaq -0xc8(%rbp), %rsi
callq 0x6eb0
jmp 0x4f0f
leaq -0x108(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x4200
jmp 0x4f24
leaq -0x128(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x4200
jmp 0x4f39
leaq 0x1c548(%rip), %rsi     # 0x21488
leaq -0x148(%rbp), %rdi
callq 0x4200
jmp 0x4f4e
leaq 0x1c553(%rip), %rsi     # 0x214a8
leaq -0x168(%rbp), %rdi
callq 0x4200
jmp 0x4f63
leaq -0xe8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
leaq -0x128(%rbp), %rdx
leaq -0x148(%rbp), %rcx
leaq -0x168(%rbp), %r8
callq 0x14980
jmp 0x4f8d
leaq -0x168(%rbp), %rdi
callq 0x47e8
leaq -0x148(%rbp), %rdi
callq 0x47e8
leaq -0x128(%rbp), %rdi
callq 0x47e8
leaq -0x108(%rbp), %rdi
callq 0x47e8
leaq -0x188(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x4200
jmp 0x4fd2
movl $0x1, %edi
leaq -0x188(%rbp), %rsi
callq 0x5f90
jmp 0x4fe5
leaq -0x188(%rbp), %rdi
callq 0x47e8
leaq 0x1c950(%rip), %rdi     # 0x21948
leaq -0xc8(%rbp), %rsi
callq 0x6eb0
jmp 0x5006
leaq 0x1c93b(%rip), %rdi     # 0x21948
leaq -0xe8(%rbp), %rsi
callq 0x6eb0
jmp 0x501b
leaq -0x1a9(%rbp), %rdi
movq %rdi, -0x388(%rbp)
callq 0x4710
movq -0x388(%rbp), %rdx
leaq 0x1c4f4(%rip), %rsi     # 0x21530
leaq -0x1a8(%rbp), %rdi
callq 0x6d90
jmp 0x504a
leaq 0x1c8f7(%rip), %rdi     # 0x21948
leaq -0x1a8(%rbp), %rsi
callq 0x6f20
jmp 0x505f
leaq -0x1a8(%rbp), %rdi
callq 0x47e8
leaq -0x1a9(%rbp), %rdi
callq 0x4450
leaq -0x1d0(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4200
jmp 0x5089
leaq -0x1d0(%rbp), %rdi
callq 0x6680
jmp 0x5097
leaq -0x1d0(%rbp), %rdi
callq 0x47e8
leaq -0x50(%rbp), %rdi
movq %rdi, -0x398(%rbp)
callq 0x43a0
movq %rax, -0x1e0(%rbp)
leaq -0x1d8(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x6f50
movq -0x398(%rbp), %rdi
callq 0x4290
movq %rax, -0x1f0(%rbp)
leaq -0x1e8(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
callq 0x6f50
movq -0x398(%rbp), %rdi
movq -0x1d8(%rbp), %rsi
movq -0x1e8(%rbp), %rdx
callq 0x4120
movq %rax, -0x390(%rbp)
jmp 0x5116
movq -0x390(%rbp), %rax
movq %rax, -0x1f8(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x6f90
movq %rax, -0x208(%rbp)
movl $0x1, -0x20c(%rbp)
leaq 0x5be8(%rip), %rsi      # 0xad30
leaq 0x1c3e1(%rip), %r9      # 0x21530
leaq -0x200(%rbp), %rdi
leaq -0x208(%rbp), %rdx
leaq -0x20c(%rbp), %rcx
leaq -0xe8(%rbp), %r8
callq 0x6fc0
jmp 0x5172
leaq 0xea27(%rip), %rsi      # 0x13ba0
leaq -0x218(%rbp), %rdi
callq 0x70a0
jmp 0x5187
leaq -0x200(%rbp), %rdi
callq 0x46c0
jmp 0x5195
leaq -0x218(%rbp), %rdi
callq 0x46f0
jmp 0x51a3
leaq -0x218(%rbp), %rdi
callq 0x7160
leaq -0x200(%rbp), %rdi
callq 0x7160
leaq -0xe8(%rbp), %rdi
callq 0x47e8
leaq -0xc8(%rbp), %rdi
callq 0x47e8
leaq -0xa8(%rbp), %rdi
callq 0x47e8
jmp 0x5946
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x51(%rbp), %rdi
callq 0x4450
jmp 0x5b39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5b30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x47e8
jmp 0x5b30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5362
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5297
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x528b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x527f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x47e8
leaq -0x148(%rbp), %rdi
callq 0x47e8
leaq -0x128(%rbp), %rdi
callq 0x47e8
leaq -0x108(%rbp), %rdi
callq 0x47e8
jmp 0x5362
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5356
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x47e8
jmp 0x5356
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x52fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x47e8
leaq -0x1a9(%rbp), %rdi
callq 0x4450
jmp 0x5356
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x47e8
jmp 0x5356
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x534a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x7160
leaq -0x200(%rbp), %rdi
callq 0x7160
leaq -0xe8(%rbp), %rdi
callq 0x47e8
leaq -0xc8(%rbp), %rdi
callq 0x47e8
leaq -0xa8(%rbp), %rdi
callq 0x47e8
jmp 0x5b30
leaq 0x10ca2(%rip), %rsi     # 0x16028
leaq -0x30(%rbp), %rdi
callq 0x6e80
movb %al, -0x399(%rbp)
jmp 0x5397
movb -0x399(%rbp), %al
testb $0x1, %al
jne 0x53a6
jmp 0x55a7
leaq -0x238(%rbp), %rdi
movq %rdi, -0x3a8(%rbp)
callq 0x45a0
movq -0x3a8(%rbp), %rsi
movq 0x1bc19(%rip), %rdi     # 0x20fe0
callq 0x4540
jmp 0x53ce
leaq -0x238(%rbp), %rdi
callq 0x42f0
movq %rax, %rcx
movb $0x0, -0x259(%rbp)
xorl %eax, %eax
cmpq $0x9, %rcx
movb %al, -0x3a9(%rbp)
jbe 0x5458
leaq -0x238(%rbp), %rdi
movq %rdi, -0x3b8(%rbp)
callq 0x42f0
movq -0x3b8(%rbp), %rsi
movq %rax, %rdx
addq $-0x9, %rdx
leaq -0x258(%rbp), %rdi
movq $-0x1, %rcx
callq 0x4420
jmp 0x5428
movb $0x1, -0x259(%rbp)
leaq 0x10bf9(%rip), %rsi     # 0x1602f
leaq -0x258(%rbp), %rdi
callq 0x7190
movb %al, -0x3b9(%rbp)
jmp 0x544a
movb -0x3b9(%rbp), %al
movb %al, -0x3a9(%rbp)
jmp 0x5458
movb -0x3a9(%rbp), %al
movb %al, -0x3ba(%rbp)
testb $0x1, -0x259(%rbp)
jne 0x546f
jmp 0x547b
leaq -0x258(%rbp), %rdi
callq 0x47e8
movb -0x3ba(%rbp), %al
testb $0x1, %al
jne 0x5487
jmp 0x54eb
movq 0x1bb3a(%rip), %rdi     # 0x20fc8
leaq 0x10ba4(%rip), %rsi     # 0x16039
callq 0x43f0
jmp 0x549c
movl $0x0, -0x4(%rbp)
movl $0x1, -0x260(%rbp)
jmp 0x555d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5596
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
testb $0x1, -0x259(%rbp)
jne 0x54da
jmp 0x54e6
leaq -0x258(%rbp), %rdi
callq 0x47e8
jmp 0x5596
leaq -0x238(%rbp), %rdi
callq 0x6f90
movq %rax, -0x270(%rbp)
movl $0x2, -0x274(%rbp)
leaq 0x5821(%rip), %rsi      # 0xad30
leaq 0x10b52(%rip), %r8      # 0x16068
leaq 0x1c013(%rip), %r9      # 0x21530
leaq -0x268(%rbp), %rdi
leaq -0x270(%rbp), %rdx
leaq -0x274(%rbp), %rcx
callq 0x71c0
jmp 0x5539
leaq -0x268(%rbp), %rdi
callq 0x46c0
jmp 0x5547
leaq -0x268(%rbp), %rdi
callq 0x7160
movl $0x0, -0x260(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x47e8
movl -0x260(%rbp), %eax
testl %eax, %eax
jne 0x5b12
jmp 0x5579
jmp 0x5944
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x7160
leaq -0x238(%rbp), %rdi
callq 0x47e8
jmp 0x5b30
leaq 0x10abd(%rip), %rsi     # 0x1606b
leaq -0x30(%rbp), %rdi
callq 0x6e80
movb %al, -0x3bb(%rbp)
jmp 0x55bf
movb -0x3bb(%rbp), %al
testb $0x1, %al
jne 0x55f2
jmp 0x55cb
leaq 0x10a9d(%rip), %rsi     # 0x1606f
leaq -0x30(%rbp), %rdi
callq 0x6e80
movb %al, -0x3bc(%rbp)
jmp 0x55e3
movb -0x3bc(%rbp), %al
testb $0x1, %al
jne 0x55f2
jmp 0x5887
leaq -0x298(%rbp), %rdi
movq %rdi, -0x3c8(%rbp)
callq 0x45a0
movq -0x3c8(%rbp), %rsi
movq 0x1b9cd(%rip), %rdi     # 0x20fe0
callq 0x4540
jmp 0x561a
leaq -0x298(%rbp), %rdi
callq 0x42f0
movq %rax, %rcx
movb $0x0, -0x2b9(%rbp)
xorl %eax, %eax
cmpq $0x9, %rcx
movb %al, -0x3c9(%rbp)
jbe 0x56a4
leaq -0x298(%rbp), %rdi
movq %rdi, -0x3d8(%rbp)
callq 0x42f0
movq -0x3d8(%rbp), %rsi
movq %rax, %rdx
addq $-0x9, %rdx
leaq -0x2b8(%rbp), %rdi
movq $-0x1, %rcx
callq 0x4420
jmp 0x5674
movb $0x1, -0x2b9(%rbp)
leaq 0x109ad(%rip), %rsi     # 0x1602f
leaq -0x2b8(%rbp), %rdi
callq 0x7190
movb %al, -0x3d9(%rbp)
jmp 0x5696
movb -0x3d9(%rbp), %al
movb %al, -0x3c9(%rbp)
jmp 0x56a4
movb -0x3c9(%rbp), %al
movb %al, -0x3da(%rbp)
testb $0x1, -0x2b9(%rbp)
jne 0x56bb
jmp 0x56c7
leaq -0x2b8(%rbp), %rdi
callq 0x47e8
movb -0x3da(%rbp), %al
testb $0x1, %al
jne 0x56d3
jmp 0x5737
movq 0x1b8ee(%rip), %rdi     # 0x20fc8
leaq 0x10958(%rip), %rsi     # 0x16039
callq 0x43f0
jmp 0x56e8
movl $0x0, -0x4(%rbp)
movl $0x1, -0x260(%rbp)
jmp 0x5809
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5876
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
testb $0x1, -0x2b9(%rbp)
jne 0x5726
jmp 0x5732
leaq -0x2b8(%rbp), %rdi
callq 0x47e8
jmp 0x5876
leaq -0x298(%rbp), %rdi
callq 0x6f90
movq %rax, -0x2d0(%rbp)
movl $0x0, -0x2d4(%rbp)
leaq 0x55d5(%rip), %rsi      # 0xad30
leaq 0x10906(%rip), %r8      # 0x16068
leaq 0x1bdc7(%rip), %r9      # 0x21530
leaq -0x2c8(%rbp), %rdi
leaq -0x2d0(%rbp), %rdx
leaq -0x2d4(%rbp), %rcx
callq 0x71c0
jmp 0x5785
leaq -0x2f8(%rbp), %rdi
leaq -0x298(%rbp), %rsi
callq 0x4200
jmp 0x579a
xorl %edi, %edi
leaq -0x2f8(%rbp), %rsi
callq 0x5f90
jmp 0x57aa
leaq -0x2f8(%rbp), %rdi
callq 0x47e8
leaq 0xe3e3(%rip), %rsi      # 0x13ba0
leaq -0x300(%rbp), %rdi
callq 0x70a0
jmp 0x57cb
leaq -0x2c8(%rbp), %rdi
callq 0x46c0
jmp 0x57d9
leaq -0x300(%rbp), %rdi
callq 0x46f0
jmp 0x57e7
leaq -0x300(%rbp), %rdi
callq 0x7160
leaq -0x2c8(%rbp), %rdi
callq 0x7160
movl $0x0, -0x260(%rbp)
leaq -0x298(%rbp), %rdi
callq 0x47e8
movl -0x260(%rbp), %eax
testl %eax, %eax
jne 0x5b12
jmp 0x5825
jmp 0x5942
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x586a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x2f8(%rbp), %rdi
callq 0x47e8
jmp 0x586a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x300(%rbp), %rdi
callq 0x7160
leaq -0x2c8(%rbp), %rdi
callq 0x7160
leaq -0x298(%rbp), %rdi
callq 0x47e8
jmp 0x5b30
leaq 0x107e5(%rip), %rsi     # 0x16073
leaq -0x30(%rbp), %rdi
callq 0x6e80
movb %al, -0x3db(%rbp)
jmp 0x589f
movb -0x3db(%rbp), %al
testb $0x1, %al
jne 0x58cf
jmp 0x58ab
leaq 0x107c6(%rip), %rsi     # 0x16078
leaq -0x30(%rbp), %rdi
callq 0x6e80
movb %al, -0x3dc(%rbp)
jmp 0x58c3
movb -0x3dc(%rbp), %al
testb $0x1, %al
jne 0x58cf
jmp 0x5929
leaq -0x320(%rbp), %rdi
movq %rdi, -0x3e8(%rbp)
callq 0x45a0
movq -0x3e8(%rbp), %rsi
movq 0x1b6f0(%rip), %rdi     # 0x20fe0
callq 0x4540
jmp 0x58f7
callq 0x6b70
jmp 0x58fe
leaq -0x320(%rbp), %rdi
callq 0x47e8
jmp 0x5940
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x320(%rbp), %rdi
callq 0x47e8
jmp 0x5b30
movq 0x1b698(%rip), %rdi     # 0x20fc8
leaq 0x10746(%rip), %rsi     # 0x1607d
callq 0x43f0
jmp 0x593e
jmp 0x5940
jmp 0x5942
jmp 0x5944
jmp 0x5946
jmp 0x5948
movq 0x1b679(%rip), %rdi     # 0x20fc8
leaq 0x10742(%rip), %rsi     # 0x16098
callq 0x43f0
jmp 0x595d
movq 0x1b67c(%rip), %rdi     # 0x20fe0
leaq -0x321(%rbp), %rsi
callq 0x4580
jmp 0x5972
movsbl -0x321(%rbp), %eax
cmpl $0x4e, %eax
je 0x598e
movsbl -0x321(%rbp), %eax
cmpl $0x6e, %eax
jne 0x5aca
leaq -0x348(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4200
jmp 0x59a0
leaq -0x348(%rbp), %rdi
callq 0x6680
jmp 0x59ae
leaq -0x348(%rbp), %rdi
callq 0x47e8
movl $0x0, -0x34c(%rbp)
movl -0x34c(%rbp), %eax
movq %rax, -0x3f0(%rbp)
leaq 0x1bb40(%rip), %rdi     # 0x21518
callq 0x72a0
movq %rax, %rcx
movq -0x3f0(%rbp), %rax
cmpq %rcx, %rax
jae 0x5ab3
movl -0x34c(%rbp), %eax
movl %eax, %esi
leaq 0x1bb19(%rip), %rdi     # 0x21518
callq 0x72c0
movq %rax, %rdi
callq 0x6f90
movq %rax, -0x360(%rbp)
movl $0x2, -0x364(%rbp)
leaq 0x530c(%rip), %rsi      # 0xad30
leaq 0x1063d(%rip), %r8      # 0x16068
leaq 0x1bafe(%rip), %r9      # 0x21530
leaq -0x358(%rbp), %rdi
leaq -0x360(%rbp), %rdx
leaq -0x364(%rbp), %rcx
callq 0x71c0
jmp 0x5a4e
leaq -0x358(%rbp), %rdi
callq 0x46c0
jmp 0x5a5c
leaq -0x358(%rbp), %rdi
callq 0x7160
movl -0x34c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34c(%rbp)
jmp 0x59c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x348(%rbp), %rdi
callq 0x47e8
jmp 0x5b30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x358(%rbp), %rdi
callq 0x7160
jmp 0x5b30
movq 0x1b50e(%rip), %rdi     # 0x20fc8
leaq 0x1090d(%rip), %rsi     # 0x163ce
callq 0x43f0
jmp 0x5ac8
jmp 0x5b01
movsbl -0x321(%rbp), %eax
cmpl $0x59, %eax
je 0x5ae2
movsbl -0x321(%rbp), %eax
cmpl $0x79, %eax
jne 0x5ae7
jmp 0x4e61
movq 0x1b4da(%rip), %rdi     # 0x20fc8
leaq 0x105c4(%rip), %rsi     # 0x160b9
callq 0x43f0
jmp 0x5afc
jmp 0x5948
movl $0x0, -0x4(%rbp)
movl $0x1, -0x260(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x47e8
leaq -0x30(%rbp), %rdi
callq 0x47e8
movl -0x4(%rbp), %eax
addq $0x3f0, %rsp            # imm = 0x3F0
popq %rbp
retq
leaq -0x50(%rbp), %rdi
callq 0x47e8
leaq -0x30(%rbp), %rdi
callq 0x47e8
movq -0x60(%rbp), %rdi
callq 0x4700
nopl (%rax,%rax)