// File: 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:
subq $0x198, %rsp            # imm = 0x198
movq %rdi, 0x40(%rsp)
movq %rdi, %rax
movq %rax, 0x38(%rsp)
movq %rdi, 0x190(%rsp)
movq %rsi, 0x188(%rsp)
movl $0x3b9aca00, 0x184(%rsp) # imm = 0x3B9ACA00
movb $0x0, 0x183(%rsp)
leaq 0x182(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x8ca50
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rdx
leaq 0x5e022(%rip), %rsi     # 0xf51ac
callq 0xa0a90
jmp 0x97191
leaq 0x182(%rsp), %rdi
callq 0x8c630
leaq 0x88af3(%rip), %rax     # 0x11fc98
movq %rax, 0x168(%rsp)
leaq 0x88ae4(%rip), %rdi     # 0x11fc98
callq 0xa2740
movq %rax, 0x160(%rsp)
leaq 0x88ad0(%rip), %rdi     # 0x11fc98
callq 0xa2770
movq %rax, 0x158(%rsp)
leaq 0x160(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0xa27a0
testb $0x1, %al
jne 0x971f3
jmp 0x976ba
leaq 0x160(%rsp), %rdi
callq 0xa27e0
movq %rax, 0x150(%rsp)
leaq 0x138(%rsp), %rdi
callq 0xa2570
leaq 0x117(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x8ca50
movq 0x30(%rsp), %rdx
leaq 0x5df79(%rip), %rsi     # 0xf51ac
leaq 0x118(%rsp), %rdi
callq 0xa0a90
jmp 0x97242
leaq 0x117(%rsp), %rdi
callq 0x8c630
movq 0x150(%rsp), %rax
movq %rax, 0x108(%rsp)
movq 0x108(%rsp), %rdi
callq 0x8c560
movq %rax, 0x100(%rsp)
movq 0x108(%rsp), %rdi
callq 0x8cb00
movq %rax, 0xf8(%rsp)
leaq 0x100(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
callq 0xa0a20
testb $0x1, %al
jne 0x972a7
jmp 0x9738f
leaq 0x100(%rsp), %rdi
callq 0xa0a60
movb (%rax), %al
movb %al, 0xf7(%rsp)
movsbl 0xf7(%rsp), %eax
cmpl $0x2d, %eax
jne 0x97362
leaq 0x138(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0xa2580
jmp 0x972e5
leaq 0x5dec0(%rip), %rsi     # 0xf51ac
leaq 0x118(%rsp), %rdi
callq 0x8c810
jmp 0x972fb
jmp 0x9737b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x178(%rsp)
movl %eax, 0x174(%rsp)
leaq 0x182(%rsp), %rdi
callq 0x8c630
jmp 0x976e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x178(%rsp)
movl %eax, 0x174(%rsp)
leaq 0x117(%rsp), %rdi
callq 0x8c630
jmp 0x976a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x178(%rsp)
movl %eax, 0x174(%rsp)
jmp 0x97694
movsbl 0xf7(%rsp), %esi
leaq 0x118(%rsp), %rdi
callq 0x8c390
jmp 0x97379
jmp 0x9737b
jmp 0x9737d
leaq 0x100(%rsp), %rdi
callq 0xa0a70
jmp 0x97289
leaq 0x138(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0xa2580
jmp 0x973a6
leaq 0xd8(%rsp), %rdi
callq 0xa3c80
movl $0x0, 0xd4(%rsp)
movl 0xd4(%rsp), %eax
movl %eax, 0x2c(%rsp)
leaq 0x138(%rsp), %rdi
callq 0xa25f0
movq %rax, %rcx
movl 0x2c(%rsp), %eax
cmpl %ecx, %eax
jge 0x97426
leaq 0xd8(%rsp), %rdi
leaq 0xd4(%rsp), %rsi
callq 0xa3c90
jmp 0x973f8
jmp 0x973fa
movl 0xd4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xd4(%rsp)
jmp 0x973be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x178(%rsp)
movl %eax, 0x174(%rsp)
jmp 0x97687
jmp 0x97428
leaq 0xaf(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x8ca50
movq 0x20(%rsp), %rdx
leaq 0x5dd66(%rip), %rsi     # 0xf51ac
leaq 0xb0(%rsp), %rdi
callq 0xa0a90
jmp 0x97455
leaq 0xaf(%rsp), %rdi
callq 0x8c630
leaq 0xd8(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rdi
callq 0xa3d00
movq %rax, 0x98(%rsp)
movq 0xa0(%rsp), %rdi
callq 0xa3d30
movq %rax, 0x90(%rsp)
leaq 0x98(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0xa3d60
testb $0x1, %al
jne 0x974ba
jmp 0x9758d
leaq 0x98(%rsp), %rdi
callq 0xa3da0
movl (%rax), %eax
movl %eax, 0x8c(%rsp)
movslq 0x8c(%rsp), %rsi
leaq 0x138(%rsp), %rdi
callq 0xa3e40
movq %rax, %rsi
leaq 0x5f13e(%rip), %rdx     # 0xf662d
leaq 0x68(%rsp), %rdi
callq 0xa3db0
jmp 0x974fb
leaq 0xb0(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x8c7a0
jmp 0x9750f
leaq 0x68(%rsp), %rdi
callq 0x8cbd8
leaq 0x98(%rsp), %rdi
callq 0xa3e60
jmp 0x9749c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x178(%rsp)
movl %eax, 0x174(%rsp)
leaq 0xaf(%rsp), %rdi
callq 0x8c630
jmp 0x97687
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x178(%rsp)
movl %eax, 0x174(%rsp)
jmp 0x9767a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x178(%rsp)
movl %eax, 0x174(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x8cbd8
jmp 0x9767a
leaq 0xb0(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x8c710
movq 0x10(%rsp), %rsi
movq 0x188(%rsp), %rdi
callq 0x96cc0
movl %eax, 0x1c(%rsp)
jmp 0x975b7
movl 0x1c(%rsp), %eax
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
cmpl 0x184(%rsp), %eax
jge 0x975ed
movq 0x40(%rsp), %rdi
movl 0x64(%rsp), %eax
movl %eax, 0x184(%rsp)
movq 0x150(%rsp), %rsi
callq 0x8c060
jmp 0x975eb
jmp 0x975ed
leaq 0xb0(%rsp), %rdi
callq 0x8cbd8
leaq 0xd8(%rsp), %rdi
movq %rdi, (%rsp)
callq 0xa3d00
movq (%rsp), %rdi
movq %rax, 0x58(%rsp)
callq 0xa3d30
movq %rax, 0x50(%rsp)
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0xa3e80
movb %al, 0xf(%rsp)
jmp 0x97633
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x97428
jmp 0x97641
leaq 0xd8(%rsp), %rdi
callq 0xa3b30
leaq 0x118(%rsp), %rdi
callq 0x8cbd8
leaq 0x138(%rsp), %rdi
callq 0xa1d50
leaq 0x160(%rsp), %rdi
callq 0xa27f0
jmp 0x971d5
leaq 0xb0(%rsp), %rdi
callq 0x8cbd8
leaq 0xd8(%rsp), %rdi
callq 0xa3b30
leaq 0x118(%rsp), %rdi
callq 0x8cbd8
leaq 0x138(%rsp), %rdi
callq 0xa1d50
movq 0x40(%rsp), %rdi
callq 0x8cbd8
jmp 0x976e3
movb $0x1, 0x183(%rsp)
testb $0x1, 0x183(%rsp)
jne 0x976d6
movq 0x40(%rsp), %rdi
callq 0x8cbd8
movq 0x38(%rsp), %rax
addq $0x198, %rsp            # imm = 0x198
retq
movq 0x178(%rsp), %rdi
callq 0x8ca40