// File: lemire[P]fastscancount/benchmark/maropuparser.h
// Function: MaropuGapReader::ReadQty(unsigned int&)
bool ReadQty(uint32_t &qty) {
    qty = 0;
    if (fd == NULL) {
      throw std::runtime_error("You forgot to open the file.");
    }
    errno = 0;
    size_t result = fread(&qty, sizeof(qty), 1, fd);
    if (errno) {
      std::stringstream err;
      err << "Error opening file, IO status: " << strerror(errno);
      throw std::runtime_error(err.str());
    }
    if (result != 1) {
      return false;
    }
    if (qty > 1 << 29) {
      std::cout << "warning: reading a very large array (" << qty
                << " integers) : is your input file in the right format?" << std::endl;
    }
    return true;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq -0x18(%rbp), %rcx
movl $0x0, (%rcx)
cmpq $0x0, 0x20(%rax)
jne 0x139ab
movl $0x10, %edi
callq 0x3160
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x1f0(%rbp)
leaq 0xa5d(%rip), %rsi       # 0x143ca
callq 0x3100
jmp 0x13974
movq -0x1f0(%rbp), %rdi
movq 0xa66e(%rip), %rsi      # 0x1dff0
movq 0xa62f(%rip), %rdx      # 0x1dfb8
callq 0x3450
movq -0x1f0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x3200
jmp 0x13b5b
callq 0x3050
movq %rax, %rcx
movq -0x1e8(%rbp), %rax
movl $0x0, (%rcx)
movq -0x18(%rbp), %rdi
movq 0x20(%rax), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x33b0
movq %rax, -0x30(%rbp)
callq 0x3050
cmpl $0x0, (%rax)
je 0x13af1
leaq -0x1b8(%rbp), %rdi
callq 0x31e0
leaq -0x1a8(%rbp), %rdi
leaq 0x9e4(%rip), %rsi       # 0x143e7
callq 0x3280
movq %rax, -0x1f8(%rbp)
jmp 0x13a11
callq 0x3050
movl (%rax), %edi
callq 0x30d0
movq -0x1f8(%rbp), %rdi
movq %rax, %rsi
callq 0x3280
jmp 0x13a2e
movb $0x1, -0x1d9(%rbp)
movl $0x10, %edi
callq 0x3160
movq %rax, -0x200(%rbp)
leaq -0x1d8(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x3270
jmp 0x13a5b
movq -0x200(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x3410
jmp 0x13a70
movq -0x200(%rbp), %rdi
movb $0x0, -0x1d9(%rbp)
movq 0xa56b(%rip), %rsi      # 0x1dff0
movq 0xa52c(%rip), %rdx      # 0x1dfb8
callq 0x3450
jmp 0x13b64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x13ae3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x13aca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x31b0
testb $0x1, -0x1d9(%rbp)
jne 0x13ad5
jmp 0x13ae1
movq -0x200(%rbp), %rdi
callq 0x3200
jmp 0x13ae3
leaq -0x1b8(%rbp), %rdi
callq 0x3210
jmp 0x13b5b
cmpq $0x1, -0x30(%rbp)
je 0x13afe
movb $0x0, -0x1(%rbp)
jmp 0x13b4d
movq -0x18(%rbp), %rax
cmpl $0x20000000, (%rax)     # imm = 0x20000000
jbe 0x13b49
movq 0xa4b7(%rip), %rdi      # 0x1dfc8
leaq 0x8ef(%rip), %rsi       # 0x14407
callq 0x3280
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl (%rax), %esi
callq 0x3340
movq %rax, %rdi
leaq 0x8f8(%rip), %rsi       # 0x1442d
callq 0x3280
movq %rax, %rdi
movq 0xa464(%rip), %rsi      # 0x1dfa8
callq 0x32c0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x3470
nopw %cs:(%rax,%rax)
nop