// File: meirdev[P]HexViewer/Main.cpp
// Function: main
int main(int argc, char** argv)
{
    CLI::App app("HexViewer");

    std::string fileName;
    app.add_option("filename", fileName, "Filename")->required();

    std::string theme = "hexyl";
    app.add_option("-t,--theme", theme, "Theme");

    int offset = 0;
    app.add_option("-s,--offset", offset, "Offset");

    size_t length = 0;
    app.add_option("-l,--length", length, "Length");

    bool noColor = false;
    app.add_flag("-n,--no-colors", noColor, "No colors");

    CLI11_PARSE(app, argc, argv);

    HexViewer hexViewer;

    hexViewer.setStyle(theme, !noColor);
    hexViewer.setPrinter("default");
    hexViewer.setFile(fileName);

    hexViewer.print(offset, length);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x520, %rsp            # imm = 0x520
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x229(%rbp), %rdi
movq %rdi, -0x4a0(%rbp)
callq 0x6770
movq -0x4a0(%rbp), %rdx
leaq 0x3a6c5(%rip), %rsi     # 0x4126f
leaq -0x228(%rbp), %rdi
callq 0x8eb0
jmp 0x6bb8
leaq -0x261(%rbp), %rdi
movq %rdi, -0x4a8(%rbp)
callq 0x6770
movq -0x4a8(%rbp), %rdx
leaq 0x3ada9(%rip), %rsi     # 0x41982
leaq -0x260(%rbp), %rdi
callq 0x8eb0
jmp 0x6be7
leaq -0x208(%rbp), %rdi
leaq -0x228(%rbp), %rsi
leaq -0x260(%rbp), %rdx
callq 0x9840
jmp 0x6c03
leaq -0x260(%rbp), %rdi
callq 0x6280
leaq -0x261(%rbp), %rdi
callq 0x6460
leaq -0x228(%rbp), %rdi
callq 0x6280
leaq -0x229(%rbp), %rdi
callq 0x6460
leaq -0x288(%rbp), %rdi
callq 0x65f0
leaq -0x2a9(%rbp), %rdi
movq %rdi, -0x4b0(%rbp)
callq 0x6770
movq -0x4b0(%rbp), %rdx
leaq 0x3a619(%rip), %rsi     # 0x41279
leaq -0x2a8(%rbp), %rdi
callq 0x8eb0
jmp 0x6c6e
leaq -0x2d1(%rbp), %rdi
movq %rdi, -0x4b8(%rbp)
callq 0x6770
movq -0x4b8(%rbp), %rdx
leaq 0x3a5f3(%rip), %rsi     # 0x41282
leaq -0x2d0(%rbp), %rdi
callq 0x8eb0
jmp 0x6c9d
leaq -0x208(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
leaq -0x288(%rbp), %rdx
leaq -0x2d0(%rbp), %rcx
callq 0x9a00
movq %rax, -0x4c0(%rbp)
jmp 0x6cc7
movq -0x4c0(%rbp), %rdi
movl $0x1, %esi
callq 0x9c10
jmp 0x6cda
leaq -0x2d0(%rbp), %rdi
callq 0x6280
leaq -0x2d1(%rbp), %rdi
callq 0x6460
leaq -0x2a8(%rbp), %rdi
callq 0x6280
leaq -0x2a9(%rbp), %rdi
callq 0x6460
leaq -0x2f9(%rbp), %rdi
movq %rdi, -0x4c8(%rbp)
callq 0x6770
movq -0x4c8(%rbp), %rdx
leaq 0x3a560(%rip), %rsi     # 0x4128b
leaq -0x2f8(%rbp), %rdi
callq 0x8eb0
jmp 0x6d39
leaq -0x2f9(%rbp), %rdi
callq 0x6460
leaq -0x321(%rbp), %rdi
movq %rdi, -0x4d0(%rbp)
callq 0x6770
movq -0x4d0(%rbp), %rdx
leaq 0x3a52b(%rip), %rsi     # 0x41291
leaq -0x320(%rbp), %rdi
callq 0x8eb0
jmp 0x6d74
leaq -0x349(%rbp), %rdi
movq %rdi, -0x4d8(%rbp)
callq 0x6770
movq -0x4d8(%rbp), %rdx
leaq 0x3a507(%rip), %rsi     # 0x4129c
leaq -0x348(%rbp), %rdi
callq 0x8eb0
jmp 0x6da3
leaq -0x208(%rbp), %rdi
leaq -0x320(%rbp), %rsi
leaq -0x2f8(%rbp), %rdx
leaq -0x348(%rbp), %rcx
callq 0x9a00
jmp 0x6dc6
leaq -0x348(%rbp), %rdi
callq 0x6280
leaq -0x349(%rbp), %rdi
callq 0x6460
leaq -0x320(%rbp), %rdi
callq 0x6280
leaq -0x321(%rbp), %rdi
callq 0x6460
movl $0x0, -0x350(%rbp)
leaq -0x371(%rbp), %rdi
movq %rdi, -0x4e0(%rbp)
callq 0x6770
movq -0x4e0(%rbp), %rdx
leaq 0x3a481(%rip), %rsi     # 0x412a2
leaq -0x370(%rbp), %rdi
callq 0x8eb0
jmp 0x6e2f
leaq -0x399(%rbp), %rdi
movq %rdi, -0x4e8(%rbp)
callq 0x6770
movq -0x4e8(%rbp), %rdx
leaq 0x3a45e(%rip), %rsi     # 0x412ae
leaq -0x398(%rbp), %rdi
callq 0x8eb0
jmp 0x6e5e
leaq -0x208(%rbp), %rdi
leaq -0x370(%rbp), %rsi
leaq -0x350(%rbp), %rdx
leaq -0x398(%rbp), %rcx
callq 0x9c30
jmp 0x6e81
leaq -0x398(%rbp), %rdi
callq 0x6280
leaq -0x399(%rbp), %rdi
callq 0x6460
leaq -0x370(%rbp), %rdi
callq 0x6280
leaq -0x371(%rbp), %rdi
callq 0x6460
movq $0x0, -0x3a8(%rbp)
leaq -0x3c9(%rbp), %rdi
movq %rdi, -0x4f0(%rbp)
callq 0x6770
movq -0x4f0(%rbp), %rdx
leaq 0x3a3d8(%rip), %rsi     # 0x412b5
leaq -0x3c8(%rbp), %rdi
callq 0x8eb0
jmp 0x6eeb
leaq -0x3f1(%rbp), %rdi
movq %rdi, -0x4f8(%rbp)
callq 0x6770
movq -0x4f8(%rbp), %rdx
leaq 0x3a3b5(%rip), %rsi     # 0x412c1
leaq -0x3f0(%rbp), %rdi
callq 0x8eb0
jmp 0x6f1a
leaq -0x208(%rbp), %rdi
leaq -0x3c8(%rbp), %rsi
leaq -0x3a8(%rbp), %rdx
leaq -0x3f0(%rbp), %rcx
callq 0x9e40
jmp 0x6f3d
leaq -0x3f0(%rbp), %rdi
callq 0x6280
leaq -0x3f1(%rbp), %rdi
callq 0x6460
leaq -0x3c8(%rbp), %rdi
callq 0x6280
leaq -0x3c9(%rbp), %rdi
callq 0x6460
movb $0x0, -0x3f2(%rbp)
leaq -0x419(%rbp), %rdi
movq %rdi, -0x500(%rbp)
callq 0x6770
movq -0x500(%rbp), %rdx
leaq 0x3a333(%rip), %rsi     # 0x412c8
leaq -0x418(%rbp), %rdi
callq 0x8eb0
jmp 0x6fa3
leaq -0x441(%rbp), %rdi
movq %rdi, -0x508(%rbp)
callq 0x6770
movq -0x508(%rbp), %rdx
leaq 0x3a313(%rip), %rsi     # 0x412d7
leaq -0x440(%rbp), %rdi
callq 0x8eb0
jmp 0x6fd2
leaq -0x208(%rbp), %rdi
leaq -0x418(%rbp), %rsi
leaq -0x3f2(%rbp), %rdx
leaq -0x440(%rbp), %rcx
callq 0xa050
jmp 0x6ff5
leaq -0x440(%rbp), %rdi
callq 0x6280
leaq -0x441(%rbp), %rdi
callq 0x6460
leaq -0x418(%rbp), %rdi
callq 0x6280
leaq -0x419(%rbp), %rdi
callq 0x6460
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq -0x208(%rbp), %rdi
callq 0xa2a0
jmp 0x703a
jmp 0x73b1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x709d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x7085
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x260(%rbp), %rdi
callq 0x6280
leaq -0x261(%rbp), %rdi
callq 0x6460
leaq -0x228(%rbp), %rdi
callq 0x6280
leaq -0x229(%rbp), %rdi
callq 0x6460
jmp 0x7541
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x710c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x70f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x6280
leaq -0x2d1(%rbp), %rdi
callq 0x6460
leaq -0x2a8(%rbp), %rdi
callq 0x6280
leaq -0x2a9(%rbp), %rdi
callq 0x6460
jmp 0x7529
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x2f9(%rbp), %rdi
callq 0x6460
jmp 0x7529
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x719e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x7186
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x348(%rbp), %rdi
callq 0x6280
leaq -0x349(%rbp), %rdi
callq 0x6460
leaq -0x320(%rbp), %rdi
callq 0x6280
leaq -0x321(%rbp), %rdi
callq 0x6460
jmp 0x751d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x720d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x71f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x398(%rbp), %rdi
callq 0x6280
leaq -0x399(%rbp), %rdi
callq 0x6460
leaq -0x370(%rbp), %rdi
callq 0x6280
leaq -0x371(%rbp), %rdi
callq 0x6460
jmp 0x751d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x727c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x7264
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x3f0(%rbp), %rdi
callq 0x6280
leaq -0x3f1(%rbp), %rdi
callq 0x6460
leaq -0x3c8(%rbp), %rdi
callq 0x6280
leaq -0x3c9(%rbp), %rdi
callq 0x6460
jmp 0x751d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x72eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x72d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x440(%rbp), %rdi
callq 0x6280
leaq -0x441(%rbp), %rdi
callq 0x6460
leaq -0x418(%rbp), %rdi
callq 0x6280
leaq -0x419(%rbp), %rdi
callq 0x6460
jmp 0x751d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
movl -0x23c(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x751d
movq -0x238(%rbp), %rdi
callq 0x61a0
movq %rax, -0x450(%rbp)
movq -0x450(%rbp), %rsi
movq 0x56c76(%rip), %rdx     # 0x5dfb8
movq 0x56c9f(%rip), %rcx     # 0x5dfe8
leaq -0x208(%rbp), %rdi
callq 0xa360
movl %eax, -0x50c(%rbp)
jmp 0x735d
movl -0x50c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x454(%rbp)
callq 0x66d0
jmp 0x7390
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
callq 0x66d0
jmp 0x73ac
jmp 0x74ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x751d
jmp 0x751d
leaq -0x470(%rbp), %rdi
callq 0x39690
jmp 0x73bf
movb -0x3f2(%rbp), %al
notb %al
movzbl %al, %edx
andl $0x1, %edx
leaq -0x470(%rbp), %rdi
leaq -0x2f8(%rbp), %rsi
callq 0x39730
jmp 0x73e2
leaq -0x491(%rbp), %rdi
movq %rdi, -0x518(%rbp)
callq 0x6770
movq -0x518(%rbp), %rdx
leaq 0x39ede(%rip), %rsi     # 0x412e1
leaq -0x490(%rbp), %rdi
callq 0x8eb0
jmp 0x7411
leaq -0x470(%rbp), %rdi
leaq -0x490(%rbp), %rsi
callq 0x39880
jmp 0x7426
leaq -0x490(%rbp), %rdi
callq 0x6280
leaq -0x491(%rbp), %rdi
callq 0x6460
leaq -0x470(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0x398f0
jmp 0x7453
movl -0x350(%rbp), %esi
movq -0x3a8(%rbp), %rdx
leaq -0x470(%rbp), %rdi
callq 0x39960
jmp 0x746e
movl $0x0, -0x4(%rbp)
movl $0x1, -0x454(%rbp)
leaq -0x470(%rbp), %rdi
callq 0x396c0
jmp 0x74ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x74df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x74d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x490(%rbp), %rdi
callq 0x6280
leaq -0x491(%rbp), %rdi
callq 0x6460
leaq -0x470(%rbp), %rdi
callq 0x396c0
jmp 0x751d
leaq -0x2f8(%rbp), %rdi
callq 0x6280
leaq -0x288(%rbp), %rdi
callq 0x6280
leaq -0x208(%rbp), %rdi
callq 0xa750
movl -0x4(%rbp), %eax
addq $0x520, %rsp            # imm = 0x520
popq %rbp
retq
leaq -0x2f8(%rbp), %rdi
callq 0x6280
leaq -0x288(%rbp), %rdi
callq 0x6280
leaq -0x208(%rbp), %rdi
callq 0xa750
movq -0x238(%rbp), %rdi
callq 0x6750
movq %rax, %rdi
callq 0xa740
nopw %cs:(%rax,%rax)
nop