// File: /workspace/github_cpp_makefile_star2_O1/establishment[P]sandman/src/bin.cpp
// Function: ClosestOption(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string ClosestOption(const string& wrong_option) {
    int mn_distance = 1e9;
    string result = "";

    for (const string& option : all_options) {
        vector<string> small_words;
        string current_word = "";
        for (char itr : option) {
            if (itr == '-') {
                small_words.push_back(current_word);
                current_word = "";
            } else {
                current_word += itr;
            }
        }

        small_words.push_back(current_word);
        vector<int> perm;
        for (int i = 0; i < (int)small_words.size(); i += 1) {
            perm.push_back(i);
        }

        do {
            string new_option = "";
            for (auto itr : perm) {
                new_option += small_words[itr] + "-";
            }
            new_option.pop_back();
            auto current_distance = LevenshteinDistance(wrong_option, new_option);
            if (current_distance < mn_distance) {
                mn_distance = current_distance;
                result = option;
            }
        } while (next_permutation(perm.begin(), perm.end()));
    }

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, 0xd0(%rsp)
leaq 0x10(%rdi), %rax
movq %rax, 0xb0(%rsp)
movq %rax, (%rdi)
leaq 0x26af4(%rip), %rdx     # 0x55188
movq %rdi, 0x28(%rsp)
movq %rdx, %rsi
callq 0x43424
movq 0x3d4b0(%rip), %rax     # 0x6bb58
movq 0x3d4b1(%rip), %rcx     # 0x6bb60
movq %rax, (%rsp)
movq %rcx, 0xb8(%rsp)
cmpq %rcx, %rax
je 0x2e978
movl $0x3b9aca00, 0xc(%rsp)  # imm = 0x3B9ACA00
leaq 0xa0(%rsp), %r14
leaq 0x50(%rsp), %rdi
leaq 0x70(%rsp), %rbp
leaq 0x90(%rsp), %rbx
leaq 0x27f0f(%rip), %r13     # 0x565fc
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x26a79(%rip), %rdx     # 0x55188
movq %rdx, %rsi
callq 0x43424
movq (%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0xc8(%rsp)
testq %rax, %rax
je 0x2e795
movq (%rsp), %rax
movq (%rax), %rax
movq %rax, 0xc0(%rsp)
xorl %r15d, %r15d
movq 0xc0(%rsp), %rax
movb (%rax,%r15), %al
cmpb $0x2d, %al
jne 0x2e77b
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %r12
movq %r12, %rsi
callq 0x368ac
movq 0x58(%rsp), %rdx
movq %r12, %rdi
xorl %esi, %esi
leaq 0x26a17(%rip), %rcx     # 0x55188
xorl %r8d, %r8d
callq 0x27750
jmp 0x2e788
movsbl %al, %esi
leaq 0x50(%rsp), %rdi
callq 0x273c0
incq %r15
cmpq %r15, 0xc8(%rsp)
jne 0x2e73e
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x368ac
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x70(%rsp)
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
shrq $0x5, %rax
testl %eax, %eax
jle 0x2e813
xorl %eax, %eax
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x2e7ea
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x2e7f7
leaq 0x10(%rsp), %rdi
movq %rbp, %rdx
callq 0x5334a
movl 0x70(%rsp), %eax
incl %eax
movl %eax, 0x70(%rsp)
movq 0x38(%rsp), %rcx
subq 0x30(%rsp), %rcx
shrq $0x5, %rcx
cmpl %ecx, %eax
jl 0x2e7d1
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
movq %rbp, %rdi
leaq 0x2695e(%rip), %rdx     # 0x55188
movq %rdx, %rsi
callq 0x43424
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %r12
cmpq %r12, %r15
je 0x2e8af
movslq (%r15), %rax
movq 0x30(%rsp), %rcx
shlq $0x5, %rax
movq %r14, 0x90(%rsp)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x47a78
movq %rbx, %rdi
movq %r13, %rsi
callq 0x27910
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq %rbp, %rdi
callq 0x27120
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x2e8a9
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x27480
addq $0x4, %r15
jmp 0x2e83c
movq %rbp, %rdi
callq 0x27590
movq 0xd0(%rsp), %rdi
movq %rbp, %rsi
callq 0x2e416
movl %eax, %r15d
cmpl 0xc(%rsp), %eax
jge 0x2e8e3
movq 0x28(%rsp), %rdi
movq (%rsp), %rsi
callq 0x27260
movl %r15d, 0xc(%rsp)
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x2e905
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x53469
testb %al, %al
jne 0x2e813
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2e933
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x27480
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x2e94f
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x27480
leaq 0x30(%rsp), %rdi
callq 0x363d0
movq (%rsp), %rax
addq $0x20, %rax
movq %rax, (%rsp)
cmpq 0xb8(%rsp), %rax
leaq 0x50(%rsp), %rdi
jne 0x2e6ed
movq 0x28(%rsp), %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2e99b
movq %rax, %rbx
jmp 0x2ea25
jmp 0x2e9a2
movq %rax, %rbx
jmp 0x2ea09
jmp 0x2e9a2
movq %rax, %rbx
jmp 0x2e9f2
jmp 0x2e9ab
jmp 0x2e9b0
movq %rax, %rbx
jmp 0x2e9d0
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x2e9d0
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x2e9f2
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2ea09
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x27480
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x2ea25
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x27480
leaq 0x30(%rsp), %rdi
callq 0x363d0
movq 0x28(%rsp), %rax
movq (%rax), %rdi
movq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x2ea4f
movq (%rax), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x27830