// File: /workspace/github_cpp_makefile_star2_O3/tsoding[P]cxx-invert-file-tree/generator.cpp
// Function: generate_tree(std::filesystem::__cxx11::path const&, unsigned long)
void generate_tree(const fs::path &root, size_t depth = 0)
{
    if (depth < DEPTH_CAPACITY) {
        int n = rand_int_range(3, 5);

        for (int i = 0; i < n; ++i) {
            const auto child_path = root / (random_fruit() + "-" + std::to_string(i));

            if (rand() % 2) {
                std::cout << "Created Folder: " << child_path << std::endl;
                fs::create_directory(child_path);
                generate_tree(child_path, depth + 1);
            } else {
                std::cout << "Created File: " << child_path << std::endl;
                std::ofstream fout(child_path);

                int words_count = rand_int_range(20, 30);
                while (words_count-- > 0) {
                    fout << random_fruit() << std::endl;
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
movq %rdi, 0x88(%rsp)
movq %rsi, 0x70(%rsp)
cmpq $0x4, %rsi
ja 0x36ed
callq 0x2070
cltq
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,2), %ecx
leaq 0x18(%rsp), %r14
incq 0x70(%rsp)
movq 0x3cb2(%rip), %rdx      # 0x6fc0
movq (%rdx), %rsi
movq %rsi, 0x80(%rsp)
movq 0x18(%rdx), %rdx
movq %rdx, 0x78(%rsp)
negl %ecx
addl %ecx, %eax
addl $0x2, %eax
movl %eax, 0x4c(%rsp)
xorl %ebp, %ebp
leaq 0xd8(%rsp), %r15
leaq 0x8(%rsp), %rbx
leaq 0x90(%rsp), %r12
movq %r12, %rdi
callq 0x3e8c
movq %r12, %rdi
leaq 0x1ccf(%rip), %rsi      # 0x5025
callq 0x2290
leaq 0x38(%rsp), %rsi
movq %rsi, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3383
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x3389
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movl $0x1, %esi
leaq 0x50(%rsp), %rdi
movl $0x2d, %edx
callq 0x2200
movq 0x50(%rsp), %rdi
movl $0x1, %esi
movl %ebp, %edx
callq 0x3c05
movq 0x28(%rsp), %rcx
movl $0xf, %edi
leaq 0x38(%rsp), %rax
cmpq %rax, %rcx
je 0x33e9
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %r8
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
jbe 0x341a
movl $0xf, %edi
leaq 0x60(%rsp), %r9
cmpq %r9, %rsi
je 0x3415
movq 0x60(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x3426
leaq 0x28(%rsp), %rdi
callq 0x2090
jmp 0x3434
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21e0
movq %r14, 0x8(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x3454
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x345b
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq %r15, %rdi
movq %rbx, %rsi
movl $0x2, %edx
callq 0x392e
leaq 0xb0(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq %r15, %rdx
callq 0x38f6
movq %r15, %rdi
callq 0x39d2
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x34bf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x34db
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x34f7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x351c
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x21c0
callq 0x2070
testb $0x1, %al
jne 0x365c
movl $0xe, %edx
movq 0x3a9b(%rip), %rdi      # 0x6fd0
leaq 0x1afc(%rip), %rsi      # 0x5038
callq 0x21f0
movq 0x3a88(%rip), %rdi      # 0x6fd0
leaq 0xb0(%rsp), %rsi
callq 0x3a0a
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq 0xb0(%rsp), %rsi
movq %r15, %rdi
movl $0x10, %edx
callq 0x21d0
callq 0x2070
cltq
imulq $0x2e8ba2e9, %rax, %rcx # imm = 0x2E8BA2E9
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x21, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,4), %edx
leal (%rcx,%rdx,2), %ecx
negl %ecx
leal (%rax,%rcx), %r12d
addl $0x14, %r12d
movq %rbx, %rdi
callq 0x3e8c
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0x21f0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x361a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
decl %r12d
jg 0x35bf
movq 0x80(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq -0x18(%rax), %rax
movq 0x78(%rsp), %rcx
movq %rcx, 0xd8(%rsp,%rax)
leaq 0xe0(%rsp), %rdi
callq 0x2160
leaq 0x1d0(%rsp), %rdi
callq 0x20a0
jmp 0x36d1
movl $0x10, %edx
movq 0x3968(%rip), %rdi      # 0x6fd0
leaq 0x19b8(%rip), %rsi      # 0x5027
callq 0x21f0
movq 0x3955(%rip), %rdi      # 0x6fd0
leaq 0xb0(%rsp), %rsi
callq 0x3a0a
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
leaq 0xb0(%rsp), %rdi
callq 0x20d0
leaq 0xb0(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0x32b7
leaq 0xb0(%rsp), %rdi
callq 0x39d2
leal 0x1(%rbp), %eax
cmpl 0x4c(%rsp), %ebp
movl %eax, %ebp
jne 0x333c
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x379e
movq %rax, %rbx
jmp 0x3777
movq %rax, %rbx
jmp 0x375b
movq %rax, %rbx
jmp 0x373f
movq %rax, %rbx
jmp 0x3728
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x39d2
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x373f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x375b
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3777
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x37dc
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0x37dc
movq %rax, %rbx
jmp 0x37cf
movq %rax, %rbx
jmp 0x37c2
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x37c2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
leaq 0xd8(%rsp), %rdi
callq 0x2230
leaq 0xb0(%rsp), %rdi
callq 0x39d2
movq %rbx, %rdi
callq 0x2270