// File: /workspace/github_cpp_makefile_star2_O3/tsoding[P]cxx-invert-file-tree/inverter.cpp
// Function: free_file_name(std::filesystem::__cxx11::path const&)
fs::path free_file_name(const fs::path &root)
{
    std::string prefix = "_";
    int counter = 0;

    while (fs::exists(root / (prefix + std::to_string(counter)))) {
        counter++;
    }

    return root / (prefix + std::to_string(counter));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, 0x28(%rsp)
movq %rdi, 0x70(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1820(%rip), %rsi      # 0x4024
leaq 0x181a(%rip), %rdx      # 0x4025
leaq 0x30(%rsp), %rdi
callq 0x33ec
xorl %r15d, %r15d
leaq 0x50(%rsp), %r12
leaq 0x78(%rsp), %r13
leaq 0xa0(%rsp), %rbx
movl $0xd1b71759, %r14d      # imm = 0xD1B71759
movl $0x1, %ebp
cmpl $0xa, %r15d
jb 0x2878
movl $0x4, %ebp
movl %r15d, %eax
cmpl $0x63, %eax
jbe 0x2871
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x2876
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x2878
movl %eax, %ecx
imulq %r14, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebp
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x2843
addl $-0x3, %ebp
jmp 0x2878
addl $-0x2, %ebp
jmp 0x2878
decl %ebp
movl %ebp, %esi
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %r12, %rdi
movl $0x2d, %edx
callq 0x21f0
movq 0x50(%rsp), %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x326d
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21d0
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x28de
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x28e4
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r13, %rdi
leaq 0x8(%rsp), %rsi
movl $0x2, %edx
callq 0x2fba
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
movq %r13, %rdx
callq 0x2f81
movq %rbx, %rdi
callq 0x20b0
movq %rax, %rbp
movq %rbx, %rdi
callq 0x305e
movq %r13, %rdi
callq 0x305e
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2955
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x2971
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x21c0
testb %bpl, %bpl
je 0x2989
movzbl %bpl, %eax
cmpl $0xff, %eax
je 0x2989
incl %r15d
jmp 0x2830
movl $0x1, %ebx
cmpl $0xa, %r15d
leaq 0x18(%rsp), %r13
jb 0x29de
movl $0x4, %ebx
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r15d, %ecx
cmpl $0x63, %ecx
jbe 0x29d7
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x29dc
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x29de
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %ebx
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x29a6
addl $-0x3, %ebx
jmp 0x29de
addl $-0x2, %ebx
jmp 0x29de
decl %ebx
movl %ebx, %esi
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
movl $0x2d, %edx
callq 0x21f0
leaq 0x8(%rsp), %r12
movq (%r12), %rdi
movl %ebx, %esi
movl %r15d, %edx
callq 0x326d
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21d0
leaq 0x88(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
movq 0x70(%rsp), %rbx
je 0x2a4d
movq %rdx, 0x78(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x88(%rsp)
jmp 0x2a54
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x78(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xa0(%rsp), %rdi
movl $0x2, %edx
callq 0x2fba
leaq 0xa0(%rsp), %rdx
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
callq 0x2f81
leaq 0xa0(%rsp), %rdi
callq 0x305e
movq 0x78(%rsp), %rdi
cmpq %r14, %rdi
je 0x2abe
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x2ad5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x2af1
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x305e
jmp 0x2b1b
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r14, %rdi
je 0x2b3a
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0x2b3a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2bb8
movq 0x18(%rsp), %rsi
jmp 0x2bab
jmp 0x2bb5
movq %rax, %rbx
jmp 0x2b6c
movq %rax, %rbx
jmp 0x2b97
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x305e
leaq 0x78(%rsp), %rdi
callq 0x305e
jmp 0x2b7b
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x2b97
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x2bb8
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0x2bb8
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x2bd4
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2260