// File: pgrouchy[P]NoiseWorld/mathNet.cpp
// Function: Tree::produceMyEqn[abi:cxx11](int)
string Tree::produceMyEqn(int total_num_trees) {
    stringstream ss;
    string myString;

    if (this->isTerminal) {
        if (this->isConstant) {
            ss << myVal;
        } else {
            int counter = (int)myVal;
            if (counter == 0) {
                ss << "x^t";
            } else if (counter == 1) {
                ss << "y^t";
            } else if (counter == 2) {
                ss << "w_in^t";
            } else if (counter == 3) {
                ss << "theta^t";
            } else if (counter == 4) {
                ss << "omega_out^t";
            } else {
                ss << "v_" << (counter - 4) << "^t";
            }
        }
    } else {
        switch ((int)myVal) {
            case ADD: {
                ss << "(" << this->leftTree->produceMyEqn(total_num_trees) << ") + (" << this->rightTree->produceMyEqn(total_num_trees) << ")";
                break;
            }
            case SUBTRACT: {
                ss << "(" << this->leftTree->produceMyEqn(total_num_trees) << ") - (" << this->rightTree->produceMyEqn(total_num_trees) << ")";
                break;
            }
            case MULTIPLY: {
                ss << "(" << this->leftTree->produceMyEqn(total_num_trees) << ") * (" << this->rightTree->produceMyEqn(total_num_trees) << ")";
                break;
            }
            case DIVIDE: {
                ss << "(" << this->leftTree->produceMyEqn(total_num_trees) << ") / (" << this->rightTree->produceMyEqn(total_num_trees) << ")";
                break;
            }
        }
    }

    return ss.str();
}

// Assembly:
subq $0x388, %rsp            # imm = 0x388
movq %rdi, 0xa0(%rsp)
movq %rdi, %rax
movq %rax, 0xa8(%rsp)
movq %rdi, 0x380(%rsp)
movq %rsi, 0x378(%rsp)
movl %edx, 0x374(%rsp)
movq 0x378(%rsp), %rax
movq %rax, 0xb0(%rsp)
leaq 0x1e8(%rsp), %rdi
callq 0x3180
leaq 0x1c8(%rsp), %rdi
callq 0x3350
movq 0xb0(%rsp), %rax
cmpl $0x0, 0x18(%rax)
je 0xa932
movq 0xb0(%rsp), %rax
cmpl $0x0, 0x1c(%rax)
je 0xa805
movq 0xb0(%rsp), %rax
leaq 0x1f8(%rsp), %rdi
movsd 0x20(%rax), %xmm0
callq 0x3490
jmp 0xa7e7
jmp 0xa92d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0xae39
movq 0xb0(%rsp), %rax
cvttsd2si 0x20(%rax), %eax
movl %eax, 0x1b8(%rsp)
cmpl $0x0, 0x1b8(%rsp)
jne 0xa83e
leaq 0x1f8(%rsp), %rdi
leaq 0xaa82(%rip), %rsi      # 0x152b4
callq 0x3280
jmp 0xa839
jmp 0xa92b
cmpl $0x1, 0x1b8(%rsp)
jne 0xa863
leaq 0x1f8(%rsp), %rdi
leaq 0xaa61(%rip), %rsi      # 0x152b8
callq 0x3280
jmp 0xa85e
jmp 0xa929
cmpl $0x2, 0x1b8(%rsp)
jne 0xa888
leaq 0x1f8(%rsp), %rdi
leaq 0xaa40(%rip), %rsi      # 0x152bc
callq 0x3280
jmp 0xa883
jmp 0xa927
cmpl $0x3, 0x1b8(%rsp)
jne 0xa8aa
leaq 0x1f8(%rsp), %rdi
leaq 0xaa22(%rip), %rsi      # 0x152c3
callq 0x3280
jmp 0xa8a8
jmp 0xa925
cmpl $0x4, 0x1b8(%rsp)
jne 0xa8cc
leaq 0x1f8(%rsp), %rdi
leaq 0xaa08(%rip), %rsi      # 0x152cb
callq 0x3280
jmp 0xa8ca
jmp 0xa923
leaq 0x1f8(%rsp), %rdi
leaq 0xa9d6(%rip), %rsi      # 0x152b1
callq 0x3280
movq %rax, 0x98(%rsp)
jmp 0xa8ea
movq 0x98(%rsp), %rdi
movl 0x1b8(%rsp), %esi
addl $-0x4, %esi
callq 0x3410
movq %rax, 0x90(%rsp)
jmp 0xa90b
movq 0x90(%rsp), %rdi
leaq 0xa9ae(%rip), %rsi      # 0x152c8
callq 0x3280
jmp 0xa921
jmp 0xa923
jmp 0xa925
jmp 0xa927
jmp 0xa929
jmp 0xa92b
jmp 0xa92d
jmp 0xadf8
movq 0xb0(%rsp), %rax
cvttsd2si 0x20(%rax), %eax
movl %eax, %ecx
movq %rcx, 0x88(%rsp)
subl $0x3, %eax
ja 0xadf6
movq 0x88(%rsp), %rax
leaq 0xa887(%rip), %rcx      # 0x151e8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1f8(%rsp), %rdi
leaq 0xa970(%rip), %rsi      # 0x152e9
callq 0x3280
movq %rax, 0x80(%rsp)
jmp 0xa988
movq 0xb0(%rsp), %rax
movq (%rax), %rsi
movl 0x374(%rsp), %edx
leaq 0x198(%rsp), %rdi
callq 0xa750
jmp 0xa9a9
movq 0x80(%rsp), %rdi
leaq 0x198(%rsp), %rsi
callq 0x3240
movq %rax, 0x78(%rsp)
jmp 0xa9c5
movq 0x78(%rsp), %rdi
leaq 0xa906(%rip), %rsi      # 0x152d7
callq 0x3280
movq %rax, 0x70(%rsp)
jmp 0xa9dd
movq 0xb0(%rsp), %rax
movq 0x8(%rax), %rsi
movl 0x374(%rsp), %edx
leaq 0x178(%rsp), %rdi
callq 0xa750
jmp 0xa9ff
movq 0x70(%rsp), %rdi
leaq 0x178(%rsp), %rsi
callq 0x3240
movq %rax, 0x68(%rsp)
jmp 0xaa18
movq 0x68(%rsp), %rdi
leaq 0xa8b9(%rip), %rsi      # 0x152dd
callq 0x3280
jmp 0xaa2b
leaq 0x178(%rsp), %rdi
callq 0x3160
leaq 0x198(%rsp), %rdi
callq 0x3160
jmp 0xadf6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0xaa81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
leaq 0x178(%rsp), %rdi
callq 0x3160
leaq 0x198(%rsp), %rdi
callq 0x3160
jmp 0xae39
leaq 0x1f8(%rsp), %rdi
leaq 0xa847(%rip), %rsi      # 0x152e9
callq 0x3280
movq %rax, 0x60(%rsp)
jmp 0xaaae
movq 0xb0(%rsp), %rax
movq (%rax), %rsi
movl 0x374(%rsp), %edx
leaq 0x158(%rsp), %rdi
callq 0xa750
jmp 0xaacf
movq 0x60(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0x3240
movq %rax, 0x58(%rsp)
jmp 0xaae8
movq 0x58(%rsp), %rdi
leaq 0xa7eb(%rip), %rsi      # 0x152df
callq 0x3280
movq %rax, 0x50(%rsp)
jmp 0xab00
movq 0xb0(%rsp), %rax
movq 0x8(%rax), %rsi
movl 0x374(%rsp), %edx
leaq 0x138(%rsp), %rdi
callq 0xa750
jmp 0xab22
movq 0x50(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0x3240
movq %rax, 0x48(%rsp)
jmp 0xab3b
movq 0x48(%rsp), %rdi
leaq 0xa796(%rip), %rsi      # 0x152dd
callq 0x3280
jmp 0xab4e
leaq 0x138(%rsp), %rdi
callq 0x3160
leaq 0x158(%rsp), %rdi
callq 0x3160
jmp 0xadf6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0xaba4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
leaq 0x138(%rsp), %rdi
callq 0x3160
leaq 0x158(%rsp), %rdi
callq 0x3160
jmp 0xae39
leaq 0x1f8(%rsp), %rdi
leaq 0xa724(%rip), %rsi      # 0x152e9
callq 0x3280
movq %rax, 0x40(%rsp)
jmp 0xabd1
movq 0xb0(%rsp), %rax
movq (%rax), %rsi
movl 0x374(%rsp), %edx
leaq 0x118(%rsp), %rdi
callq 0xa750
jmp 0xabf2
movq 0x40(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0x3240
movq %rax, 0x38(%rsp)
jmp 0xac0b
movq 0x38(%rsp), %rdi
leaq 0xa6ce(%rip), %rsi      # 0x152e5
callq 0x3280
movq %rax, 0x30(%rsp)
jmp 0xac23
movq 0xb0(%rsp), %rax
movq 0x8(%rax), %rsi
movl 0x374(%rsp), %edx
leaq 0xf8(%rsp), %rdi
callq 0xa750
jmp 0xac45
movq 0x30(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0x3240
movq %rax, 0x28(%rsp)
jmp 0xac5e
movq 0x28(%rsp), %rdi
leaq 0xa673(%rip), %rsi      # 0x152dd
callq 0x3280
jmp 0xac71
leaq 0xf8(%rsp), %rdi
callq 0x3160
leaq 0x118(%rsp), %rdi
callq 0x3160
jmp 0xadf6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0xacc7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x3160
leaq 0x118(%rsp), %rdi
callq 0x3160
jmp 0xae39
leaq 0x1f8(%rsp), %rdi
leaq 0xa601(%rip), %rsi      # 0x152e9
callq 0x3280
movq %rax, 0x20(%rsp)
jmp 0xacf4
movq 0xb0(%rsp), %rax
movq (%rax), %rsi
movl 0x374(%rsp), %edx
leaq 0xd8(%rsp), %rdi
callq 0xa750
jmp 0xad15
movq 0x20(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x3240
movq %rax, 0x18(%rsp)
jmp 0xad2e
movq 0x18(%rsp), %rdi
leaq 0xa5b1(%rip), %rsi      # 0x152eb
callq 0x3280
movq %rax, 0x10(%rsp)
jmp 0xad46
movq 0xb0(%rsp), %rax
movq 0x8(%rax), %rsi
movl 0x374(%rsp), %edx
leaq 0xb8(%rsp), %rdi
callq 0xa750
jmp 0xad68
movq 0x10(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x3240
movq %rax, 0x8(%rsp)
jmp 0xad81
movq 0x8(%rsp), %rdi
leaq 0xa550(%rip), %rsi      # 0x152dd
callq 0x3280
jmp 0xad94
leaq 0xb8(%rsp), %rdi
callq 0x3160
leaq 0xd8(%rsp), %rdi
callq 0x3160
jmp 0xadf6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
jmp 0xade7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1c0(%rsp)
movl %eax, 0x1bc(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x3160
leaq 0xd8(%rsp), %rdi
callq 0x3160
jmp 0xae39
jmp 0xadf8
movq 0xa0(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x3270
jmp 0xae0f
leaq 0x1c8(%rsp), %rdi
callq 0x3160
leaq 0x1e8(%rsp), %rdi
callq 0x31b0
movq 0xa8(%rsp), %rax
addq $0x388, %rsp            # imm = 0x388
retq
leaq 0x1c8(%rsp), %rdi
callq 0x3160
leaq 0x1e8(%rsp), %rdi
callq 0x31b0
movq 0x1c0(%rsp), %rdi
callq 0x3430