// File: eschwabe[P]interview-practice/src/stringpermutations.cpp
// Function: main
int main()
{
    perm("hat", 0);
    perm("tire", 0);
    perm("sweat", 0);

    vector<string> results = GenerateStrings("abcd", "");
    for(auto s : results) {
        cout << s << endl;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movl $0x0, -0x4(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x2240
movq -0x138(%rbp), %rdx
leaq 0x2774(%rip), %rsi      # 0x5004
leaq -0x28(%rbp), %rdi
callq 0x2e60
jmp 0x289b
xorl %eax, %eax
movl %eax, %esi
leaq -0x28(%rbp), %rdi
callq 0x23d0
jmp 0x28aa
leaq -0x28(%rbp), %rdi
callq 0x20d0
leaq -0x29(%rbp), %rdi
callq 0x21b0
leaq -0x61(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x2240
movq -0x140(%rbp), %rdx
leaq 0x272e(%rip), %rsi      # 0x5008
leaq -0x60(%rbp), %rdi
callq 0x2e60
jmp 0x28e5
xorl %eax, %eax
movl %eax, %esi
leaq -0x60(%rbp), %rdi
callq 0x23d0
jmp 0x28f4
leaq -0x60(%rbp), %rdi
callq 0x20d0
leaq -0x61(%rbp), %rdi
callq 0x21b0
leaq -0x89(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x2240
movq -0x148(%rbp), %rdx
leaq 0x26e6(%rip), %rsi      # 0x500d
leaq -0x88(%rbp), %rdi
callq 0x2e60
jmp 0x2935
xorl %eax, %eax
movl %eax, %esi
leaq -0x88(%rbp), %rdi
callq 0x23d0
jmp 0x2947
leaq -0x88(%rbp), %rdi
callq 0x20d0
leaq -0x89(%rbp), %rdi
callq 0x21b0
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0x2240
movq -0x150(%rbp), %rdx
leaq 0x2693(%rip), %rsi      # 0x5013
leaq -0xc8(%rbp), %rdi
callq 0x2e60
jmp 0x298e
leaq -0xf1(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0x2240
movq -0x158(%rbp), %rdx
leaq 0x2668(%rip), %rsi      # 0x5017
leaq -0xf0(%rbp), %rdi
callq 0x2e60
jmp 0x29bd
leaq -0xa8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
callq 0x2580
jmp 0x29d9
leaq -0xf0(%rbp), %rdi
callq 0x20d0
leaq -0xf1(%rbp), %rdi
callq 0x21b0
leaq -0xc8(%rbp), %rdi
callq 0x20d0
leaq -0xc9(%rbp), %rdi
callq 0x21b0
leaq -0xa8(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rdi
callq 0x2dd0
movq %rax, -0x108(%rbp)
movq -0x100(%rbp), %rdi
callq 0x2d60
movq %rax, -0x110(%rbp)
leaq -0x108(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x2f10
testb $0x1, %al
jne 0x2a59
jmp 0x2bdf
leaq -0x108(%rbp), %rdi
callq 0x2f50
movq %rax, %rsi
leaq -0x130(%rbp), %rdi
callq 0x2090
jmp 0x2a76
movq 0x555b(%rip), %rdi      # 0x7fd8
leaq -0x130(%rbp), %rsi
callq 0x2160
movq %rax, -0x160(%rbp)
jmp 0x2a92
movq -0x160(%rbp), %rdi
movq 0x5528(%rip), %rsi      # 0x7fc8
callq 0x2190
jmp 0x2aa7
leaq -0x130(%rbp), %rdi
callq 0x20d0
leaq -0x108(%rbp), %rdi
callq 0x2f70
jmp 0x2a3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x2ae7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x20d0
leaq -0x29(%rbp), %rdi
callq 0x21b0
jmp 0x2c0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x2b18
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x20d0
leaq -0x61(%rbp), %rdi
callq 0x21b0
jmp 0x2c0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x2b4c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x20d0
leaq -0x89(%rbp), %rdi
callq 0x21b0
jmp 0x2c0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x2ba9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x2b91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x20d0
leaq -0xf1(%rbp), %rdi
callq 0x21b0
leaq -0xc8(%rbp), %rdi
callq 0x20d0
leaq -0xc9(%rbp), %rdi
callq 0x21b0
jmp 0x2c0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x2bfe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x20d0
jmp 0x2bfe
movl $0x0, -0x4(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x2e00
movl -0x4(%rbp), %eax
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
leaq -0xa8(%rbp), %rdi
callq 0x2e00
movq -0x38(%rbp), %rdi
callq 0x2230
nopw %cs:(%rax,%rax)
nopl (%rax)