// File: 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
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x130(%rbp)
movl -0xc(%rbp), %esi
callq 0x26170
testb $0x1, %al
jne 0x2687e
jmp 0x26bc7
movq -0x130(%rbp), %rdi
callq 0x21580
movq -0x130(%rbp), %rdi
addq $0x1a0, %rdi            # imm = 0x1A0
movslq -0xc(%rbp), %rsi
callq 0x27390
movq %rax, %rsi
leaq -0x30(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x3100
movq -0x130(%rbp), %rdi
movq -0x138(%rbp), %rsi
callq 0x21720
jmp 0x268c9
leaq -0x30(%rbp), %rdi
callq 0x3180
movl $0x0, -0x40(%rbp)
movq -0x130(%rbp), %rdi
movl -0x40(%rbp), %eax
movq %rax, -0x140(%rbp)
addq $0x1a0, %rdi            # imm = 0x1A0
movslq -0xc(%rbp), %rsi
callq 0x27390
movq %rax, %rdi
addq $0x40, %rdi
callq 0x6bf0
movq %rax, %rcx
movq -0x140(%rbp), %rax
cmpq %rcx, %rax
jae 0x269c3
movq -0x130(%rbp), %rdi
movl -0x40(%rbp), %eax
movl %eax, -0x14c(%rbp)
addq $0x1a0, %rdi            # imm = 0x1A0
movslq -0xc(%rbp), %rsi
callq 0x27390
movq %rax, %rdi
addq $0x40, %rdi
movl -0x40(%rbp), %eax
movl %eax, %esi
callq 0x6c10
movq %rax, %rsi
leaq -0x60(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x3100
movq -0x130(%rbp), %rdi
movl -0x14c(%rbp), %esi
movq -0x148(%rbp), %rdx
callq 0x216e0
jmp 0x26978
leaq -0x60(%rbp), %rdi
callq 0x3180
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x268d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3180
jmp 0x26bd0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x3180
jmp 0x26bd0
movq -0x130(%rbp), %rdi
addq $0x1a0, %rdi            # imm = 0x1A0
movslq -0xc(%rbp), %rsi
callq 0x27390
movq %rax, %rsi
addq $0x20, %rsi
leaq -0x80(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0x3100
movq -0x130(%rbp), %rdi
movq -0x158(%rbp), %rdx
xorl %esi, %esi
callq 0x21750
jmp 0x26a08
leaq -0x80(%rbp), %rdi
callq 0x3180
leaq -0x98(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x12040
movq -0x130(%rbp), %rdi
movq -0x160(%rbp), %rsi
callq 0x21930
jmp 0x26a39
movq -0x130(%rbp), %rdi
addq $0x188, %rdi            # imm = 0x188
movslq -0xc(%rbp), %rsi
callq 0x273b0
movq %rax, -0x168(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x6bf0
movq -0x168(%rbp), %rdi
movq %rax, %rsi
callq 0x273d0
jmp 0x26a74
movq -0x130(%rbp), %rdi
addq $0x1a0, %rdi            # imm = 0x1A0
movslq -0xc(%rbp), %rsi
callq 0x27390
movl 0x58(%rax), %eax
movl %eax, -0x9c(%rbp)
movl $0x0, -0xa0(%rbp)
movl -0xa0(%rbp), %eax
movq %rax, -0x170(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x6bf0
movq %rax, %rcx
movq -0x170(%rbp), %rax
cmpq %rcx, %rax
jae 0x26bab
movl -0xa0(%rbp), %eax
movl %eax, %esi
leaq -0x98(%rbp), %rdi
callq 0x6c10
movq %rax, %rsi
leaq -0x128(%rbp), %rdi
callq 0x3100
jmp 0x26aef
movl -0x9c(%rbp), %edx
leaq -0x108(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x1cf50
jmp 0x26b0a
movq -0x130(%rbp), %rdi
addq $0x188, %rdi            # imm = 0x188
movslq -0xc(%rbp), %rsi
callq 0x273b0
movq %rax, %rdi
movl -0xa0(%rbp), %eax
movl %eax, %esi
callq 0x27460
movq %rax, %rdi
leaq -0x108(%rbp), %rsi
callq 0x27480
leaq -0x108(%rbp), %rdi
callq 0x274f0
leaq -0x128(%rbp), %rdi
callq 0x3180
movl -0xa0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa0(%rbp)
jmp 0x26a9e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x3180
jmp 0x26bd0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x26bb9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x3180
jmp 0x26bb9
leaq -0x98(%rbp), %rdi
callq 0x7b40
jmp 0x26bc7
leaq -0x98(%rbp), %rdi
callq 0x7b40
jmp 0x26bd0
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x3410
nopl (%rax)