// File: /workspace/github_cpp_makefile_star2_O3/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 0x21858
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 0x21913
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 0x2190a
testq %r13, %r13
je 0x2190a
movl $0x1, %r12d
movzbl -0x1(%rbx,%r12), %ecx
movw %cx, 0x8(%rsp)
movq 0x30(%r14), %rax
cmpq 0x38(%r14), %rax
je 0x218bb
movw %cx, (%rax)
addq $0x2, %rax
movq %rax, 0x30(%r14)
jmp 0x218cf
movq %r15, %rdi
movq %rax, %rsi
leaq 0x8(%rsp), %rdx
callq 0x21ace
movq 0x30(%r14), %rax
subq (%r15), %rax
je 0x218ea
sarq %rax
xorl %edx, %edx
divq 0x40(%r14)
testq %rdx, %rdx
jne 0x218ea
movq %r14, %rdi
callq 0x219e4
leaq (%r12,%rbp), %rdx
movq 0x8(%r14), %rax
leaq 0x1(%r12), %rcx
cmpq %rax, %rdx
jae 0x21904
cmpq %r13, %r12
movq %rcx, %r12
jb 0x21899
addq %rcx, %rbp
decq %rbp
cmpq %rax, %rbp
jne 0x2185e
movq 0x28(%r14), %rsi
movq 0x30(%r14), %rax
movq %rax, %rcx
subq %rsi, %rcx
subq %rsi, %rax
je 0x21947
sarq %rcx
movq 0x40(%r14), %rdx
subq %rcx, %rdx
je 0x21947
addq %rax, %rsi
leaq 0x8(%rsp), %rcx
movw $0x100, (%rcx)          # imm = 0x100
movq %r15, %rdi
callq 0x21c06
movq %r14, %rdi
callq 0x219e4
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 0x2198d
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 0x219c9
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x219db
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x52c0
movq %rbx, %rdi
callq 0x5510
nop