// File: /workspace/github_cpp_makefile_star2_O1/chulchultrain[P]FactoryHead/BattleEvaluator/BattleEvaluator.cpp
// Function: BattleEvaluator::EvaluateCriteria(int)
void BattleEvaluator::EvaluateCriteria(int whichCriteria) {
	if(inBoundCriteria(whichCriteria) ) {
		ef.ResetAllFilters();
		ef.SetNameFilter(crit[whichCriteria].name);
		for(unsigned j = 0; j < crit[whichCriteria].moves.size(); j++) {
			ef.SetMoveFilter(j,crit[whichCriteria].moves[j]);
		}	
		ef.SetTypeFilter(0,crit[whichCriteria].type); //Take note will only set first type.
		vector<string> resIDs;
		ef.Evaluate(resIDs);
		candidates[whichCriteria].resize(resIDs.size());
		int IV = crit[whichCriteria].IV;
		
		for(unsigned x = 0; x < resIDs.size(); x++) {
			candidates[whichCriteria][x] = PokemonEntry(resIDs[x],IV); 
		}		
	}	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
testl %esi, %esi
js 0x12bca
movl %esi, %r14d
movq %rdi, %rbx
cmpl %esi, 0x1e8(%rdi)
jle 0x12bca
movq %rbx, %rdi
callq 0xf6b8
movl %r14d, %eax
movq 0x1a0(%rbx), %rcx
leaq (%rax,%rax,2), %r12
movq %r12, -0x70(%rbp)
shlq $0x5, %r12
leaq -0x148(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rcx,%r12), %rsi
movq 0x8(%rcx,%r12), %rdx
addq %rsi, %rdx
leaq -0x158(%rbp), %r14
movq %r14, %rdi
callq 0x8870
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf86c
movq -0x158(%rbp), %rdi
cmpq %r15, %rdi
je 0x1286c
movq -0x148(%rbp), %rsi
incq %rsi
callq 0x21b0
movq 0x1a0(%rbx), %rax
movq 0x40(%rax,%r12), %rcx
cmpq %rcx, 0x48(%rax,%r12)
je 0x1291e
xorl %edx, %edx
leaq -0xa0(%rbp), %r8
xorl %r15d, %r15d
movq %r12, %r14
shlq $0x5, %rdx
movq %r8, -0xb0(%rbp)
movq (%rcx,%rdx), %rsi
movq 0x8(%rcx,%rdx), %rdx
addq %rsi, %rdx
leaq -0xb0(%rbp), %rdi
movq %r8, %r12
callq 0x8870
movq %rbx, %r13
movq %rbx, %rdi
movl %r15d, %esi
leaq -0xb0(%rbp), %rdx
callq 0xf854
movq -0xb0(%rbp), %rdi
cmpq %r12, %rdi
movq %r12, %r8
je 0x128f1
movq -0xa0(%rbp), %rsi
incq %rsi
movq %r8, %rbx
callq 0x21b0
movq %rbx, %r8
incl %r15d
movq %r13, %rbx
movq 0x1a0(%r13), %rax
movq %r14, %r12
movq 0x40(%rax,%r14), %rcx
movq 0x48(%rax,%r14), %rsi
subq %rcx, %rsi
sarq $0x5, %rsi
movq %r15, %rdx
cmpq %r15, %rsi
ja 0x1288f
addq %r12, %rax
leaq -0x128(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0x138(%rbp), %r14
movq %r14, %rdi
callq 0x8870
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xf87a
movq -0x138(%rbp), %rdi
cmpq %r15, %rdi
je 0x1296e
movq -0x128(%rbp), %rsi
incq %rsi
callq 0x21b0
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq %rbx, %rdi
callq 0xf9d4
movq -0x70(%rbp), %rax
leaq (,%rax,8), %rdi
addq 0x188(%rbx), %rdi
movq -0x58(%rbp), %rsi
subq -0x60(%rbp), %rsi
sarq $0x5, %rsi
callq 0x13398
movq %rbx, -0x68(%rbp)
movq -0x60(%rbp), %rax
cmpq %rax, -0x58(%rbp)
je 0x12bc1
movq -0x68(%rbp), %rcx
movq 0x1a0(%rcx), %rcx
movl 0x58(%rcx,%r12), %ecx
movl %ecx, -0x44(%rbp)
leaq -0x80(%rbp), %r13
movl $0x1, %r15d
leaq -0x90(%rbp), %r12
leaq -0x118(%rbp), %rbx
xorl %r14d, %r14d
movq %r14, %rcx
shlq $0x5, %rcx
movq %r13, -0x90(%rbp)
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x8870
movq %rbx, %rdi
movq %r12, %rsi
movl -0x44(%rbp), %edx
callq 0xc262
movq -0x68(%rbp), %rax
movq 0x188(%rax), %rax
movq -0x70(%rbp), %rcx
movq (%rax,%rcx,8), %r12
imulq $0x68, %r14, %r14
leaq (%r12,%r14), %rdi
movq %rbx, %rsi
callq 0x2210
addq %r12, %r14
addq $0x20, %r14
movq %r14, %rdi
leaq -0xf8(%rbp), %rsi
callq 0xe698
xorl %r12d, %r12d
movq %r12, -0x30(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq 0x18(%r14), %rax
movups 0x20(%r14), %xmm0
movq -0xe0(%rbp), %rcx
movq %rcx, 0x18(%r14)
movq -0xd8(%rbp), %rcx
movq %rcx, 0x20(%r14)
movq -0xd0(%rbp), %rcx
movq %rcx, 0x28(%r14)
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rdx
movq -0x30(%rbp), %rsi
movq %rax, -0x40(%rbp)
movups %xmm0, -0x38(%rbp)
movq %rcx, -0xe0(%rbp)
movq %rdx, -0xd8(%rbp)
movq %rsi, -0xd0(%rbp)
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
callq 0xdfec
movq %r12, -0x30(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq 0x30(%r14), %rax
movups 0x38(%r14), %xmm0
movq -0xc8(%rbp), %rcx
movq %rcx, 0x30(%r14)
movq -0xc0(%rbp), %rcx
movq %rcx, 0x38(%r14)
movq -0xb8(%rbp), %rcx
movq %rcx, 0x40(%r14)
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rdx
movq -0x30(%rbp), %rsi
movq %rax, -0x40(%rbp)
movups %xmm0, -0x38(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xb8(%rbp)
movq %rbx, %rdi
callq 0x5f52
leaq -0xc8(%rbp), %rdi
callq 0x5f52
leaq -0xe0(%rbp), %rdi
callq 0xdfec
movq -0xf8(%rbp), %rdi
testq %rdi, %rdi
je 0x12b5b
movq -0xe8(%rbp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x12b7d
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x21b0
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
leaq -0x90(%rbp), %r12
je 0x12b9c
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x21b0
movl %r15d, %r14d
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
incl %r15d
cmpq %r14, %rcx
leaq -0x118(%rbp), %rbx
ja 0x129ec
leaq -0x60(%rbp), %rdi
callq 0x5f52
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x138(%rbp), %rdi
cmpq %r15, %rdi
je 0x12c57
movq -0x128(%rbp), %rsi
jmp 0x12c4f
movq %rax, %rbx
movq -0x158(%rbp), %rdi
cmpq %r15, %rdi
je 0x12c57
movq -0x148(%rbp), %rsi
jmp 0x12c4f
jmp 0x12c0e
movq %rax, %rbx
jmp 0x12c2e
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x12c2e
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x21b0
leaq -0x60(%rbp), %rdi
callq 0x5f52
jmp 0x12c57
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
cmpq %r12, %rdi
je 0x12c57
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22d0
nop