// File: /workspace/github_cpp_makefile_star2_O2/drarwood[P]gags/GA.cpp
// Function: TestBestSolution(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::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>&, std::vector<int, std::allocator<int>>&, std::vector<double, std::allocator<double>>&, std::vector<double, std::allocator<double>>&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&)
bool TestBestSolution(vector<string>& c, map<string, double>& p, vector<int>& n, vector<double>& m, vector<double>& s, vector<int>& mp, vector<int>& sp) {
    vector<double> values;
    int index = 0;
    bool solutionFound;
    for (int i = 0; i < n.size(); ++i) {
        int count = 0;
        while (count < n[i]) {
            values.push_back(p[c[index]]);
            index++;
            count++;
        }
        
        double mean = roundf(CalcMean(values) * pow(10,mp[i])) / pow(10,mp[i]);
        double sd   = roundf(sqrt(CalcVariance(values)) * pow(10,sp[i])) / pow(10,sp[i]);
        if (doubleEqual(mean, m[i], 0.00001) && doubleEqual(sd, s[i], 0.00001)) {
            solutionFound = true;
        }
        else {
            solutionFound = false;
            break;
        }
        values.clear();
    }
    return solutionFound;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r9, 0x28(%rsp)
movq %r8, 0x50(%rsp)
movq %rcx, 0x58(%rsp)
movq %rdx, %r12
movq %rsi, 0x70(%rsp)
movq %rdi, %rbp
xorpd %xmm0, %xmm0
leaq 0x30(%rsp), %r13
movapd %xmm0, (%r13)
andq $0x0, 0x10(%r13)
xorl %r15d, %r15d
movq $0x0, 0x20(%rsp)
movq (%r12), %rax
movq 0x8(%r12), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
movq %rcx, 0x60(%rsp)
cmpq %r15, %rcx
jbe 0x7048
movq 0x20(%rsp), %rbx
movslq %ebx, %rbx
movq %rbx, 0x20(%rsp)
shlq $0x5, %rbx
xorl %r14d, %r14d
cmpl (%rax,%r15,4), %r14d
jge 0x6ed5
movq (%rbp), %rsi
addq %rbx, %rsi
movq 0x70(%rsp), %rdi
callq 0x670e
movq %r13, %rdi
movq %rax, %rsi
callq 0x4a12
movq (%r12), %rax
incq %r14
addq $0x20, %rbx
jmp 0x6ea6
movq %r13, %rbx
movq %r13, %rdi
callq 0x60da
movsd %xmm0, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq (%rax), %rax
cvtsi2sdl (%rax,%r15,4), %xmm1
movsd 0x3464(%rip), %xmm0     # 0xa360
callq 0x3400
movsd %xmm0, 0x8(%rsp)
movq 0x28(%rsp), %rax
movq (%rax), %rax
cvtsi2sdl (%rax,%r15,4), %xmm1
movsd 0x3443(%rip), %xmm0     # 0xa360
callq 0x3400
movsd %xmm0, 0x18(%rsp)
movq %rbx, %rdi
callq 0x6064
movsd %xmm0, 0x68(%rsp)
movsd 0x10(%rsp), %xmm0
mulsd 0x8(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x3280
movaps %xmm0, %xmm1
movsd 0x68(%rsp), %xmm0
ucomisd 0x33f4(%rip), %xmm0     # 0xa350
jb 0x6f64
sqrtsd %xmm0, %xmm0
jmp 0x6f75
movss %xmm1, 0x10(%rsp)
callq 0x3200
movss 0x10(%rsp), %xmm1
movsd %xmm0, 0x8(%rsp)
cvtss2sd %xmm1, %xmm0
divsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0xb0(%rsp), %rbx
movq (%rbx), %rax
cvtsi2sdl (%rax,%r15,4), %xmm1
movsd 0x33bc(%rip), %xmm0     # 0xa360
callq 0x3400
mulsd 0x8(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x3280
movss %xmm0, 0x18(%rsp)
movq (%rbx), %rax
cvtsi2sdl (%rax,%r15,4), %xmm1
movsd 0x3391(%rip), %xmm0     # 0xa360
callq 0x3400
movsd %xmm0, 0x8(%rsp)
movq 0x58(%rsp), %rax
movq (%rax), %rax
movsd (%rax,%r15,8), %xmm1
movsd 0x10(%rsp), %xmm0
movsd 0x3372(%rip), %xmm2     # 0xa368
callq 0x612b
testb %al, %al
je 0x7048
cvtss2sd 0x18(%rsp), %xmm0
divsd 0x8(%rsp), %xmm0
movq 0x50(%rsp), %rax
movq (%rax), %rax
movsd (%rax,%r15,8), %xmm1
movsd 0x3347(%rip), %xmm2     # 0xa368
callq 0x612b
testb %al, %al
je 0x7048
movq 0x30(%rsp), %rax
cmpq %rax, 0x38(%rsp)
je 0x703b
movq %rax, 0x38(%rsp)
addq %r14, 0x20(%rsp)
incq %r15
jmp 0x6e74
cmpq %r15, 0x60(%rsp)
setbe %bl
leaq 0x30(%rsp), %rdi
callq 0x4eae
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x706f
jmp 0x706f
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x4eae
movq %rbx, %rdi
callq 0x3410