// File: loadzero[P]geoloc/geoloc/query.hpp
// Function: GeoData::read_header()
void read_header()
    {
        const char* raw = (const char*) mem_file_.get_mem(32);

        std::string header(raw, raw + 32);
        std::string scratch;
        std::vector<char*> toks;

        char_split(header, scratch, toks, ' ');

        if (toks.size() != 5)
        {
            FATAL_ERROR("header is corrupt - %s", header.c_str());
        }

        check_header_value("header1", toks[0], "geoloc");
        check_header_value("header2", toks[1], "loadzero");
        check_header_value("version", toks[2], "v001");
        check_header_value("endian", toks[3], get_endian());
    }

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq 0xb0(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movl $0x20, %esi
callq 0x170f0
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x20(%rsp)
addq $0x20, %rax
movq %rax, 0x28(%rsp)
leaq 0x87(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x44e0
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rcx
leaq 0x88(%rsp), %rdi
callq 0x17170
jmp 0x16c84
leaq 0x87(%rsp), %rdi
callq 0x42d0
leaq 0x50(%rsp), %rdi
callq 0x4410
jmp 0x16c9d
leaq 0x38(%rsp), %rdi
callq 0x7510
jmp 0x16ca9
leaq 0x88(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movl $0x20, %ecx
callq 0x171f0
jmp 0x16cc7
leaq 0x38(%rsp), %rdi
callq 0x78f0
cmpq $0x5, %rax
je 0x16d75
leaq 0x88(%rsp), %rdi
callq 0x4100
movq %rax, 0x10(%rsp)
jmp 0x16cef
movq 0x10(%rsp), %rcx
leaq 0x58ad(%rip), %rdi      # 0x1c5a8
leaq 0x59ce(%rip), %rdx      # 0x1c6d0
xorl %eax, %eax
movl $0x70, %esi
callq 0x1b800
jmp 0x16d10
jmp 0x16d75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x87(%rsp), %rdi
callq 0x42d0
jmp 0x16e7d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0x16e6c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
jmp 0x16e5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
leaq 0x38(%rsp), %rdi
callq 0xad50
jmp 0x16e5c
xorl %eax, %eax
movl %eax, %esi
leaq 0x38(%rsp), %rdi
callq 0x7930
movq 0x18(%rsp), %rdi
movq (%rax), %rdx
leaq 0x5955(%rip), %rsi      # 0x1c6e7
leaq 0x5956(%rip), %rcx      # 0x1c6ef
callq 0x17310
jmp 0x16da0
leaq 0x38(%rsp), %rdi
movl $0x1, %esi
callq 0x7930
movq 0x18(%rsp), %rdi
movq (%rax), %rdx
leaq 0x5938(%rip), %rsi      # 0x1c6f6
leaq 0x5939(%rip), %rcx      # 0x1c6fe
callq 0x17310
jmp 0x16dcc
leaq 0x38(%rsp), %rdi
movl $0x2, %esi
callq 0x7930
movq 0x18(%rsp), %rdi
movq (%rax), %rdx
leaq 0x591d(%rip), %rsi      # 0x1c707
leaq 0x591e(%rip), %rcx      # 0x1c70f
callq 0x17310
jmp 0x16df8
leaq 0x38(%rsp), %rdi
movl $0x3, %esi
callq 0x7930
movq (%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x65a0
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rdx
movq %rax, %rcx
leaq 0x58ec(%rip), %rsi      # 0x1c714
callq 0x17310
jmp 0x16e2f
leaq 0x38(%rsp), %rdi
callq 0xad50
jmp 0x16e3b
leaq 0x50(%rsp), %rdi
callq 0x41a0
jmp 0x16e47
leaq 0x88(%rsp), %rdi
callq 0x41a0
addq $0xb8, %rsp
retq
jmp 0x16e5e
leaq 0x50(%rsp), %rdi
callq 0x41a0
jmp 0x16e6a
jmp 0x16e6c
leaq 0x88(%rsp), %rdi
callq 0x41a0
jmp 0x16e7b
jmp 0x16e7d
movq 0x78(%rsp), %rdi
callq 0x44d0
movq %rax, %rdi
callq 0x5b40
nop