// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file.c
// Function: get_file_u64
bool get_file_u64(struct hed_file *file, size_t pos, uint64_t *data)
{
  if (! file->data || pos + 8 > file->data_len) return false;

  if (file->endianess == HED_DATA_LITTLE_ENDIAN) {
    *data = (((uint64_t) file->data[pos+7] << 56) |
             ((uint64_t) file->data[pos+6] << 48) |
             ((uint64_t) file->data[pos+5] << 40) |
             ((uint64_t) file->data[pos+4] << 32) |
             ((uint64_t) file->data[pos+3] << 24) |
             ((uint64_t) file->data[pos+2] << 16) |
             ((uint64_t) file->data[pos+1] <<  8) |
             ((uint64_t) file->data[pos+0] <<  0));
  } else {
    *data = (((uint64_t) file->data[pos+0] << 56) |
             ((uint64_t) file->data[pos+1] << 48) |
             ((uint64_t) file->data[pos+2] << 40) |
             ((uint64_t) file->data[pos+3] << 32) |
             ((uint64_t) file->data[pos+4] << 24) |
             ((uint64_t) file->data[pos+5] << 16) |
             ((uint64_t) file->data[pos+6] <<  8) |
             ((uint64_t) file->data[pos+7] <<  0));
  }
  return true;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq %rdx, -0x20(%rsp)
movq -0x10(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x45df
movq -0x18(%rsp), %rax
addq $0x8, %rax
movq -0x10(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jbe 0x45e9
movb $0x0, -0x1(%rsp)
jmp 0x47ae
movq -0x10(%rsp), %rax
cmpl $0x0, 0x2c(%rax)
jne 0x46d3
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rcx
movzbl 0x7(%rax,%rcx), %eax
movl %eax, %ecx
shlq $0x38, %rcx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl 0x6(%rax,%rdx), %eax
shlq $0x30, %rax
orq %rax, %rcx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl 0x5(%rax,%rdx), %eax
shlq $0x28, %rax
orq %rax, %rcx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl 0x4(%rax,%rdx), %eax
shlq $0x20, %rax
orq %rax, %rcx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl 0x3(%rax,%rdx), %eax
shlq $0x18, %rax
orq %rax, %rcx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl 0x2(%rax,%rdx), %eax
shlq $0x10, %rax
orq %rax, %rcx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl 0x1(%rax,%rdx), %eax
shlq $0x8, %rax
orq %rax, %rcx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl (%rax,%rdx), %eax
shlq $0x0, %rax
orq %rax, %rcx
movq -0x20(%rsp), %rax
movq %rcx, (%rax)
jmp 0x47a9
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
shlq $0x38, %rcx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl 0x1(%rax,%rdx), %eax
shlq $0x30, %rax
orq %rax, %rcx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl 0x2(%rax,%rdx), %eax
shlq $0x28, %rax
orq %rax, %rcx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl 0x3(%rax,%rdx), %eax
shlq $0x20, %rax
orq %rax, %rcx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl 0x4(%rax,%rdx), %eax
shlq $0x18, %rax
orq %rax, %rcx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl 0x5(%rax,%rdx), %eax
shlq $0x10, %rax
orq %rax, %rcx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl 0x6(%rax,%rdx), %eax
shlq $0x8, %rax
orq %rax, %rcx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl 0x7(%rax,%rdx), %eax
shlq $0x0, %rax
orq %rax, %rcx
movq -0x20(%rsp), %rax
movq %rcx, (%rax)
movb $0x1, -0x1(%rsp)
movb -0x1(%rsp), %al
andb $0x1, %al
retq
nopw %cs:(%rax,%rax)