// File: 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
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq 0x802f(%rip), %rdi      # 0x15380
movq %rdi, -0x118(%rbp)
callq 0x31e0
movq %rax, %rsi
leaq -0x10(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x4ae0
movq -0x118(%rbp), %rdi
callq 0x31e0
movq -0x110(%rbp), %rdi
movq %rax, -0x100(%rbp)
callq 0x4bc0
movq -0x108(%rbp), %rdi
movq -0x100(%rbp), %rsi
movq %rax, %rdx
callq 0x3dd0
movq %rax, -0xf8(%rbp)
jmp 0xd3ae
movq -0xf8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq 0x7fb5(%rip), %rdi      # 0x15380
callq 0x31e0
movq %rax, %rcx
movq -0x120(%rbp), %rax
cmpq %rcx, %rax
jae 0xd4f7
movb $0x1, -0x4b(%rbp)
movl $0x8, %edi
callq 0x3180
movq %rax, -0x130(%rbp)
movl $0x10, %edi
callq 0x32b0
movq %rax, -0x128(%rbp)
jmp 0xd40b
movb $0x1, -0x4a(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x34a0
movq -0x138(%rbp), %rdx
leaq 0x1539(%rip), %rsi      # 0xe966
leaq -0x48(%rbp), %rdi
callq 0x47f0
jmp 0xd438
movq -0x128(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0xd980
jmp 0xd44a
movq -0x130(%rbp), %rdi
movq -0x128(%rbp), %rax
movb $0x0, -0x4a(%rbp)
movq %rax, (%rdi)
movb $0x0, -0x4b(%rbp)
leaq 0x78ce(%rip), %rsi      # 0x14d38
xorl %eax, %eax
movl %eax, %edx
callq 0x3480
jmp 0xd97d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xd96b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xd4de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xd4ba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x3528
leaq -0x49(%rbp), %rdi
callq 0x32f0
testb $0x1, -0x4a(%rbp)
jne 0xd4cb
jmp 0xd4dc
movq -0x128(%rbp), %rdi
movl $0x10, %esi
callq 0x32c0
jmp 0xd4de
testb $0x1, -0x4b(%rbp)
jne 0xd4e6
jmp 0xd4f2
movq -0x130(%rbp), %rdi
callq 0x3200
jmp 0xd96b
leaq -0x10(%rbp), %rdi
callq 0x4bc0
movq %rax, -0x150(%rbp)
leaq 0x7e72(%rip), %rdi      # 0x15380
callq 0x31e0
movq %rax, -0x148(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x34a0
movq -0x150(%rbp), %rsi
movq -0x148(%rbp), %rdx
movq -0x140(%rbp), %rcx
leaq -0x70(%rbp), %rdi
callq 0x3340
jmp 0xd54a
leaq -0x71(%rbp), %rdi
callq 0x32f0
leaq -0x70(%rbp), %rdi
leaq 0x7e22(%rip), %rsi      # 0x15380
callq 0xd9c0
testb $0x1, %al
jne 0xd56c
jmp 0xd6aa
movb $0x1, -0x9b(%rbp)
movl $0x8, %edi
callq 0x3180
movq %rax, -0x160(%rbp)
movl $0x10, %edi
callq 0x32b0
movq %rax, -0x158(%rbp)
jmp 0xd597
movb $0x1, -0x9a(%rbp)
leaq -0x99(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x34a0
movq -0x168(%rbp), %rdx
leaq 0x13c9(%rip), %rsi      # 0xe988
leaq -0x98(%rbp), %rdi
callq 0x47f0
jmp 0xd5cd
movq -0x158(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0xd980
jmp 0xd5e2
movq -0x160(%rbp), %rdi
movq -0x158(%rbp), %rax
movb $0x0, -0x9a(%rbp)
movq %rax, (%rdi)
movb $0x0, -0x9b(%rbp)
leaq 0x7730(%rip), %rsi      # 0x14d38
xorl %eax, %eax
movl %eax, %edx
callq 0x3480
jmp 0xd97d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x71(%rbp), %rdi
callq 0x32f0
jmp 0xd96b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xd68e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xd664
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x3528
leaq -0x99(%rbp), %rdi
callq 0x32f0
testb $0x1, -0x9a(%rbp)
jne 0xd67b
jmp 0xd68c
movq -0x158(%rbp), %rdi
movl $0x10, %esi
callq 0x32c0
jmp 0xd68e
testb $0x1, -0x9b(%rbp)
jne 0xd699
jmp 0xd6a5
movq -0x160(%rbp), %rdi
callq 0x3200
jmp 0xd962
movq -0x108(%rbp), %rdi
movl $0x1, %esi
leaq -0x9c(%rbp), %rdx
callq 0x3dd0
movq %rax, -0x170(%rbp)
jmp 0xd6cb
movq -0x170(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x1, -0x18(%rbp)
jae 0xd816
movb $0x1, -0xc3(%rbp)
movl $0x8, %edi
callq 0x3180
movq %rax, -0x180(%rbp)
movl $0x10, %edi
callq 0x32b0
movq %rax, -0x178(%rbp)
jmp 0xd70c
movb $0x1, -0xc2(%rbp)
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x34a0
movq -0x188(%rbp), %rdx
leaq 0x1270(%rip), %rsi      # 0xe9a4
leaq -0xc0(%rbp), %rdi
callq 0x47f0
jmp 0xd742
movq -0x178(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0xd980
jmp 0xd757
movq -0x180(%rbp), %rdi
movq -0x178(%rbp), %rax
movb $0x0, -0xc2(%rbp)
movq %rax, (%rdi)
movb $0x0, -0xc3(%rbp)
leaq 0x75bb(%rip), %rsi      # 0x14d38
xorl %eax, %eax
movl %eax, %edx
callq 0x3480
jmp 0xd97d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xd962
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xd7fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xd7d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x3528
leaq -0xc1(%rbp), %rdi
callq 0x32f0
testb $0x1, -0xc2(%rbp)
jne 0xd7e7
jmp 0xd7f8
movq -0x178(%rbp), %rdi
movl $0x10, %esi
callq 0x32c0
jmp 0xd7fa
testb $0x1, -0xc3(%rbp)
jne 0xd805
jmp 0xd811
movq -0x180(%rbp), %rdi
callq 0x3200
jmp 0xd962
movzbl -0x9c(%rbp), %eax
cmpl $0x2, %eax
je 0xd947
movb $0x1, -0xeb(%rbp)
movl $0x8, %edi
callq 0x3180
movq %rax, -0x198(%rbp)
movl $0x10, %edi
callq 0x32b0
movq %rax, -0x190(%rbp)
jmp 0xd851
movb $0x1, -0xea(%rbp)
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x34a0
movq -0x1a0(%rbp), %rdx
leaq 0x114b(%rip), %rsi      # 0xe9c4
leaq -0xe8(%rbp), %rdi
callq 0x47f0
jmp 0xd887
movq -0x190(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0xd980
jmp 0xd89c
movq -0x198(%rbp), %rdi
movq -0x190(%rbp), %rax
movb $0x0, -0xea(%rbp)
movq %rax, (%rdi)
movb $0x0, -0xeb(%rbp)
leaq 0x7476(%rip), %rsi      # 0x14d38
xorl %eax, %eax
movl %eax, %edx
callq 0x3480
jmp 0xd97d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xd92e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0xd904
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x3528
leaq -0xe9(%rbp), %rdi
callq 0x32f0
testb $0x1, -0xea(%rbp)
jne 0xd91b
jmp 0xd92c
movq -0x190(%rbp), %rdi
movl $0x10, %esi
callq 0x32c0
jmp 0xd92e
testb $0x1, -0xeb(%rbp)
jne 0xd939
jmp 0xd945
movq -0x198(%rbp), %rdi
callq 0x3200
jmp 0xd962
leaq -0x70(%rbp), %rdi
callq 0x3528
leaq -0x10(%rbp), %rdi
callq 0x4b70
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
leaq -0x70(%rbp), %rdi
callq 0x3528
leaq -0x10(%rbp), %rdi
callq 0x4b70
movq -0x20(%rbp), %rdi
callq 0x3490
nopl (%rax)