// File: /workspace/github_cpp_makefile_star2_O2/ys1998[P]spsim/src/main.cpp
// Function: main
int main(int argc, char const *argv[])
{
	if(argc <= 1) {
		error_msg("main", "Program needed for execution");
	}
	if(argc == 3){
		int l = std::stoi(argv[2]);
		if(l < 0 || l > 2)
			error_msg("main", "Invalid logging level");
		LOG_LEVEL = l;
	}

	std::ifstream programFile(argv[1]);
	if(!programFile) {
    	error_msg("main", "Unable to open program file");
 	}

	initialize_ISA();

	/**********************************************************************************
						Instantiate classes and build data path
	**********************************************************************************/

	Buffer<Instruction> output_order, ICache, if_de_queue;
	int DCache[DCACHE_SIZE];
	int RegisterMapping[NUM_LOG_REGS];
	bool BusyBitTable[NUM_PHY_REGS];

	int BranchPredict[BRANCH_PREDICT_SLOTS];
	int BranchPredictAddr[BRANCH_PREDICT_SLOTS];

	Fetcher f(&ICache, &if_de_queue);

	FreeList fl;
	ActiveList al(&fl, &output_order, &RegisterMapping[0], &BusyBitTable[0]);
	IntegerQueue iq(&BusyBitTable[0]);
	AddressQueue aq(&BusyBitTable[0],&al);
	IntegerRegisterFile rf;

	Decoder d(&if_de_queue, &fl, &al, &RegisterMapping[0], &BusyBitTable[0],
				&iq, &aq, &BranchPredict[0], &BranchPredictAddr[0], &f);

	Latch< std::tuple<Instruction, int, int> > in_latch_1, in_latch_2,in_latch_3,in_latch_4;

	Issuer is(&iq, &aq, &rf);

	Latch< std::tuple<Instruction, int> > out_latch_1,out_latch_3,out_latch_4;
	Latch< std::tuple<Instruction, int, int> > out_latch_2;

	ALU2 a2(&in_latch_2, &out_latch_2, &BusyBitTable[0]);
	ALU3 a3(&in_latch_3, &out_latch_3, &BusyBitTable[0]);
	MEM  mem(&in_latch_4,&out_latch_4, &DCache[0], &BusyBitTable[0]);

	Writer w(&out_latch_1, &out_latch_2, &out_latch_4, &al, &rf, &BusyBitTable[0]);
	Flusher flsh(&is, &f, &d, &w);
	ALU1 a1(&in_latch_1, &out_latch_1, &BusyBitTable[0], &a2, &a3, &flsh,
			&BranchPredict[0], &BranchPredictAddr[0]);

	is.attach_latch(0, &in_latch_1,1);
	is.attach_latch(1, &in_latch_2,1);
	is.attach_latch(2,&in_latch_3,2);
	is.attach_latch(3,&in_latch_4,3);
	is.attach_cal_latch_outer(&out_latch_3);

	/**********************************************************************************/

	for(int i=0; i<NUM_LOG_REGS; ++i)
		RegisterMapping[i] = -1;
	for(int i=0; i<NUM_PHY_REGS; ++i)
		BusyBitTable[i] = false;
	for(int i=0; i<DCACHE_SIZE;++i)
		DCache[i] = 0;
	for(int i=0; i<BRANCH_PREDICT_SLOTS; ++i){
		BranchPredict[i] = STRONGLY_NOT_TAKEN;
		BranchPredictAddr[i] = i + 1;
	}

	int PC = 0, stage = -1;
	bool main_found = false;
	std::string input = "";

	while(std::getline(programFile, input)){
		if(input.compare("") == 0)
			continue;
		if(PC > PROG_SIZE) {
			error_msg("main", std::string("Program size limit [") + std::to_string(PROG_SIZE) + "] exceeded");
		}
		switch(stage){
			case -1:
			if(input.compare("data:") == 0)
				stage = 0;
			else if(input.compare("main:") == 0)
				stage = 1;
			break;

			case 0:
			if(input.compare("main:") == 0)
				stage = 1;
			else{
				size_t pos;
				int idx = std::stoi(input, &pos);
				if(idx >= DCACHE_SIZE)
					error_msg("parser", "D-Cache size limit exceeded");
				else{
					int value = std::stoi(input.substr(pos));
					DCache[idx] = value;
				}
			}
			break;

			case 1:
			main_found = true;
			Instruction instr(PC, input);
			instr.set_id();
			ICache.push_back(instr);
			PC++;
			break;
		}
	}
	programFile.close();

	if(!main_found)
		error_msg("parser", "Main label not found");

	if(LOG_LEVEL >= 1)
		status_msg("main", "Program parsing complete");
	
	while(!terminate){
		CLOCK++;
		f.tick();
		d.tick();
		w.tick(); // for preventing additional stall
		a1.tick();
		a2.tick();
		a3.tick();
		mem.tick();
		is.tick();

		f.tock();
		d.tock();
		is.tock();
		a1.tock();
		a2.tock();
		a3.tock();
		mem.tock();
		w.tock();
	}
	if(LOG_LEVEL >= 1)
		status_msg("main", "Program simulation complete, ticks = " + std::to_string(CLOCK));

	std::cout << std::endl;
	print_std(output_order);

	std::cout << std::endl;
	print_regs(rf, &RegisterMapping[0]);

	std::cout << std::endl;
	print_mem(&DCache[0]);

	std::cout << std::endl;
	if(LOG_LEVEL >= 1)
		status_msg("main", "Space-Time Diagram, register values and memory content displayed");

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1968, %rsp           # imm = 0x1968
movq %rsi, %rbx
cmpl $0x1, %edi
jg 0xae1c
leaq 0x566b(%rip), %rsi      # 0x10422
leaq 0x2d8(%rsp), %rdi
leaq 0xb90(%rsp), %rdx
callq 0x4860
leaq 0x5654(%rip), %rsi      # 0x10427
leaq 0x2b8(%rsp), %rdi
leaq 0x1200(%rsp), %rdx
callq 0x4860
leaq 0x2d8(%rsp), %rdi
leaq 0x2b8(%rsp), %rsi
callq 0x9f00
leaq 0x2b8(%rsp), %rdi
callq 0x3100
leaq 0x2d8(%rsp), %rdi
callq 0x3100
jmp 0xaed1
cmpl $0x3, %edi
jne 0xaed1
movq 0x10(%rbx), %rsi
leaq 0xb90(%rsp), %rdi
leaq 0x1200(%rsp), %rdx
callq 0x4860
leaq 0xb90(%rsp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0xbe9f
movl %eax, %ebp
leaq 0xb90(%rsp), %rdi
callq 0x3100
cmpl $0x3, %ebp
jb 0xaecb
leaq 0x55b7(%rip), %rsi      # 0x10422
leaq 0x298(%rsp), %rdi
leaq 0xb90(%rsp), %rdx
callq 0x4860
leaq 0x55bd(%rip), %rsi      # 0x10444
leaq 0x278(%rsp), %rdi
leaq 0x1200(%rsp), %rdx
callq 0x4860
leaq 0x298(%rsp), %rdi
leaq 0x278(%rsp), %rsi
callq 0x9f00
leaq 0x278(%rsp), %rdi
callq 0x3100
leaq 0x298(%rsp), %rdi
callq 0x3100
movl %ebp, 0xc307(%rip)      # 0x171d8
movq 0x8(%rbx), %rsi
leaq 0x1200(%rsp), %rbx
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0x3340
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x1220(%rsp,%rax)
je 0xaf60
leaq 0x5522(%rip), %rsi      # 0x10422
leaq 0x258(%rsp), %rdi
leaq 0xb90(%rsp), %rdx
callq 0x4860
leaq 0x553e(%rip), %rsi      # 0x1045a
leaq 0x238(%rsp), %rdi
leaq 0x1408(%rsp), %rdx
callq 0x4860
leaq 0x258(%rsp), %rdi
leaq 0x238(%rsp), %rsi
callq 0x9f00
leaq 0x238(%rsp), %rdi
callq 0x3100
leaq 0x258(%rsp), %rdi
callq 0x3100
callq 0x69ec
leaq 0x458(%rsp), %rdi
callq 0x59f8
leaq 0x408(%rsp), %rdi
callq 0x59f8
leaq 0x3b8(%rsp), %rdi
callq 0x59f8
leaq 0x338(%rsp), %rbx
leaq 0x408(%rsp), %rsi
leaq 0x3b8(%rsp), %rdx
movq %rbx, %rdi
callq 0x68ac
leaq 0x568(%rsp), %rdi
callq 0x87c8
leaq 0x4a8(%rsp), %rdi
leaq 0x568(%rsp), %rsi
leaq 0x458(%rsp), %rdx
leaq 0xaf0(%rsp), %rcx
leaq 0xb0(%rsp), %r8
callq 0x8dec
leaq 0x5a8(%rsp), %r14
leaq 0xb0(%rsp), %rsi
movq %r14, %rdi
callq 0xc838
leaq 0x1048(%rsp), %r15
leaq 0xb0(%rsp), %rsi
leaq 0x4a8(%rsp), %rdx
movq %r15, %rdi
callq 0xd080
leaq 0x16c0(%rsp), %rdi
callq 0xbebc
subq $0x8, %rsp
leaq 0x15c8(%rsp), %r13
leaq 0x1648(%rsp), %r12
leaq 0xa48(%rsp), %rdi
leaq 0x3c0(%rsp), %rsi
leaq 0x570(%rsp), %rdx
leaq 0x4b0(%rsp), %rcx
leaq 0xaf8(%rsp), %r8
leaq 0xb8(%rsp), %r9
pushq %rbx
pushq %r13
pushq %r12
pushq %r15
pushq %r14
callq 0x51d8
addq $0x30, %rsp
leaq 0x9b8(%rsp), %rdi
callq 0xbed8
leaq 0x930(%rsp), %rdi
callq 0xbed8
leaq 0x8a8(%rsp), %rdi
callq 0xbed8
leaq 0x820(%rsp), %rdi
callq 0xbed8
leaq 0xb90(%rsp), %rdi
leaq 0x5a8(%rsp), %rsi
leaq 0x1048(%rsp), %rdx
leaq 0x16c0(%rsp), %rcx
callq 0x80d4
leaq 0x798(%rsp), %rdi
callq 0xbeea
leaq 0x710(%rsp), %rdi
callq 0xbeea
leaq 0x688(%rsp), %rdi
callq 0xbeea
leaq 0x600(%rsp), %rdi
callq 0xbed8
leaq 0xf68(%rsp), %rdi
leaq 0x930(%rsp), %rsi
leaq 0x600(%rsp), %rdx
leaq 0xb0(%rsp), %rcx
callq 0x3dd6
leaq 0xe88(%rsp), %rdi
leaq 0x8a8(%rsp), %rsi
leaq 0x710(%rsp), %rdx
leaq 0xb0(%rsp), %rcx
callq 0x4402
leaq 0xdd0(%rsp), %rdi
leaq 0x820(%rsp), %rsi
leaq 0x688(%rsp), %rdx
leaq 0x17d0(%rsp), %rcx
leaq 0xb0(%rsp), %rbx
movq %rbx, %r8
callq 0xc5f0
subq $0x8, %rsp
leaq 0x1410(%rsp), %rdi
leaq 0x7a0(%rsp), %rsi
leaq 0x608(%rsp), %rdx
leaq 0x690(%rsp), %rcx
leaq 0x4b0(%rsp), %r8
leaq 0x16c8(%rsp), %r9
pushq %rbx
callq 0xe748
popq %rax
popq %rcx
leaq 0xb70(%rsp), %rbx
leaq 0xb90(%rsp), %rsi
leaq 0x338(%rsp), %rdx
leaq 0xa40(%rsp), %rcx
leaq 0x1408(%rsp), %r8
movq %rbx, %rdi
callq 0x699c
subq $0x8, %rsp
leaq 0x1100(%rsp), %rdi
leaq 0x9c0(%rsp), %rsi
leaq 0x7a0(%rsp), %rdx
leaq 0xb8(%rsp), %rcx
leaq 0xf70(%rsp), %r8
leaq 0xe90(%rsp), %r9
pushq %r13
pushq %r12
pushq %rbx
callq 0x36ec
addq $0x20, %rsp
leaq 0xb90(%rsp), %rdi
leaq 0x9b8(%rsp), %rdx
pushq $0x1
popq %rcx
xorl %esi, %esi
callq 0x815c
leaq 0xb90(%rsp), %rdi
leaq 0x930(%rsp), %rdx
pushq $0x1
popq %rcx
movl %ecx, %esi
callq 0x815c
leaq 0xb90(%rsp), %rdi
leaq 0x8a8(%rsp), %rdx
pushq $0x2
popq %rcx
movl %ecx, %esi
callq 0x815c
leaq 0xb90(%rsp), %rdi
leaq 0x820(%rsp), %rdx
pushq $0x3
popq %rcx
movl %ecx, %esi
callq 0x815c
leaq 0xb90(%rsp), %rdi
leaq 0x710(%rsp), %rsi
callq 0x8180
xorl %eax, %eax
cmpq $0x20, %rax
je 0xb2c8
orl $-0x1, 0xaf0(%rsp,%rax,4)
incq %rax
jmp 0xb2b5
xorl %eax, %eax
cmpq $0x40, %rax
je 0xb2dd
movb $0x0, 0xb0(%rsp,%rax)
incq %rax
jmp 0xb2ca
xorl %eax, %eax
cmpq $0x64, %rax
je 0xb2f2
andl $0x0, 0x17d0(%rsp,%rax,4)
incq %rax
jmp 0xb2df
xorl %eax, %eax
cmpq $0x20, %rax
je 0xb312
andl $0x0, 0x1640(%rsp,%rax,4)
leaq 0x1(%rax), %rcx
movl %ecx, 0x15c0(%rsp,%rax,4)
movq %rcx, %rax
jmp 0xb2f4
leaq 0x4fc5(%rip), %rsi      # 0x102de
leaq 0x218(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x4860
pushq $-0x1
popq %rax
movl %eax, (%rsp)
movq $0x0, 0x8(%rsp)
leaq 0x1200(%rsp), %r12
leaq 0x218(%rsp), %r13
leaq 0x4f8d(%rip), %rbp      # 0x102de
movq $0x0, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x3070
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xb5f6
movq %r13, %rdi
movq %rbp, %rsi
callq 0x30c0
testl %eax, %eax
je 0xb35a
cmpl $0xf4241, 0x8(%rsp)     # imm = 0xF4241
jb 0xb44b
leaq 0x318(%rsp), %rdi
leaq 0x507f(%rip), %rsi      # 0x10422
leaq 0x7(%rsp), %rdx
callq 0x4860
leaq 0x18(%rsp), %rdi
leaq 0x50bd(%rip), %rsi      # 0x10476
leaq 0x6(%rsp), %rdx
callq 0x4860
leaq 0x1f8(%rsp), %r14
movq %r14, %rdi
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x7da4
leaq 0x38(%rsp), %r15
movq %r15, %rdi
leaq 0x18(%rsp), %rsi
movq %r14, %rdx
callq 0x7ca8
leaq 0x398(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
leaq 0x5089(%rip), %rdx      # 0x1048b
callq 0x7d0f
leaq 0x318(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9f00
movq %rbx, %rdi
callq 0x3100
leaq 0x38(%rsp), %rdi
callq 0x3100
leaq 0x1f8(%rsp), %rdi
callq 0x3100
leaq 0x18(%rsp), %rdi
callq 0x3100
movq %r14, %rdi
callq 0x3100
movl (%rsp), %eax
cmpl $-0x1, %eax
je 0xb4f8
testl %eax, %eax
jne 0xb579
movq %r13, %rdi
leaq 0x5033(%rip), %rsi      # 0x1049c
callq 0x30c0
pushq $0x1
popq %rbx
movl %ebx, (%rsp)
testl %eax, %eax
je 0xb35a
movq %r13, %rdi
leaq 0x18(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0xbe9f
leaq 0x38(%rsp), %rbx
movl %eax, %r14d
cmpl $0x64, %eax
jl 0xb539
leaq 0x2f8(%rsp), %rdi
leaq 0x4c18(%rip), %rsi      # 0x100c4
movq %rbx, %rdx
callq 0x4860
leaq 0x378(%rsp), %r14
movq %r14, %rdi
leaq 0x4fdc(%rip), %rsi      # 0x104a2
leaq 0x1f8(%rsp), %rdx
callq 0x4860
leaq 0x2f8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9f00
movq %r14, %rdi
callq 0x3100
movq %rbx, %rdi
callq 0x3100
jmp 0xb56d
movq %r13, %rdi
leaq 0x4f94(%rip), %rsi      # 0x10496
callq 0x30c0
movl $0x0, (%rsp)
testl %eax, %eax
je 0xb35a
movq %r13, %rdi
leaq 0x4f7c(%rip), %rsi      # 0x1049c
callq 0x30c0
negl %eax
movl $0x0, %eax
sbbl %eax, %eax
orl $0x1, %eax
movl %eax, (%rsp)
jmp 0xb35a
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
pushq $-0x1
popq %rcx
callq 0x3200
movq %rbx, %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0xbe9f
movq %rbx, %rdi
movl %eax, %ebx
callq 0x3100
movslq %r14d, %rax
movl %ebx, 0x17d0(%rsp,%rax,4)
movl $0x0, (%rsp)
jmp 0xb35a
leaq 0x358(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x3270
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0x6de8
movq %r14, %rdi
callq 0x3100
leaq 0xbc3c(%rip), %rdx      # 0x171ec
movl (%rdx), %eax
leal 0x1(%rax), %ecx
movl %ecx, (%rdx)
movl %eax, 0x38(%rsp)
leaq 0x408(%rsp), %rdi
movq %rbx, %rsi
callq 0x5910
movq 0x8(%rsp), %rax
incl %eax
movq %rax, 0x8(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x3100
movb $0x1, %al
movq %rax, 0x10(%rsp)
pushq $0x1
popq %rbx
movl %ebx, (%rsp)
jmp 0xb35a
leaq 0x1200(%rsp), %rdi
callq 0x3080
testb $0x1, 0x10(%rsp)
jne 0xb66b
leaq 0x4ab3(%rip), %rsi      # 0x100c4
leaq 0x1d8(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x4860
leaq 0x4e94(%rip), %rsi      # 0x104be
leaq 0x1b8(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x4860
leaq 0x1d8(%rsp), %rdi
leaq 0x1b8(%rsp), %rsi
callq 0x9f00
leaq 0x1b8(%rsp), %rdi
callq 0x3100
leaq 0x1d8(%rsp), %rdi
callq 0x3100
cmpl $0x0, 0xbb66(%rip)      # 0x171d8
jle 0xb6d5
leaq 0x4da7(%rip), %rsi      # 0x10422
leaq 0x198(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x4860
leaq 0x4e3f(%rip), %rsi      # 0x104d3
leaq 0x178(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x4860
leaq 0x198(%rsp), %rdi
leaq 0x178(%rsp), %rsi
callq 0xa061
leaq 0x178(%rsp), %rdi
callq 0x3100
leaq 0x198(%rsp), %rdi
callq 0x3100
cmpb $0x0, 0xbb24(%rip)      # 0x17200
jne 0xb7b0
incl 0xbb14(%rip)            # 0x171fc
leaq 0xa40(%rsp), %rdi
callq 0x5778
leaq 0x1408(%rsp), %rdi
callq 0xe7f6
leaq 0x10f8(%rsp), %rdi
callq 0x3b8c
leaq 0xf68(%rsp), %rdi
callq 0x4148
leaq 0xe88(%rsp), %rdi
callq 0x4548
leaq 0xdd0(%rsp), %rdi
callq 0xc64a
leaq 0xb90(%rsp), %rdi
callq 0x8188
leaq 0x338(%rsp), %rdi
callq 0x68c4
leaq 0xa40(%rsp), %rdi
callq 0x57ac
leaq 0xb90(%rsp), %rdi
callq 0x8358
leaq 0x10f8(%rsp), %rdi
callq 0x3d08
leaq 0xf68(%rsp), %rdi
callq 0x42c4
leaq 0xe88(%rsp), %rdi
callq 0x468c
leaq 0xdd0(%rsp), %rdi
callq 0xc782
leaq 0x1408(%rsp), %rdi
callq 0xeb56
jmp 0xb6d5
cmpl $0x0, 0xba21(%rip)      # 0x171d8
jle 0xb834
leaq 0x4c62(%rip), %rsi      # 0x10422
leaq 0x158(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x4860
movl 0xba24(%rip), %esi      # 0x171fc
leaq 0x38(%rsp), %rdi
callq 0x7da4
leaq 0x4d03(%rip), %rsi      # 0x104ec
leaq 0x138(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x7e64
leaq 0x158(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0xa061
leaq 0x138(%rsp), %rdi
callq 0x3100
leaq 0x38(%rsp), %rdi
callq 0x3100
leaq 0x158(%rsp), %rdi
callq 0x3100
movq 0xb795(%rip), %rdi      # 0x16fd0
callq 0x3120
leaq 0x518(%rsp), %rdi
leaq 0x458(%rsp), %rsi
callq 0xbefc
leaq 0x518(%rsp), %rdi
callq 0xa62a
leaq 0x518(%rsp), %rdi
callq 0xbf9e
movq 0xb75a(%rip), %rdi      # 0x16fd0
callq 0x3120
leaq 0x16c0(%rsp), %rdi
leaq 0xaf0(%rsp), %rsi
callq 0xa408
movq 0xb739(%rip), %rdi      # 0x16fd0
callq 0x3120
leaq 0x17d0(%rsp), %rdi
callq 0xa52b
movq 0xb720(%rip), %rdi      # 0x16fd0
callq 0x3120
cmpl $0x0, 0xb91c(%rip)      # 0x171d8
jle 0xb91f
leaq 0x4b5d(%rip), %rsi      # 0x10422
leaq 0x118(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x4860
leaq 0x4c34(%rip), %rsi      # 0x10512
leaq 0xf8(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x4860
leaq 0x118(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0xa061
leaq 0xf8(%rsp), %rdi
callq 0x3100
leaq 0x118(%rsp), %rdi
callq 0x3100
leaq 0x218(%rsp), %rdi
callq 0x3100
leaq 0x10f8(%rsp), %rdi
callq 0xbfea
leaq 0x1408(%rsp), %rdi
callq 0xc016
leaq 0xdd0(%rsp), %rdi
callq 0xc04e
leaq 0xe88(%rsp), %rdi
callq 0xc066
leaq 0xf68(%rsp), %rdi
callq 0xc092
leaq 0x658(%rsp), %rdi
callq 0x3100
leaq 0x6e0(%rsp), %rdi
callq 0x3100
leaq 0x768(%rsp), %rdi
callq 0x3100
leaq 0x7f0(%rsp), %rdi
callq 0x3100
leaq 0xb90(%rsp), %rdi
callq 0xc0be
leaq 0x878(%rsp), %rdi
callq 0x3100
leaq 0x900(%rsp), %rdi
callq 0x3100
leaq 0x988(%rsp), %rdi
callq 0x3100
leaq 0xa10(%rsp), %rdi
callq 0x3100
leaq 0xa40(%rsp), %rdi
callq 0xc0f4
leaq 0x1048(%rsp), %rdi
callq 0xc10c
leaq 0x5a8(%rsp), %rdi
callq 0xbf9e
leaq 0x4a8(%rsp), %rdi
callq 0xc286
leaq 0x3b8(%rsp), %rdi
callq 0xbf9e
leaq 0x408(%rsp), %rdi
callq 0xbf9e
leaq 0x458(%rsp), %rdi
callq 0xbf9e
leaq 0x1200(%rsp), %rdi
callq 0x30a0
xorl %eax, %eax
addq $0x1968, %rsp           # imm = 0x1968
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
jmp 0xbc1e
movq %rax, %rbx
leaq 0x358(%rsp), %rdi
jmp 0xbc1e
jmp 0xbd2c
movq %rax, %rbx
leaq 0x278(%rsp), %rdi
callq 0x3100
jmp 0xba98
movq %rax, %rbx
leaq 0x298(%rsp), %rdi
jmp 0xbb98
jmp 0xbba2
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0xbc1e
jmp 0xbd2c
movq %rax, %rbx
leaq 0x378(%rsp), %rdi
callq 0x3100
jmp 0xbad1
movq %rax, %rbx
leaq 0x2f8(%rsp), %rdi
jmp 0xbc1e
jmp 0xbd2c
movq %rax, %rbx
leaq 0xb90(%rsp), %rdi
jmp 0xbb98
jmp 0xbba2
jmp 0xbd2c
movq %rax, %rbx
jmp 0xbb42
movq %rax, %rbx
leaq 0x398(%rsp), %rdi
callq 0x3100
jmp 0xbb17
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x3100
jmp 0xbb26
movq %rax, %rbx
leaq 0x1f8(%rsp), %rdi
callq 0x3100
jmp 0xbb38
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3100
leaq 0x318(%rsp), %rdi
jmp 0xbc1e
jmp 0xbd2c
movq %rax, %rbx
leaq 0x1b8(%rsp), %rdi
callq 0x3100
jmp 0xbb69
movq %rax, %rbx
leaq 0x1d8(%rsp), %rdi
jmp 0xbc1e
jmp 0xbd2c
movq %rax, %rbx
leaq 0x2b8(%rsp), %rdi
callq 0x3100
jmp 0xbb90
movq %rax, %rbx
leaq 0x2d8(%rsp), %rdi
callq 0x3100
jmp 0xbe5a
movq %rax, %rbx
jmp 0xbe5a
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x3100
jmp 0xbbbf
movq %rax, %rbx
leaq 0x118(%rsp), %rdi
jmp 0xbc1e
jmp 0xbd2c
movq %rax, %rbx
leaq 0x138(%rsp), %rdi
callq 0x3100
jmp 0xbbe3
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x3100
jmp 0xbbf2
movq %rax, %rbx
leaq 0x158(%rsp), %rdi
jmp 0xbc1e
jmp 0xbd2c
movq %rax, %rbx
leaq 0x178(%rsp), %rdi
callq 0x3100
jmp 0xbc16
movq %rax, %rbx
leaq 0x198(%rsp), %rdi
callq 0x3100
jmp 0xbd2f
jmp 0xbd2c
movq %rax, %rbx
leaq 0x238(%rsp), %rdi
callq 0x3100
jmp 0xbc42
movq %rax, %rbx
leaq 0x258(%rsp), %rdi
callq 0x3100
jmp 0xbe4d
jmp 0xbd1b
movq %rax, %rbx
leaq 0x518(%rsp), %rdi
callq 0xbf9e
jmp 0xbd2f
jmp 0xbd23
jmp 0xbc75
movq %rax, %rbx
jmp 0xbd49
movq %rax, %rbx
jmp 0xbd56
movq %rax, %rbx
jmp 0xbd63
movq %rax, %rbx
jmp 0xbd70
movq %rax, %rbx
jmp 0xbd7d
movq %rax, %rbx
jmp 0xbd8a
movq %rax, %rbx
jmp 0xbd97
movq %rax, %rbx
jmp 0xbda4
movq %rax, %rbx
jmp 0xbdb1
movq %rax, %rbx
jmp 0xbdbe
movq %rax, %rbx
jmp 0xbdcb
movq %rax, %rbx
jmp 0xbdd8
movq %rax, %rbx
jmp 0xbde5
movq %rax, %rbx
jmp 0xbdf2
movq %rax, %rbx
jmp 0xbdff
movq %rax, %rbx
jmp 0xbe0c
movq %rax, %rbx
jmp 0xbe19
jmp 0xbd01
jmp 0xbd01
movq %rax, %rbx
jmp 0xbe26
movq %rax, %rbx
jmp 0xbe33
movq %rax, %rbx
jmp 0xbe40
jmp 0xbd1b
movq %rax, %rbx
jmp 0xbe4d
movq %rax, %rbx
jmp 0xbd3c
jmp 0xbd2c
jmp 0xbd2c
movq %rax, %rbx
leaq 0x218(%rsp), %rdi
callq 0x3100
leaq 0x10f8(%rsp), %rdi
callq 0xbfea
leaq 0x1408(%rsp), %rdi
callq 0xc016
leaq 0xdd0(%rsp), %rdi
callq 0xc04e
leaq 0xe88(%rsp), %rdi
callq 0xc066
leaq 0xf68(%rsp), %rdi
callq 0xc092
leaq 0x658(%rsp), %rdi
callq 0x3100
leaq 0x6e0(%rsp), %rdi
callq 0x3100
leaq 0x768(%rsp), %rdi
callq 0x3100
leaq 0x7f0(%rsp), %rdi
callq 0x3100
leaq 0xb90(%rsp), %rdi
callq 0xc0be
leaq 0x878(%rsp), %rdi
callq 0x3100
leaq 0x900(%rsp), %rdi
callq 0x3100
leaq 0x988(%rsp), %rdi
callq 0x3100
leaq 0xa10(%rsp), %rdi
callq 0x3100
leaq 0xa40(%rsp), %rdi
callq 0xc0f4
leaq 0x1048(%rsp), %rdi
callq 0xc10c
leaq 0x5a8(%rsp), %rdi
callq 0xbf9e
leaq 0x4a8(%rsp), %rdi
callq 0xc286
leaq 0x3b8(%rsp), %rdi
callq 0xbf9e
leaq 0x408(%rsp), %rdi
callq 0xbf9e
leaq 0x458(%rsp), %rdi
callq 0xbf9e
leaq 0x1200(%rsp), %rdi
callq 0x30a0
movq %rbx, %rdi
callq 0x3320