// File: /workspace/github_cpp_makefile_star2_O2/pgrouchy[P]NoiseWorld/./mathNet.h
// Function: Tree::Tree(bool, int, int, bool, int, int, int)
Tree(bool makeTerminal, int currentDepth, int maxDepth, bool isGrow, int my_num_outputs, int my_isl, int my_id) {
        myDepth = currentDepth;
        tree_id = new TreeID(my_isl, my_id);

        if (currentDepth == 0) {
            numConstants = 0;
            numTerminals = 0;
            numNodes = 0;
        }

        if (makeTerminal) {
            isTerminal = true;
            numTerminals = 1;
            leftTree = NULL;
            rightTree = NULL;
            if (randfloat() < PERCENT_CONSTANT) {
                isConstant = true;
                myVal = (2.0*(double)MAX_CONSTANT*randfloat() - (double)MAX_CONSTANT);
                numConstants = 1;
                numNodes = 1;
            } else {
                isConstant = false;
                myVal = (double)((int)((NUM_INPUTS + my_num_outputs) * randfloat()));
                numConstants = 0;
                numNodes = 1;
            }
        } else {
            isTerminal = false;
            isConstant = false;
            myVal = (int)(NUM_FUNCTIONS * randfloat());

            if (currentDepth == (maxDepth-1)) {
                leftTree = new Tree(true, (myDepth+1), maxDepth, isGrow, my_num_outputs, my_isl, my_id);
                rightTree = new Tree(true, (myDepth+1), maxDepth, isGrow, my_num_outputs, my_isl, my_id);
            } else if (isGrow) {
                bool nextIsTerminal = false;
                if (randfloat() < PERCENT_TERMINAL) {
                    nextIsTerminal = true;
                }
                leftTree = new Tree(nextIsTerminal, (myDepth+1), maxDepth, isGrow, my_num_outputs, my_isl, my_id);
                nextIsTerminal = false;
                if (randfloat() < PERCENT_TERMINAL) {
                    nextIsTerminal = true;
                }
                rightTree = new Tree(nextIsTerminal, (myDepth+1), maxDepth, isGrow, my_num_outputs, my_isl, my_id);
            } else {
                leftTree = new Tree(false, (myDepth+1), maxDepth, isGrow, my_num_outputs, my_isl, my_id);
                rightTree = new Tree(false, (myDepth+1), maxDepth, isGrow, my_num_outputs, my_isl, my_id);
            }
            numConstants = leftTree->numConstants + rightTree->numConstants;
            numTerminals = leftTree->numTerminals + rightTree->numTerminals;
            numNodes = 1 + leftTree->numNodes + rightTree->numNodes;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r15d
movl %r8d, 0x14(%rsp)
movq %rcx, 0x8(%rsp)
movl %edx, %r14d
movl %esi, %r13d
movq %rdi, %rbx
movl 0x58(%rsp), %r12d
movl 0x50(%rsp), %ebp
movl %edx, 0x28(%rdi)
pushq $0x8
popq %rdi
callq 0x21f0
movl %ebp, (%rax)
movq %r12, %rbp
movl %r12d, 0x4(%rax)
movq %rax, 0x10(%rbx)
testl %r14d, %r14d
jne 0x8a91
andq $0x0, 0x2c(%rbx)
andl $0x0, 0x34(%rbx)
testb %r13b, %r13b
je 0x8aec
pushq $0x1
popq %r14
movl %r14d, 0x18(%rbx)
movl %r14d, 0x30(%rbx)
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
callq 0x476f
movsd 0x1839(%rip), %xmm1     # 0xa2f0
ucomisd %xmm0, %xmm1
jbe 0x8b8c
pushq $0x1
popq %r14
movl %r14d, 0x1c(%rbx)
callq 0x476f
mulsd 0x183a(%rip), %xmm0     # 0xa310
addsd 0x183a(%rip), %xmm0     # 0xa318
movsd %xmm0, 0x20(%rbx)
movl %r14d, 0x2c(%rbx)
jmp 0x8ce4
andq $0x0, 0x18(%rbx)
callq 0x476f
mulsd 0x1822(%rip), %xmm0     # 0xa320
cvttpd2dq %xmm0, %xmm0
cvtdq2pd %xmm0, %xmm0
movlpd %xmm0, 0x20(%rbx)
movq 0x8(%rsp), %r13
leal -0x1(%r13), %eax
cmpl %r14d, %eax
jne 0x8bc0
pushq $0x38
popq %rdi
callq 0x21f0
movq %rax, %r14
movl 0x28(%rbx), %edx
incl %edx
movzbl 0x14(%rsp), %r12d
pushq $0x1
popq %rsi
movq %rax, %rdi
movl %r13d, %ecx
movl %r12d, %r8d
movl %r15d, %r9d
pushq %rbp
movl %r15d, %ebp
movq %r13, %r15
movl 0x58(%rsp), %r13d
pushq %r13
callq 0x8a3e
popq %rax
popq %rcx
movq %r14, (%rbx)
pushq $0x38
popq %rdi
callq 0x21f0
movq %rax, %r14
movl 0x28(%rbx), %edx
incl %edx
pushq $0x1
popq %rsi
movq %rax, %rdi
movl %r15d, %ecx
movl %r12d, %r8d
movl %ebp, %r9d
movl 0x58(%rsp), %eax
pushq %rax
pushq %r13
callq 0x8a3e
popq %rax
popq %rcx
jmp 0x8cbb
andl $0x0, 0x1c(%rbx)
addl $0x3, %r15d
cvtsi2sd %r15d, %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x476f
mulsd 0x8(%rsp), %xmm0
cvttpd2dq %xmm0, %xmm0
cvtdq2pd %xmm0, %xmm0
movq %xmm0, 0x20(%rbx)
andl $0x0, 0x2c(%rbx)
jmp 0x8ce4
cmpb $0x0, 0x14(%rsp)
movl 0x50(%rsp), %r13d
je 0x8c63
callq 0x476f
movsd 0x1713(%rip), %xmm1     # 0xa2f0
xorl %r12d, %r12d
ucomisd %xmm0, %xmm1
seta %r12b
pushq $0x38
popq %rdi
callq 0x21f0
movq %rax, %r14
movl 0x28(%rbx), %edx
incl %edx
pushq $0x1
popq %r8
movq %rax, %rdi
movl %r12d, %esi
movq %r13, %rax
movq 0x8(%rsp), %r13
movl %r13d, %ecx
movl %r15d, %r9d
pushq %rbp
pushq %rax
callq 0x8a3e
popq %rax
popq %rcx
movq %r14, (%rbx)
callq 0x476f
xorl %r12d, %r12d
movsd 0x16c4(%rip), %xmm1     # 0xa2f0
ucomisd %xmm0, %xmm1
seta %r12b
pushq $0x38
popq %rdi
callq 0x21f0
movq %rax, %r14
movl 0x28(%rbx), %edx
incl %edx
pushq $0x1
popq %r8
movq %rax, %rdi
movl %r12d, %esi
movl %r13d, %ecx
movl %r15d, %r9d
pushq %rbp
movl 0x58(%rsp), %eax
pushq %rax
callq 0x8a3e
popq %rax
popq %rcx
jmp 0x8cbb
pushq $0x38
popq %rdi
callq 0x21f0
movq %rax, %r14
movl 0x28(%rbx), %edx
incl %edx
movq %rax, %rdi
xorl %esi, %esi
movq 0x8(%rsp), %r12
movl %r12d, %ecx
xorl %r8d, %r8d
movl %r15d, %r9d
pushq %rbp
pushq %r13
callq 0x8a3e
popq %rax
popq %rcx
movq %r14, (%rbx)
pushq $0x38
popq %rdi
callq 0x21f0
movq %rax, %r14
movl 0x28(%rbx), %edx
incl %edx
movq %rax, %rdi
xorl %esi, %esi
movl %r12d, %ecx
xorl %r8d, %r8d
movl %r15d, %r9d
pushq %rbp
pushq %r13
callq 0x8a3e
popq %rax
popq %rcx
movq %r14, 0x8(%rbx)
movq (%rbx), %rax
movq 0x2c(%rax), %xmm0
movq 0x2c(%r14), %xmm1
paddd %xmm0, %xmm1
movq %xmm1, 0x2c(%rbx)
movl 0x34(%rax), %eax
movl 0x34(%r14), %ecx
leal (%rax,%rcx), %r14d
incl %r14d
movl %r14d, 0x34(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8d01
jmp 0x8d01
jmp 0x8d01
jmp 0x8d01
jmp 0x8d01
movq %rax, %rbx
pushq $0x38
popq %rsi
movq %r14, %rdi
callq 0x2200
movq %rbx, %rdi
callq 0x2310
nop