LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/WorkingStats/WorkingStats.cpp
// Function: CalcWorkingStats(std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>>, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
vector<int> CalcWorkingStats(const vector<int> &bs, vector<int> EV, int IV, string nature) {
	vector<int> stats(6);
	if(!mapsInitialized) {
		initializeWorkingStatsMaps();
		mapsInitialized = true;
	}
	//stats.resize(6);
	stats[0] = CalcHP(bs[0],EV[0],IV,100);
	for(unsigned i = 1; i < 6; i++) {
		stats[i] = CalcNonHP(i,bs[i],EV[i],IV,100,nature);
	}	
	return stats;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %r14
movq %rcx, -0x40(%rbp)
movq %rdx, -0x50(%rbp)
movq %rsi, -0x48(%rbp)
movq %rdi, %rbx
movl $0x18, %edi
callq 0x21a0
movq %rax, (%rbx)
leaq 0x18(%rax), %rcx
movq %rcx, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rax, -0x38(%rbp)
movq $0x0, 0x10(%rax)
movq %rcx, 0x8(%rbx)
cmpb $0x0, 0x10e37(%rip)     # 0x1f688
jne 0xe873
leaq -0x29(%rbp), %rdi
callq 0xe020
leaq 0x10df5(%rip), %rsi     # 0x1f658
leaq -0x29(%rbp), %rdi
callq 0x52a2
movb $0x1, 0x10e15(%rip)     # 0x1f688
movq %rbx, -0x78(%rbp)
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq -0x50(%rbp), %rcx
movq (%rcx), %rcx
movl (%rcx), %ecx
leal 0x3(%rcx), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
movl (%rax), %eax
sarl $0x2, %edx
movq -0x40(%rbp), %rcx
leal (%rcx,%rax,2), %eax
addl %edx, %eax
addl $0x6e, %eax
movq -0x38(%rbp), %rcx
movl %eax, (%rcx)
movl $0x1, %ebx
leaq -0x70(%rbp), %r15
movq -0x48(%rbp), %rax
movq (%rax), %rax
movl (%rax,%rbx,4), %r12d
movq -0x50(%rbp), %rax
movq (%rax), %rax
movl (%rax,%rbx,4), %r13d
leaq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x88c2
movl %ebx, %edi
movl %r12d, %esi
movl %r13d, %edx
movq -0x40(%rbp), %rcx
movl $0x64, %r8d
movq %r15, %r9
callq 0xe9ca
movq -0x38(%rbp), %rcx
movl %eax, (%rcx,%rbx,4)
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xe919
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x21b0
incq %rbx
cmpq $0x6, %rbx
jne 0xe8af
movq -0x78(%rbp), %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xe937
movq %rax, %rbx
jmp 0xe958
movq %rax, %rbx
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xe958
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x21b0
movl $0x18, %esi
movq -0x38(%rbp), %rdi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/WorkingStats/WorkingStats.cpp
// Function: CalcNonHP(int, int, int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int CalcNonHP(int which, int base, int EV, int IV, int level,string nature) {
	int res = 2 * base + IV + EV / 4;
	res *= level;
	res /= 100;
	res += 5;
	double natureMultiplier = CalcNatureMultiplier(which,nature);
	res = int( double(res) * natureMultiplier);
	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, -0x2c(%rbp)
movq %rcx, -0x40(%rbp)
movl %edx, %r12d
movl %esi, %r15d
movl %edi, %r13d
leaq -0x50(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%r9), %rsi
movq 0x8(%r9), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
callq 0x88c2
movl %r13d, %edi
movq %rbx, %rsi
callq 0xf05f
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0xea34
movq -0x50(%rbp), %rsi
incq %rsi
movsd %xmm0, -0x38(%rbp)
callq 0x21b0
movsd -0x38(%rbp), %xmm0
leal 0x3(%r12), %eax
testl %r12d, %r12d
cmovnsl %r12d, %eax
movq -0x40(%rbp), %rcx
leal (%rcx,%r15,2), %ecx
sarl $0x2, %eax
addl %ecx, %eax
imull -0x2c(%rbp), %eax
cltq
imulq $0x51eb851f, %rax, %rax # imm = 0x51EB851F
movq %rax, %rcx
sarq $0x25, %rcx
shrq $0x3f, %rax
addl %ecx, %eax
addl $0x5, %eax
cvtsi2sd %eax, %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0xea9d
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/WorkingStats/WorkingStats.cpp
// Function: CalculateEVs(std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
vector<int> CalculateEVs(const vector<int> &ws, const vector<int> &bs, string nature) {
//	cout << natureMul[nature][5] << endl;
	if(!mapsInitialized) {
		initializeWorkingStatsMaps();
		mapsInitialized = true;
	}

	int iv = CalculateIVs(ws, bs,nature);
	//cout << iv << endl;
	if(iv == -1)
		return vector<int>(6,-1);
	return CalculateEVs(ws, bs,iv,nature);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r12
movq %rdx, -0x38(%rbp)
movq %rsi, %r15
movq %rdi, %rbx
cmpb $0x0, 0x10bbe(%rip)     # 0x1f688
jne 0xeaee
leaq -0x29(%rbp), %r13
movq %r13, %rdi
callq 0xe020
leaq 0x10b79(%rip), %rsi     # 0x1f658
movq %r13, %rdi
callq 0x52a2
movb $0x1, 0x10b9a(%rip)     # 0x1f688
leaq -0x68(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq -0x78(%rbp), %r13
movq %r13, %rdi
callq 0x88c2
movq %r15, %rdi
movq -0x38(%rbp), %rsi
movq %r13, %rdx
callq 0xebea
movl %eax, %r13d
movq -0x78(%rbp), %rdi
cmpq %r14, %rdi
je 0xeb35
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x21b0
cmpl $-0x1, %r13d
je 0xeb87
leaq -0x48(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq -0x58(%rbp), %r12
movq %r12, %rdi
callq 0x88c2
movq %rbx, %rdi
movq %r15, %rsi
movq -0x38(%rbp), %rdx
movl %r13d, %ecx
movq %r12, %r8
callq 0xecf0
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0xebb0
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21b0
jmp 0xebb0
movl $0x18, %edi
callq 0x21a0
movq %rax, (%rbx)
leaq 0x18(%rax), %rcx
movq %rcx, 0x10(%rbx)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, (%rax)
movq $-0x1, 0x10(%rax)
movq %rcx, 0x8(%rbx)
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x58(%rbp), %rdi
jmp 0xebd2
movq %rax, %rbx
movq -0x78(%rbp), %rdi
cmpq %r14, %rdi
je 0xebe2
movq (%r14), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/WorkingStats/WorkingStats.cpp
// Function: CalculateIVs(std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int  CalculateIVs(const vector<int> &ws, const vector<int> &bs,string nature) {
	for(int i = 0; i <= 31; i++) {
		if( CalcHP(bs[0],0,i,100) == ws[0]) {
		//	cout << "HP FAIL\n";
			return i;
		}
		for(int j = 1; j < 6; j++) {
			if(CalcNonHP(j,bs[j],0,i,100,nature) == ws[j]) {
			//	cout << j << " FAIL\n";
				return i;
			}
		} 

	}
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, -0x40(%rbp)
xorl %r14d, %r14d
leaq -0x50(%rbp), %rbx
movq %rsi, -0x38(%rbp)
movq %rdi, -0x30(%rbp)
movq (%rsi), %rax
movl (%rax), %eax
leal (%r14,%rax,2), %eax
addl $0x6e, %eax
movq (%rdi), %rcx
cmpl (%rcx), %eax
je 0xecbe
movl $0x1, %r13d
movq (%rsi), %rax
movl (%rax,%r13,4), %r15d
movq %rbx, -0x60(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %rdi
callq 0x88c2
movl %r13d, %edi
movl %r15d, %esi
xorl %edx, %edx
movq %r14, %r12
movl %r14d, %ecx
movl $0x64, %r8d
leaq -0x60(%rbp), %r9
callq 0xe9ca
movl %eax, %r15d
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl (%rax,%r13,4), %r14d
movq -0x60(%rbp), %rdi
cmpq %rbx, %rdi
je 0xec8d
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
cmpl %r14d, %r15d
je 0xecbb
incq %r13
cmpq $0x6, %r13
movq %r12, %r14
movq -0x38(%rbp), %rsi
jne 0xec2b
incl %r14d
cmpl $0x20, %r14d
movq -0x30(%rbp), %rdi
jne 0xec0e
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0xecbe
movq %r12, %r14
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x60(%rbp), %rdi
cmpq %rbx, %rdi
je 0xece8
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/EntryFilter/EntryFilter.cpp
// Function: MergeVectors(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>>>>&, std::vector<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>>>>, std::allocator<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 MergeVectors(vector<string> &res, vector<vector<string> > &temp) {
	map<string, unsigned int> rMap;
	for(unsigned int i = 0; i < temp.size(); i++)
		for(unsigned int j = 0; j < temp[i].size(); j++)
			rMap[temp[i][j]]++;
	res.clear();
	for( map<string,unsigned int>::iterator it = rMap.begin(); it != rMap.end(); it++)
		if( it->second == temp.size())
			res.push_back(it->first);

	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, -0x30(%rbp)
leaq -0x58(%rbp), %rax
movl $0x0, (%rax)
xorl %r13d, %r13d
movq %r13, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %r13, 0x20(%rax)
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
cmpq %rax, %rcx
je 0xf884
leaq -0x60(%rbp), %r15
leaq (,%r13,2), %r12
addq %r13, %r12
movq (%rax,%r12,8), %rdx
cmpq %rdx, 0x8(%rax,%r12,8)
je 0xf864
movl $0x1, %r14d
xorl %esi, %esi
shlq $0x5, %rsi
addq %rdx, %rsi
movq %r15, %rdi
callq 0xfb9c
incl (%rax)
movl %r14d, %esi
movq (%rbx), %rax
movq (%rax,%r12,8), %rdx
movq 0x8(%rax,%r12,8), %rcx
subq %rdx, %rcx
sarq $0x5, %rcx
incl %r14d
cmpq %rsi, %rcx
ja 0xf831
movq 0x8(%rbx), %rcx
incl %r13d
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rdx
cmpq %r13, %rdx
ja 0xf813
movq -0x30(%rbp), %r12
movq (%r12), %rsi
movq %r12, %rdi
callq 0xbb12
movq -0x48(%rbp), %r15
leaq -0x58(%rbp), %r13
cmpq %r13, %r15
je 0xf8df
movabsq $-0x5555555555555555, %r14 # imm = 0xAAAAAAAAAAAAAAAB
movq 0x8(%rbx), %rax
subq (%rbx), %rax
movl 0x40(%r15), %ecx
sarq $0x3, %rax
imulq %r14, %rax
cmpq %rcx, %rax
jne 0xf8cf
leaq 0x20(%r15), %rsi
movq %r12, %rdi
callq 0x591a
movq %r15, %rdi
callq 0x2130
movq %rax, %r15
cmpq %r13, %rax
jne 0xf8ab
leaq -0x60(%rbp), %rdi
callq 0xfcae
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf8f9
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0xfcae
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::HashString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
BattleSim::str_code BattleSim::HashString(string s) {
	if(s == "INITCODE")
		return INITCODE;
	else if(s == "SETCRITERIA")
		return SETCRITERIA;
	else if(s == "SETNAME")
		return SETNAME;
	else if(s == "SETMOVE")
		return SETMOVE;
	else if(s == "SETTYPE")
		return SETTYPE;
	else if(s == "SETIV")
		return SETIV;
	else if(s == "EVALUATECRITERIA")
		return EVALUATECRITERIA;
	else if(s == "SETPARTICIPANTS")
		return SETPARTICIPANTS;
	else if(s == "EXIT")
		return EXIT;
	else if(s == "PRINTCANDIDATES")
		return PRINTCANDIDATES;
	else if(s == "PRINTPARTICIPANTS")
		return PRINTPARTICIPANTS;
	else if(s == "PRINTCRITERIA")
		return PRINTCRITERIA;
	else if(s == "SIMULATE")
		return SIMULATE;
	else if(s == "RETRIEVERESULTS")
		return RETRIEVERESULTS;
	else 
		return INVALID;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x5fc6(%rip), %rsi      # 0x1663a
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x107b0
leaq 0x5fb8(%rip), %rsi      # 0x16643
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x107b4
leaq 0x5fad(%rip), %rsi      # 0x1664f
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x107bb
leaq 0x5f9e(%rip), %rsi      # 0x16657
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x107c2
leaq 0x5f8f(%rip), %rsi      # 0x1665f
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x107c9
leaq 0x5f80(%rip), %rsi      # 0x16667
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x107d0
leaq 0x5f6f(%rip), %rsi      # 0x1666d
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x107d7
leaq 0x5f69(%rip), %rsi      # 0x1667e
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x107de
leaq 0x5f62(%rip), %rsi      # 0x1668e
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x107e5
leaq 0x5f50(%rip), %rsi      # 0x16693
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x107ec
leaq 0x5f49(%rip), %rsi      # 0x166a3
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x107f3
leaq 0x5f44(%rip), %rsi      # 0x166b5
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x107fa
leaq 0x5f3f(%rip), %rsi      # 0x166c3
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x10801
leaq 0x5f35(%rip), %rsi      # 0x166cc
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
movl $0x7, %ecx
movl $0xe, %eax
cmovel %ecx, %eax
jmp 0x10806
xorl %eax, %eax
jmp 0x10806
movl $0x8, %eax
jmp 0x10806
movl $0x9, %eax
jmp 0x10806
movl $0xa, %eax
jmp 0x10806
movl $0xb, %eax
jmp 0x10806
movl $0xc, %eax
jmp 0x10806
movl $0x2, %eax
jmp 0x10806
movl $0x3, %eax
jmp 0x10806
movl $0xd, %eax
jmp 0x10806
movl $0x4, %eax
jmp 0x10806
movl $0x5, %eax
jmp 0x10806
movl $0x1, %eax
jmp 0x10806
movl $0x6, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::SetCriteria(std::ostream&, std::istream&)
void BattleSim::SetCriteria(ostream &pout, istream &fin) {
	//TODO: FIX MAGIC NUMBER of 2
	string whichEntry;
	int whichEntryInt;

	pout << "Enter Which Entry To Modify\n";
	getline(fin,whichEntry);
	whichEntryInt = StringToIntHelper(whichEntry);
	if(whichEntryInt >= 0 && whichEntryInt < be.size() ) {
		SetCriterion(pout,fin,whichEntryInt);
	} else {
		pout << "Invalid Choice\n"; //TODO: TELL SIZE?
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0x5c5a(%rip), %rsi      # 0x1649e
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x2200
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
leaq -0x48(%rbp), %rsi
movq %r14, %rdi
callq 0x2300
leaq -0x48(%rbp), %rsi
callq 0x111c6
movl %eax, %r12d
testl %eax, %eax
js 0x108a4
movq %r15, %rdi
callq 0x130e4
cmpl %eax, %r12d
jge 0x108a4
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x114fa
jmp 0x108b8
leaq 0x5adb(%rip), %rsi      # 0x16386
movl $0xf, %edx
movq %rbx, %rdi
callq 0x2200
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x108cd
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x108f4
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::EvaluateCriteria(std::ostream&, std::istream&)
void BattleSim::EvaluateCriteria(ostream &pout, istream &fin) {
	string whichCriteria;
	pout << "Enter which criterion to evaluate.\n";
	getline(fin,whichCriteria);
	
	int wcInt = StringToIntHelper(whichCriteria);
	if(wcInt == 0 || wcInt == 1) { //TODO::MAGIC NUMBER HERE
		EvaluateCriterion(pout,wcInt);
	} else {
		pout << "Invalid choice\n"; //TODO: TELL SIZE?
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x5bbb(%rip), %rsi      # 0x164ed
movl $0x23, %edx
movq %rbx, %rdi
callq 0x2200
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
leaq -0x40(%rbp), %rsi
movq %r15, %rdi
callq 0x2300
leaq -0x40(%rbp), %rsi
callq 0x111c6
cmpl $0x1, %eax
ja 0x1097c
movq %r14, %rdi
movl %eax, %esi
callq 0x1272c
jmp 0x10990
leaq 0x5b8e(%rip), %rsi      # 0x16511
movl $0xf, %edx
movq %rbx, %rdi
callq 0x2200
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x109a5
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x109b4
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x109cc
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::SetParticipants(std::ostream&, std::istream&)
void BattleSim::SetParticipants(ostream &pout,istream &fin) {
	string whichEntry;
	int whichEntryInt;
	
	pout << "Enter which participant to set\n";
	getline(fin,whichEntry);
	whichEntryInt = StringToIntHelper(whichEntry);
	if(whichEntryInt == 0 || whichEntryInt == 1) {  //TODO::MAGIC NUMBER HERE
		SetParticipant(pout, fin, whichEntryInt);
	} else {
		pout << "Invalid choice(0 or 1)\n"; //TODO: TELL SIZE?
	}	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x5b47(%rip), %rsi      # 0x16551
movl $0x1f, %edx
movq %rbx, %rdi
callq 0x2200
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
leaq -0x40(%rbp), %rsi
movq %r14, %rdi
callq 0x2300
leaq -0x40(%rbp), %rsi
callq 0x111c6
cmpl $0x1, %eax
ja 0x10a5a
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl %eax, %ecx
callq 0x11826
jmp 0x10a6e
leaq 0x5b10(%rip), %rsi      # 0x16571
movl $0x17, %edx
movq %rbx, %rdi
callq 0x2200
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x10a83
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x10aa8
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::PrintCriteria(std::ostream&, std::istream&)
void BattleSim::PrintCriteria(ostream &pout, istream &fin) {
	/*
		Prompt:
		Get Input Number:
		Call PrintCriterion Function with param
	*/
	pout << "Enter which criterion to print.\n";
	string whichCriterion;
	getline(fin,whichCriterion);	
	int wcInt = StringToIntHelper(whichCriterion);
	if(wcInt == 0 || wcInt == 1) { //TODO::MAGIC NUMBER HERE
		PrintCriterion(pout, wcInt);
	} else {
		pout << "Invalid Choice.\n"; //TODO: TELL SIZE?
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x59ec(%rip), %rsi      # 0x164bb
movl $0x20, %edx
movq %rbx, %rdi
callq 0x2200
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
leaq -0x40(%rbp), %rsi
movq %r15, %rdi
callq 0x2300
leaq -0x40(%rbp), %rsi
callq 0x111c6
cmpl $0x1, %eax
ja 0x10b33
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x1168c
jmp 0x10b47
leaq 0x59a2(%rip), %rsi      # 0x164dc
movl $0x10, %edx
movq %rbx, %rdi
callq 0x2200
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x10b5c
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10b6b
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x10b83
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::PrintCandidates(std::ostream&, std::istream&)
void BattleSim::PrintCandidates(ostream &pout, istream &fin) {
	string whichEntry;
	int whichEntryInt;

	pout << "Enter Which Candidate List to Print from\n";
	getline(fin,whichEntry);
	whichEntryInt = StringToIntHelper(whichEntry);
	if(whichEntryInt == 0 || whichEntryInt == 1) { //TODO::MAGIC NUMBER HERE
		PrintAllCandidates(pout, whichEntryInt);
	} else {
		pout << "Invalid Choice.\n"; //TODO: TELL SIZE?
	}
		
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x595f(%rip), %rsi      # 0x16521
movl $0x29, %edx
movq %rbx, %rdi
callq 0x2200
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
leaq -0x40(%rbp), %rsi
movq %r15, %rdi
callq 0x2300
leaq -0x40(%rbp), %rsi
callq 0x111c6
cmpl $0x1, %eax
ja 0x10c0f
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x11740
jmp 0x10c23
leaq 0x58c6(%rip), %rsi      # 0x164dc
movl $0x10, %edx
movq %rbx, %rdi
callq 0x2200
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x10c38
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x10c5d
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::PrintParticipants(std::ostream&)
void BattleSim::PrintParticipants(ostream &pout) {
	string res;
	for(unsigned i = 0; i < 2; i++) {
		be.ParticipantDescription(i,res);
		pout << res << '\n';
	}
	pout << '\n';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %esi, %esi
movb $0x1, %r13b
leaq -0x50(%rbp), %r15
leaq -0x29(%rbp), %r12
movq %r14, %rdi
movq %r15, %rdx
callq 0x12d2c
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x2200
movb $0xa, -0x29(%rbp)
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2200
movl $0x1, %esi
testb $0x1, %r13b
movl $0x0, %r13d
jne 0x10c9d
leaq -0x29(%rbp), %rsi
movb $0xa, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x2200
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x10d0a
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10d1b
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x10d37
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::Simulate(std::ostream&, std::istream&, std::ostream&)
void BattleSim::Simulate(ostream &pout,istream &fin, ostream &fout) {
	//TODO:
	string whichEntry;
	int whichEntryInt1,whichEntryInt2;
	
	pout << "Enter first participant to set\n";
	getline(fin,whichEntry);
	whichEntryInt1 = StringToIntHelper(whichEntry);	
	pout << "Enter second participant to set\n";
	getline(fin,whichEntry);
	whichEntryInt2 = StringToIntHelper(whichEntry);
	if(whichEntryInt1 >= 0 && whichEntryInt1 <= 1 && whichEntryInt2 >= 0 && whichEntryInt2 <= 1) { //TODO::MAGIC NUMBER HERE
		be.Evaluate(whichEntryInt1,whichEntryInt2);
		be.Evaluate(whichEntryInt2,whichEntryInt1);
	} else {
		pout << "Invalid Choices\n"; //TODO: TELL SIZE?
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0x5831(%rip), %rsi      # 0x165a7
movl $0x1f, %edx
movq %r14, %rdi
callq 0x2200
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
leaq -0x48(%rbp), %rsi
movq %r15, %rdi
callq 0x2300
leaq -0x48(%rbp), %rsi
callq 0x111c6
movl %eax, %r12d
leaq 0x580e(%rip), %rsi      # 0x165c7
movl $0x20, %edx
movq %r14, %rdi
callq 0x2200
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
leaq -0x48(%rbp), %rsi
movq %r15, %rdi
callq 0x2300
leaq -0x48(%rbp), %rsi
callq 0x111c6
movl %eax, %r15d
orl %r12d, %eax
cmpl $0x1, %eax
ja 0x10e1b
movq %rbx, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x12d8c
movq %rbx, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x12d8c
jmp 0x10e2f
leaq 0x57c6(%rip), %rsi      # 0x165e8
movl $0x10, %edx
movq %r14, %rdi
callq 0x2200
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x10e44
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x10e6b
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::RetrieveResults(std::ostream&, std::istream&, std::ostream&)
void BattleSim::RetrieveResults(ostream &pout,istream &fin, ostream &fout) {
	string whichEntry;
	int whichEntryInt1,whichEntryInt2;
	
	pout << "Enter first participant to set\n";
	getline(fin,whichEntry);
	whichEntryInt1 = StringToIntHelper(whichEntry);	
	pout << "Enter second participant to set\n";
	getline(fin,whichEntry);
	whichEntryInt2 = StringToIntHelper(whichEntry);	
	if(whichEntryInt1 >= 0 && whichEntryInt1 <= 1 && whichEntryInt2 >= 0 && whichEntryInt2 <= 1) {
		RetrieveResult(pout,fout,whichEntryInt1,whichEntryInt2);
	} else {
		pout << "Invalid Choices\n";
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0x56fd(%rip), %rsi      # 0x165a7
movl $0x1f, %edx
movq %rbx, %rdi
callq 0x2200
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
leaq -0x48(%rbp), %rsi
movq %r15, %rdi
callq 0x2300
leaq -0x48(%rbp), %rsi
callq 0x111c6
movl %eax, %r12d
leaq 0x56da(%rip), %rsi      # 0x165c7
movl $0x20, %edx
movq %rbx, %rdi
callq 0x2200
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
leaq -0x48(%rbp), %rsi
movq %r15, %rdi
callq 0x2300
leaq -0x48(%rbp), %rsi
callq 0x111c6
movl %eax, %ecx
orl %r12d, %ecx
cmpl $0x1, %ecx
ja 0x10f40
movq %r14, %rdi
movl %r12d, %ecx
movl %eax, %r8d
callq 0x1191a
jmp 0x10f54
leaq 0x56a1(%rip), %rsi      # 0x165e8
movl $0x10, %edx
movq %rbx, %rdi
callq 0x2200
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x10f69
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x10f90
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::SetName(std::ostream&, std::istream&, int)
void BattleSim::SetName(ostream &pout, istream &fin, int whichCriteria) {
	string name;
	pout << "Enter Name\n";
	getline(fin,name);
	be.SetName(whichCriteria,name);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %rax
movq %rdi, %r14
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x53c6(%rip), %rsi      # 0x16396
movl $0xb, %edx
movq %rax, %rdi
callq 0x2200
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
leaq -0x40(%rbp), %rsi
movq %r15, %rdi
callq 0x2300
leaq -0x50(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %rdi
callq 0x88c2
leaq -0x60(%rbp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x1203c
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x1103f
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x11054
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x1107e
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
jmp 0x1107e
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x11093
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::SetMoves(std::ostream&, std::istream&, int)
void BattleSim::SetMoves(ostream &pout, istream &fin, int whichCriteria) {
	pout << "Enter the number of the move to change.(0-4)\n";
	string whichMove;
	getline(fin,whichMove);
	int whichMoveInt = StringToIntHelper(whichMove);
	if(whichMoveInt >= 0 && whichMoveInt < 4) {
		SetMove(pout,fin,whichCriteria,whichMoveInt);
		
	} else {
		pout << "Incorrect Move Choice. You have to choose between " << 0 << " and " << 4 << '\n';
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r14d
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x52e2(%rip), %rsi      # 0x163a2
movl $0x2d, %edx
movq %rbx, %rdi
callq 0x2200
leaq -0x40(%rbp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
leaq -0x50(%rbp), %rsi
movq %r15, %rdi
callq 0x2300
leaq -0x50(%rbp), %rsi
callq 0x111c6
cmpl $0x3, %eax
ja 0x11129
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %r14d, %ecx
movl %eax, %r8d
callq 0x1121c
jmp 0x1117f
leaq 0x52a0(%rip), %rsi      # 0x163d0
movl $0x32, %edx
movq %rbx, %rdi
callq 0x2200
movq %rbx, %rdi
xorl %esi, %esi
callq 0x22c0
movq %rax, %rbx
leaq 0x52b2(%rip), %rsi      # 0x16403
movl $0x5, %edx
movq %rax, %rdi
callq 0x2200
movq %rbx, %rdi
movl $0x4, %esi
callq 0x22c0
leaq -0x29(%rbp), %rsi
movb $0xa, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x2200
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x11194
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x111a5
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x111bd
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::StringToIntHelper(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int BattleSim::StringToIntHelper(const string &a) {
	unsigned i = 0;
	unsigned len = a.size();
	int res = 0;
	for(i = 0; i < len; i++) {
		res *= 10;
		res += (int)(a.at(i) - '0');
		if(res < 0)
			return -1;
	}
	return res;
	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rsi), %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
andq %rdx, %rcx
je 0x111ff
movq (%rsi), %rsi
xorl %edi, %edi
xorl %eax, %eax
cmpq %rdi, %rdx
je 0x1120a
leal (%rax,%rax,4), %eax
movsbl (%rsi,%rdi), %r8d
leal (%r8,%rax,2), %eax
addl $-0x30, %eax
js 0x11203
incq %rdi
cmpq %rdi, %rcx
jne 0x111df
jmp 0x11208
xorl %eax, %eax
jmp 0x11208
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbp
retq
leaq 0x54cb(%rip), %rdi      # 0x166dc
movq %rdx, %rsi
xorl %eax, %eax
callq 0x2260
nop
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::SetMove(std::ostream&, std::istream&, int, int)
void BattleSim::SetMove(ostream &pout, istream &fin, int whichCriteria, int whichMove) {
	string move;
	pout <<"Enter Move\n";
	getline(fin,move);
	be.SetMove(whichCriteria,whichMove,move);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, %ebx
movl %ecx, %r14d
movq %rdx, %r12
movq %rsi, %rax
movq %rdi, %r15
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0x51b1(%rip), %rsi      # 0x16409
movl $0xb, %edx
movq %rax, %rdi
callq 0x2200
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
leaq -0x48(%rbp), %rsi
movq %r12, %rdi
callq 0x2300
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x88c2
leaq -0x68(%rbp), %rcx
movq %r15, %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x120b6
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x112cc
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21b0
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x112e1
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x1130d
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21b0
jmp 0x1130d
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x11322
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::SetType(std::ostream&, std::istream&, int)
void BattleSim::SetType(ostream &pout, istream &fin, int whichCriteria) {
	string type;
	pout << "Enter Type\n";
	getline(fin,type);
	be.SetType(whichCriteria,type);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %rax
movq %rdi, %r14
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x50b3(%rip), %rsi      # 0x16415
movl $0xb, %edx
movq %rax, %rdi
callq 0x2200
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
leaq -0x40(%rbp), %rsi
movq %r15, %rdi
callq 0x2300
leaq -0x50(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
addq %rsi, %rdx
leaq -0x60(%rbp), %rdi
callq 0x88c2
leaq -0x60(%rbp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x12082
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x113d1
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x113e6
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x11410
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
jmp 0x11410
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x11425
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::SetIV(std::ostream&, std::istream&, int)
void BattleSim::SetIV(ostream &pout, istream &fin, int whichCriteria) {
	string iv;
	getline(fin,iv);
	int ivInt = StringToIntHelper(iv);
	if(ivInt != -1) {
		be.SetIVs(whichCriteria,ivInt);
	} else {
		pout << "Enter valid value for IV(positive integer 0 - 31)\n";
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r14d
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movq (%rdx), %rax
movq -0x18(%rax), %rdi
addq %rdx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
leaq -0x48(%rbp), %rsi
movq %r12, %rdi
callq 0x2300
leaq -0x48(%rbp), %rsi
callq 0x111c6
cmpl $-0x1, %eax
je 0x114a0
movq %r15, %rdi
movl %r14d, %esi
movl %eax, %edx
callq 0x120f2
jmp 0x114b4
leaq 0x4f7a(%rip), %rsi      # 0x16421
movl $0x32, %edx
movq %rbx, %rdi
callq 0x2200
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x114c9
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x114da
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x114f2
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::SetCriterion(std::ostream&, std::istream&, int)
void BattleSim::SetCriterion(ostream &pout, istream &fin, int whichCriteria) {

	string option;
	str_code sc = INITCODE;
	while(sc != EXIT) {
		pout << "Enter what to change.(SETNAME,SETMOVE,SETTYPE,SETIV)\n";
		getline(fin,option);
		sc = HashString(option);
		switch(sc) {
			case SETNAME:
				SetName(pout,fin,whichCriteria); break;
			case SETMOVE: 
				SetMoves(pout,fin,whichCriteria); break;
			case SETTYPE:
				SetType(pout,fin,whichCriteria); break;
			case SETIV:
				SetIV(pout,fin,whichCriteria); break;
			case EXIT:
				pout << "Exit Criteria Menu\n"; break;
			default:
				pout << "Invalid Choice\n"; break;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %ecx, -0x2c(%rbp)
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, -0x38(%rbp)
leaq -0x48(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x68(%rbp), %r12
leaq -0x78(%rbp), %r13
movl $0x35, %edx
movq %rbx, %rdi
leaq 0x4f12(%rip), %rsi      # 0x16454
callq 0x2200
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
movq %r15, %rdi
leaq -0x58(%rbp), %rsi
callq 0x2300
movq %r12, -0x78(%rbp)
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x88c2
movq %r13, %rsi
callq 0x10664
movl %eax, %r14d
movq -0x78(%rbp), %rdi
cmpq %r12, %rdi
je 0x115a1
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x21b0
leal -0x9(%r14), %eax
cmpl $0x4, %eax
ja 0x1160a
leaq 0x4d37(%rip), %rcx      # 0x162e8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl -0x2c(%rbp), %ecx
callq 0x10f98
jmp 0x1161e
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl -0x2c(%rbp), %ecx
callq 0x1132a
jmp 0x1161e
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl -0x2c(%rbp), %ecx
callq 0x1142e
jmp 0x1161e
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl -0x2c(%rbp), %ecx
callq 0x1109c
jmp 0x1161e
movl $0xf, %edx
movq %rbx, %rdi
leaq 0x4d6d(%rip), %rsi      # 0x16386
callq 0x2200
cmpl $0xd, %r14d
jne 0x11533
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x11641
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4e33(%rip), %rsi      # 0x1648a
movl $0x13, %edx
movq %rbx, %rdi
callq 0x2200
jmp 0x11628
jmp 0x11668
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x11684
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::PrintAllCandidates(std::ostream&, int)
void BattleSim::PrintAllCandidates(ostream &pout,int whichCriteria) {

	int sz = be.CandidateListSize(whichCriteria);
	string res;
	//TODO::ADD COUNTERS / A HEADER TO PRINT???
	for(int i = 0; i < sz; i++) {
		be.CandidateDescription(whichCriteria,i,res);
		pout << res << '\n';
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl %edx, %esi
callq 0x12bbc
movl %eax, %r12d
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
testl %r12d, %r12d
jle 0x117d5
xorl %r13d, %r13d
movq %r15, %rdi
movl %ebx, %esi
movl %r13d, %edx
leaq -0x50(%rbp), %rcx
callq 0x12bf4
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %r14, %rdi
callq 0x2200
movb $0xa, -0x29(%rbp)
movl $0x1, %edx
movq %rax, %rdi
leaq -0x29(%rbp), %rsi
callq 0x2200
incl %r13d
cmpl %r13d, %r12d
jne 0x1177e
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x117d5
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x11800
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::SetParticipant(std::ostream&, std::istream&, int)
void BattleSim::SetParticipant(ostream &pout, istream &fin, int whichEntryInt) {
	string whichChoice;
	int whichChoiceInt;
	pout << "Enter which Candidate to set\n";
	getline(fin,whichChoice);
	whichChoiceInt = StringToIntHelper(whichChoice);

	if(be.CandidateListSize(whichEntryInt) > whichChoiceInt && whichChoiceInt >= 0) {
		be.SetParticipant(whichEntryInt,whichChoiceInt);
	} else {
		pout << "Invalid Choice\n";
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r14d
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0x4d2a(%rip), %rsi      # 0x16589
movl $0x1d, %edx
movq %rbx, %rdi
callq 0x2200
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
leaq -0x48(%rbp), %rsi
movq %r12, %rdi
callq 0x2300
leaq -0x48(%rbp), %rsi
callq 0x111c6
movl %eax, %r12d
movq %r15, %rdi
movl %r14d, %esi
callq 0x12bbc
testl %r12d, %r12d
js 0x118c1
cmpl %r12d, %eax
jle 0x118c1
movq %r15, %rdi
movl %r14d, %esi
movl %r12d, %edx
callq 0x12c78
jmp 0x118d5
leaq 0x4abe(%rip), %rsi      # 0x16386
movl $0xf, %edx
movq %rbx, %rdi
callq 0x2200
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x118ea
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x11911
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: BattleSim::RetrieveResult(std::ostream&, std::ostream&, int, int)
void BattleSim::RetrieveResult(ostream &pout, ostream &fout, int wcInt1, int wcInt2) {
	vector<BattleEvaluator::MoveResult> rr;
	be.RetrieveResults(rr,wcInt1,wcInt2);
	PrintRes(rr);
	be.RetrieveResults(rr,wcInt2,wcInt1);
	PrintRes(rr);	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %r14d
movl %ecx, %ebx
movq %rdi, %r15
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movl %ecx, %edx
movl %r8d, %ecx
callq 0x130b6
movq -0x38(%rbp), %r13
subq -0x40(%rbp), %r13
sarq $0x3, %r13
movabsq $0x4ec4ec4ec4ec4ec5, %rax # imm = 0x4EC4EC4EC4EC4EC5
imulq %rax, %r13
testl %r13d, %r13d
jle 0x1198d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %r12d, %r12d
movq -0x40(%rbp), %rdi
addq %r12, %rdi
callq 0x11a0a
addq $0x68, %r12
decq %r13
jne 0x11978
leaq -0x40(%rbp), %rsi
movq %r15, %rdi
movl %r14d, %edx
movl %ebx, %ecx
callq 0x130b6
movq -0x38(%rbp), %rbx
subq -0x40(%rbp), %rbx
sarq $0x3, %rbx
movabsq $0x4ec4ec4ec4ec4ec5, %rax # imm = 0x4EC4EC4EC4EC4EC5
imulq %rax, %rbx
testl %ebx, %ebx
jle 0x119da
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
xorl %r14d, %r14d
movq -0x40(%rbp), %rdi
addq %r14, %rdi
callq 0x11a0a
addq $0x68, %r14
decq %rbx
jne 0x119c5
leaq -0x40(%rbp), %rdi
callq 0x11ba4
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x119f6
jmp 0x119f6
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x11ba4
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSim.cpp
// Function: PrintMoveRes(BattleEvaluator::MoveResult&)
void PrintMoveRes(BattleEvaluator::MoveResult &r) {
	//TODO::Replace cout. probably have to make it part of BS
	cout << r.participants.first << " to " << r.participants.second << " using: ";
	cout << r.moveName << " does " << r.damage.first << " to " << r.damage.second;
	cout << ".\n";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
movq 0xd5b2(%rip), %rbx      # 0x1efd8
movq %rbx, %rdi
callq 0x2200
movq %rax, %r12
leaq 0x4bc1(%rip), %r15      # 0x165f9
movl $0x4, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2200
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movq %r12, %rdi
callq 0x2200
leaq 0x4b9f(%rip), %rsi      # 0x165fe
movl $0x8, %edx
movq %rax, %rdi
callq 0x2200
movq 0x40(%r14), %rsi
movq 0x48(%r14), %rdx
movq %rbx, %rdi
callq 0x2200
movq %rax, %r12
leaq 0x4b81(%rip), %rsi      # 0x16607
movl $0x6, %edx
movq %rax, %rdi
callq 0x2200
movl 0x60(%r14), %esi
movq %r12, %rdi
callq 0x22c0
movq %rax, %r12
movl $0x4, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2200
movl 0x64(%r14), %esi
movq %r12, %rdi
callq 0x22c0
leaq 0x4a25(%rip), %rsi      # 0x164ea
movl $0x2, %edx
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2200
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleSim/BattleSimulator.cpp
// Function: main
int main() {
	BattleSim bs;
	//bs.Menu(cout,cin,cout);
	ifstream fin("BSTestData.txt");
	bs.Menu(cout,fin,cout);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
leaq -0x200(%rbp), %rdi
callq 0x1046c
leaq 0x4aad(%rip), %rsi      # 0x16720
leaq -0x408(%rbp), %rdi
movl $0x8, %edx
callq 0x22f0
movq 0xd34d(%rip), %rcx      # 0x1efd8
leaq -0x200(%rbp), %rdi
leaq -0x408(%rbp), %rdx
movq %rcx, %rsi
callq 0x10488
leaq -0x408(%rbp), %rdi
callq 0x2070
leaq -0x200(%rbp), %rdi
callq 0x11f24
xorl %eax, %eax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x408(%rbp), %rdi
callq 0x2070
jmp 0x11cd9
movq %rax, %rbx
leaq -0x200(%rbp), %rdi
callq 0x11f24
movq %rbx, %rdi
callq 0x22d0
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/chulchultrain[P]FactoryHead/BattleEvaluator/BattleEvaluator.cpp
// Function: BattleEvaluator::resize(int)
void BattleEvaluator::resize(int n) {
	crit.resize(n);
	candidates.resize(n);
	participants.resize(n);
	res.resize(n);
	for(int i = 0; i < n; i++) {
		res[i].resize(n);
		for(int j = 0; j < n; j++)
			res[i][j].resize(4);
	}
	numCriteria = n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
addq $0x1a0, %rdi            # imm = 0x1A0
movl %esi, -0x2c(%rbp)
movslq %esi, %r14
movq %r14, %rsi
callq 0x1346c
leaq 0x188(%rbx), %rdi
movq %r14, %rsi
callq 0x134b6
leaq 0x1b8(%rbx), %rdi
movq %r14, %rsi
callq 0x13300
movq %rbx, -0x38(%rbp)
leaq 0x1d0(%rbx), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x1352e
movq %r14, -0x48(%rbp)
testl %r14d, %r14d
jle 0x11e5b
movl -0x2c(%rbp), %eax
movq %rax, -0x40(%rbp)
leaq (,%rax,8), %rax
leaq (%rax,%rax,2), %rbx
xorl %r14d, %r14d
leaq (%r14,%r14,2), %r15
leaq (,%r15,8), %rdi
addq (%r12), %rdi
movq -0x48(%rbp), %rsi
callq 0x135a6
xorl %r13d, %r13d
movq (%r12), %rax
movq (%rax,%r15,8), %rdi
addq %r13, %rdi
movl $0x4, %esi
callq 0x1361e
addq $0x18, %r13
cmpq %r13, %rbx
jne 0x11e34
incq %r14
cmpq -0x40(%rbp), %r14
jne 0x11e18
movl -0x2c(%rbp), %eax
movq -0x38(%rbp), %rcx
movl %eax, 0x1e8(%rcx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop