// File: /workspace/github_cpp_makefile_star2_O3/jansucan[P]diff-dd/src/./format_v2.h
// Function: FormatV2::Reader::readFileHeader()
void readFileHeader()
    {
        auto rawSignature{std::make_unique<char[]>(FileSignature.size())};
        size_t r{m_reader.read(FileSignature.size(), rawSignature.get())};
        if (r < FileSignature.size()) {
            throw new Error("cannot read file header signature");
        }
        const std::string signature{rawSignature.get(), FileSignature.size()};
        if (signature != FileSignature) {
            throw new Error("wrong file header signature");
        }

        uint8_t version;
        r = {
            m_reader.read(sizeof(version), reinterpret_cast<char *>(&version))};
        if (r < sizeof(version)) {
            throw new Error("cannot read file header version");
        }
        if (version != FileVersion) {
            throw new Error("wrong file header version");
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
movq 0x4ae2(%rip), %r15      # 0xc2d8
movq %r15, %rdi
callq 0x3030
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x3150
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3aa0
movq 0x4ab5(%rip), %rcx      # 0xc2d8
cmpq %rcx, %rax
jb 0x7935
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rbx, %rdx
addq %rcx, %rdx
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x41b8
movq 0x30(%rsp), %rdx
cmpq 0x4a84(%rip), %rdx      # 0xc2d8
jne 0x78c4
testq %rdx, %rdx
je 0x7870
movq 0x4a6e(%rip), %rsi      # 0xc2d0
movq 0x28(%rsp), %rdi
callq 0x3250
testl %eax, %eax
jne 0x78c4
leaq 0x7(%rsp), %rdx
movl $0x1, %esi
movq %r14, %rdi
callq 0x3aa0
testq %rax, %rax
je 0x79a6
cmpb $0x2, 0x7(%rsp)
jne 0x7a14
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x78ad
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3240
movq %rbx, %rdi
callq 0x32f0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x3130
movq %rax, %r15
movl $0x10, %edi
callq 0x3230
movq %rax, %r12
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x10a1(%rip), %rsi      # 0x898f
leaq 0x10b5(%rip), %rdx      # 0x89aa
leaq 0x8(%rsp), %rdi
callq 0x41b8
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x32d0
leaq 0x444a(%rip), %rax      # 0xbd60
movq %rax, (%r12)
movq %r12, (%r15)
xorl %ebp, %ebp
leaq 0x440a(%rip), %rsi      # 0xbd30
movq %r15, %rdi
xorl %edx, %edx
callq 0x3360
jmp 0x7a80
movl $0x8, %edi
callq 0x3130
movq %rax, %r15
movl $0x10, %edi
callq 0x3230
movq %rax, %r12
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x100e(%rip), %rsi      # 0x896d
leaq 0x1028(%rip), %rdx      # 0x898e
leaq 0x28(%rsp), %rdi
callq 0x41b8
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r12, %rdi
callq 0x32d0
leaq 0x43d9(%rip), %rax      # 0xbd60
movq %rax, (%r12)
movq %r12, (%r15)
xorl %ebp, %ebp
leaq 0x4399(%rip), %rsi      # 0xbd30
movq %r15, %rdi
xorl %edx, %edx
callq 0x3360
jmp 0x7a80
movl $0x8, %edi
callq 0x3130
movq %rax, %r15
movl $0x10, %edi
callq 0x3230
movq %rax, %r12
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xfdb(%rip), %rsi       # 0x89ab
leaq 0xff3(%rip), %rdx       # 0x89ca
leaq 0x8(%rsp), %rdi
callq 0x41b8
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x32d0
leaq 0x4368(%rip), %rax      # 0xbd60
movq %rax, (%r12)
movq %r12, (%r15)
xorl %ebp, %ebp
leaq 0x4328(%rip), %rsi      # 0xbd30
movq %r15, %rdi
xorl %edx, %edx
callq 0x3360
jmp 0x7a80
movl $0x8, %edi
callq 0x3130
movq %rax, %r15
movl $0x10, %edi
callq 0x3230
movq %rax, %r12
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xf8d(%rip), %rsi       # 0x89cb
leaq 0xf9f(%rip), %rdx       # 0x89e4
leaq 0x8(%rsp), %rdi
callq 0x41b8
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x32d0
leaq 0x42fa(%rip), %rax      # 0xbd60
movq %rax, (%r12)
movq %r12, (%r15)
xorl %ebp, %ebp
leaq 0x42ba(%rip), %rsi      # 0xbd30
movq %r15, %rdi
xorl %edx, %edx
callq 0x3360
jmp 0x7abe
jmp 0x7ae4
jmp 0x7abe
jmp 0x7ae4
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x7aa2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3240
testb %bpl, %bpl
jne 0x7aaf
jmp 0x7b35
movq %rax, %r14
movl $0x10, %esi
movq %r12, %rdi
callq 0x3240
jmp 0x7afd
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x7add
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3240
testb %bpl, %bpl
jne 0x7ae7
jmp 0x7b17
movq %rax, %r14
movl $0x10, %esi
movq %r12, %rdi
callq 0x3240
jmp 0x7b0a
jmp 0x7b07
jmp 0x7b07
movq %rax, %r14
movq %r15, %rdi
callq 0x3190
jmp 0x7b35
movq %rax, %r14
movq %r15, %rdi
callq 0x3190
jmp 0x7b17
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x7b35
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3240
jmp 0x7b35
jmp 0x7b32
movq %rax, %r14
movq %rbx, %rdi
callq 0x32f0
movq %r14, %rdi
callq 0x3370
nop