// File: /workspace/github_cpp_makefile_star2_O3/eschwabe[P]interview-practice/src/anagrams.cpp
// Function: SortAnagramList(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>*)
void SortAnagramList(vector<string>* list) {
    if(list == nullptr) {
        return;
    }
    unordered_map<string, vector<string>> table;
    for(auto s : (*list)) {
        string tmp(s);
        sort(tmp.begin(), tmp.end());
        table[tmp].push_back(s);
    }
    int index = 0;
    for(auto anagrams : table) {
        for(auto astr : anagrams.second) {
            (*list)[index++] = astr;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
testq %rdi, %rdi
je 0x2509
leaq 0xa0(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movq (%rdi), %r12
movq %rdi, 0x68(%rsp)
movq 0x8(%rdi), %r15
cmpq %r15, %r12
je 0x24ff
leaq 0x18(%rsp), %r14
leaq 0x28(%rsp), %rbx
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x2bb8
movq %r14, 0x8(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x2bb8
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x23db
movq 0x8(%rsp), %r13
leaq (%rax,%r13), %rbp
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2c4d
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2d28
leaq 0x70(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2f66
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2862
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x240c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2120
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2428
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2120
addq $0x20, %r12
cmpq %r15, %r12
jne 0x236b
movq 0x80(%rsp), %rbx
testq %rbx, %rbx
je 0x24ff
xorl %r13d, %r13d
leaq 0x8(%rsp), %r12
leaq 0x8(%rbx), %rsi
leaq 0x28(%rsp), %rdi
callq 0x28a0
movq %rbx, 0x60(%rsp)
movq 0x48(%rsp), %r15
movq 0x50(%rsp), %rbp
cmpq %rbp, %r15
je 0x24c8
movslq %r13d, %rbx
shlq $0x5, %rbx
movq %r14, 0x8(%rsp)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x2bb8
movq 0x68(%rsp), %rax
movq (%rax), %rdi
addq %rbx, %rdi
movq %r12, %rsi
callq 0x2090
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x24b8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2120
addq $0x20, %r15
addq $0x20, %rbx
incl %r13d
cmpq %rbp, %r15
jne 0x2477
leaq 0x48(%rsp), %rdi
callq 0x291e
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x24ee
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2120
movq 0x60(%rsp), %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x244e
leaq 0x70(%rsp), %rdi
callq 0x2af2
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x251d
movq %rax, %rbx
jmp 0x2588
movq %rax, %rbx
jmp 0x2541
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x2541
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2120
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2588
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2120
jmp 0x2588
movq %rax, %rbx
jmp 0x257e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x257e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2120
leaq 0x28(%rsp), %rdi
callq 0x28f6
leaq 0x70(%rsp), %rdi
callq 0x2af2
movq %rbx, %rdi
callq 0x21a0