LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x8(%rsi), %rax
cmpq (%rsi), %rax
je 0xf94b
leaq -0x60(%rbp), %r15
movq (%rbx), %rcx
leaq (,%r13,2), %r12
addq %r13, %r12
movq (%rcx,%r12,8), %rax
cmpq %rax, 0x8(%rcx,%r12,8)
je 0xf92a
movl $0x1, %r14d
xorl %esi, %esi
shlq $0x5, %rsi
addq %rax, %rsi
movq %r15, %rdi
callq 0xfc58
incl (%rax)
movl %r14d, %esi
movq (%rbx), %rcx
movq (%rcx,%r12,8), %rax
movq 0x8(%rcx,%r12,8), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
incl %r14d
cmpq %rsi, %rcx
ja 0xf8fb
movq 0x8(%rbx), %rax
subq (%rbx), %rax
incl %r13d
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq %r13, %rax
ja 0xf8da
movq -0x30(%rbp), %r12
movq (%r12), %rsi
movq %r12, %rdi
callq 0xbb6c
movq -0x48(%rbp), %r15
leaq -0x58(%rbp), %r13
cmpq %r13, %r15
je 0xf9a6
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 0xf996
leaq 0x20(%r15), %rsi
movq %r12, %rdi
callq 0x58fc
movq %r15, %rdi
callq 0x2130
movq %rax, %r15
cmpq %r13, %rax
jne 0xf972
leaq -0x60(%rbp), %rdi
callq 0xfd64
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf9c0
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0xfd64
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5f06(%rip), %rsi      # 0x1663a
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x10870
leaq 0x5ef8(%rip), %rsi      # 0x16643
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x10874
leaq 0x5eed(%rip), %rsi      # 0x1664f
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x1087b
leaq 0x5ede(%rip), %rsi      # 0x16657
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x10882
leaq 0x5ecf(%rip), %rsi      # 0x1665f
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x10889
leaq 0x5ec0(%rip), %rsi      # 0x16667
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x10890
leaq 0x5eaf(%rip), %rsi      # 0x1666d
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x10897
leaq 0x5ea9(%rip), %rsi      # 0x1667e
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x1089e
leaq 0x5ea2(%rip), %rsi      # 0x1668e
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x108a5
leaq 0x5e90(%rip), %rsi      # 0x16693
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x108ac
leaq 0x5e89(%rip), %rsi      # 0x166a3
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x108b3
leaq 0x5e84(%rip), %rsi      # 0x166b5
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x108ba
leaq 0x5e7f(%rip), %rsi      # 0x166c3
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
je 0x108c1
leaq 0x5e75(%rip), %rsi      # 0x166cc
movq %rbx, %rdi
callq 0x2090
testl %eax, %eax
movl $0x7, %ecx
movl $0xe, %eax
cmovel %ecx, %eax
jmp 0x108c6
xorl %eax, %eax
jmp 0x108c6
movl $0x8, %eax
jmp 0x108c6
movl $0x9, %eax
jmp 0x108c6
movl $0xa, %eax
jmp 0x108c6
movl $0xb, %eax
jmp 0x108c6
movl $0xc, %eax
jmp 0x108c6
movl $0x2, %eax
jmp 0x108c6
movl $0x3, %eax
jmp 0x108c6
movl $0xd, %eax
jmp 0x108c6
movl $0x4, %eax
jmp 0x108c6
movl $0x5, %eax
jmp 0x108c6
movl $0x1, %eax
jmp 0x108c6
movl $0x6, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5b9a(%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 0x1127e
movl %eax, %r12d
testl %eax, %eax
js 0x10964
movq %r15, %rdi
callq 0x13188
cmpl %eax, %r12d
jge 0x10964
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x115a6
jmp 0x10978
leaq 0x5a1b(%rip), %rsi      # 0x16386
movl $0xf, %edx
movq %rbx, %rdi
callq 0x2200
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x1098d
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 0x109b4
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5afb(%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 0x1127e
cmpl $0x1, %eax
ja 0x10a3c
movq %r14, %rdi
movl %eax, %esi
callq 0x127d4
jmp 0x10a50
leaq 0x5ace(%rip), %rsi      # 0x16511
movl $0xf, %edx
movq %rbx, %rdi
callq 0x2200
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x10a65
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10a74
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x10a8c
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5a87(%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 0x1127e
cmpl $0x1, %eax
ja 0x10b1a
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movl %eax, %ecx
callq 0x118c6
jmp 0x10b2e
leaq 0x5a50(%rip), %rsi      # 0x16571
movl $0x17, %edx
movq %rbx, %rdi
callq 0x2200
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x10b43
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 0x10b68
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x592c(%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 0x1127e
cmpl $0x1, %eax
ja 0x10bf3
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x1172c
jmp 0x10c07
leaq 0x58e2(%rip), %rsi      # 0x164dc
movl $0x10, %edx
movq %rbx, %rdi
callq 0x2200
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x10c1c
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10c2b
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x10c43
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x589f(%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 0x1127e
cmpl $0x1, %eax
ja 0x10ccf
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x117e0
jmp 0x10ce3
leaq 0x5806(%rip), %rsi      # 0x164dc
movl $0x10, %edx
movq %rbx, %rdi
callq 0x2200
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x10cf8
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 0x10d1d
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15d, %r15d
leaq -0x50(%rbp), %r12
leaq -0x29(%rbp), %r13
movq %r14, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x12dd0
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x2200
movb $0xa, -0x29(%rbp)
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2200
incl %r15d
cmpl $0x1, %r15d
je 0x10d5b
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 0x10dc3
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 0x10dd4
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x10df0
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5779(%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 0x1127e
movl %eax, %r12d
leaq 0x5756(%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 0x1127e
movl %eax, %r15d
orl %r12d, %eax
cmpl $0x1, %eax
ja 0x10ed3
movq %rbx, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x12e30
movq %rbx, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x12e30
jmp 0x10ee7
leaq 0x570e(%rip), %rsi      # 0x165e8
movl $0x10, %edx
movq %r14, %rdi
callq 0x2200
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x10efc
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 0x10f23
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5645(%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 0x1127e
movl %eax, %r12d
leaq 0x5622(%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 0x1127e
movl %eax, %ecx
orl %r12d, %ecx
cmpl $0x1, %ecx
ja 0x10ff8
movq %r14, %rdi
movl %r12d, %ecx
movl %eax, %r8d
callq 0x119ba
jmp 0x1100c
leaq 0x55e9(%rip), %rsi      # 0x165e8
movl $0x10, %edx
movq %rbx, %rdi
callq 0x2200
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x11021
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 0x11048
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x530e(%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 0x8870
leaq -0x60(%rbp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x120dc
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x110f7
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x1110c
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 0x11136
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
jmp 0x11136
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x1114b
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x522a(%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 0x1127e
cmpl $0x3, %eax
ja 0x111e1
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %r14d, %ecx
movl %eax, %r8d
callq 0x112c8
jmp 0x11237
leaq 0x51e8(%rip), %rsi      # 0x163d0
movl $0x32, %edx
movq %rbx, %rdi
callq 0x2200
movq %rbx, %rdi
xorl %esi, %esi
callq 0x22c0
movq %rax, %rbx
leaq 0x51fa(%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 0x1124c
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 0x1125d
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x11275
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
testl %edx, %edx
je 0x112ae
movq (%rsi), %rcx
xorl %esi, %esi
xorl %eax, %eax
cmpq %rsi, %rdx
jbe 0x112b9
leal (%rax,%rax,4), %eax
movsbl (%rcx,%rsi), %edi
leal (%rdi,%rax,2), %eax
addl $-0x30, %eax
js 0x112b2
incq %rsi
cmpl %esi, %edx
jne 0x11291
jmp 0x112b7
xorl %eax, %eax
jmp 0x112b7
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbp
retq
leaq 0x541c(%rip), %rdi      # 0x166dc
xorl %eax, %eax
callq 0x2260
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5105(%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 0x8870
leaq -0x68(%rbp), %rcx
movq %r15, %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x12156
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x11378
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21b0
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x1138d
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 0x113b9
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21b0
jmp 0x113b9
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x113ce
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5007(%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 0x8870
leaq -0x60(%rbp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x12122
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x1147d
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x11492
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 0x114bc
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21b0
jmp 0x114bc
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x114d1
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1127e
cmpl $-0x1, %eax
je 0x1154c
movq %r15, %rdi
movl %r14d, %esi
movl %eax, %edx
callq 0x12192
jmp 0x11560
leaq 0x4ece(%rip), %rsi      # 0x16421
movl $0x32, %edx
movq %rbx, %rdi
callq 0x2200
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x11575
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 0x11586
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x1159e
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/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, %r14
movq %rsi, %r15
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 %r15, %rdi
leaq 0x4e66(%rip), %rsi      # 0x16454
callq 0x2200
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %edx
movq %r14, %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 0x8870
movq %r13, %rsi
callq 0x10724
movl %eax, %ebx
movq -0x78(%rbp), %rdi
cmpq %r12, %rdi
je 0x1164c
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x21b0
leal -0x9(%rbx), %eax
cmpl $0x4, %eax
ja 0x116c2
leaq 0x4c8d(%rip), %rcx      # 0x162e8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x38(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movl -0x2c(%rbp), %ecx
callq 0x11050
jmp 0x116d6
movl $0x13, %edx
leaq 0x4e06(%rip), %rsi      # 0x1648a
jmp 0x116ce
movq -0x38(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movl -0x2c(%rbp), %ecx
callq 0x113d6
jmp 0x116d6
movq -0x38(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movl -0x2c(%rbp), %ecx
callq 0x114da
jmp 0x116d6
movq -0x38(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movl -0x2c(%rbp), %ecx
callq 0x11154
jmp 0x116d6
movl $0xf, %edx
leaq 0x4cb8(%rip), %rsi      # 0x16386
movq %r15, %rdi
callq 0x2200
cmpl $0xd, %ebx
jne 0x115df
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x116f8
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21b0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x11723
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x12c60
movl %eax, %r12d
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
testl %r12d, %r12d
jle 0x1185c
xorl %r13d, %r13d
movq %r15, %rdi
movl %ebx, %esi
movl %r13d, %edx
leaq -0x50(%rbp), %rcx
callq 0x12c98
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 0x1181e
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x11875
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 0x118a0
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4c8a(%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 0x1127e
movl %eax, %r12d
movq %r15, %rdi
movl %r14d, %esi
callq 0x12c60
testl %r12d, %r12d
js 0x11961
cmpl %r12d, %eax
jle 0x11961
movq %r15, %rdi
movl %r14d, %esi
movl %r12d, %edx
callq 0x12d1c
jmp 0x11975
leaq 0x4a1e(%rip), %rsi      # 0x16386
movl $0xf, %edx
movq %rbx, %rdi
callq 0x2200
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x1198a
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 0x119b1
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1315a
movq -0x38(%rbp), %r13
subq -0x40(%rbp), %r13
sarq $0x3, %r13
movabsq $0x4ec4ec4ec4ec4ec5, %rax # imm = 0x4EC4EC4EC4EC4EC5
imulq %rax, %r13
testl %r13d, %r13d
jle 0x11a2d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %r12d, %r12d
movq -0x40(%rbp), %rdi
addq %r12, %rdi
callq 0x11aaa
addq $0x68, %r12
decq %r13
jne 0x11a18
leaq -0x40(%rbp), %rsi
movq %r15, %rdi
movl %r14d, %edx
movl %ebx, %ecx
callq 0x1315a
movq -0x38(%rbp), %rbx
subq -0x40(%rbp), %rbx
sarq $0x3, %rbx
movabsq $0x4ec4ec4ec4ec4ec5, %rax # imm = 0x4EC4EC4EC4EC4EC5
imulq %rax, %rbx
testl %ebx, %ebx
jle 0x11a7a
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
xorl %r14d, %r14d
movq -0x40(%rbp), %rdi
addq %r14, %rdi
callq 0x11aaa
addq $0x68, %r14
decq %rbx
jne 0x11a65
leaq -0x40(%rbp), %rdi
callq 0x11c44
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x11a96
jmp 0x11a96
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x11c44
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/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 0xd512(%rip), %rbx      # 0x1efd8
movq %rbx, %rdi
callq 0x2200
movq %rax, %r12
leaq 0x4b21(%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 0x4aff(%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 0x4ae1(%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 0x4985(%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_O1/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 0x1052c
leaq 0x4a0d(%rip), %rsi      # 0x16720
leaq -0x408(%rbp), %rdi
movl $0x8, %edx
callq 0x22f0
movq 0xd2ad(%rip), %rcx      # 0x1efd8
leaq -0x200(%rbp), %rdi
leaq -0x408(%rbp), %rdx
movq %rcx, %rsi
callq 0x10548
leaq -0x408(%rbp), %rdi
callq 0x2070
leaq -0x200(%rbp), %rdi
callq 0x11fc4
xorl %eax, %eax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x408(%rbp), %rdi
callq 0x2070
jmp 0x11d79
movq %rax, %rbx
leaq -0x200(%rbp), %rdi
callq 0x11fc4
movq %rbx, %rdi
callq 0x22d0
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/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 0x13504
leaq 0x188(%rbx), %rdi
movq %r14, %rsi
callq 0x1354e
leaq 0x1b8(%rbx), %rdi
movq %r14, %rsi
callq 0x13398
movq %rbx, -0x38(%rbp)
leaq 0x1d0(%rbx), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x135c6
movq %r14, -0x48(%rbp)
testl %r14d, %r14d
jle 0x11efb
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 0x1363e
xorl %r13d, %r13d
movq (%r12), %rax
movq (%rax,%r15,8), %rdi
addq %r13, %rdi
movl $0x4, %esi
callq 0x136b6
addq $0x18, %r13
cmpq %r13, %rbx
jne 0x11ed4
incq %r14
cmpq -0x40(%rbp), %r14
jne 0x11eb8
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
// File: /workspace/github_cpp_makefile_star2_O1/niekh1234[P]nnchesslib/attacks.cpp
// Function: nnchesslib::Attacks::initRookMasks()
void Attacks::initRookMasks()
{
    for (int i = 0; i <= 63; i++)
    {
        rookMasks[i] =  Rays::getRay(NORTH, i) & ~rank_bb[RANK_8] |
                        Rays::getRay(SOUTH, i) & ~rank_bb[RANK_1] |
                        Rays::getRay(WEST, i) & ~file_bb[FILE_A]  |
                        Rays::getRay(EAST, i) & ~file_bb[FILE_H];
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xa787(%rip), %r12      # 0xd1c0
xorl %ebx, %ebx
movabsq $0x7f7f7f7f7f7f7f7f, %r13 # imm = 0x7F7F7F7F7F7F7F7F
xorl %edi, %edi
movl %ebx, %esi
callq 0x874a
movq %rax, %r14
movabsq $0xffffffffffffff, %rax # imm = 0xFFFFFFFFFFFFFF
andq %rax, %r14
movl $0x2, %edi
movl %ebx, %esi
callq 0x874a
movq %rax, %r15
andq $-0x100, %r15
orq %r14, %r15
movl $0x3, %edi
movl %ebx, %esi
callq 0x874a
movq %rax, %r14
movabsq $-0x101010101010102, %rax # imm = 0xFEFEFEFEFEFEFEFE
andq %rax, %r14
movl $0x1, %edi
movl %ebx, %esi
callq 0x874a
andq %r13, %rax
orq %r14, %rax
orq %r15, %rax
movq %rax, (%r12)
incq %rbx
addq $0x8, %r12
cmpq $0x40, %rbx
jne 0x2a45
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/niekh1234[P]nnchesslib/attacks.cpp
// Function: nnchesslib::Attacks::initBishopMasks()
void Attacks::initBishopMasks()
{
    for (int i = 0; i <= 63; i++)
    {
        bishopMasks[i] =   (Rays::getRay(NORTH_EAST, i) | Rays::getRay(NORTH_WEST, i)  |
                            Rays::getRay(SOUTH_EAST, i) | Rays::getRay(SOUTH_WEST, i)) &
                            ~(file_bb[FILE_H] | file_bb[FILE_A] | rank_bb[RANK_1] | rank_bb[RANK_8]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xa8e3(%rip), %r12      # 0xd3c0
xorl %ebx, %ebx
movabsq $0x7e7e7e7e7e7e00, %r13 # imm = 0x7E7E7E7E7E7E00
movl $0x4, %edi
movl %ebx, %esi
callq 0x874a
movq %rax, %r14
movl $0x5, %edi
movl %ebx, %esi
callq 0x874a
movq %rax, %r15
orq %r14, %r15
movl $0x6, %edi
movl %ebx, %esi
callq 0x874a
movq %rax, %r14
movl $0x7, %edi
movl %ebx, %esi
callq 0x874a
orq %r14, %rax
orq %r15, %rax
andq %r13, %rax
movq %rax, (%r12)
incq %rbx
addq $0x8, %r12
cmpq $0x40, %rbx
jne 0x2ae9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/niekh1234[P]nnchesslib/attacks.cpp
// Function: nnchesslib::Attacks::initRookMagics()
void Attacks::initRookMagics()
{
    for(int sq = 0; sq <= 63; sq++)
    {
        for(int i = 0; i < (1 << countBits(Attacks::rookMasks[sq])); i++)
        {
            U64 blockers = Attacks::genBlockers(i, Attacks::rookMasks[sq]);

            Attacks::rookTable[sq][(blockers * Attacks::rookMagics[sq]) >> (64 - countBits(Attacks::rookMasks[sq]))] = Attacks::getRookAttacksRays(sq, blockers);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorl %r12d, %r12d
leaq 0xa657(%rip), %r14      # 0xd1c0
xorl %r15d, %r15d
movq (%r14,%r15,8), %rdi
callq 0x87b4
cmpl $0x1f, %eax
je 0x2c24
xorl %r13d, %r13d
movq %r15, %rcx
shlq $0xf, %rcx
leaq 0xaa31(%rip), %rax      # 0xd5c0
addq %rax, %rcx
movq %rcx, -0x30(%rbp)
movq (%r14,%r15,8), %rax
xorl %ecx, %ecx
xorl %edx, %edx
xorl %r14d, %r14d
movl $0x1, %esi
shlq %cl, %rsi
btq %rcx, %rax
jae 0x2bbc
btl %edx, %r13d
cmovaeq %r12, %rsi
orq %rsi, %r14
incl %edx
incq %rcx
cmpq $0x40, %rcx
jne 0x2ba1
movl %r15d, %edi
movq %r14, %rsi
callq 0x2f31
movq %rax, -0x38(%rbp)
leaq 0x6535(%rip), %rax      # 0x9110
imulq (%rax,%r15,8), %r14
leaq 0xa5d9(%rip), %rbx      # 0xd1c0
movq (%rbx,%r15,8), %rdi
callq 0x87b4
negb %al
movl %eax, %ecx
shrq %cl, %r14
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, (%rax,%r14,8)
movq %rbx, %r14
incl %r13d
movq (%rbx,%r15,8), %rdi
callq 0x87b4
movl $0x1, %edx
movl %eax, %ecx
shll %cl, %edx
cmpl %edx, %r13d
jl 0x2b96
incq %r15
cmpq $0x40, %r15
jne 0x2b6c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/niekh1234[P]nnchesslib/attacks.cpp
// Function: nnchesslib::Attacks::initBishopMagics()
void Attacks::initBishopMagics()
{
    for(int sq = 0; sq <= 63; sq++)
    {
        for(int i = 0; i < (1 << countBits(Attacks::bishopMasks[sq])); i++)
        {
            U64 blockers = Attacks::genBlockers(i, Attacks::bishopMasks[sq]);

            Attacks::bishopTable[sq][(blockers * Attacks::bishopMagics[sq]) >> (64 - countBits(Attacks::bishopMasks[sq]))] = Attacks::getBishopAttacksRays(sq, blockers);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorl %r12d, %r12d
leaq 0xa765(%rip), %r14      # 0xd3c0
xorl %r15d, %r15d
movq (%r14,%r15,8), %rdi
callq 0x87b4
cmpl $0x1f, %eax
je 0x2d16
xorl %r13d, %r13d
movq %r15, %rcx
shlq $0xd, %rcx
leaq 0x20a93f(%rip), %rax    # 0x20d5c0
addq %rax, %rcx
movq %rcx, -0x30(%rbp)
movq (%r14,%r15,8), %rax
xorl %ecx, %ecx
xorl %edx, %edx
xorl %r14d, %r14d
movl $0x1, %esi
shlq %cl, %rsi
btq %rcx, %rax
jae 0x2cae
btl %edx, %r13d
cmovaeq %r12, %rsi
orq %rsi, %r14
incl %edx
incq %rcx
cmpq $0x40, %rcx
jne 0x2c93
movl %r15d, %edi
movq %r14, %rsi
callq 0x3016
movq %rax, -0x38(%rbp)
leaq 0x6643(%rip), %rax      # 0x9310
imulq (%rax,%r15,8), %r14
leaq 0xa6e7(%rip), %rbx      # 0xd3c0
movq (%rbx,%r15,8), %rdi
callq 0x87b4
negb %al
movl %eax, %ecx
shrq %cl, %r14
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, (%rax,%r14,8)
movq %rbx, %r14
incl %r13d
movq (%rbx,%r15,8), %rdi
callq 0x87b4
movl $0x1, %edx
movl %eax, %ecx
shll %cl, %edx
cmpl %edx, %r13d
jl 0x2c88
incq %r15
cmpq $0x40, %r15
jne 0x2c5e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/niekh1234[P]nnchesslib/attacks.cpp
// Function: nnchesslib::Attacks::initPawnAttacks()
void Attacks::initPawnAttacks()
{
    for (int i = 0; i <= 63; i++)
    {
        U64 pos = (U64)1 << i;

        U64 wpAttacks = ((pos << 9) & ~file_bb[FILE_A]) | ((pos << 7) & ~file_bb[FILE_H]);  //White pawn attacks, checking for no wraparound
        U64 bpAttacks = ((pos >> 7) & ~file_bb[FILE_A]) | ((pos >> 9) & ~file_bb[FILE_H]);  //Black pawn attacks, checking for no wraparound

        nonSlidingAttacks[WHITE][PAWN][i] = wpAttacks;
        nonSlidingAttacks[BLACK][PAWN][i] = bpAttacks;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
movabsq $-0x101010101010200, %rax # imm = 0xFEFEFEFEFEFEFE00
movabsq $0x7f7f7f7f7f7f7f00, %rdx # imm = 0x7F7F7F7F7F7F7F00
movabsq $0xfefefefefefefe, %rsi # imm = 0xFEFEFEFEFEFEFE
movabsq $0x7f7f7f7f7f7f7f, %rdi # imm = 0x7F7F7F7F7F7F7F
leaq 0x28a859(%rip), %r8     # 0x28d5c0
movl $0x1, %r9d
shlq %cl, %r9
movl $0x200, %r10d           # imm = 0x200
shlq %cl, %r10
andq %rax, %r10
movl $0x80, %r11d
shlq %cl, %r11
andq %rdx, %r11
orq %r10, %r11
movq %r9, %r10
shrq $0x7, %r10
andq %rsi, %r10
shrq $0x9, %r9
andq %rdi, %r9
orq %r10, %r9
movq %r11, 0xc00(%r8,%rcx,8)
movq %r9, (%r8,%rcx,8)
incq %rcx
cmpq $0x40, %rcx
jne 0x2d67
popq %rbp
retq