// File: 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
movq %rsp, %rbp
subq $0x2c0, %rsp            # imm = 0x2C0
movq %rsi, -0x288(%rbp)
movq %rdi, -0x298(%rbp)
movq %rdi, %rax
movq %rax, -0x290(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x4430
movq -0x288(%rbp), %rdi
leaq 0x12116(%rip), %rsi     # 0x1723b
movq $-0x1, %rdx
callq 0x42d0
movq %rax, -0x190(%rbp)
cmpq $-0x1, -0x190(%rbp)
je 0x53e6
movq -0x288(%rbp), %rsi
movq -0x190(%rbp), %rdx
incq %rdx
leaq -0x1d0(%rbp), %rdi
movq $-0x1, %rcx
callq 0x4330
jmp 0x516c
leaq -0x1b0(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x4fd0
jmp 0x5181
leaq -0x1d0(%rbp), %rdi
callq 0x41c0
leaq -0x200(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x4100
jmp 0x51a2
leaq -0x200(%rbp), %rdi
callq 0x5050
movslq %eax, %rsi
leaq 0x1e1c8(%rip), %rdi     # 0x23380
callq 0xa650
movq %rax, -0x2a0(%rbp)
jmp 0x51c6
movq -0x2a0(%rbp), %rsi
leaq -0x188(%rbp), %rdi
callq 0x42b0
jmp 0x51db
leaq -0x200(%rbp), %rdi
callq 0x41c0
leaq -0x240(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x4100
jmp 0x51fc
leaq -0x220(%rbp), %rdi
leaq -0x240(%rbp), %rsi
movl $0x3, %edx
callq 0x4ee0
jmp 0x5216
leaq -0x240(%rbp), %rdi
callq 0x41c0
leaq -0x220(%rbp), %rdi
callq 0x44a0
cmpq $0x3, %rax
jae 0x52fb
leaq -0x220(%rbp), %rdi
movl $0x20, %esi
callq 0x4280
jmp 0x524b
jmp 0x5222
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d8(%rbp)
movl %eax, -0x1dc(%rbp)
jmp 0x5466
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d8(%rbp)
movl %eax, -0x1dc(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x41c0
jmp 0x5466
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d8(%rbp)
movl %eax, -0x1dc(%rbp)
jmp 0x53d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d8(%rbp)
movl %eax, -0x1dc(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x41c0
jmp 0x53d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d8(%rbp)
movl %eax, -0x1dc(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x41c0
jmp 0x53d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d8(%rbp)
movl %eax, -0x1dc(%rbp)
jmp 0x53c9
leaq -0x280(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0x4100
jmp 0x5310
leaq -0x260(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x4f50
jmp 0x5325
leaq -0x188(%rbp), %rdi
leaq -0x260(%rbp), %rsi
callq 0x42b0
movq %rax, -0x2a8(%rbp)
jmp 0x5341
movq -0x2a8(%rbp), %rdi
leaq 0x11eee(%rip), %rsi     # 0x1723d
callq 0x42f0
jmp 0x5356
leaq -0x260(%rbp), %rdi
callq 0x41c0
leaq -0x280(%rbp), %rdi
callq 0x41c0
leaq -0x220(%rbp), %rdi
callq 0x41c0
leaq -0x1b0(%rbp), %rdi
callq 0x41c0
jmp 0x5435
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d8(%rbp)
movl %eax, -0x1dc(%rbp)
jmp 0x53bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d8(%rbp)
movl %eax, -0x1dc(%rbp)
leaq -0x260(%rbp), %rdi
callq 0x41c0
leaq -0x280(%rbp), %rdi
callq 0x41c0
leaq -0x220(%rbp), %rdi
callq 0x41c0
leaq -0x1b0(%rbp), %rdi
callq 0x41c0
jmp 0x5466
leaq 0x11e42(%rip), %rsi     # 0x1722f
leaq -0x188(%rbp), %rdi
callq 0x42f0
movq %rax, -0x2b0(%rbp)
jmp 0x5402
movq -0x2b0(%rbp), %rdi
leaq 0x11e32(%rip), %rsi     # 0x17242
callq 0x42f0
movq %rax, -0x2b8(%rbp)
jmp 0x541e
movq -0x2b8(%rbp), %rdi
leaq 0x11e11(%rip), %rsi     # 0x1723d
callq 0x42f0
jmp 0x5433
jmp 0x5435
movq -0x298(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0x4320
jmp 0x544a
leaq -0x188(%rbp), %rdi
callq 0x4060
movq -0x290(%rbp), %rax
addq $0x2c0, %rsp            # imm = 0x2C0
popq %rbp
retq
leaq -0x188(%rbp), %rdi
callq 0x4060
movq -0x1d8(%rbp), %rdi
callq 0x4560
nop