// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/RunSim.cpp
// Function: main
int main(int argc, char **argv)
{
	//
	//parse command-line options setting
	//
	numSimCycles = 100000;
	memUtil = 0.1;
	rwRatio = 80;
	traceType = "";
	traceFileName = "";
	
	int opt;
	string pwdString = "";
	ifstream traceFile;
	string line;
	bool pendingTran = false;
	while(1) {
		static struct option long_options[] = {
			{"pwd", required_argument, 0, 'p'},
			{"cycle",  required_argument, 0, 'c'},
			{"trace",  required_argument, 0, 't'},
			{"util",  required_argument, 0, 'u'},
			{"rwratio",  required_argument, 0, 'r'},
			{"file",  required_argument, 0, 'f'},
			{"help", no_argument, 0, 'h'},
			{0, 0, 0, 0}
		};
		int option_index=0;
		opt = getopt_long (argc, argv, "p:c:t:u:r:f:h", long_options, &option_index);
		if(opt == -1) {
			break;
		}
		switch(opt) {
			case 0:
				if (long_options[option_index].flag != 0) {
					cout<<"setting flag"<<endl;
					break;
				}
				cout<<"option "<<long_options[option_index].name<<endl;
				if (optarg) {
					cout<<" with arg"<<optarg<<endl;
				}
				cout<<""<<endl;
				break;
			case 'p':
				pwdString = string(optarg);
				break;
			case 'c':
				numSimCycles = atol(optarg);
				break;
			case 't':
				traceType = string(optarg);
				if(traceType != "random" && traceType != "file") {
					cout<<endl<<" == -t (--trace) ERROR ==";
					cout<<endl<<"  This option must be selected by one of 'random' and 'file'"<<endl<<endl;
					exit(0);
				}
				break;
			case 'u':
				memUtil = atof(optarg);
				if(memUtil < 0 || memUtil > 1) {
					cout<<endl<<" == -u (--util) ERROR ==";
					cout<<endl<<"  This value must be in the between '0' and '1'"<<endl<<endl;
					exit(0);
				}
				break;
			case 'r':
				rwRatio = atof(optarg);
				if(rwRatio < 0 || rwRatio > 100) {
					cout<<endl<<" == -r (--rwratio) ERROR ==";
					cout<<endl<<"  This value is the percentage of reads in request stream"<<endl<<endl;
					exit(0);
				}
				break;
			case 'f':
				traceFileName = string(optarg);
				if(access(traceFileName.c_str(), 0) == -1) {
					cout<<endl<<" == -f (--file) ERROR ==";
					cout<<endl<<"  There is no trace file ["<<traceFileName<<"]"<<endl<<endl;
					exit(0);
				}
				break;
			case 'h':
			case '?':
				Help();
				exit(0);
				break;
		}
	}
	
	srand((unsigned)time(NULL));
	casHMCWrapper = new CasHMCWrapper("ConfigSim.ini", "ConfigDRAM.ini");
	
#ifdef CALLBACKTRANS
	//Register callback function (ReadComplete, WriteComplete)
	CallbackTrans callbackTrans;
	TransCompCB* read_cb = new Callback<CallbackTrans, void, uint64_t, uint64_t>(&callbackTrans, &CallbackTrans::ReadComplete);
    TransCompCB* write_cb = new Callback<CallbackTrans, void, uint64_t, uint64_t>(&callbackTrans, &CallbackTrans::WriteComplete);
	casHMCWrapper->RegisterCallbacks(read_cb, write_cb);
#endif
	
	if(traceType == "random") {
		for(uint64_t cpuCycle=0; cpuCycle<numSimCycles; cpuCycle++) {
			MakeRandomTransaction();
			if(!transactionBuffers.empty()) {
				if(casHMCWrapper->ReceiveTran(transactionBuffers[0])) {
					transactionBuffers.erase(transactionBuffers.begin());
				}
			}
			casHMCWrapper->Update();
		}
	}
	else if(traceType == "file") {
		uint64_t issueClock = 0;
		traceFile.open(traceFileName.c_str());
		if(!traceFile.is_open()) {
			ERROR(" == Error - Could not open trace file ["<<traceFileName<<"]");
			exit(0);
		}
		for(uint64_t cpuCycle=0; cpuCycle<numSimCycles; cpuCycle++) {
			if(!pendingTran) {
				if(!traceFile.eof()) {
					getline(traceFile, line);
					if(line.size() > 0) {
						uint64_t addr;
						TransactionType tranType;
						unsigned dataSize;
						ParseTraceFileLine(line, issueClock, addr, tranType, dataSize);
						Transaction *newTran = new Transaction(tranType, addr, dataSize, casHMCWrapper);
						
						if(cpuCycle >= issueClock) {
							if(!casHMCWrapper->ReceiveTran(newTran)) {
								pendingTran = true;
								transactionBuffers.push_back(newTran);
							}
						}
						else {
							pendingTran = true;
							transactionBuffers.push_back(newTran);
						}
					}
					else {
						cout<<" ## WARNING ## Skipping line ("<<lineNumber<<") in tracefile  (CurrentClock : "<<cpuCycle<<")"<<endl;
					}
					lineNumber++;
				}
			}
			else {
				if(cpuCycle >= issueClock) {
					if(casHMCWrapper->ReceiveTran(transactionBuffers[0])) {
						pendingTran = false;
						transactionBuffers.erase(transactionBuffers.begin());
					}
				}					
			}
			casHMCWrapper->Update();
		}
	}

	transactionBuffers.clear();
	delete casHMCWrapper;
	casHMCWrapper = NULL;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2c8, %rsp            # imm = 0x2C8
movq %rsi, %r14
movl %edi, %ebp
leaq 0x11069(%rip), %rax     # 0x3c410
movq $0x186a0, (%rax)        # imm = 0x186A0
leaq 0x11063(%rip), %rcx     # 0x3c418
movabsq $0x3fb999999999999a, %rax # imm = 0x3FB999999999999A
movq %rax, (%rcx)
leaq 0x11057(%rip), %rcx     # 0x3c420
movabsq $0x4054000000000000, %rax # imm = 0x4054000000000000
movq %rax, (%rcx)
leaq 0x1104b(%rip), %rdi     # 0x3c428
movq 0x8(%rdi), %rdx
leaq 0x7695(%rip), %rbx      # 0x32a7d
xorl %esi, %esi
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x4440
leaq 0x1104c(%rip), %rdi     # 0x3c448
movq 0x8(%rdi), %rdx
xorl %esi, %esi
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x4440
leaq 0x70(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x60(%rsp), %rdi
movq %rbx, %rsi
movq %rbx, %rdx
callq 0x18176
leaq 0xc0(%rsp), %rdi
callq 0x4330
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x30(%rsp), %r12
leaq 0x10ead(%rip), %r13     # 0x3c300
movq 0x10b76(%rip), %rbx     # 0x3bfd0
movl $0x0, 0x10(%rsp)
movl %ebp, %edi
movq %r14, %rsi
leaq 0x91f4(%rip), %rdx      # 0x34662
movq %r13, %rcx
leaq 0x10(%rsp), %r8
callq 0x44a0
cmpl $0x65, %eax
jle 0x2b4e1
leal -0x70(%rax), %ecx
cmpl $0x5, %ecx
ja 0x2b581
leaq 0x8f4d(%rip), %rdx      # 0x343e0
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
movq 0x10b0d(%rip), %rax     # 0x3bfb0
movq (%rax), %rsi
leaq 0x20(%rsp), %r15
movq %r15, %rdi
leaq 0x8(%rsp), %rdx
callq 0x2bfbc
leaq 0x60(%rsp), %rdi
movq %r15, %rsi
callq 0x4370
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x2b45a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x2b45a
cmpl $0x3e, %eax
jg 0x2b55a
testl %eax, %eax
jne 0x2b6de
movslq 0x10(%rsp), %rax
shlq $0x5, %rax
movl $0xc, %edx
cmpq $0x0, 0x10(%rax,%r13)
leaq 0x9167(%rip), %rsi      # 0x34670
jne 0x2b7de
movl $0x7, %edx
movq %rbx, %rdi
leaq 0x915f(%rip), %rsi      # 0x3467d
callq 0x4340
movq %r12, %r15
movslq 0x10(%rsp), %rax
shlq $0x5, %rax
movq (%rax,%r13), %r12
testq %r12, %r12
je 0x2b708
movq %r12, %rdi
callq 0x4150
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x4340
movq %r15, %r12
jmp 0x2b722
cmpl $0x63, %eax
jne 0x2b6ec
movq 0x10a46(%rip), %rax     # 0x3bfb0
movq (%rax), %rdi
callq 0x4350
leaq 0x10e97(%rip), %rcx     # 0x3c410
movq %rax, (%rcx)
jmp 0x2b45a
cmpl $0x66, %eax
jne 0x2b6fa
movq 0x10a1f(%rip), %rax     # 0x3bfb0
movq (%rax), %rsi
leaq 0x20(%rsp), %r15
movq %r15, %rdi
leaq 0x8(%rsp), %rdx
callq 0x2bfbc
leaq 0x10e9b(%rip), %rdi     # 0x3c448
movq %r15, %rsi
callq 0x4370
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x2b5cc
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x10e75(%rip), %rax     # 0x3c448
movq (%rax), %rdi
xorl %esi, %esi
callq 0x44b0
cmpl $-0x1, %eax
jne 0x2b45a
jmp 0x2bd3c
movq 0x109be(%rip), %rax     # 0x3bfb0
movq (%rax), %rsi
leaq 0x20(%rsp), %r15
movq %r15, %rdi
leaq 0x8(%rsp), %rdx
callq 0x2bfbc
leaq 0x10e1a(%rip), %rdi     # 0x3c428
movq %r15, %rsi
callq 0x4370
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x2b62d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x10df4(%rip), %rdi     # 0x3c428
leaq 0x63e6(%rip), %rsi      # 0x31a21
callq 0x4100
testl %eax, %eax
je 0x2b45a
leaq 0x10dd9(%rip), %rdi     # 0x3c428
leaq 0x7702(%rip), %rsi      # 0x32d58
callq 0x4100
testl %eax, %eax
je 0x2b45a
jmp 0x2bdc1
movq 0x10941(%rip), %rax     # 0x3bfb0
movq (%rax), %rdi
callq 0x4380
leaq 0x10d9a(%rip), %rax     # 0x3c418
movsd %xmm0, (%rax)
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x2bce4
ucomisd 0x5a18(%rip), %xmm0     # 0x310b0
jbe 0x2b45a
jmp 0x2bce4
movq 0x10906(%rip), %rax     # 0x3bfb0
movq (%rax), %rdi
callq 0x4380
leaq 0x10d67(%rip), %rax     # 0x3c420
movsd %xmm0, (%rax)
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x2bc8f
ucomisd 0x59f5(%rip), %xmm0     # 0x310c8
jbe 0x2b45a
jmp 0x2bc8f
cmpl $-0x1, %eax
jne 0x2b45a
jmp 0x2b812
cmpl $0x3f, %eax
jne 0x2b45a
jmp 0x2bc83
cmpl $0x68, %eax
jne 0x2b45a
jmp 0x2bc83
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x44e0
movq %r15, %r12
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
movq 0x10860(%rip), %rax     # 0x3bfb0
cmpq $0x0, (%rax)
je 0x2b7d5
movl $0x9, %edx
movq %rbx, %rdi
leaq 0x8f20(%rip), %rsi      # 0x34685
callq 0x4340
movq 0x1083f(%rip), %rax     # 0x3bfb0
movq (%rax), %r12
testq %r12, %r12
je 0x2b794
movq %r12, %rdi
callq 0x4150
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x4340
movq %r15, %r12
jmp 0x2b7ae
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x44e0
movq %r15, %r12
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
leaq 0x72a1(%rip), %rsi      # 0x32a7d
xorl %edx, %edx
movq %rbx, %rdi
callq 0x4340
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
jmp 0x2b45a
xorl %edi, %edi
callq 0x42a0
movl %eax, %edi
callq 0x42c0
movl $0x1018, %edi           # imm = 0x1018
callq 0x42f0
movq %rax, %r14
leaq 0xb0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8f79(%rip), %rsi      # 0x347b9
leaq 0x8f7f(%rip), %rdx      # 0x347c6
leaq 0xa0(%rsp), %rdi
callq 0x18176
leaq 0x90(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x8f5f(%rip), %rsi      # 0x347c7
leaq 0x8f66(%rip), %rdx      # 0x347d5
leaq 0x80(%rsp), %rdi
callq 0x18176
leaq 0xa0(%rsp), %rsi
leaq 0x80(%rsp), %rdx
movq %r14, %rdi
callq 0x64f8
movq %r14, 0x11b35(%rip)     # 0x3d3d0
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x2b8b8
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0xa0(%rsp), %rdi
cmpq %r15, %rdi
je 0x2b8d5
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x10b4c(%rip), %rdi     # 0x3c428
leaq 0x613e(%rip), %rsi      # 0x31a21
callq 0x4100
testl %eax, %eax
je 0x2bb7d
leaq 0x10b31(%rip), %rdi     # 0x3c428
leaq 0x745a(%rip), %rsi      # 0x32d58
callq 0x4100
testl %eax, %eax
jne 0x2bbf6
movq $0x0, 0x20(%rsp)
leaq 0x10b2d(%rip), %rax     # 0x3c448
movq (%rax), %rsi
leaq 0xc0(%rsp), %rdi
movl $0x8, %edx
callq 0x41c0
leaq 0x138(%rsp), %rdi
callq 0x40b0
testb %al, %al
je 0x2be19
leaq 0x10ac4(%rip), %rax     # 0x3c410
cmpq $0x0, (%rax)
je 0x2bbf6
xorl %ebx, %ebx
leaq 0xc0(%rsp), %r14
leaq 0x40(%rsp), %r15
movq 0x10664(%rip), %r12     # 0x3bfd0
xorl %r13d, %r13d
testb $0x1, %r13b
je 0x2b9cd
cmpq 0x20(%rsp), %rbx
jb 0x2bb5c
movq 0x11a49(%rip), %rdi     # 0x3d3d0
movq 0x11a2a(%rip), %rax     # 0x3d3b8
movq (%rax), %rsi
callq 0x115c0
testb %al, %al
je 0x2bb5c
movq 0x11a13(%rip), %rdi     # 0x3d3b8
leaq 0x8(%rdi), %rsi
movq 0x11a10(%rip), %rdx     # 0x3d3c0
cmpq %rdx, %rsi
je 0x2b9bd
subq %rsi, %rdx
callq 0x4480
addq $-0x8, 0x119fb(%rip)    # 0x3d3c0
xorl %r13d, %r13d
jmp 0x2bb5c
movq 0xc0(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x2, 0xe0(%rsp,%rax)
jne 0x2bb5c
leaq (%rsp,%rax), %rdi
addq $0xc0, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4560
cmpq $0x0, 0x48(%rsp)
je 0x2ba83
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x1c(%rsp), %rcx
leaq 0x18(%rsp), %r8
callq 0x2a907
movl $0x30, %edi
callq 0x42f0
movq %rax, %rbp
movl 0x1c(%rsp), %esi
movq 0x10(%rsp), %rdx
movl 0x18(%rsp), %ecx
movq 0x11981(%rip), %r8      # 0x3d3d0
movq %rax, %rdi
callq 0x2bffc
movq %rbp, 0x8(%rsp)
cmpq 0x20(%rsp), %rbx
jae 0x2bb09
movq 0x11952(%rip), %rsi     # 0x3d3c0
cmpq 0x11953(%rip), %rsi     # 0x3d3c8
je 0x2bb41
movq %rbp, (%rsi)
jmp 0x2bb34
movl $0x1e, %edx
movq %r12, %rdi
leaq 0x8d6c(%rip), %rsi      # 0x347fe
callq 0x4340
movq 0x10852(%rip), %rsi     # 0x3c2f0
movq %r12, %rdi
callq 0x41e0
movq %rax, %rbp
movl $0x20, %edx
movq %rax, %rdi
leaq 0x8d65(%rip), %rsi      # 0x3481d
callq 0x4340
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x41e0
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
leaq 0x8987(%rip), %rsi      # 0x34461
callq 0x4340
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
jmp 0x2bb55
movq 0x118c0(%rip), %rdi     # 0x3d3d0
movq %rbp, %rsi
callq 0x115c0
testb %al, %al
jne 0x2bb55
movq 0x1189d(%rip), %rsi     # 0x3d3c0
cmpq 0x1189e(%rip), %rsi     # 0x3d3c8
je 0x2bb41
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x11884(%rip)     # 0x3d3c0
movb $0x1, %r13b
jmp 0x2bb55
movb $0x1, %r13b
leaq 0x1186d(%rip), %rdi     # 0x3d3b8
leaq 0x8(%rsp), %rdx
callq 0x1454a
incq 0x10794(%rip)           # 0x3c2f0
movq 0x1186d(%rip), %rdi     # 0x3d3d0
callq 0x11714
incq %rbx
leaq 0x1089e(%rip), %rax     # 0x3c410
cmpq (%rax), %rbx
jb 0x2b96f
jmp 0x2bbf6
leaq 0x1088c(%rip), %rax     # 0x3c410
cmpq $0x0, (%rax)
je 0x2bbf6
xorl %ebx, %ebx
callq 0x2a7d8
movq 0x11820(%rip), %rax     # 0x3d3b8
cmpq 0x11821(%rip), %rax     # 0x3d3c0
je 0x2bbdb
movq 0x11828(%rip), %rdi     # 0x3d3d0
movq (%rax), %rsi
callq 0x115c0
testb %al, %al
je 0x2bbdb
movq 0x117fd(%rip), %rdi     # 0x3d3b8
leaq 0x8(%rdi), %rsi
movq 0x117fa(%rip), %rdx     # 0x3d3c0
cmpq %rdx, %rsi
je 0x2bbd3
subq %rsi, %rdx
callq 0x4480
addq $-0x8, 0x117e5(%rip)    # 0x3d3c0
movq 0x117ee(%rip), %rdi     # 0x3d3d0
callq 0x11714
incq %rbx
leaq 0x1081f(%rip), %rax     # 0x3c410
cmpq (%rax), %rbx
jb 0x2bb8c
movq 0x117bb(%rip), %rax     # 0x3d3b8
cmpq %rax, 0x117bc(%rip)     # 0x3d3c0
je 0x2bc0d
movq %rax, 0x117b3(%rip)     # 0x3d3c0
movq 0x117bc(%rip), %rdi     # 0x3d3d0
testq %rdi, %rdi
je 0x2bc1f
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x117a6(%rip) # 0x3d3d0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x2bc46
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0xc0(%rsp), %rdi
callq 0x40d0
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2bc6f
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x4300
xorl %eax, %eax
addq $0x2c8, %rsp            # imm = 0x2C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a610
xorl %edi, %edi
callq 0x4360
movq 0x1033a(%rip), %rdi     # 0x3bfd0
callq 0x4170
leaq 0x8a8d(%rip), %rsi      # 0x3472f
movl $0x1b, %edx
movq %rax, %rdi
callq 0x4340
movq 0x1031a(%rip), %rdi     # 0x3bfd0
callq 0x4170
movq %rax, %rbx
leaq 0x8a86(%rip), %rsi      # 0x3474b
movl $0x39, %edx
movq %rax, %rdi
callq 0x4340
movq %rbx, %rdi
callq 0x4170
movq %rax, %rdi
callq 0x4170
jmp 0x2bc88
movq 0x102e5(%rip), %rdi     # 0x3bfd0
callq 0x4170
leaq 0x89ef(%rip), %rsi      # 0x346e6
movl $0x18, %edx
movq %rax, %rdi
callq 0x4340
movq 0x102c5(%rip), %rdi     # 0x3bfd0
callq 0x4170
movq %rax, %rbx
leaq 0x89e5(%rip), %rsi      # 0x346ff
movl $0x2f, %edx
movq %rax, %rdi
callq 0x4340
movq %rbx, %rdi
callq 0x4170
movq %rax, %rdi
callq 0x4170
jmp 0x2bc88
movq 0x1028d(%rip), %rdi     # 0x3bfd0
callq 0x4170
leaq 0x8a36(%rip), %rsi      # 0x34785
movl $0x18, %edx
movq %rax, %rdi
callq 0x4340
movq 0x1026d(%rip), %rdi     # 0x3bfd0
callq 0x4170
movq %rax, %rbx
leaq 0x8a2c(%rip), %rsi      # 0x3479e
movl $0x1a, %edx
movq %rax, %rdi
callq 0x4340
leaq 0x106c2(%rip), %rax     # 0x3c448
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x4340
movq %rax, %rbx
leaq 0x6ce3(%rip), %rsi      # 0x32a82
movl $0x1, %edx
movq %rax, %rdi
callq 0x4340
movq %rbx, %rdi
callq 0x4170
movq %rax, %rdi
callq 0x4170
jmp 0x2bc88
movq 0x10208(%rip), %rdi     # 0x3bfd0
callq 0x4170
leaq 0x88bb(%rip), %rsi      # 0x3468f
movl $0x19, %edx
movq %rax, %rdi
callq 0x4340
movq 0x101e8(%rip), %rdi     # 0x3bfd0
callq 0x4170
movq %rax, %rbx
leaq 0x88b2(%rip), %rsi      # 0x346a9
movl $0x3c, %edx
movq %rax, %rdi
callq 0x4340
movq %rbx, %rdi
callq 0x4170
movq %rax, %rdi
callq 0x4170
jmp 0x2bc88
movq 0x101d0(%rip), %rdi     # 0x3bff0
leaq 0x51fb(%rip), %rsi      # 0x31022
movl $0x8, %edx
callq 0x4340
movq 0x101b8(%rip), %rdi     # 0x3bff0
leaq 0x8716(%rip), %rsi      # 0x34555
movl $0x12, %edx
callq 0x4340
movq 0x101a0(%rip), %rdi     # 0x3bff0
leaq 0x59e0(%rip), %rsi      # 0x31837
movl $0x1, %edx
callq 0x4340
movq 0x10188(%rip), %rdi     # 0x3bff0
movl $0x105, %esi            # imm = 0x105
callq 0x4500
movq %rax, %rbx
leaq 0x51c5(%rip), %rsi      # 0x31041
movl $0x4, %edx
movq %rax, %rdi
callq 0x4340
leaq 0x8946(%rip), %rsi      # 0x347d6
movl $0x27, %edx
movq %rbx, %rdi
callq 0x4340
leaq 0x105a4(%rip), %rax     # 0x3c448
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x4340
movq %rax, %rbx
leaq 0x6bc5(%rip), %rsi      # 0x32a82
movl $0x1, %edx
movq %rax, %rdi
callq 0x4340
movq %rbx, %rdi
callq 0x4170
jmp 0x2bc88
jmp 0x2bf53
movq %rax, %rbx
movl $0x30, %esi
movq %rbp, %rdi
jmp 0x2bf37
jmp 0x2bf53
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x2bf0d
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x2bf0d
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
cmpq %r15, %rdi
je 0x2bf2f
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x2bf2f
movq %rax, %rbx
movl $0x1018, %esi           # imm = 0x1018
movq %r14, %rdi
callq 0x4300
jmp 0x2bf56
jmp 0x2bf53
movq %rax, %rbx
jmp 0x2bf7f
jmp 0x2bf53
jmp 0x2bf53
jmp 0x2bf53
jmp 0x2bf53
jmp 0x2bf53
jmp 0x2bf53
jmp 0x2bf53
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x2bf72
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0xc0(%rsp), %rdi
callq 0x40d0
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2bf9b
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x4540
nop