// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/eis-blockcomp.c
// Function: blockCompSeqExpose
static void
blockCompSeqExpose(struct encIdxSeq *eSeqIdx, GtUword pos, int flags,
                   struct extBitsRetrieval *retval, union EISHint *hint)
{
  struct blockCompositionSeq *seqIdx;
  gt_assert(eSeqIdx && eSeqIdx->classInfo == &blockCompositionSeqClass);
  gt_assert(retval);
  seqIdx = encIdxSeq2blockCompositionSeq(eSeqIdx);
  {
    struct superBlock *sBlock;
    GtUword bucketNum, end;
    bucketNum = bucketNumFromPos(seqIdx, pos);
    retval->start = bucketBasePos(seqIdx, bucketNum);
    end = bucketBasePos(seqIdx, bucketNum + 1);
    if (end >= seqIdx->baseClass.seqLen)
      end = seqIdx->baseClass.seqLen;
    retval->len = end - retval->start;
#ifdef USE_SBLOCK_CACHE
    sBlock = cacheFetchSuperBlock(seqIdx, bucketNum,
                                  &hint->bcHint.sBlockCache);
#else
    sBlock = fetchSuperBlock(seqIdx, bucketNum, NULL);
#endif
    retval->cwOffset = sBlockCWExtBitsOffset(sBlock, seqIdx);
    if (flags & EBRF_PERSISTENT_CWBITS)
    {
      if (!(retval->flags & EBRF_PERSISTENT_CWBITS))
      {
          retval->varPart = gt_malloc(superBlockCWMaxReadSize(seqIdx));
      }
      memcpy(retval->cwPart, sBlock->cwData,
             superBlockCWMaxReadSize(seqIdx));
    }
    else
    {
      if (retval->flags & EBRF_PERSISTENT_CWBITS)
        gt_free(retval->cwPart);
      retval->cwPart = sBlock->cwData;
    }
    if (EBRF_RETRIEVE_VARBITS)
    {
      retval->varOffset = sBlockGetcbOffset(sBlock, seqIdx)
        + sBlock->varDataMemBase;
      if (flags & EBRF_PERSISTENT_VARBITS)
      {
        if (!(retval->flags & EBRF_PERSISTENT_VARBITS))
        {
          retval->varPart = gt_malloc(superBlockVarMaxReadSize(seqIdx));
        }
        memcpy(retval->varPart, sBlock->varData,
               superBlockVarMaxReadSize(seqIdx));
      }
      else
      {
        if (retval->flags & EBRF_PERSISTENT_VARBITS)
          gt_free(retval->varPart);
        retval->varPart = sBlock->varData;
      }
    }
    else
    {
      if (retval->flags & EBRF_PERSISTENT_VARBITS)
        gt_free(retval->varPart);
      retval->varPart = NULL;
      retval->varOffset = 0;
    }
#ifndef USE_SBLOCK_CACHE
    deleteSuperBlock(sBlock);
#endif
    retval->flags = flags;
  }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movl %edx, 0x54(%rsp)
movq %rcx, 0x48(%rsp)
movq %r8, 0x40(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0x4abc85
movq 0x60(%rsp), %rax
leaq 0x18ff90(%rip), %rcx    # 0x63bc10
cmpq %rcx, (%rax)
je 0x4abcbd
movq 0x190314(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x6a37d(%rip), %rsi     # 0x516013
leaq 0x10ab55(%rip), %rdx    # 0x5b67f2
leaq 0x10aea0(%rip), %rcx    # 0x5b6b44
leaq 0x10a25d(%rip), %r8     # 0x5b5f08
movl $0x525, %r9d            # imm = 0x525
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4abcbf
jmp 0x4abcc1
cmpq $0x0, 0x48(%rsp)
jne 0x4abd01
movq 0x1902d0(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x6a339(%rip), %rsi     # 0x516013
leaq 0x899fd(%rip), %rdx     # 0x5356de
leaq 0x10ae5c(%rip), %rcx    # 0x5b6b44
leaq 0x10a219(%rip), %r8     # 0x5b5f08
movl $0x526, %r9d            # imm = 0x526
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4abd03
movq 0x60(%rsp), %rdi
callq 0x4ac370
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x4ac3d0
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x4ac790
movq %rax, %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rsi
addq $0x1, %rsi
callq 0x4ac790
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jb 0x4abd77
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rcx
movq 0x48(%rsp), %rax
subq 0x10(%rax), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x4ac400
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x4ad7f0
movq %rax, %rcx
movq 0x48(%rsp), %rax
movq %rcx, (%rax)
movl 0x54(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4abe41
movq 0x48(%rsp), %rax
movl 0x30(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x4abe07
movq 0x38(%rsp), %rdi
callq 0x4acc80
movq %rax, %rdi
leaq 0x10a117(%rip), %rsi    # 0x5b5f08
movl $0x53c, %edx            # imm = 0x53C
callq 0xe80f0
movq %rax, %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x48(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdi
callq 0x4acc80
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %rax, %rdx
callq 0x19610
jmp 0x4abe7d
movq 0x48(%rsp), %rax
movl 0x30(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4abe6b
movq 0x48(%rsp), %rax
movq 0x20(%rax), %rdi
leaq 0x10a0a7(%rip), %rsi    # 0x5b5f08
movl $0x544, %edx            # imm = 0x544
callq 0xe88c0
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x4ad820
movq %rax, %rcx
movq 0x30(%rsp), %rax
movl (%rax), %eax
addq %rax, %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x8(%rax)
movl 0x54(%rsp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x4abf20
movq 0x48(%rsp), %rax
movl 0x30(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x4abee8
movq 0x38(%rsp), %rdi
callq 0x4accd0
movq %rax, %rdi
leaq 0x10a036(%rip), %rsi    # 0x5b5f08
movl $0x54f, %edx            # imm = 0x54F
callq 0xe80f0
movq %rax, %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x48(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, (%rsp)
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
callq 0x4accd0
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %rax, %rdx
callq 0x19610
jmp 0x4abf5c
movq 0x48(%rsp), %rax
movl 0x30(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x4abf4a
movq 0x48(%rsp), %rax
movq 0x28(%rax), %rdi
leaq 0x109fc8(%rip), %rsi    # 0x5b5f08
movl $0x557, %edx            # imm = 0x557
callq 0xe88c0
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x48(%rsp), %rax
movq %rcx, 0x28(%rax)
movl 0x54(%rsp), %ecx
movq 0x48(%rsp), %rax
movl %ecx, 0x30(%rax)
addq $0x68, %rsp
retq
nopl (%rax)