// File: /workspace/github_cpp_makefile_star2_O1/eschwabe[P]interview-practice/src/stringpermutations.cpp
// Function: GenerateStrings(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
vector<string> GenerateStrings(string source, string target) {
    vector<string> results;
    if(source.size() == 0) {
        results.push_back(target);
    }
    for(size_t i = 0; i < source.size(); ++i) {
        string new_source(source);
        string new_target(target);
        new_source.erase(i, 1);
        new_target.push_back(source.at(i));
        vector<string> tmp_results = GenerateStrings(new_source, new_target);
        results.insert(results.end(), tmp_results.begin(), tmp_results.end());
    }
    return results;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
cmpq $0x0, 0x8(%rsi)
jne 0x24d8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2a0e
movq 0x8(%r15), %rdx
testq %rdx, %rdx
je 0x264b
xorl %r12d, %r12d
leaq 0x60(%rsp), %rbp
leaq 0x80(%rsp), %r13
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq (%r15), %rsi
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x2ab2
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x2ab2
movl $0x1, %edx
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x2040
movq 0x8(%r15), %rdx
cmpq %r12, %rdx
jbe 0x2660
movq (%r15), %rax
movsbl (%rax,%r12), %esi
movq %rsp, %rdi
callq 0x20e0
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x40(%rsp), %rdi
callq 0x2ab2
leaq 0x70(%rsp), %rax
movq %rax, 0x60(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0x2ab2
movq %r13, %rdi
leaq 0x40(%rsp), %rsi
movq %rbp, %rdx
callq 0x249e
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x25c4
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2120
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x25e0
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2120
movq 0x8(%rbx), %rsi
movq 0x80(%rsp), %rdx
movq 0x88(%rsp), %rcx
movq %rbx, %rdi
callq 0x2dc6
movq %r13, %rdi
callq 0x2a4c
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x261f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2120
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x263b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2120
incq %r12
movq 0x8(%r15), %rdx
cmpq %rdx, %r12
jb 0x24f5
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x19f5(%rip), %rdi      # 0x405c
movq %r12, %rsi
xorl %eax, %eax
callq 0x2160
jmp 0x2673
movq %rax, %r14
jmp 0x2712
movq %rax, %r14
jmp 0x26f6
jmp 0x26d8
jmp 0x26d8
movq %rax, %r14
jmp 0x26a8
movq %rax, %r14
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x26a8
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2120
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x26db
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2120
jmp 0x26db
movq %rax, %r14
leaq 0x80(%rsp), %rdi
callq 0x2a4c
jmp 0x26db
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x26f6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2120
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2712
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2120
movq %rbx, %rdi
callq 0x2a4c
movq %r14, %rdi
callq 0x2190