// File: /workspace/github_cpp_makefile_star2_O1/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 0x250e
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), %r14
cmpq %r14, %r12
je 0x2435
leaq 0x18(%rsp), %rbx
leaq 0x8(%rsp), %r15
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x2bbe
movq %rbx, 0x8(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x2bbe
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 0x2c4e
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2d29
leaq 0x70(%rsp), %rdi
movq %r15, %rsi
callq 0x2f8c
movq %rax, %rdi
leaq 0x28(%rsp), %rsi
callq 0x286a
movq 0x8(%rsp), %rdi
cmpq %rbx, %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 %r14, %r12
jne 0x236b
movq 0x80(%rsp), %rbx
testq %rbx, %rbx
je 0x2504
leaq 0x18(%rsp), %rbp
xorl %r14d, %r14d
leaq 0x8(%rsp), %r12
leaq 0x8(%rbx), %rsi
leaq 0x28(%rsp), %rdi
callq 0x28a8
movq %rbx, 0x60(%rsp)
movq 0x48(%rsp), %r15
movq 0x50(%rsp), %r13
cmpq %r13, %r15
je 0x24cd
movslq %r14d, %rbx
shlq $0x5, %rbx
movq %rbp, 0x8(%rsp)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x2bbe
movq 0x68(%rsp), %rax
movq (%rax), %rdi
addq %rbx, %rdi
movq %r12, %rsi
callq 0x2090
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x24bd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2120
addq $0x20, %r15
addq $0x20, %rbx
incl %r14d
cmpq %r13, %r15
jne 0x247c
leaq 0x48(%rsp), %rdi
callq 0x2926
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x24f3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2120
movq 0x60(%rsp), %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x2453
leaq 0x70(%rsp), %rdi
callq 0x2af8
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2522
movq %rax, %rbx
jmp 0x2590
movq %rax, %rbx
jmp 0x2549
movq %rbx, %rcx
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rcx, %rdi
je 0x2549
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2120
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2590
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2120
jmp 0x2590
movq %rax, %rbx
jmp 0x2586
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2586
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2120
leaq 0x28(%rsp), %rdi
callq 0x28fe
leaq 0x70(%rsp), %rdi
callq 0x2af8
movq %rbx, %rdi
callq 0x21a0