// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movq 0x659d(%rip), %r14      # 0xd2c0
movq %r14, %rdi
callq 0x3030
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x3150
movq %r15, 0x10(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x38c0
movq 0x656b(%rip), %rdx      # 0xd2c0
cmpq %rdx, %rax
jb 0x6dd2
movq 0x10(%rsp), %rsi
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0x3fe4
leaq 0x653c(%rip), %rsi      # 0xd2b8
leaq 0x38(%rsp), %rdi
callq 0x6fd3
testb %al, %al
jne 0x6e2a
pushq $0x1
popq %rsi
leaq 0xe(%rsp), %rdx
movq %rbx, %rdi
callq 0x38c0
testq %rax, %rax
je 0x6e82
cmpb $0x2, 0xe(%rsp)
jne 0x6ed7
leaq 0x38(%rsp), %rdi
callq 0x3398
leaq 0x10(%rsp), %rdi
callq 0x3e8c
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $0x8
popq %rdi
callq 0x3130
movq %rax, %r14
pushq $0x10
popq %rdi
callq 0x3210
movq %rax, %r15
leaq 0x1b62(%rip), %rsi      # 0x8951
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x3e0e
movb $0x1, %r12b
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0x6fbe
movq %r15, (%r14)
xorl %r12d, %r12d
leaq 0x5f1d(%rip), %rsi      # 0xcd38
movq %r14, %rdi
xorl %edx, %edx
callq 0x3330
jmp 0x6f2a
pushq $0x8
popq %rdi
callq 0x3130
movq %rax, %r14
pushq $0x10
popq %rdi
callq 0x3210
movq %rax, %r15
leaq 0x1b2c(%rip), %rsi      # 0x8973
leaq 0x18(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x3e0e
movb $0x1, %r12b
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x6fbe
movq %r15, (%r14)
xorl %r12d, %r12d
leaq 0x5ec5(%rip), %rsi      # 0xcd38
movq %r14, %rdi
xorl %edx, %edx
callq 0x3330
jmp 0x6f2a
pushq $0x8
popq %rdi
callq 0x3130
movq %rax, %r14
pushq $0x10
popq %rdi
callq 0x3210
movq %rax, %r15
leaq 0x1af0(%rip), %rsi      # 0x898f
leaq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x3e0e
movb $0x1, %r12b
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x6fbe
movq %r15, (%r14)
xorl %r12d, %r12d
leaq 0x5e6d(%rip), %rsi      # 0xcd38
movq %r14, %rdi
xorl %edx, %edx
callq 0x3330
jmp 0x6f2a
pushq $0x8
popq %rdi
callq 0x3130
movq %rax, %r14
pushq $0x10
popq %rdi
callq 0x3210
movq %rax, %r15
leaq 0x1abb(%rip), %rsi      # 0x89af
leaq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x3e0e
movb $0x1, %r12b
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x6fbe
movq %r15, (%r14)
xorl %r12d, %r12d
leaq 0x5e18(%rip), %rsi      # 0xcd38
movq %r14, %rdi
xorl %edx, %edx
callq 0x3330
jmp 0x6f32
jmp 0x6f46
jmp 0x6f32
jmp 0x6f46
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3398
testb %r12b, %r12b
jne 0x6f49
jmp 0x6f9b
movq %rax, %rbx
pushq $0x10
popq %rsi
movq %r15, %rdi
callq 0x3220
jmp 0x6f81
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x3398
testb %r12b, %r12b
jne 0x6f6d
jmp 0x6fac
movq %rax, %rbx
pushq $0x10
popq %rsi
movq %r15, %rdi
callq 0x3220
jmp 0x6f8e
jmp 0x6f7e
jmp 0x6f7e
movq %rax, %rbx
movq %r14, %rdi
callq 0x3180
jmp 0x6f9b
movq %rax, %rbx
movq %r14, %rdi
callq 0x3180
jmp 0x6fac
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x3398
jmp 0x6fac
jmp 0x6fa9
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3e8c
movq %rbx, %rdi
callq 0x3340