// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/core/encseq.c
// Function: gt_encseq_determine_size
uint64_t gt_encseq_determine_size(GtEncseqAccessType sat,
                                  GtUword totallength,
                                  GtUword numofsequences,
                                  GtUword numofdbfiles,
                                  GtUword lengthofdbfilenames,
                                  GtUword wildcardranges,
                                  unsigned int numofchars,
                                  unsigned int bitspersymbol,
                                  GtUword lengthofalphadef)
{
  uint64_t sum,
           sizeoftwobitencoding
             = (uint64_t) gt_unitsoftwobitencoding(totallength) *
               (uint64_t) sizeof (GtTwobitencoding);

  switch (sat) {
    case GT_ACCESS_TYPE_DIRECTACCESS:
         sum = (uint64_t) totallength * (uint64_t) sizeof (GtUchar);
         break;
    case GT_ACCESS_TYPE_BYTECOMPRESS:
         gt_assert(bitspersymbol > 0);
         sum = (uint64_t) sizeofbitarray(bitspersymbol,
                                         (BitOffset) totallength);
         break;
    case GT_ACCESS_TYPE_EQUALLENGTH:
         sum = sizeoftwobitencoding;
         break;
    case GT_ACCESS_TYPE_BITACCESS:
         sum = sizeoftwobitencoding;
         if (wildcardranges > 0 || numofsequences > 1UL) {
           sum += (uint64_t) sizeof (GtBitsequence) *
                  (uint64_t) GT_NUMOFINTSFORBITS(totallength+GT_INTWORDSIZE);
         }
         break;
    case GT_ACCESS_TYPE_UCHARTABLES:
    case GT_ACCESS_TYPE_USHORTTABLES:
    case GT_ACCESS_TYPE_UINT32TABLES:
         sum = sizeoftwobitencoding +
               gt_encseq_sizeofSWtable(sat, true, false, totallength,
                                       wildcardranges);
         break;
    default:
         fprintf(stderr, "gt_encseq_determine_size(%d) undefined\n", (int) sat);
         exit(GT_EXIT_PROGRAMMING_ERROR);
  }
  sum += sizeof (GtUchar); /* for is64bit type */
  sum += sizeof (GtUword); /* for version type */
  sum += sizeof (GtUword); /* for sat type */
  sum += sizeof (totallength);   /* for totallength */
  sum += sizeof (GtUword); /* for numofdbsequences type */
  sum += sizeof (GtUword); /* for numofdbfilenames type */
  sum += sizeof (GtUword); /* for lengthofdbfilenames type */
  sum += sizeof (GtSpecialcharinfo); /* for specialcharinfo */
  sum += sizeof (GtUword); /* for minseqlen type */
  sum += sizeof (GtUword); /* for maxseqlen type */
  sum += sizeof (GtUword); /* for numofallchars type */
  sum += sizeof (unsigned char); /* for maxsubalphasize type */
  sum += sizeof (GtFilelengthvalues) * numofdbfiles; /* for filelengthtab */
  sum += sizeof (GtUword) * numofchars; /* for characterdistribution */
  sum += sizeof (char) * lengthofdbfilenames; /* for firstfilename */
  sum += sizeof (GtUword); /* for alphatype */
  sum += sizeof (GtUword); /* for lengthofalphadef */
  sum += sizeof (char) * lengthofalphadef; /* for alphadef */
  return sum;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rsi, %rcx
movl %edi, %eax
decq %rsi
shrq $0x5, %rsi
cmpq $0x20, %rcx
leaq 0x10(,%rsi,8), %rsi
pushq $0x10
popq %r15
cmovaeq %rsi, %r15
cmpl $0x6, %edi
ja 0xa7d99
movq %r8, %r14
movl %eax, %esi
leaq 0x43d0d(%rip), %rdi     # 0xeba0c
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
pushq $0x1
popq %rsi
movl %eax, %edi
xorl %edx, %edx
movq %r9, %r8
callq 0xa7df3
addq %rax, %r15
jmp 0xa7d76
movl 0x28(%rsp), %eax
testl %eax, %eax
je 0xa7dbb
movl %eax, %eax
imulq %rcx, %rax
movq %rax, %r15
shrq $0x3, %r15
andl $0x7, %eax
cmpq $0x1, %rax
sbbq $-0x1, %r15
jmp 0xa7d76
testq %r9, %r9
sete %al
cmpq $0x2, %rdx
setb %dl
testb %al, %dl
jne 0xa7d76
leaq 0x3f(%rcx), %rax
shrq $0x6, %rax
cmpq $-0x40, %rcx
leaq 0x8(,%rax,8), %rax
pushq $0x8
popq %rcx
cmovbq %rax, %rcx
addq %rcx, %r15
jmp 0xa7d76
movq %rcx, %r15
shlq $0x4, %rbx
movl 0x20(%rsp), %eax
addq %r14, %rbx
leaq (%rbx,%rax,8), %rax
addq 0x30(%rsp), %rax
addq %r15, %rax
addq $0xca, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0x86218(%rip), %rcx     # 0x12dfb8
movq (%rcx), %rdi
leaq 0x44c3a(%rip), %rsi     # 0xec9e4
movl %eax, %edx
xorl %eax, %eax
callq 0xb8c0
pushq $0x2
popq %rdi
callq 0xb7b0
movq 0x861f6(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x2229a(%rip), %rsi     # 0xca066
leaq 0x44be6(%rip), %rdx     # 0xec9b9
leaq 0x44bf1(%rip), %rcx     # 0xec9cb
leaq 0x43db9(%rip), %r8      # 0xebb9a
movl $0x143a, %r9d           # imm = 0x143A
xorl %eax, %eax
callq 0xb8c0
callq 0xb300