// File: canzarlab[P]Trajan/src/generator.cpp
// Function: main
int main(int argc, char** argv)
{
    if (argc != 3)
    {
        cout << "usage: " << argv[0] << " <n-leaves> <n-trees>\n";
        return 1;
    }
    srand(unsigned(time(0)));
    int n_leaves = stoi(argv[1]);
    int n_trees = stoi(argv[2]);
    for (int i = 0; i < n_trees; ++i)
    {
        for (int j = 0; j < 2; ++j)
        {
            newick_node* root = F[j](n_leaves);
            ofstream file(string("data") + to_string(j) + string("/a") + to_string(i));
            assert(file);
            print_tree(root, file);
            file << '\n';
            delete root;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3d0, %rsp            # imm = 0x3D0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x3, -0x8(%rbp)
je 0x439c
movq 0x12c5a(%rip), %rdi     # 0x16fc0
leaq 0xac97(%rip), %rsi      # 0xf004
callq 0x3290
movq %rax, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x3290
movq %rax, %rdi
leaq 0xac81(%rip), %rsi      # 0xf00c
callq 0x3290
movl $0x1, -0x4(%rbp)
jmp 0x4859
xorl %eax, %eax
movl %eax, %edi
callq 0x3270
movl %eax, %edi
callq 0x3280
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x388(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x380(%rbp)
callq 0x3460
movq -0x388(%rbp), %rsi
movq -0x380(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x4870
jmp 0x43e4
xorl %eax, %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
movl $0xa, %edx
callq 0x4d50
movl %eax, -0x38c(%rbp)
jmp 0x43fe
leaq -0x38(%rbp), %rdi
callq 0x3190
leaq -0x39(%rbp), %rdi
callq 0x3300
movl -0x38c(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x3a0(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0x398(%rbp)
callq 0x3460
movq -0x3a0(%rbp), %rsi
movq -0x398(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x4870
jmp 0x4451
xorl %eax, %eax
movl %eax, %esi
leaq -0x70(%rbp), %rdi
movl $0xa, %edx
callq 0x4d50
movl %eax, -0x3a4(%rbp)
jmp 0x446b
leaq -0x70(%rbp), %rdi
callq 0x3190
leaq -0x71(%rbp), %rdi
callq 0x3300
movl -0x3a4(%rbp), %eax
movl %eax, -0x50(%rbp)
movl $0x0, -0x78(%rbp)
movl -0x78(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x4859
movl $0x0, -0x7c(%rbp)
cmpl $0x2, -0x7c(%rbp)
jge 0x4849
movslq -0x7c(%rbp), %rcx
leaq 0x12dcb(%rip), %rax     # 0x17280
movq (%rax,%rcx,8), %rax
movl -0x14(%rbp), %edi
callq *%rax
movq %rax, -0x88(%rbp)
leaq -0x309(%rbp), %rdi
movq %rdi, -0x3b0(%rbp)
callq 0x3460
movq -0x3b0(%rbp), %rdx
leaq 0xab3d(%rip), %rsi      # 0xf023
leaq -0x308(%rbp), %rdi
callq 0x4870
jmp 0x44f4
movl -0x7c(%rbp), %esi
leaq -0x330(%rbp), %rdi
callq 0x4e60
jmp 0x4505
leaq -0x2e8(%rbp), %rdi
leaq -0x308(%rbp), %rsi
leaq -0x330(%rbp), %rdx
callq 0x4d90
jmp 0x4521
leaq -0x351(%rbp), %rdi
movq %rdi, -0x3b8(%rbp)
callq 0x3460
movq -0x3b8(%rbp), %rdx
leaq 0xaae6(%rip), %rsi      # 0xf028
leaq -0x350(%rbp), %rdi
callq 0x4870
jmp 0x4550
leaq -0x2c8(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
leaq -0x350(%rbp), %rdx
callq 0x4d90
jmp 0x456c
movl -0x78(%rbp), %esi
leaq -0x378(%rbp), %rdi
callq 0x4e60
jmp 0x457d
leaq -0x2a8(%rbp), %rdi
leaq -0x2c8(%rbp), %rsi
leaq -0x378(%rbp), %rdx
callq 0x4d90
jmp 0x4599
leaq -0x288(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
movl $0x10, %edx
callq 0x3490
jmp 0x45b3
leaq -0x2a8(%rbp), %rdi
callq 0x3190
leaq -0x378(%rbp), %rdi
callq 0x3190
leaq -0x2c8(%rbp), %rdi
callq 0x3190
leaq -0x350(%rbp), %rdi
callq 0x3190
leaq -0x351(%rbp), %rdi
callq 0x3300
leaq -0x2e8(%rbp), %rdi
callq 0x3190
leaq -0x330(%rbp), %rdi
callq 0x3190
leaq -0x308(%rbp), %rdi
callq 0x3190
leaq -0x309(%rbp), %rdi
callq 0x3300
movq -0x288(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x288(%rbp,%rax), %rdi
callq 0x3370
movb %al, -0x3b9(%rbp)
jmp 0x463f
movb -0x3b9(%rbp), %al
testb $0x1, %al
jne 0x464b
jmp 0x4650
jmp 0x47d6
leaq 0xa9d4(%rip), %rdi      # 0xf02b
leaq 0xa9d2(%rip), %rsi      # 0xf030
movl $0x5c, %edx
leaq 0xa9d8(%rip), %rcx      # 0xf042
callq 0x31b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4692
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3190
leaq -0x39(%rbp), %rdi
callq 0x3300
jmp 0x4865
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x46c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x3190
leaq -0x71(%rbp), %rdi
callq 0x3300
jmp 0x4865
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x47a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x479c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4790
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4778
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x476c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4760
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4754
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x3190
leaq -0x378(%rbp), %rdi
callq 0x3190
leaq -0x2c8(%rbp), %rdi
callq 0x3190
leaq -0x350(%rbp), %rdi
callq 0x3190
leaq -0x351(%rbp), %rdi
callq 0x3300
leaq -0x2e8(%rbp), %rdi
callq 0x3190
leaq -0x330(%rbp), %rdi
callq 0x3190
leaq -0x308(%rbp), %rdi
callq 0x3190
leaq -0x309(%rbp), %rdi
callq 0x3300
jmp 0x4865
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x288(%rbp), %rdi
callq 0x33e0
jmp 0x4865
movq -0x88(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0x7ad0
jmp 0x47eb
leaq -0x288(%rbp), %rdi
movl $0xa, %esi
callq 0x3340
jmp 0x47fe
movq -0x88(%rbp), %rax
movq %rax, -0x3c8(%rbp)
cmpq $0x0, %rax
je 0x482f
movq -0x3c8(%rbp), %rdi
callq 0x6c50
movq -0x3c8(%rbp), %rdi
movl $0x38, %esi
callq 0x32b0
leaq -0x288(%rbp), %rdi
callq 0x33e0
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x44a0
jmp 0x484b
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x448d
movl -0x4(%rbp), %eax
addq $0x3d0, %rsp            # imm = 0x3D0
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3450
nop