// File: /workspace/github_cpp_makefile_star2_O1/meirdev[P]HexViewer/DataProcessing/DataProcessing.cpp
// Function: DataProcessing::process()
void DataProcessing::process()
{
    const size_t bufferSize = 4096;

    char* buffer = new char[bufferSize];

    m_file.seek(m_offset);

    m_printer << m_style.header();

    size_t totalLength = 0;

    while (!m_file.eof())
    {
        size_t readBytes = m_file.read(buffer, bufferSize);

        for (size_t i = 0; (totalLength < m_length) && (i < readBytes); ++i, ++totalLength)
        {
            printByte(buffer[i]);
        }

        if (totalLength == m_length)
        {
            break;
        }
    }

    printEnd();

    m_printer << m_style.footer();

    m_printer.flush();

    delete[] buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movl $0x1000, %edi           # imm = 0x1000
callq 0x5030
movq %rax, %rbx
movq (%r14), %rsi
movq 0x20(%r14), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x10(%r14), %r15
movq 0x18(%r14), %rsi
movq (%rsi), %rax
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq *0x18(%rax)
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
callq *0x18(%rax)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21c40
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x52c0
leaq 0x28(%r14), %r15
xorl %ebp, %ebp
movq 0x20(%r14), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
testb %al, %al
jne 0x21cf9
movq 0x20(%r14), %rdi
movq (%rdi), %rax
movl $0x1000, %edx           # imm = 0x1000
movq %rbx, %rsi
callq *0x10(%rax)
movq %rax, %r13
movq 0x8(%r14), %rax
cmpq %rax, %rbp
jae 0x21cf0
testq %r13, %r13
je 0x21cf0
movl $0x1, %r12d
movzbl -0x1(%rbx,%r12), %eax
movw %ax, 0x8(%rsp)
movq 0x30(%r14), %rsi
cmpq 0x38(%r14), %rsi
je 0x21ca3
movw %ax, (%rsi)
addq $0x2, %rsi
movq %rsi, 0x30(%r14)
jmp 0x21cb0
movq %r15, %rdi
leaq 0x8(%rsp), %rdx
callq 0x21eb4
movq 0x30(%r14), %rax
subq 0x28(%r14), %rax
je 0x21cd0
sarq %rax
xorl %edx, %edx
divq 0x40(%r14)
testq %rdx, %rdx
jne 0x21cd0
movq %r14, %rdi
callq 0x21dca
leaq (%r12,%rbp), %rdx
movq 0x8(%r14), %rax
leaq 0x1(%r12), %rcx
cmpq %rax, %rdx
jae 0x21cea
cmpq %r13, %r12
movq %rcx, %r12
jb 0x21c81
addq %rcx, %rbp
decq %rbp
cmpq %rax, %rbp
jne 0x21c46
movq 0x28(%r14), %rsi
movq 0x30(%r14), %rax
movq %rax, %rcx
subq %rsi, %rcx
subq %rsi, %rax
je 0x21d2d
sarq %rcx
movq 0x40(%r14), %rdx
subq %rcx, %rdx
je 0x21d2d
addq %rax, %rsi
leaq 0x8(%rsp), %rcx
movw $0x100, (%rcx)          # imm = 0x100
movq %r15, %rdi
callq 0x21fec
movq %r14, %rdi
callq 0x21dca
movq 0x10(%r14), %r15
movq 0x18(%r14), %rsi
movq (%rsi), %rax
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq *0x20(%rax)
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
callq *0x18(%rax)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x21d73
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x52c0
movq 0x10(%r14), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq %rbx, %rdi
callq 0x53b0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
jmp 0x21daf
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21dc1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x52c0
movq %rbx, %rdi
callq 0x5510
nop