// File: /workspace/github_cpp_makefile_star2_O1/drarwood[P]gags/FileWriter.cpp
// Function: OutputSolution(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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int&)
void OutputSolution(vector<string>& s, map<string,double>& m, vector<int>& n, string& o, int& g) {
    ofstream outFile;
    outFile.open(o.c_str(), ios_base::out);
    if (outFile.is_open()) {
        int index  = 0;
        //int group  = 0;
        int offset = 0;
        outFile << "Group\tID\tPhenotype\n";   
        for (int i = 0; i < n.size(); ++i) {
            //group++;
            while (index < n[i] + offset) {
                outFile << g << "\t" << s[index] << "\t" << m[s[index]] << endl;
                index++;
            }
            offset = offset + index;
            g++;
        }
        outFile.close();
    }
    else {
        cout << "Can not open " << o << " for writing" << endl;
        exit(EXIT_FAILURE);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %r8, 0x10(%rsp)
movq %rcx, %r13
movq %rdx, %rbx
movq %rsi, 0x18(%rsp)
movq %rdi, %r12
leaq 0x28(%rsp), %rbp
movq %rbp, %rdi
callq 0x3410
movq (%r13), %rsi
movq %rbp, %rdi
movl $0x10, %edx
callq 0x3050
leaq 0x98(%rsp), %rdi
callq 0x3080
testb %al, %al
je 0x6f13
leaq 0x65a7(%rip), %rsi      # 0xd33d
leaq 0x28(%rsp), %rdi
movl $0x13, %edx
callq 0x32c0
movq 0x8(%rbx), %rax
cmpq (%rbx), %rax
je 0x6ec5
xorl %r15d, %r15d
xorl %ecx, %ecx
xorl %r14d, %r14d
movq (%rbx), %rax
movl (%rax,%r15,4), %eax
addl %ecx, %eax
cmpl %eax, %r14d
jge 0x6ea4
movq %rbx, %rbp
movslq %r14d, %r14
movq %r14, %rbx
shlq $0x5, %rbx
movl %ecx, 0xc(%rsp)
movslq %ecx, %rax
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rax
movl (%rax), %esi
leaq 0x28(%rsp), %rdi
callq 0x3420
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x6549(%rip), %rsi      # 0xd351
callq 0x32c0
movq (%r12), %rax
movq (%rax,%rbx), %rsi
movq 0x8(%rax,%rbx), %rdx
movq %r13, %rdi
callq 0x32c0
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x651d(%rip), %rsi      # 0xd351
callq 0x32c0
movq (%r12), %rsi
addq %rbx, %rsi
movq 0x18(%rsp), %rdi
callq 0x7314
movsd (%rax), %xmm0
movq %r13, %rdi
callq 0x33e0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3260
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31b0
incq %r14
movq (%rbp), %rax
movslq (%rax,%r15,4), %rax
addq 0x20(%rsp), %rax
addq $0x20, %rbx
cmpq %rax, %r14
jl 0x6de5
movq %rbp, %rbx
movl 0xc(%rsp), %ecx
movq 0x10(%rsp), %rax
incl (%rax)
addl %r14d, %ecx
incq %r15
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x2, %rax
cmpq %r15, %rax
ja 0x6dba
leaq 0x28(%rsp), %rdi
callq 0x3340
movq 0xb0ea(%rip), %rax      # 0x11fc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x30(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x28(%rsp,%rcx)
callq 0x3230
leaq 0x120(%rsp), %rdi
callq 0x30d0
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xb0be(%rip), %rdi      # 0x11fd8
leaq 0x6432(%rip), %rsi      # 0xd353
movl $0xd, %edx
callq 0x32c0
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq 0xb09e(%rip), %rdi      # 0x11fd8
callq 0x32c0
movq %rax, %rbx
leaq 0x6418(%rip), %rsi      # 0xd361
movl $0xc, %edx
movq %rax, %rdi
callq 0x32c0
movq %rbx, %rdi
callq 0x3120
movl $0x1, %edi
callq 0x32e0
jmp 0x6f6c
jmp 0x6f6c
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3370
movq %rbx, %rdi
callq 0x3450