// File: /workspace/github_cpp_makefile_star2_O3/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 0x26c26(%rip), %rdx     # 0x55188
movq %rdi, 0x28(%rsp)
movq %rdx, %rsi
callq 0x42cf8
movq 0x3d5e2(%rip), %rax     # 0x6bb58
movq 0x3d5e3(%rip), %rcx     # 0x6bb60
movq %rax, (%rsp)
movq %rcx, 0xb8(%rsp)
cmpq %rcx, %rax
je 0x2e852
movl $0x3b9aca00, 0xc(%rsp)  # imm = 0x3B9ACA00
leaq 0xa0(%rsp), %r14
leaq 0x50(%rsp), %rdi
leaq 0x70(%rsp), %rbp
leaq 0x90(%rsp), %rbx
leaq 0x28041(%rip), %r13     # 0x565fc
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x26bab(%rip), %rdx     # 0x55188
movq %rdx, %rsi
callq 0x42cf8
movq (%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0xc8(%rsp)
testq %rax, %rax
je 0x2e663
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 0x2e649
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %r12
movq %r12, %rsi
callq 0x365de
movq 0x58(%rsp), %rdx
movq %r12, %rdi
xorl %esi, %esi
leaq 0x26b49(%rip), %rcx     # 0x55188
xorl %r8d, %r8d
callq 0x27750
jmp 0x2e656
movsbl %al, %esi
leaq 0x50(%rsp), %rdi
callq 0x273c0
incq %r15
cmpq %r15, 0xc8(%rsp)
jne 0x2e60c
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x365de
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x70(%rsp)
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
shrq $0x5, %rdx
testl %edx, %edx
jle 0x2e6ed
xorl %edx, %edx
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x2e6be
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x2e6d5
leaq 0x10(%rsp), %rdi
movq %rbp, %rdx
callq 0x52d7a
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
movl 0x70(%rsp), %edx
incl %edx
movl %edx, 0x70(%rsp)
movq %rcx, %rsi
subq %rax, %rsi
shrq $0x5, %rsi
cmpl %esi, %edx
jl 0x2e6a5
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
movq %rbp, %rdi
leaq 0x26a84(%rip), %rdx     # 0x55188
movq %rdx, %rsi
callq 0x42cf8
movq 0x10(%rsp), %r15
movq 0x18(%rsp), %r12
cmpq %r12, %r15
je 0x2e789
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 0x47420
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 0x2e783
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x27480
addq $0x4, %r15
jmp 0x2e716
movq %rbp, %rdi
callq 0x27590
movq 0xd0(%rsp), %rdi
movq %rbp, %rsi
callq 0x2e321
movl %eax, %r15d
cmpl 0xc(%rsp), %eax
jge 0x2e7bd
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 0x2e7df
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x52e99
testb %al, %al
jne 0x2e6ed
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2e80d
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x27480
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x2e829
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x27480
leaq 0x30(%rsp), %rdi
callq 0x36100
movq (%rsp), %rax
addq $0x20, %rax
movq %rax, (%rsp)
cmpq 0xb8(%rsp), %rax
leaq 0x50(%rsp), %rdi
jne 0x2e5bb
movq 0x28(%rsp), %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2e875
movq %rax, %rbx
jmp 0x2e8ff
jmp 0x2e87c
movq %rax, %rbx
jmp 0x2e8e3
jmp 0x2e87c
movq %rax, %rbx
jmp 0x2e8cc
jmp 0x2e885
jmp 0x2e88a
movq %rax, %rbx
jmp 0x2e8aa
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x2e8aa
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x2e8cc
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2e8e3
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x27480
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x2e8ff
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x27480
leaq 0x30(%rsp), %rdi
callq 0x36100
movq 0x28(%rsp), %rax
movq (%rax), %rdi
movq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x2e929
movq (%rax), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x27830