// File: /workspace/github_cpp_makefile_star2_O3/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 0x12b29
movl %esi, %r14d
movq %rdi, %rbx
cmpl %esi, 0x1e8(%rdi)
jle 0x12b29
movq %rbx, %rdi
callq 0xf5e2
movl %r14d, %eax
movq 0x1a0(%rbx), %rcx
leaq (%rax,%rax,2), %r12
movq %r12, -0x60(%rbp)
shlq $0x5, %r12
leaq -0xe8(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rcx,%r12), %rsi
movq 0x8(%rcx,%r12), %rdx
addq %rsi, %rdx
leaq -0xf8(%rbp), %r14
movq %r14, %rdi
callq 0x88c2
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf7a2
movq -0xf8(%rbp), %rdi
cmpq %r15, %rdi
je 0x127c4
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x21b0
movq 0x1a0(%rbx), %rax
movq 0x40(%rax,%r12), %rcx
cmpq %rcx, 0x48(%rax,%r12)
je 0x12876
xorl %edx, %edx
leaq -0x90(%rbp), %r8
xorl %r15d, %r15d
movq %r12, %r14
shlq $0x5, %rdx
movq %r8, -0xa0(%rbp)
movq (%rcx,%rdx), %rsi
movq 0x8(%rcx,%rdx), %rdx
addq %rsi, %rdx
leaq -0xa0(%rbp), %rdi
movq %r8, %r12
callq 0x88c2
movq %rbx, %r13
movq %rbx, %rdi
movl %r15d, %esi
leaq -0xa0(%rbp), %rdx
callq 0xf78a
movq -0xa0(%rbp), %rdi
cmpq %r12, %rdi
movq %r12, %r8
je 0x12849
movq -0x90(%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 0x127e7
addq %r12, %rax
leaq -0xc8(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0xd8(%rbp), %r14
movq %r14, %rdi
callq 0x88c2
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0xf7b0
movq -0xd8(%rbp), %rdi
cmpq %r15, %rdi
je 0x128c6
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x21b0
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq %rbx, %rdi
callq 0xf90e
movq -0x60(%rbp), %rax
leaq (,%rax,8), %rdi
addq 0x188(%rbx), %rdi
movq -0x48(%rbp), %rsi
subq -0x50(%rbp), %rsi
sarq $0x5, %rsi
callq 0x13300
movq %rbx, -0x58(%rbp)
movq -0x50(%rbp), %rax
cmpq %rax, -0x48(%rbp)
je 0x12b20
movq -0x58(%rbp), %rcx
movq 0x1a0(%rcx), %rcx
movl 0x58(%rcx,%r12), %ecx
movl %ecx, -0x2c(%rbp)
leaq -0x70(%rbp), %r15
movl $0x1, %ebx
leaq -0x80(%rbp), %r12
xorl %r14d, %r14d
movl %ebx, -0x30(%rbp)
movq %r14, %rcx
shlq $0x5, %rcx
movq %r15, -0x80(%rbp)
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x88c2
movq %r15, %rbx
leaq -0x160(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
movl -0x2c(%rbp), %edx
callq 0xc232
movq -0x58(%rbp), %rax
movq 0x188(%rax), %rax
movq -0x60(%rbp), %rcx
movq (%rax,%rcx,8), %r15
imulq $0x68, %r14, %r12
leaq (%r15,%r12), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x2210
movq 0x20(%r15,%r12), %rdi
movq 0x30(%r15,%r12), %rsi
movq -0x140(%rbp), %rax
movq %rax, 0x20(%r15,%r12)
movq -0x138(%rbp), %rax
movq %rax, 0x28(%r15,%r12)
movq -0x130(%rbp), %rax
movq %rax, 0x30(%r15,%r12)
leaq -0x140(%rbp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
testq %rdi, %rdi
je 0x129e9
subq %rdi, %rsi
callq 0x21b0
movups 0x38(%r14), %xmm0
movq 0x48(%r14), %rax
movq -0x128(%rbp), %rcx
movq %rcx, 0x38(%r14)
movq -0x120(%rbp), %rcx
movq %rcx, 0x40(%r14)
movq -0x118(%rbp), %rcx
movq %rcx, 0x48(%r14)
movups %xmm0, -0xb8(%rbp)
movq %rax, -0xa8(%rbp)
leaq -0x128(%rbp), %r15
xorl %r12d, %r12d
movq %r12, 0x10(%r15)
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
leaq -0xb8(%rbp), %r13
movq %r13, %rdi
callq 0xdfa4
movups 0x50(%r14), %xmm0
movq 0x60(%r14), %rax
movq -0x110(%rbp), %rcx
movq %rcx, 0x50(%r14)
movq -0x108(%rbp), %rcx
movq %rcx, 0x58(%r14)
movq -0x100(%rbp), %rcx
movq %rcx, 0x60(%r14)
movups %xmm0, -0xb8(%rbp)
movq %rax, -0xa8(%rbp)
leaq -0x110(%rbp), %r14
movq %r12, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq %r13, %rdi
callq 0x5fa0
movq %r14, %rdi
callq 0x5fa0
movq %r15, %rdi
callq 0xdfa4
movq -0x140(%rbp), %rdi
testq %rdi, %rdi
movq %rbx, %r15
je 0x12ac5
movq -0x130(%rbp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq -0x160(%rbp), %rdi
leaq -0x150(%rbp), %rax
cmpq %rax, %rdi
leaq -0x80(%rbp), %r12
je 0x12aeb
movq -0x150(%rbp), %rsi
incq %rsi
callq 0x21b0
movq -0x80(%rbp), %rdi
cmpq %r15, %rdi
movl -0x30(%rbp), %ebx
je 0x12b03
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x21b0
movl %ebx, %r14d
movq -0x50(%rbp), %rax
movq -0x48(%rbp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
incl %ebx
cmpq %r14, %rcx
ja 0x12939
leaq -0x50(%rbp), %rdi
callq 0x5fa0
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0xd8(%rbp), %rdi
cmpq %r15, %rdi
je 0x12bb3
movq -0xc8(%rbp), %rsi
jmp 0x12bab
movq %rax, %r14
movq -0xf8(%rbp), %rdi
cmpq %r15, %rdi
je 0x12bb3
movq -0xe8(%rbp), %rsi
jmp 0x12bab
jmp 0x12b6d
movq %rax, %r14
jmp 0x12b8a
movq %rax, %r14
movq -0x80(%rbp), %rdi
cmpq %rbx, %rdi
je 0x12b8a
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x21b0
leaq -0x50(%rbp), %rdi
callq 0x5fa0
jmp 0x12bb3
movq %rax, %r14
movq -0xa0(%rbp), %rdi
cmpq %r12, %rdi
je 0x12bb3
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x22d0
nop