// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/hcr.c
// Function: get_next_file_chunk_for_huffman
static int get_next_file_chunk_for_huffman(GtBitsequence **bits,
                                           GtUword *length,
                                           GtUword *offset,
                                           GtUword *pad_length,
                                           void *meminfo)
{
  const int empty = 0,
            success = 1;
  HcrHuffDataIterator *data_iter;
  gt_assert(meminfo);
  gt_assert(bits && length && offset && pad_length);
  data_iter = (HcrHuffDataIterator*) meminfo;

  if (data_iter->pos < data_iter->end) {
    gt_fa_xmunmap(data_iter->data);
    data_iter->data = NULL;
    data_iter->data = gt_fa_xmmap_read_range(data_iter->path,
                                        (size_t) data_iter->blocksize,
                                        data_iter->pos);
    data_iter->pos += data_iter->blocksize;
    if (data_iter->pos > data_iter->end) {
      gt_safe_assign(*length,
                    (data_iter->blocksize - (data_iter->pos - data_iter->end)));
      *length /= sizeof (GtBitsequence);
    }
    else
      *length = data_iter->bitseq_per_chunk;

    *offset = 0;
    *pad_length = 0;
    *bits = data_iter->data;
    return success;
  }
  gt_fa_xmunmap(data_iter->data);
  data_iter->data = NULL;
  *bits = NULL;
  *length = 0;
  *offset = 0;
  *pad_length = 0;
  return empty;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %r8, %r8
je 0xebed3
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq %rsi, %xmm0
movq %rdi, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
movq %rcx, (%rsp)
movq %rcx, %xmm0
movq %rdx, %xmm2
punpcklqdq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0]
pxor %xmm0, %xmm0
pcmpeqd %xmm0, %xmm2
pcmpeqd %xmm0, %xmm1
movdqa %xmm1, %xmm0
shufps $0xdd, %xmm2, %xmm0     # xmm0 = xmm0[1,3],xmm2[1,3]
shufps $0x88, %xmm2, %xmm1     # xmm1 = xmm1[0,2],xmm2[0,2]
andps %xmm0, %xmm1
movmskps %xmm1, %eax
testl %eax, %eax
jne 0xebf01
movq %r8, %r13
movq 0x8(%r8), %rdi
movq 0x20(%r8), %rbp
movq 0x18(%r8), %rbx
callq 0x8b9fa
andq $0x0, 0x8(%r13)
cmpq %rbx, %rbp
jae 0xebe91
movq 0x40(%r13), %rsi
movq (%r13), %rdi
movq 0x20(%r13), %rdx
leaq 0x236bf7(%rip), %rcx    # 0x322a58
movl $0x27e, %r8d            # imm = 0x27E
callq 0x8b849
movq %rax, 0x8(%r13)
movq 0x18(%r13), %rcx
movq 0x40(%r13), %rdx
movq 0x20(%r13), %rsi
addq %rdx, %rsi
movq %rsi, 0x20(%r13)
subq %rsi, %rcx
jae 0xebeaa
addq %rdx, %rcx
shrq $0x3, %rcx
jmp 0xebeae
andq $0x0, (%r15)
andq $0x0, (%r12)
andq $0x0, (%r14)
movq (%rsp), %rax
andq $0x0, (%rax)
xorl %eax, %eax
jmp 0xebec4
movq 0x30(%r13), %rcx
movq %rcx, (%r12)
andq $0x0, (%r14)
movq (%rsp), %rcx
andq $0x0, (%rcx)
movq %rax, (%r15)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x34c08e(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1f912f(%rip), %rsi    # 0x2e5013
leaq 0x23708a(%rip), %rdx    # 0x322f75
leaq 0x23708b(%rip), %rcx    # 0x322f7d
leaq 0x236b5f(%rip), %r8     # 0x322a58
movl $0x275, %r9d            # imm = 0x275
jmp 0xebf2d
movq 0x34c060(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1f9101(%rip), %rsi    # 0x2e5013
leaq 0x237084(%rip), %rdx    # 0x322f9d
leaq 0x23705d(%rip), %rcx    # 0x322f7d
leaq 0x236b31(%rip), %r8     # 0x322a58
movl $0x276, %r9d            # imm = 0x276
xorl %eax, %eax
callq 0x17a50
callq 0x17390