// File: meirdev[P]HexViewer/Style/Hexyl/Hexyl.cpp
// Function: Hexyl::row(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<unsigned short, std::allocator<unsigned short>> const&)
std::string Hexyl::row(const std::string& _position, const std::vector<unsigned short>& _bytes)
{
    std::stringstream row;

    row << "│" << _position << "│ ";

    for (size_t i = 0; i < 16; ++i)
    {
        if (i)
        {
            if (i % 8 == 0)
            {
                row << " ┊ ";
            }
            else
            {
                row << " ";
            }
        }

        row << getByte(_bytes[i]);
    }
    
    row << " │";
    
    for (size_t i = 0; i < 16; ++i)
    {
        if (i && (i % 8 == 0))
        {
            row << "┊";
        }

        row << getText(_bytes[i]);
    }

    row << "│" << std::endl;

    return row.str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x220, %rsp            # imm = 0x220
movq %rdi, -0x1e8(%rbp)
movq %rdi, %rax
movq %rax, -0x1e0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1d8(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x62e0
leaq -0x198(%rbp), %rdi
leaq 0x5f00(%rip), %rsi      # 0x42821
callq 0x63d0
movq %rax, -0x1d0(%rbp)
jmp 0x3c92f
movq -0x1d0(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6390
movq %rax, -0x1f0(%rbp)
jmp 0x3c948
movq -0x1f0(%rbp), %rdi
leaq 0x5ebf(%rip), %rsi      # 0x42815
callq 0x63d0
jmp 0x3c95d
movq $0x0, -0x1c0(%rbp)
cmpq $0x10, -0x1c0(%rbp)
jae 0x3ca48
cmpq $0x0, -0x1c0(%rbp)
je 0x3c9e4
movq -0x1c0(%rbp), %rax
andq $0x7, %rax
cmpq $0x0, %rax
jne 0x3c9cb
leaq -0x198(%rbp), %rdi
leaq 0x5e7b(%rip), %rsi      # 0x4281a
callq 0x63d0
jmp 0x3c9a6
jmp 0x3c9e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1b0(%rbp)
movl %eax, -0x1b4(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x6320
jmp 0x3cb6e
leaq -0x198(%rbp), %rdi
leaq 0x4fac(%rip), %rsi      # 0x41985
callq 0x63d0
jmp 0x3c9e0
jmp 0x3c9e2
jmp 0x3c9e4
leaq -0x198(%rbp), %rax
movq %rax, -0x200(%rbp)
movq -0x20(%rbp), %rdi
movq -0x1c0(%rbp), %rsi
callq 0x3ac30
movq -0x1d8(%rbp), %rdi
movzwl (%rax), %esi
callq 0x3cfb0
movq %rax, -0x1f8(%rbp)
jmp 0x3ca1a
movq -0x1f8(%rbp), %rsi
movq -0x200(%rbp), %rdi
callq 0x6390
jmp 0x3ca2f
jmp 0x3ca31
movq -0x1c0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1c0(%rbp)
jmp 0x3c968
leaq -0x198(%rbp), %rdi
leaq 0x5dca(%rip), %rsi      # 0x42820
callq 0x63d0
jmp 0x3ca5d
movq $0x0, -0x1c8(%rbp)
cmpq $0x10, -0x1c8(%rbp)
jae 0x3cb0c
cmpq $0x0, -0x1c8(%rbp)
je 0x3caa8
movq -0x1c8(%rbp), %rax
andq $0x7, %rax
cmpq $0x0, %rax
jne 0x3caa8
leaq -0x198(%rbp), %rdi
leaq 0x5d86(%rip), %rsi      # 0x42825
callq 0x63d0
jmp 0x3caa6
jmp 0x3caa8
leaq -0x198(%rbp), %rax
movq %rax, -0x210(%rbp)
movq -0x20(%rbp), %rdi
movq -0x1c8(%rbp), %rsi
callq 0x3ac30
movq -0x1d8(%rbp), %rdi
movzwl (%rax), %esi
callq 0x3cfe0
movq %rax, -0x208(%rbp)
jmp 0x3cade
movq -0x208(%rbp), %rsi
movq -0x210(%rbp), %rdi
callq 0x6390
jmp 0x3caf3
jmp 0x3caf5
movq -0x1c8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1c8(%rbp)
jmp 0x3ca68
leaq -0x198(%rbp), %rdi
leaq 0x5d07(%rip), %rsi      # 0x42821
callq 0x63d0
movq %rax, -0x218(%rbp)
jmp 0x3cb28
movq -0x218(%rbp), %rdi
movq 0x21462(%rip), %rsi     # 0x5df98
callq 0x6430
jmp 0x3cb3d
movq -0x1e8(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x63c0
jmp 0x3cb52
leaq -0x1a8(%rbp), %rdi
callq 0x6320
movq -0x1e0(%rbp), %rax
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq
movq -0x1b0(%rbp), %rdi
callq 0x6750
nopw (%rax,%rax)