// File: /workspace/github_cpp_makefile_star2_O3/juli9797[P]ssf/src/filetype_icon.hpp
// Function: ssf::get_icon(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string get_icon(std::string file)
{
    std::ostringstream oss;
    auto index = file.find_last_of(".");
    if (index != std::string::npos)
    {
        auto filetype = to_lower(file.substr(index + 1));
	
	oss << colors.at(get_colorhash(filetype));
        auto icon_text = shortened_string(filetype, 3);
        while (icon_text.length() < 3)
        {
            icon_text.push_back(' ');
        }
        oss << to_upper(icon_text)
            << c_cmd::color::reset;
    }
    else
    {
        oss << c_cmd::color::foreground::bright_cyan
            << "---"
            << c_cmd::color::reset;
    }
    return oss.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x32a0
leaq 0x6638(%rip), %rsi      # 0xa1b3
movl $0x1, %ecx
movq %r14, %rdi
movq $-0x1, %rdx
callq 0x3440
cmpq $-0x1, %rax
je 0x3c00
incq %rax
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x3220
movq 0x20(%rsp), %r14
movq 0x28(%rsp), %r15
testq %r15, %r15
je 0x3bdc
xorl %r12d, %r12d
movsbl (%r14,%r12), %edi
callq 0x32e0
movb %al, (%r14,%r12)
incq %r12
cmpq %r12, %r15
jne 0x3bc1
movq 0x20(%rsp), %r14
leaq 0x50(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x30(%rsp), %rax
cmpq %rax, %r14
je 0x3c50
movq %r14, 0x40(%rsp)
movq 0x30(%rsp), %rcx
movq %rcx, 0x50(%rsp)
jmp 0x3c5a
leaq 0x65a0(%rip), %rsi      # 0xa1a7
leaq 0xe0(%rsp), %rdi
movl $0x5, %edx
callq 0x3240
leaq 0x659a(%rip), %rsi      # 0xa1ba
leaq 0xe0(%rsp), %rdi
movl $0x3, %edx
callq 0x3240
leaq 0x657c(%rip), %rsi      # 0xa1b5
leaq 0xe0(%rsp), %rdi
movl $0x4, %edx
callq 0x3240
jmp 0x3ebc
movups (%rax), %xmm0
movups %xmm0, (%r15)
movq %r15, %r14
movq 0x28(%rsp), %rdx
movq %rdx, 0x48(%rsp)
movq %rax, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movb $0x0, 0x30(%rsp)
leaq 0xb0(%rsp), %r12
movq %r12, -0x10(%r12)
addq %r14, %rdx
leaq 0xa0(%rsp), %rdi
movq %r14, %rsi
callq 0x8eac
movq 0xa8(%rsp), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x3cc2
movq 0xa0(%rsp), %rdx
xorl %esi, %esi
movsbq (%rdx,%rsi), %rdi
cltq
addq %rdi, %rax
incq %rsi
cmpq %rsi, %rcx
jne 0x3cb0
movq 0xb5e7(%rip), %rcx      # 0xf2b0
movq 0xb5d8(%rip), %rdi      # 0xf2a8
subq %rdi, %rcx
sarq $0x5, %rcx
xorl %edx, %edx
divq %rcx
movslq %edx, %rsi
cmpq %rsi, %rcx
jbe 0x3f02
shlq $0x5, %rsi
movq (%rdi,%rsi), %rax
movq 0x8(%rdi,%rsi), %rdx
leaq 0xe0(%rsp), %rdi
movq %rax, %rsi
callq 0x3240
movq 0xa0(%rsp), %rdi
cmpq %r12, %rdi
je 0x3d22
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0xd0(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
addq %rsi, %rdx
leaq 0xc0(%rsp), %rdi
callq 0x8eac
leaq 0x80(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
movl $0x3, %edx
callq 0x39c0
movq 0xc0(%rsp), %rdi
cmpq %r14, %rdi
je 0x3d7f
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0x80(%rsp), %r14
movq 0x88(%rsp), %rdx
cmpq $0x2, %rdx
ja 0x3da4
movq %r14, %rdi
movl $0x20, %esi
callq 0x31c0
jmp 0x3d87
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x80(%rsp), %rsi
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x8eac
movq (%rsp), %r14
movq 0x8(%rsp), %r13
testq %r13, %r13
je 0x3deb
xorl %ebp, %ebp
movsbl (%r14,%rbp), %edi
callq 0x33e0
movb %al, (%r14,%rbp)
incq %rbp
cmpq %rbp, %r13
jne 0x3dd1
movq (%rsp), %r14
leaq 0x70(%rsp), %r13
movq %r13, -0x10(%r13)
cmpq %r12, %r14
je 0x3e0a
movq %r14, 0x60(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x3e17
movups (%r12), %xmm0
movups %xmm0, (%r13)
movq %r13, %r14
movq 0x8(%rsp), %rdx
movq %rdx, 0x68(%rsp)
movq %r12, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
leaq 0xe0(%rsp), %rdi
movq %r14, %rsi
callq 0x3240
leaq 0x636b(%rip), %rsi      # 0xa1b5
movl $0x4, %edx
movq %rax, %rdi
callq 0x3240
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x3e6e
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3200
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x3e84
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3ea5
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x3ebc
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0xe8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3350
movq 0xb0ed(%rip), %rsi      # 0xefc0
leaq 0xe0(%rsp), %rdi
callq 0x3120
leaq 0x150(%rsp), %rdi
callq 0x3080
movq %rbx, %rax
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x62f7(%rip), %rdi      # 0xa200
movq %rcx, %rdx
xorl %eax, %eax
callq 0x3310
jmp 0x3f8d
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r14, %rdi
je 0x3fb1
movq 0xd0(%rsp), %rsi
jmp 0x3fa9
jmp 0x3f35
movq %rax, %rbx
jmp 0x3fb1
jmp 0x3f88
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x3f56
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3200
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x3f90
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x3f90
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
cmpq %r12, %rdi
je 0x3fb1
movq 0xb0(%rsp), %rsi
jmp 0x3fa9
movq %rax, %rbx
jmp 0x3fc8
movq %rax, %rbx
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3fb1
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x3fc8
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0xaff1(%rip), %rsi      # 0xefc0
leaq 0xe0(%rsp), %rdi
callq 0x3120
leaq 0x150(%rsp), %rdi
callq 0x3080
movq %rbx, %rdi
callq 0x33b0