// File: /workspace/github_cpp_makefile_star2_O2/pgrouchy[P]NoiseWorld/mathNet.cpp
// Function: Genome::save_EMM_txt(int)
void Genome::save_EMM_txt(int myNum) {
    list<Tree*>::iterator curTree;

    int counter;
    ofstream myFile;
    stringstream tempNum;
    tempNum << myNum;
    string myName = "myEMM_ind" + tempNum.str();
    string myFilename = myName + ".emm";

    do {
        myFile.open(myFilename.c_str(), ios::out | ios::trunc);
        if (!myFile)
            sleep(0.1);
    } while (!myFile);

    counter = 0;
    for (curTree = trees.begin(); curTree != trees.end(); ++curTree) {
        if (counter == 0) {
            myFile << "theta^(t+1) = ";
        } else if (counter == 1) {
            myFile << "omega_out^(t+1) = ";
        } else {
            myFile << "v_" << (counter - 1) << "^(t+1) = ";
        }
        myFile << (*curTree)->produceMyEqn(this->num_trees) << "\n";
        counter++;
    }
    myFile << "\n";
    myFile.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3e8, %rsp            # imm = 0x3E8
movl %esi, %ebp
movq %rdi, %r13
leaq 0x60(%rsp), %rdi
callq 0x22f0
leaq 0x260(%rsp), %rdi
callq 0x20f0
leaq 0x270(%rsp), %rdi
movl %ebp, %esi
callq 0x2300
leaq 0x278(%rsp), %rsi
movq %rsp, %rdi
callq 0x22c0
leaq 0x53b1(%rip), %rsi      # 0xa340
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x899e
movq %rsp, %rdi
callq 0x20b0
leaq 0x539f(%rip), %rdx      # 0xa34a
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x89c2
leaq 0x60(%rsp), %r14
pushq $0x30
popq %rbp
movq (%rsp), %rsi
movq %r14, %rdi
movl %ebp, %edx
callq 0x2040
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x80(%rsp,%rax), %eax
testb $0x5, %al
je 0x4ff9
xorl %edi, %edi
callq 0x2130
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x80(%rsp,%rax), %eax
testb $0x5, %al
jne 0x4fc0
xorl %ebp, %ebp
leaq 0x40(%rsp), %r15
leaq 0x5436(%rip), %r12      # 0xa441
movq %r13, %rbx
movq (%rbx), %rbx
cmpq %r13, %rbx
je 0x508d
movq %r14, %rdi
cmpl $0x1, %ebp
je 0x504f
leaq 0x532a(%rip), %rsi      # 0xa34f
testl %ebp, %ebp
je 0x5056
movq %r14, %rdi
leaq 0x533e(%rip), %rsi      # 0xa371
callq 0x21d0
leal -0x1(%rbp), %esi
movq %rax, %rdi
callq 0x2300
movq %rax, %rdi
leaq 0x5307(%rip), %rsi      # 0xa354
jmp 0x5056
leaq 0x5308(%rip), %rsi      # 0xa35e
callq 0x21d0
movq 0x10(%rbx), %rsi
movl 0x34(%r13), %edx
movq %r15, %rdi
callq 0x5146
movq %r14, %rdi
movq %r15, %rsi
callq 0x21a0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21d0
movq %r15, %rdi
callq 0x20b0
incl %ebp
jmp 0x500e
leaq 0x53ad(%rip), %rsi      # 0xa441
leaq 0x60(%rsp), %rdi
callq 0x21d0
leaq 0x60(%rsp), %rdi
callq 0x2270
movq %rsp, %rdi
callq 0x20b0
leaq 0x20(%rsp), %rdi
callq 0x20b0
leaq 0x260(%rsp), %rdi
callq 0x2120
leaq 0x60(%rsp), %rdi
callq 0x2290
addq $0x3e8, %rsp            # imm = 0x3E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x511c
movq %rax, %rbx
movq %rsp, %rdi
jmp 0x5121
jmp 0x50f2
movq %rax, %rbx
jmp 0x5126
movq %rax, %rbx
jmp 0x5133
jmp 0x5102
jmp 0x5102
jmp 0x5102
movq %rax, %rbx
jmp 0x5114
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x20b0
movq %rsp, %rdi
callq 0x20b0
leaq 0x20(%rsp), %rdi
callq 0x20b0
leaq 0x260(%rsp), %rdi
callq 0x2120
leaq 0x60(%rsp), %rdi
callq 0x2290
movq %rbx, %rdi
callq 0x2310
nop