// File: /workspace/github_cpp_makefile_star2_O1/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 0x65f0(%rip), %rsi      # 0xa17b
movl $0x1, %ecx
movq %r14, %rdi
movq $-0x1, %rdx
callq 0x3440
cmpq $-0x1, %rax
je 0x3c0f
incq %rax
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x3220
movq 0x68(%rsp), %r14
testq %r14, %r14
je 0x3be7
movq 0x60(%rsp), %r15
xorl %r12d, %r12d
movsbl (%r15,%r12), %edi
callq 0x32e0
movb %al, (%r15,%r12)
incq %r12
cmpq %r12, %r14
jne 0x3bd1
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rcx
cmpq %rax, %rcx
je 0x3c5f
movq %rcx, 0x20(%rsp)
movq 0x70(%rsp), %rcx
movq %rcx, 0x30(%rsp)
jmp 0x3c66
leaq 0x6559(%rip), %rsi      # 0xa16f
leaq 0xe0(%rsp), %rdi
movl $0x5, %edx
callq 0x3240
leaq 0x6553(%rip), %rsi      # 0xa182
leaq 0xe0(%rsp), %rdi
movl $0x3, %edx
callq 0x3240
leaq 0x6535(%rip), %rsi      # 0xa17d
leaq 0xe0(%rsp), %rdi
movl $0x4, %edx
callq 0x3240
jmp 0x3ec9
movups (%rax), %xmm0
movups %xmm0, (%r15)
movq 0x68(%rsp), %rdx
movq %rdx, 0x28(%rsp)
movq %rax, 0x60(%rsp)
movq $0x0, 0x68(%rsp)
movb $0x0, 0x70(%rsp)
leaq 0xb0(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rsp), %rsi
addq %rsi, %rdx
leaq 0xa0(%rsp), %rdi
callq 0x8fc8
movq 0xa8(%rsp), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x3ccf
movq 0xa0(%rsp), %rdx
xorl %esi, %esi
movsbq (%rdx,%rsi), %rdi
cltq
addq %rdi, %rax
incq %rsi
cmpq %rsi, %rcx
jne 0x3cbd
movq 0xb5da(%rip), %rcx      # 0xf2b0
movq 0xb5cb(%rip), %rdi      # 0xf2a8
subq %rdi, %rcx
sarq $0x5, %rcx
xorl %edx, %edx
divq %rcx
movslq %edx, %rsi
cmpq %rsi, %rcx
jbe 0x3f0f
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 %r14, %rdi
je 0x3d2f
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0xd0(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0xc0(%rsp), %rdi
callq 0x8fc8
leaq 0x80(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
movl $0x3, %edx
callq 0x39d0
movq 0xc0(%rsp), %rdi
cmpq %r14, %rdi
je 0x3d8c
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0x80(%rsp), %r14
movq 0x88(%rsp), %rdx
cmpq $0x2, %rdx
ja 0x3db1
movq %r14, %rdi
movl $0x20, %esi
callq 0x31c0
jmp 0x3d94
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x80(%rsp), %rsi
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x8fc8
movq 0x8(%rsp), %r12
testq %r12, %r12
je 0x3df5
movq (%rsp), %r13
xorl %ebp, %ebp
movsbl (%r13,%rbp), %edi
callq 0x33e0
movb %al, (%r13,%rbp)
incq %rbp
cmpq %rbp, %r12
jne 0x3ddd
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rsp), %rax
cmpq %r14, %rax
je 0x3e19
movq %rax, 0x40(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x3e22
movups (%r14), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rsp), %rdx
movq %rdx, 0x48(%rsp)
movq %r14, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq 0x40(%rsp), %rsi
leaq 0xe0(%rsp), %rdi
callq 0x3240
leaq 0x6326(%rip), %rsi      # 0xa17d
movl $0x4, %edx
movq %rax, %rdi
callq 0x3240
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x3e7b
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3200
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3e91
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3eb2
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x3ec9
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3200
leaq 0xe8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3350
movq 0xb0e0(%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 0x62b2(%rip), %rdi      # 0xa1c8
movq %rcx, %rdx
xorl %eax, %eax
callq 0x3310
jmp 0x3f9a
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r14, %rdi
je 0x3fbe
movq 0xd0(%rsp), %rsi
jmp 0x3fb6
jmp 0x3f42
movq %rax, %rbx
jmp 0x3fbe
jmp 0x3f95
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x3f63
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3200
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x3f9d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3200
jmp 0x3f9d
movq %rax, %rbx
movq 0xa0(%rsp), %rdi
cmpq %r14, %rdi
je 0x3fbe
movq 0xb0(%rsp), %rsi
jmp 0x3fb6
movq %rax, %rbx
jmp 0x3fd5
movq %rax, %rbx
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3fbe
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x3fd5
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3200
movq 0xafe4(%rip), %rsi      # 0xefc0
leaq 0xe0(%rsp), %rdi
callq 0x3120
leaq 0x150(%rsp), %rdi
callq 0x3080
movq %rbx, %rdi
callq 0x33b0