// File: /workspace/github_cpp_makefile_star2_O1/MPSLab-ASU[P]DiRAC/./src/baseAccelSim.cc
// Function: baseAccelSim::readArchSpec(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void baseAccelSim::readArchSpec(string archSpecFileName) {
	string key, value, line;
	map <string, string> archSpec;

	ifstream inFile(archSpecFileName.c_str());

	if(!inFile)
	{
		cout << "Cannot open and read file: " << archSpecFileName.c_str() << endl;
		exit (EXIT_FAILURE);
	}

	while(getline(inFile, line)) {
		istringstream tokenStream(line);
		tokenStream >> key >> value;
		// Skip comments beginning with #
		// Skip empty lines
		if ( (key.find("#") != std::string::npos) || (line.empty()) )
	    continue;
		archSpec[key] = value;
	}
	inFile.close();

	nRows_PE_Array 				= stoi(archSpec["nRows_PE_Array"]);
	nCols_PE_Array 				= stoi(archSpec["nCols_PE_Array"]);
	RF_size 							= stoi(archSpec["RF_size"]);
	SPM_size 							= stoi(archSpec["SPM_size"]);
	total_banks_in_SPM 		= stoi(archSpec["total_banks_in_SPM"]);
	total_bytes_in_bank = stoi(archSpec["total_bytes_in_bank"]);
	accelerator_freq 			= stoi(archSpec["accelerator_freq"]);
	DMA_latency_setup 		= stoi(archSpec["DMA_init_cycles"]);
	DMA_latency_transfer_byte		= stod(archSpec["DMA_cycles_per_byte"]);
	DMA_freq 							= stoi(archSpec["DMA_freq"]);
	multiplier_stages			= stoi(archSpec["multiplier_stages"]);
	adder_stages 					= stoi(archSpec["adder_stages"]);
	maxItems_PE_FIFO			= stoi(archSpec["maxItems_PE_FIFO"]);
	size_insMem						= stoi(archSpec["size_insMem"]);

	inNetworks						= stoi(archSpec["inNetworks"]);
	outNetworks						= stoi(archSpec["outNetworks"]);

	total_PEs 						= nRows_PE_Array * nCols_PE_Array;
	// Consider total number of registers in the Register Files of PEs
	RF_size 							= RF_size / sizeof(data_type);
	totalNetworks					= inNetworks + outNetworks;
	// PE pipeline stages: Fetch+ Decoder + RF_Read + Multiplier+Adder + RF_Write
	uint8_t PE_pipeline_stages	= multiplier_stages + adder_stages + 4;
	delay_PE_WB_reduce		= PE_pipeline_stages;

	assert(nRows_PE_Array >= 1 && "Total PEs in a row should be 1 or more.");
	assert(nCols_PE_Array >= 1 && "Total PEs in a column should be 1 or more.");
	assert(RF_size >= 1 && "Registers in the RFs must be 1 or more.");
	assert(SPM_size >= RF_size && "Size of scratchpad memory must be larger than RF size.");
	assert(total_banks_in_SPM >= 1 &&
		"Total banks in Scratch-pad should be 1 or more.");
	assert(total_bytes_in_bank >= 1 &&
		"Total bytes in a bank of the Scratch-pad Memory must be 1 or more.");
	assert(SPM_size == (total_banks_in_SPM * total_bytes_in_bank) &&
		"SPM size must match SPM configuration with multi-banks.");
	assert(accelerator_freq > 0 &&
		"Frequency of the dataflow accelerator must be larger than 0 Hz.");
	assert(DMA_latency_setup > 0 &&
		"Initiation Cycles for DMA invocation should be greater than 0.");
	assert(DMA_latency_transfer_byte > 0 &&
		"Cycles per byte for transfering data through DMA must be greater than 0.");
	assert(DMA_freq > 0 &&
		"Frequency of the DMA for transferring the data must be larger than 0 Hz.");
	assert(multiplier_stages > 0 &&
		"Multiplier stages of Multiply-and-ACcumulate unit must be greater than 0.");
	assert(adder_stages > 0 &&
		"Adder stages of Multiply-and-ACcumulate unit must be greater than 0.");
	assert(maxItems_PE_FIFO > 1 && "Length of FIFOs in PEs for communicating via interconnect should be two or more.");
	assert(size_insMem > 0 && "Total instructions for executing an RF pass should be one or more.");
	assert(inNetworks >= 2 && "Total networks to communicate input data should be 2 or more.");
	assert(outNetworks >= 1 && "Total networks to communicate output data should be 1 or more.");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq %rsi, %r14
leaq 0x210(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x1f0(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x50(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x18(%rsp), %rcx
movl $0x0, (%rcx)
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq (%rsi), %rsi
leaq 0x220(%rsp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x460c10
movq 0x220(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x240(%rsp,%rax)
jne 0x406088
leaq 0x40(%rsp), %r15
leaq 0x60(%rsp), %r12
leaq 0x200(%rsp), %r13
leaq 0x1e0(%rsp), %rbp
movq $0x606328, %r14         # imm = 0x606328
movq 0x220(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4653c0
movsbl %al, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x419ec0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x40556f
movq %r12, %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x48c470
movq %r12, %rdi
movq %r13, %rsi
callq 0x419b40
movq %rax, %rdi
movq %rbp, %rsi
callq 0x419b40
movl $0x1, %ecx
movq %r13, %rdi
leaq 0x19592b(%rip), %rsi    # 0x59ae50
xorl %edx, %edx
callq 0x4964f0
cmpq $-0x1, %rax
jne 0x405552
cmpq $0x0, 0x48(%rsp)
je 0x405552
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x40e000
movq %rax, %rdi
movq %rbp, %rsi
callq 0x4946b0
movq %r12, %rdi
movq %r14, %rsi
callq 0x48c720
leaq 0xd8(%rsp), %rdi
callq 0x4667e0
jmp 0x4054bb
leaq 0x220(%rsp), %rdi
callq 0x4611c0
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x18eb2f(%rip), %rsi    # 0x5940bc
leaq 0x18eb36(%rip), %rdx    # 0x5940ca
leaq 0x60(%rsp), %rdi
callq 0x40e294
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x40e07c
movq (%rax), %r14
callq 0x4c7aa0
movq %rax, %rbx
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x4de6e0
cmpq %r14, (%r15)
je 0x4060c1
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x4060cd
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x4060cd
testl %ecx, %ecx
jne 0x4055fb
movl %ebp, (%rbx)
movw %ax, 0x205faa(%rip)     # 0x60b5ac
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x405619
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0x60(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x18eaa3(%rip), %rsi    # 0x5940cb
leaq 0x18eaaa(%rip), %rdx    # 0x5940d9
callq 0x40e294
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x40e07c
movq (%rax), %r14
movl (%rbx), %ebp
movl $0x0, (%rbx)
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x4de6e0
cmpq %r14, (%r15)
je 0x4060d9
movabsq $-0x100000000, %r13     # imm = 0xFFFFFFFF00000000
leaq -0x80000000(%rax), %rcx
cmpq %r13, %rcx
jb 0x4060e5
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x4060e5
testl %ecx, %ecx
jne 0x405697
movl %ebp, (%rbx)
movw %ax, 0x205f10(%rip)     # 0x60b5ae
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x4056b5
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0x60(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x18ea16(%rip), %rsi    # 0x5940da
leaq 0x18ea16(%rip), %rdx    # 0x5940e1
callq 0x40e294
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x40e07c
movq (%rax), %r14
movl (%rbx), %ebp
movl $0x0, (%rbx)
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x4de6e0
cmpq %r14, (%r15)
je 0x4060f1
leaq -0x80000000(%rax), %rcx
cmpq %r13, %rcx
jb 0x4060fd
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x4060fd
testl %ecx, %ecx
jne 0x405729
movl %ebp, (%rbx)
movw %ax, 0x205e80(%rip)     # 0x60b5b0
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x405747
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0x60(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x18e98c(%rip), %rsi    # 0x5940e2
leaq 0x18e98d(%rip), %rdx    # 0x5940ea
callq 0x40e294
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x40e07c
movq (%rax), %r14
movl (%rbx), %ebp
movl $0x0, (%rbx)
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x4de6e0
cmpq %r14, (%r15)
je 0x406109
leaq -0x80000000(%rax), %rcx
cmpq %r13, %rcx
jb 0x406115
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x406115
testl %ecx, %ecx
jne 0x4057bb
movl %ebp, (%rbx)
movl %eax, 0x205df3(%rip)    # 0x60b5b4
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x4057d8
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0x60(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x18e904(%rip), %rsi    # 0x5940eb
leaq 0x18e90f(%rip), %rdx    # 0x5940fd
callq 0x40e294
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x40e07c
movq (%rax), %r14
movl (%rbx), %ebp
movl $0x0, (%rbx)
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x4de6e0
cmpq %r14, (%r15)
je 0x406121
leaq -0x80000000(%rax), %rcx
cmpq %r13, %rcx
jb 0x40612d
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x40612d
testl %ecx, %ecx
jne 0x40584c
movl %ebp, (%rbx)
movw %ax, 0x205d67(%rip)     # 0x60b5ba
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x40586a
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0x60(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x18e885(%rip), %rsi    # 0x5940fe
leaq 0x18e891(%rip), %rdx    # 0x594111
callq 0x40e294
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x40e07c
movq (%rax), %r14
movl (%rbx), %ebp
movl $0x0, (%rbx)
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x4de6e0
cmpq %r14, (%r15)
je 0x406139
leaq -0x80000000(%rax), %rcx
cmpq %r13, %rcx
jb 0x406145
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x406145
testl %ecx, %ecx
jne 0x4058de
movl %ebp, (%rbx)
movw %ax, 0x205cd7(%rip)     # 0x60b5bc
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x4058fc
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0x60(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x18e807(%rip), %rsi    # 0x594112
leaq 0x18e810(%rip), %rdx    # 0x594122
callq 0x40e294
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x40e07c
movq (%rax), %r14
movl (%rbx), %ebp
movl $0x0, (%rbx)
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x4de6e0
cmpq %r14, (%r15)
je 0x406151
leaq -0x80000000(%rax), %rcx
cmpq %r13, %rcx
jb 0x40615d
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x40615d
testl %ecx, %ecx
jne 0x405970
movl %ebp, (%rbx)
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x205c44(%rip)   # 0x60b5c0
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x405993
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0x60(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x18e781(%rip), %rsi    # 0x594123
leaq 0x18e789(%rip), %rdx    # 0x594132
callq 0x40e294
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x40e07c
movq (%rax), %r14
movl (%rbx), %ebp
movl $0x0, (%rbx)
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x4de6e0
cmpq %r14, (%r15)
je 0x406169
leaq -0x80000000(%rax), %rcx
cmpq %r13, %rcx
jb 0x406175
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x406175
testl %ecx, %ecx
jne 0x405a07
movl %ebp, (%rbx)
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x205bae(%rip)   # 0x60b5c4
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x405a2d
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0x60(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x18e6f7(%rip), %rsi    # 0x594133
leaq 0x18e703(%rip), %rdx    # 0x594146
callq 0x40e294
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x40e07c
movq (%rax), %r14
movl (%rbx), %ebp
movl $0x0, (%rbx)
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x4df160
cmpq %r14, (%r15)
je 0x406181
movl (%rbx), %eax
testl %eax, %eax
je 0x405a92
cmpl $0x22, %eax
jne 0x405a94
leaq 0x18ff39(%rip), %rdi    # 0x5959c6
callq 0x402c3d
movl %ebp, (%rbx)
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x205b28(%rip)   # 0x60b5c8
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x405ab7
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0x60(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x18e681(%rip), %rsi    # 0x594147
leaq 0x18e682(%rip), %rdx    # 0x59414f
callq 0x40e294
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x40e07c
movq (%rax), %r14
movl (%rbx), %ebp
movl $0x0, (%rbx)
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x4de6e0
cmpq %r14, (%r15)
je 0x40618d
leaq -0x80000000(%rax), %rcx
cmpq %r13, %rcx
jb 0x406199
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x406199
testl %ecx, %ecx
jne 0x405b2b
movl %ebp, (%rbx)
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x205a92(%rip)   # 0x60b5cc
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x405b51
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0x60(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x18e5f0(%rip), %rsi    # 0x594150
leaq 0x18e5fa(%rip), %rdx    # 0x594161
callq 0x40e294
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x40e07c
movq (%rax), %r14
movl (%rbx), %ebp
movl $0x0, (%rbx)
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x4de6e0
cmpq %r14, (%r15)
je 0x4061a5
leaq -0x80000000(%rax), %rcx
cmpq %r13, %rcx
jb 0x4061b1
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x4061b1
testl %ecx, %ecx
jne 0x405bc5
movl %ebp, (%rbx)
movb %al, 0x203589(%rip)     # 0x609154
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x405be2
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0x60(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x18e571(%rip), %rsi    # 0x594162
leaq 0x18e576(%rip), %rdx    # 0x59416e
callq 0x40e294
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x40e07c
movq (%rax), %r14
movl (%rbx), %ebp
movl $0x0, (%rbx)
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x4de6e0
cmpq %r14, (%r15)
je 0x4061bd
leaq -0x80000000(%rax), %rcx
cmpq %r13, %rcx
jb 0x4061c9
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x4061c9
testl %ecx, %ecx
jne 0x405c56
movl %ebp, (%rbx)
movb %al, 0x2034f9(%rip)     # 0x609155
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x405c73
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0x60(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x18e4ed(%rip), %rsi    # 0x59416f
leaq 0x18e4f6(%rip), %rdx    # 0x59417f
callq 0x40e294
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x40e07c
movq (%rax), %r14
movl (%rbx), %ebp
movl $0x0, (%rbx)
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x4de6e0
cmpq %r14, (%r15)
je 0x4061d5
leaq -0x80000000(%rax), %rcx
cmpq %r13, %rcx
jb 0x4061e1
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x4061e1
testl %ecx, %ecx
jne 0x405ce7
movl %ebp, (%rbx)
movb %al, 0x203469(%rip)     # 0x609156
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x405d04
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0x60(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x18e46d(%rip), %rsi    # 0x594180
leaq 0x18e471(%rip), %rdx    # 0x59418b
callq 0x40e294
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x40e07c
movq (%rax), %r14
movl (%rbx), %ebp
movl $0x0, (%rbx)
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x4de6e0
cmpq %r14, (%r15)
je 0x4061ed
leaq -0x80000000(%rax), %rcx
cmpq %r13, %rcx
jb 0x4061f9
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x4061f9
testl %ecx, %ecx
jne 0x405d78
movl %ebp, (%rbx)
movw %ax, 0x205839(%rip)     # 0x60b5b8
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x405d96
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0x60(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x18e3e7(%rip), %rsi    # 0x59418c
leaq 0x18e3ea(%rip), %rdx    # 0x594196
callq 0x40e294
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x40e07c
movq (%rax), %r14
movl (%rbx), %ebp
movl $0x0, (%rbx)
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x4de6e0
cmpq %r14, (%r15)
je 0x406205
leaq -0x80000000(%rax), %rcx
cmpq %r13, %rcx
jb 0x406211
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x406211
testl %ecx, %ecx
jne 0x405e0a
movl %ebp, (%rbx)
movb %al, 0x203341(%rip)     # 0x609151
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x405e27
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x416ca0
leaq 0x60(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x18e361(%rip), %rsi    # 0x594197
leaq 0x18e365(%rip), %rdx    # 0x5941a2
callq 0x40e294
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x40e07c
movq (%rax), %r14
movl (%rbx), %ebp
movl $0x0, (%rbx)
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x4de6e0
cmpq %r14, (%r15)
je 0x40621d
leaq -0x80000000(%rax), %rcx
cmpq %r13, %rcx
jb 0x406229
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x406229
testl %ecx, %ecx
jne 0x405e9b
movl %ebp, (%rbx)
movb %al, 0x205743(%rip)     # 0x60b5e4
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x405eb8
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x416ca0
movzwl 0x2056ec(%rip), %r10d   # 0x60b5ac
movzwl 0x2056e6(%rip), %r9d    # 0x60b5ae
movl %r9d, %r11d
imull %r10d, %r11d
movzwl 0x2056d9(%rip), %r8d    # 0x60b5b0
movl %r8d, %edi
shrl %edi
movb 0x20326f(%rip), %cl     # 0x609151
movb 0x2056fc(%rip), %al     # 0x60b5e4
leal (%rax,%rcx), %ebx
movb 0x203262(%rip), %sil    # 0x609154
movb 0x20325d(%rip), %dl     # 0x609155
leal (%rsi,%rdx), %ebp
addb $0x4, %bpl
movl %r11d, 0x2056a2(%rip)   # 0x60b5a8
movw %di, 0x2056a3(%rip)     # 0x60b5b0
movb %bl, 0x203240(%rip)     # 0x609153
movb %bpl, 0x203236(%rip)    # 0x609150
testl %r10d, %r10d
je 0x406235
testw %r9w, %r9w
je 0x406254
cmpw $0x1, %r8w
jbe 0x406273
movl 0x205675(%rip), %r8d    # 0x60b5b4
cmpl %edi, %r8d
jb 0x406292
movzwl 0x20566b(%rip), %edi    # 0x60b5ba
testl %edi, %edi
je 0x4062b1
movzwl 0x20565d(%rip), %r9d    # 0x60b5bc
testl %r9d, %r9d
je 0x4062d0
imull %edi, %r9d
cmpl %r9d, %r8d
jne 0x4062ef
movss 0x205643(%rip), %xmm1   # 0x60b5c0
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jbe 0x40630e
movss 0x205633(%rip), %xmm1   # 0x60b5c4
ucomiss %xmm0, %xmm1
jbe 0x40632d
movss 0x205626(%rip), %xmm1   # 0x60b5c8
ucomiss %xmm0, %xmm1
jbe 0x40634c
movss 0x205619(%rip), %xmm1   # 0x60b5cc
ucomiss %xmm0, %xmm1
jbe 0x40636b
testb %sil, %sil
je 0x40638a
testb %dl, %dl
je 0x4063a9
cmpb $0x1, 0x203182(%rip)    # 0x609156
jbe 0x4063c8
cmpw $0x0, 0x2055d6(%rip)    # 0x60b5b8
je 0x4063e7
cmpb $0x1, %cl
jbe 0x406406
testb %al, %al
je 0x406425
leaq 0x220(%rsp), %rdi
callq 0x461570
leaq 0x10(%rsp), %rdi
callq 0x40e104
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x40602c
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x1e0(%rsp), %rdi
leaq 0x1f0(%rsp), %rax
cmpq %rax, %rdi
je 0x406051
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x200(%rsp), %rdi
leaq 0x210(%rsp), %rax
cmpq %rax, %rdi
je 0x406076
movq 0x210(%rsp), %rsi
incq %rsi
callq 0x416ca0
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $0x60c900, %rdi         # imm = 0x60C900
leaq 0x18df8a(%rip), %rsi    # 0x594020
movl $0x1b, %edx
callq 0x484270
movq (%r14), %rsi
movq $0x60c900, %rdi         # imm = 0x60C900
callq 0x4847a0
movq %rax, %rdi
callq 0x484080
movl $0x1, %edi
callq 0x4de3d0
leaq 0x18f8f9(%rip), %rdi    # 0x5959c1
callq 0x402b8d
leaq 0x18f8ed(%rip), %rdi    # 0x5959c1
callq 0x402c3d
leaq 0x18f8e1(%rip), %rdi    # 0x5959c1
callq 0x402b8d
leaq 0x18f8d5(%rip), %rdi    # 0x5959c1
callq 0x402c3d
leaq 0x18f8c9(%rip), %rdi    # 0x5959c1
callq 0x402b8d
leaq 0x18f8bd(%rip), %rdi    # 0x5959c1
callq 0x402c3d
leaq 0x18f8b1(%rip), %rdi    # 0x5959c1
callq 0x402b8d
leaq 0x18f8a5(%rip), %rdi    # 0x5959c1
callq 0x402c3d
leaq 0x18f899(%rip), %rdi    # 0x5959c1
callq 0x402b8d
leaq 0x18f88d(%rip), %rdi    # 0x5959c1
callq 0x402c3d
leaq 0x18f881(%rip), %rdi    # 0x5959c1
callq 0x402b8d
leaq 0x18f875(%rip), %rdi    # 0x5959c1
callq 0x402c3d
leaq 0x18f869(%rip), %rdi    # 0x5959c1
callq 0x402b8d
leaq 0x18f85d(%rip), %rdi    # 0x5959c1
callq 0x402c3d
leaq 0x18f851(%rip), %rdi    # 0x5959c1
callq 0x402b8d
leaq 0x18f845(%rip), %rdi    # 0x5959c1
callq 0x402c3d
leaq 0x18f83e(%rip), %rdi    # 0x5959c6
callq 0x402b8d
leaq 0x18f82d(%rip), %rdi    # 0x5959c1
callq 0x402b8d
leaq 0x18f821(%rip), %rdi    # 0x5959c1
callq 0x402c3d
leaq 0x18f815(%rip), %rdi    # 0x5959c1
callq 0x402b8d
leaq 0x18f809(%rip), %rdi    # 0x5959c1
callq 0x402c3d
leaq 0x18f7fd(%rip), %rdi    # 0x5959c1
callq 0x402b8d
leaq 0x18f7f1(%rip), %rdi    # 0x5959c1
callq 0x402c3d
leaq 0x18f7e5(%rip), %rdi    # 0x5959c1
callq 0x402b8d
leaq 0x18f7d9(%rip), %rdi    # 0x5959c1
callq 0x402c3d
leaq 0x18f7cd(%rip), %rdi    # 0x5959c1
callq 0x402b8d
leaq 0x18f7c1(%rip), %rdi    # 0x5959c1
callq 0x402c3d
leaq 0x18f7b5(%rip), %rdi    # 0x5959c1
callq 0x402b8d
leaq 0x18f7a9(%rip), %rdi    # 0x5959c1
callq 0x402c3d
leaq 0x18f79d(%rip), %rdi    # 0x5959c1
callq 0x402b8d
leaq 0x18f791(%rip), %rdi    # 0x5959c1
callq 0x402c3d
leaq 0x18df67(%rip), %rdi    # 0x5941a3
leaq 0x18de36(%rip), %rsi    # 0x594079
leaq 0x18df9a(%rip), %rcx    # 0x5941e4
movl $0x6a, %edx
callq 0x4d75c0
leaq 0x18dfb1(%rip), %rdi    # 0x59420c
leaq 0x18de17(%rip), %rsi    # 0x594079
leaq 0x18df7b(%rip), %rcx    # 0x5941e4
movl $0x6b, %edx
callq 0x4d75c0
leaq 0x18dfd6(%rip), %rdi    # 0x594250
leaq 0x18ddf8(%rip), %rsi    # 0x594079
leaq 0x18df5c(%rip), %rcx    # 0x5941e4
movl $0x6c, %edx
callq 0x4d75c0
leaq 0x18dff1(%rip), %rdi    # 0x59428a
leaq 0x18ddd9(%rip), %rsi    # 0x594079
leaq 0x18df3d(%rip), %rcx    # 0x5941e4
movl $0x6d, %edx
callq 0x4d75c0
leaq 0x18e022(%rip), %rdi    # 0x5942da
leaq 0x18ddba(%rip), %rsi    # 0x594079
leaq 0x18df1e(%rip), %rcx    # 0x5941e4
movl $0x6f, %edx
callq 0x4d75c0
leaq 0x18e050(%rip), %rdi    # 0x594327
leaq 0x18dd9b(%rip), %rsi    # 0x594079
leaq 0x18deff(%rip), %rcx    # 0x5941e4
movl $0x71, %edx
callq 0x4d75c0
leaq 0x18e092(%rip), %rdi    # 0x594388
leaq 0x18dd7c(%rip), %rsi    # 0x594079
leaq 0x18dee0(%rip), %rcx    # 0x5941e4
movl $0x73, %edx
callq 0x4d75c0
leaq 0x18e0e7(%rip), %rdi    # 0x5943fc
leaq 0x18dd5d(%rip), %rsi    # 0x594079
leaq 0x18dec1(%rip), %rcx    # 0x5941e4
movl $0x75, %edx
callq 0x4d75c0
leaq 0x18e122(%rip), %rdi    # 0x594456
leaq 0x18dd3e(%rip), %rsi    # 0x594079
leaq 0x18dea2(%rip), %rcx    # 0x5941e4
movl $0x77, %edx
callq 0x4d75c0
leaq 0x18e15d(%rip), %rdi    # 0x5944b0
leaq 0x18dd1f(%rip), %rsi    # 0x594079
leaq 0x18de83(%rip), %rcx    # 0x5941e4
movl $0x79, %edx
callq 0x4d75c0
leaq 0x18e1aa(%rip), %rdi    # 0x59451c
leaq 0x18dd00(%rip), %rsi    # 0x594079
leaq 0x18de64(%rip), %rcx    # 0x5941e4
movl $0x7b, %edx
callq 0x4d75c0
leaq 0x18e1e6(%rip), %rdi    # 0x594577
leaq 0x18dce1(%rip), %rsi    # 0x594079
leaq 0x18de45(%rip), %rcx    # 0x5941e4
movl $0x7d, %edx
callq 0x4d75c0
leaq 0x18e22c(%rip), %rdi    # 0x5945dc
leaq 0x18dcc2(%rip), %rsi    # 0x594079
leaq 0x18de26(%rip), %rcx    # 0x5941e4
movl $0x7f, %edx
callq 0x4d75c0
leaq 0x18e268(%rip), %rdi    # 0x594637
leaq 0x18dca3(%rip), %rsi    # 0x594079
leaq 0x18de07(%rip), %rcx    # 0x5941e4
movl $0x80, %edx
callq 0x4d75c0
leaq 0x18e2b4(%rip), %rdi    # 0x5946a2
leaq 0x18dc84(%rip), %rsi    # 0x594079
leaq 0x18dde8(%rip), %rcx    # 0x5941e4
movl $0x81, %edx
callq 0x4d75c0
leaq 0x18e2ed(%rip), %rdi    # 0x5946fa
leaq 0x18dc65(%rip), %rsi    # 0x594079
leaq 0x18ddc9(%rip), %rcx    # 0x5941e4
movl $0x82, %edx
callq 0x4d75c0
leaq 0x18e321(%rip), %rdi    # 0x59474d
leaq 0x18dc46(%rip), %rsi    # 0x594079
leaq 0x18ddaa(%rip), %rcx    # 0x5941e4
movl $0x83, %edx
callq 0x4d75c0
jmp 0x406489
jmp 0x4064da
jmp 0x406489
jmp 0x4064da
jmp 0x406489
jmp 0x4064da
jmp 0x406489
jmp 0x4064da
jmp 0x406489
jmp 0x4064da
jmp 0x406489
jmp 0x4064da
jmp 0x406489
jmp 0x4064da
jmp 0x406489
jmp 0x4064da
jmp 0x406489
jmp 0x4064da
jmp 0x406489
jmp 0x4064da
jmp 0x406489
jmp 0x4064da
jmp 0x406489
jmp 0x4064da
jmp 0x406489
jmp 0x4064da
jmp 0x406489
jmp 0x4064da
jmp 0x406489
jmp 0x4064da
movq %rax, %r14
jmp 0x4064bf
jmp 0x4064da
movq %rax, %r14
jmp 0x40650d
jmp 0x4064b5
jmp 0x4064da
jmp 0x4064b5
jmp 0x4064b5
jmp 0x4064b5
jmp 0x4064b5
jmp 0x4064b5
jmp 0x4064b5
jmp 0x4064b5
jmp 0x4064b5
jmp 0x4064b5
jmp 0x4064b5
jmp 0x4064b5
jmp 0x4064b5
jmp 0x4064b5
jmp 0x4064b5
movq %rax, %r14
cmpl $0x0, (%rbx)
jne 0x4064bf
movl %ebp, (%rbx)
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x406500
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x416ca0
jmp 0x406500
jmp 0x4064da
movq %rax, %r14
jmp 0x406500
movq %rax, %r14
movq $0x606328, %rsi         # imm = 0x606328
leaq 0x60(%rsp), %rdi
callq 0x48c720
leaq 0xd8(%rsp), %rdi
callq 0x4667e0
leaq 0x220(%rsp), %rdi
callq 0x461570
leaq 0x10(%rsp), %rdi
callq 0x40e104
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x406533
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x1e0(%rsp), %rdi
leaq 0x1f0(%rsp), %rax
cmpq %rax, %rdi
je 0x406558
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq 0x200(%rsp), %rdi
leaq 0x210(%rsp), %rax
cmpq %rax, %rdi
je 0x40657d
movq 0x210(%rsp), %rsi
incq %rsi
callq 0x416ca0
movq %r14, %rdi
callq 0x4c2960
nop