// File: /workspace/github_cpp_makefile_star2_O1/canzarlab[P]Trajan/src/generator.cpp
// Function: yule(int)
newick_node* yule(int n)
{
    newick_node* root = new newick_node;
    vector<newick_node*> L;
    L.push_back(root);
    while (L.size() < n)
    {
        newick_node* leaf1 = new newick_node;
        newick_node* leaf2 = new newick_node;
        newick_child* child = new newick_child(leaf1);
        child->next = new newick_child(leaf2);
        int i = rand() % L.size();
        L[i]->child = child;
        L[i] = leaf1;
        L.push_back(leaf2);
    }

    unsigned random[n];
    iota(random, random + n, 1);
    random_shuffle(random, random + n);
    for (int i = 0; i < L.size(); ++i)
        L[i]->taxon = to_string(random[i]);

    return root;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %edi, -0x68(%rbp)
movl $0x38, %edi
callq 0x2200
movq %rax, %rbx
leaq -0x50(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x3c23(%rip), %rdx      # 0x61af
leaq -0x60(%rbp), %rdi
movq %rdx, %rsi
callq 0x3902
leaq -0x60(%rbp), %rsi
xorps %xmm0, %xmm0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3c52
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0x25be
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2210
movq %rbx, -0x78(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x38(%rbp), %rsi
testq %rsi, %rsi
je 0x25e4
movq %rbx, (%rsi)
addq $0x8, -0x38(%rbp)
jmp 0x25f1
leaq -0x40(%rbp), %rdi
leaq -0x78(%rbp), %rdx
callq 0x3992
movslq -0x68(%rbp), %r14
movq -0x38(%rbp), %rax
subq -0x40(%rbp), %rax
sarq $0x3, %rax
cmpq %r14, %rax
jae 0x274b
leaq -0x60(%rbp), %r15
movl $0x38, %edi
callq 0x2200
movq %rax, %rbx
leaq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq %r15, %rdi
leaq 0x3b82(%rip), %rdx      # 0x61af
movq %rdx, %rsi
callq 0x3902
xorps %xmm0, %xmm0
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3c52
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x265e
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2210
movl $0x38, %edi
callq 0x2200
movq %rax, %r12
leaq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq %r15, %rdi
leaq 0x3b32(%rip), %rdx      # 0x61af
movq %rdx, %rsi
callq 0x3902
xorps %xmm0, %xmm0
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3c52
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x26ae
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2210
movq %r12, -0x70(%rbp)
movl $0x10, %edi
callq 0x2200
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3c24
movl $0x10, %edi
callq 0x2200
movq %rax, %r13
movq -0x70(%rbp), %rsi
movq %rax, %rdi
callq 0x3c24
movq %r13, 0x8(%r12)
callq 0x2090
cltq
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rsi
subq %rcx, %rsi
sarq $0x3, %rsi
xorl %edx, %edx
divq %rsi
movslq %edx, %rax
movq (%rcx,%rax,8), %rdx
movq %r12, (%rdx)
movq %rbx, (%rcx,%rax,8)
movq -0x38(%rbp), %rsi
cmpq -0x30(%rbp), %rsi
je 0x2729
movq -0x70(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, -0x38(%rbp)
jmp 0x2736
leaq -0x40(%rbp), %rdi
leaq -0x70(%rbp), %rdx
callq 0x3992
movq -0x38(%rbp), %rax
subq -0x40(%rbp), %rax
sarq $0x3, %rax
cmpq %r14, %rax
jb 0x260e
movq %rsp, -0x80(%rbp)
movl -0x68(%rbp), %ecx
movl %ecx, %eax
movq %rsp, %r15
leaq 0xf(,%rax,4), %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
testl %ecx, %ecx
je 0x27ce
shlq $0x2, %r14
movl $0x1, %eax
xorl %ecx, %ecx
movl %eax, (%r15,%rcx)
incl %eax
addq $0x4, %rcx
cmpq %rcx, %r14
jne 0x2778
cmpl $0x1, -0x68(%rbp)
je 0x27ce
movl $0x4, %ebx
callq 0x2090
cltq
movq %rbx, %rcx
sarq $0x2, %rcx
incq %rcx
cqto
idivq %rcx
leaq (,%rdx,4), %rax
cmpq %rax, %rbx
je 0x27c5
leaq (%r15,%rbx), %rax
leaq (%r15,%rdx,4), %rcx
movl (%rax), %edx
movl (%rcx), %esi
movl %esi, (%rax)
movl %edx, (%rcx)
addq $0x4, %rbx
cmpq %rbx, %r14
jne 0x2792
movq %r15, -0x68(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0x28aa
xorl %r13d, %r13d
leaq -0x60(%rbp), %r12
movl $0xd1b71759, %r15d      # imm = 0xD1B71759
movq -0x68(%rbp), %rax
movl (%rax,%r13,4), %r14d
movl $0x1, %eax
cmpl $0xa, %r14d
jb 0x2840
movl $0x4, %eax
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x2839
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x283e
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x2840
movl %ecx, %edx
imulq %r15, %rdx
shrq $0x2d, %rdx
addl $0x4, %eax
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x2808
addl $-0x3, %eax
jmp 0x2840
addl $-0x2, %eax
jmp 0x2840
decl %eax
movl %eax, %esi
leaq -0x50(%rbp), %rbx
movq %rbx, -0x60(%rbp)
movq %r12, %rdi
xorl %edx, %edx
callq 0x2260
movq -0x60(%rbp), %rdi
movl -0x58(%rbp), %esi
movl %r14d, %edx
callq 0x3895
movq -0x40(%rbp), %rax
movq (%rax,%r13,8), %rdi
addq $0x8, %rdi
movq %r12, %r14
movq %r12, %rsi
callq 0x2270
movq -0x60(%rbp), %rdi
cmpq %rbx, %rdi
je 0x288f
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2210
incq %r13
movq -0x38(%rbp), %rax
subq -0x40(%rbp), %rax
sarq $0x3, %rax
cmpq %r13, %rax
movq %r14, %r12
ja 0x27ed
movq -0x80(%rbp), %rsp
movq -0x78(%rbp), %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x28c7
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x2210
movq %rbx, %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2985
movq %r14, %rcx
movq %rax, %r14
movq -0x60(%rbp), %rdi
cmpq %rcx, %rdi
je 0x28fe
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0x28fe
movq %rax, %r14
movl $0x38, %esi
movq %rbx, %rdi
jmp 0x2998
jmp 0x2985
jmp 0x2985
movq %rax, %r14
jmp 0x2930
movq %rax, %r14
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x2930
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2210
movl $0x38, %esi
movq %rbx, %rdi
jmp 0x297c
jmp 0x2985
movq %rax, %r14
jmp 0x295d
movq %rax, %r14
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x295d
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2210
movl $0x38, %esi
jmp 0x296c
movq %rax, %r14
movl $0x10, %esi
movq %r12, %rdi
jmp 0x297c
movq %rax, %r14
movl $0x10, %esi
movq %r13, %rdi
callq 0x2210
jmp 0x2988
jmp 0x2985
movq %rax, %r14
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x299d
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x2210
movq %r14, %rdi
callq 0x2370