// File: /workspace/github_cpp_makefile_star2_O3/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 $0x68, %rsp
movl %edi, -0x4c(%rbp)
movl $0x38, %edi
callq 0x2200
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x4c53(%rip), %rdx      # 0x71df
leaq -0x48(%rbp), %rdi
movq %rdx, %rsi
callq 0x3af4
leaq -0x48(%rbp), %rsi
pxor %xmm0, %xmm0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x3e48
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x25c3
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x90(%rbp), %rdx
movq %rbx, (%rdx)
pxor %xmm0, %xmm0
leaq -0x70(%rbp), %rdi
movdqa %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
xorl %esi, %esi
callq 0x3b8a
movq -0x68(%rbp), %rax
movslq -0x4c(%rbp), %rcx
subq -0x70(%rbp), %rax
sarq $0x3, %rax
movq %rcx, -0x78(%rbp)
cmpq %rcx, %rax
jae 0x274f
leaq 0x4bd3(%rip), %r14      # 0x71df
leaq -0x48(%rbp), %r15
movl $0x38, %edi
callq 0x2200
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %r15, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x3af4
pxor %xmm0, %xmm0
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3e48
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x265d
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movl $0x38, %edi
callq 0x2200
movq %rax, %r12
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %r15, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x3af4
pxor %xmm0, %xmm0
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3e48
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x26aa
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movq %r12, -0x80(%rbp)
movl $0x10, %edi
callq 0x2200
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3e1c
movl $0x10, %edi
callq 0x2200
movq %rax, %r13
movq -0x80(%rbp), %rsi
movq %rax, %rdi
callq 0x3e1c
movq %r13, 0x8(%r12)
callq 0x2090
cltq
movq -0x70(%rbp), %rcx
movq -0x68(%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 -0x68(%rbp), %rsi
cmpq -0x60(%rbp), %rsi
je 0x272c
movq -0x80(%rbp), %rax
movq %rax, (%rsi)
movq -0x68(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x68(%rbp)
jmp 0x273d
leaq -0x70(%rbp), %rdi
leaq -0x80(%rbp), %rdx
callq 0x3b8a
movq -0x68(%rbp), %rax
subq -0x70(%rbp), %rax
sarq $0x3, %rax
cmpq -0x78(%rbp), %rax
jb 0x2610
movq %rsp, -0x88(%rbp)
movl -0x4c(%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 0x28c5
movq -0x78(%rbp), %rax
shlq $0x2, %rax
movq %rax, %r14
addq $-0x4, %rax
movq %rax, %xmm0
shrq $0x2, %rax
addq $0x4, %rax
andq $-0x4, %rax
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
psrlq $0x2, %xmm0
xorl %ecx, %ecx
movdqa 0x4864(%rip), %xmm1     # 0x7010
movdqa 0x486c(%rip), %xmm2     # 0x7020
movdqa 0x4874(%rip), %xmm3     # 0x7030
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rcx, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %edx
notl %edx
testb $0x1, %dl
je 0x280d
leal 0x1(%rcx), %edx
movl %edx, (%r15,%rcx,4)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x2823
leal 0x2(%rcx), %edx
movl %edx, 0x4(%r15,%rcx,4)
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %edx
testb $0x1, %dl
je 0x285f
leal 0x3(%rcx), %edx
movl %edx, 0x8(%r15,%rcx,4)
pextrw $0x4, %xmm5, %edx
testb $0x1, %dl
je 0x2871
leal 0x4(%rcx), %edx
movl %edx, 0xc(%r15,%rcx,4)
addq $0x4, %rcx
cmpq %rcx, %rax
jne 0x27c4
cmpl $0x1, -0x4c(%rbp)
je 0x28c5
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 0x28bc
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 0x2889
movq %r15, -0x78(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x70(%rbp), %rax
je 0x29a1
xorl %r13d, %r13d
leaq -0x48(%rbp), %r12
movl $0xd1b71759, %r15d      # imm = 0xD1B71759
movq -0x78(%rbp), %rax
movl (%rax,%r13,4), %r14d
movl $0x1, %eax
cmpl $0xa, %r14d
jb 0x2937
movl $0x4, %eax
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x2930
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x2935
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x2937
movl %ecx, %edx
imulq %r15, %rdx
shrq $0x2d, %rdx
addl $0x4, %eax
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x28ff
addl $-0x3, %eax
jmp 0x2937
addl $-0x2, %eax
jmp 0x2937
decl %eax
movl %eax, %esi
leaq -0x38(%rbp), %rbx
movq %rbx, -0x48(%rbp)
movq %r12, %rdi
xorl %edx, %edx
callq 0x2260
movq -0x48(%rbp), %rdi
movl -0x40(%rbp), %esi
movl %r14d, %edx
callq 0x3a86
movq -0x70(%rbp), %rax
movq (%rax,%r13,8), %rdi
addq $0x8, %rdi
movq %r12, %r14
movq %r12, %rsi
callq 0x2270
movq -0x48(%rbp), %rdi
cmpq %rbx, %rdi
je 0x2986
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
incq %r13
movq -0x68(%rbp), %rax
subq -0x70(%rbp), %rax
sarq $0x3, %rax
cmpq %r13, %rax
movq %r14, %r12
ja 0x28e4
movq -0x88(%rbp), %rsp
movq -0x90(%rbp), %rbx
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x29c4
movq -0x60(%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 0x2a83
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x29fc
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0x29fc
movq %rax, %r14
movl $0x38, %esi
movq %rbx, %rdi
jmp 0x2a96
jmp 0x2a83
jmp 0x2a83
movq %rax, %r14
jmp 0x2a2e
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x2a2e
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movl $0x38, %esi
movq %rbx, %rdi
jmp 0x2a7a
jmp 0x2a83
movq %rax, %r14
jmp 0x2a5b
movq %rax, %r14
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x2a5b
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movl $0x38, %esi
jmp 0x2a6a
movq %rax, %r14
movl $0x10, %esi
movq %r12, %rdi
jmp 0x2a7a
movq %rax, %r14
movl $0x10, %esi
movq %r13, %rdi
callq 0x2210
jmp 0x2a86
jmp 0x2a83
movq %rax, %r14
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x2a9b
movq -0x60(%rbp), %rsi
subq %rdi, %rsi
callq 0x2210
movq %r14, %rdi
callq 0x2370