// File: /workspace/github_cpp_makefile_star2_O2/meirdev[P]HexViewer/Style/Hexyl/Hexyl.cpp
// Function: Hexyl::Hexyl(bool)
Hexyl::Hexyl(bool _colourful)
: m_colourful(_colourful)
{
    std::stringstream byte;

    for (int i = 0; i < 256; ++i)
    {
        byte << std::setfill('0') << std::setw(2) << std::hex << i;

        if (!i)
        {
            m_byteTextStyle.push_back({ "38;5;242", byte.str(), "0" });
        }
        else if (isspace(i))
        {
            m_byteTextStyle.push_back({ "32", byte.str(), i != 0x20 ? "_" : " " });
        }
        else if (iscntrl(i))
        {
            m_byteTextStyle.push_back({ "35", byte.str(), "•" });
        }
        else if (isprint(i))
        {
            m_byteTextStyle.push_back({ "36", byte.str(), std::string(1, static_cast<char>(i)) });
        }
        else
        {
            m_byteTextStyle.push_back({ "33", byte.str(), "×" });
        }

        byte.str("");
    }

    if (_colourful)
    {
        for (int i = 0; i < 256; ++i)
        {
            m_byteTextStyle[i].m_byte = "\x1b[" + m_byteTextStyle[i].m_color + "m" + m_byteTextStyle[i].m_byte + "\x1b[0m";
            m_byteTextStyle[i].m_text = "\x1b[" + m_byteTextStyle[i].m_color + "m" + m_byteTextStyle[i].m_text + "\x1b[0m";
        }
    }

    m_byteTextStyle.push_back({ "", "  ", " " });
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
leaq 0x1053c(%rip), %rax     # 0x27c38
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
andq $0x0, 0x18(%rdi)
movl %esi, 0xc(%rsp)
movb %sil, 0x20(%rdi)
leaq 0xd0(%rsp), %rdi
callq 0x5220
leaq 0xe8(%rsp), %r13
xorl %ebp, %ebp
leaq 0x10(%rsp), %r15
leaq 0x90(%rsp), %r12
leaq 0x2066(%rip), %r14      # 0x197a8
cmpl $0x100, %ebp            # imm = 0x100
je 0x17947
leaq 0xe0(%rsp), %rdi
pushq $0x30
popq %rsi
callq 0x5480
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x2, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movl %ebp, %esi
callq 0x54f0
testl %ebp, %ebp
je 0x177f0
movl %ebp, %edi
callq 0x5060
testl %eax, %eax
je 0x17835
movq %r15, %rdi
leaq 0x2e45(%rip), %rsi      # 0x1a5ec
movq %r12, %rdx
callq 0x6844
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x5490
cmpl $0x20, %ebp
leaq 0x2e29(%rip), %rsi      # 0x1a5ef
leaq 0x1fde(%rip), %rax      # 0x197ab
cmoveq %rax, %rsi
leaq 0x50(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x6844
movq %rbx, %rdi
movq %r15, %rsi
callq 0x182ba
jmp 0x17917
movq %r15, %rdi
leaq 0x2de7(%rip), %rsi      # 0x1a5e1
movq %r12, %rdx
callq 0x6844
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x5490
leaq 0x50(%rsp), %rdi
leaq 0x2dcf(%rip), %rsi      # 0x1a5ea
leaq 0x70(%rsp), %rdx
callq 0x6844
movq %rbx, %rdi
movq %r15, %rsi
callq 0x182ba
jmp 0x17917
movl %ebp, %edi
callq 0x5430
testl %eax, %eax
je 0x17885
movq %r15, %rdi
leaq 0x2da7(%rip), %rsi      # 0x1a5f1
movq %r12, %rdx
callq 0x6844
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x5490
leaq 0x50(%rsp), %rdi
leaq 0x2d89(%rip), %rsi      # 0x1a5f4
leaq 0x70(%rsp), %rdx
callq 0x6844
movq %rbx, %rdi
movq %r15, %rsi
callq 0x182ba
jmp 0x17917
movl %ebp, %edi
callq 0x5520
testl %eax, %eax
je 0x178d7
movq %r15, %rdi
leaq 0x2d5e(%rip), %rsi      # 0x1a5f8
movq %r12, %rdx
callq 0x6844
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x5490
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movsbl %bpl, %edx
leaq 0x50(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x5340
movq %rbx, %rdi
movq %r15, %rsi
callq 0x182ba
jmp 0x17917
movq %r15, %rdi
leaq 0x2d1a(%rip), %rsi      # 0x1a5fb
movq %r12, %rdx
callq 0x6844
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x5490
leaq 0x50(%rsp), %rdi
leaq 0x2cfc(%rip), %rsi      # 0x1a5fe
leaq 0x70(%rsp), %rdx
callq 0x6844
movq %rbx, %rdi
movq %r15, %rsi
callq 0x182ba
movq %r15, %rdi
callq 0x17db6
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x6844
movq %r13, %rdi
movq %r15, %rsi
callq 0x5440
movq %r15, %rdi
callq 0x5180
incl %ebp
jmp 0x17742
cmpb $0x0, 0xc(%rsp)
je 0x17a8a
pushq $0x40
popq %r14
leaq 0xb0(%rsp), %r15
leaq 0x70(%rsp), %r13
leaq 0x90(%rsp), %rbp
leaq 0x10(%rsp), %r12
cmpq $0x6040, %r14           # imm = 0x6040
je 0x17a8a
movq (%rbx), %rax
leaq (%rax,%r14), %rdx
addq $-0x40, %rdx
movq %r15, %rdi
leaq 0x2c6f(%rip), %rsi      # 0x1a601
callq 0x94d9
movq %r13, %rdi
movq %r15, %rsi
leaq 0x2c63(%rip), %rdx      # 0x1a607
callq 0x69e3
movq (%rbx), %rax
leaq (%rax,%r14), %rdx
addq $-0x20, %rdx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x9e97
movq %r12, %rdi
movq %rbp, %rsi
leaq 0x2c38(%rip), %rdx      # 0x1a604
callq 0x69e3
movq (%rbx), %rax
leaq (%rax,%r14), %rdi
addq $-0x20, %rdi
movq %r12, %rsi
callq 0x5360
movq %r12, %rdi
callq 0x5180
movq %rbp, %rdi
callq 0x5180
movq %r13, %rdi
callq 0x5180
movq %r15, %rdi
callq 0x5180
movq (%rbx), %rax
leaq (%rax,%r14), %rdx
addq $-0x40, %rdx
movq %r15, %rdi
leaq 0x2be8(%rip), %rsi      # 0x1a601
callq 0x94d9
movq %r13, %rdi
movq %r15, %rsi
leaq 0x2bdc(%rip), %rdx      # 0x1a607
callq 0x69e3
movq (%rbx), %rdx
addq %r14, %rdx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x9e97
movq %r12, %rdi
movq %rbp, %rsi
leaq 0x2bb6(%rip), %rdx      # 0x1a604
callq 0x69e3
movq (%rbx), %rdi
addq %r14, %rdi
movq %r12, %rsi
callq 0x5360
movq %r12, %rdi
callq 0x5180
movq %rbp, %rdi
callq 0x5180
movq %r13, %rdi
callq 0x5180
movq %r15, %rdi
callq 0x5180
addq $0x60, %r14
jmp 0x17970
leaq 0x1d17(%rip), %rsi      # 0x197a8
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x6844
leaq 0x30(%rsp), %r15
leaq 0x1cfb(%rip), %rsi      # 0x197aa
leaq 0x70(%rsp), %rdx
movq %r15, %rdi
callq 0x6844
leaq 0x50(%rsp), %rdi
leaq 0x1ce3(%rip), %rsi      # 0x197ab
leaq 0xb0(%rsp), %rdx
callq 0x6844
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x182ba
leaq 0x10(%rsp), %rdi
callq 0x17db6
leaq 0xd0(%rsp), %rdi
callq 0x5250
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x17b4a
movq %rax, %r14
movq %r15, %rdi
jmp 0x17b61
jmp 0x17ba6
jmp 0x17bb5
movq %rax, %r14
jmp 0x17bc5
jmp 0x17b4a
jmp 0x17b59
jmp 0x17ba6
jmp 0x17bb5
jmp 0x17b4a
jmp 0x17b59
jmp 0x17ba6
jmp 0x17bb5
jmp 0x17b4a
jmp 0x17b59
jmp 0x17ba6
jmp 0x17bb5
jmp 0x17b4a
jmp 0x17b59
jmp 0x17ba6
jmp 0x17bb5
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x17db6
jmp 0x17bb8
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x5180
jmp 0x17ba9
jmp 0x17ba6
jmp 0x17bb5
jmp 0x17bb5
jmp 0x17b76
jmp 0x17b7b
jmp 0x17b80
jmp 0x17bb5
movq %rax, %r14
jmp 0x17b9a
movq %rax, %r14
jmp 0x17b90
movq %rax, %r14
leaq 0x90(%rsp), %rdi
callq 0x5180
leaq 0x70(%rsp), %rdi
callq 0x5180
leaq 0xb0(%rsp), %rdi
jmp 0x17bae
jmp 0x17bb5
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x5180
jmp 0x17bb8
movq %rax, %r14
leaq 0xd0(%rsp), %rdi
callq 0x5250
movq %rbx, %rdi
callq 0x17dd6
movq %r14, %rdi
callq 0x5510
nop