// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x58, %rsp
movq 0x70(%rsp), %rax
movl 0x68(%rsp), %eax
movl 0x60(%rsp), %eax
movl %edi, 0x54(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq %r9, 0x28(%rsp)
movq 0x48(%rsp), %rdi
callq 0x117be0
shlq $0x3, %rax
movq %rax, 0x18(%rsp)
movl 0x54(%rsp), %eax
movq %rax, 0x10(%rsp)
subq $0x6, %rax
ja 0x11cd02
movq 0x10(%rsp), %rax
leaq 0x6889c(%rip), %rcx     # 0x18547c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x48(%rsp), %rax
shlq $0x0, %rax
movq %rax, 0x20(%rsp)
jmp 0x11cd28
jmp 0x11cbfe
cmpl $0x0, 0x68(%rsp)
ja 0x11cc3d
movq 0x973cc(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x41450(%rip), %rsi     # 0x15e066
leaq 0x6986d(%rip), %rdx     # 0x18648a
leaq 0x69878(%rip), %rcx     # 0x18649c
leaq 0x68a33(%rip), %r8      # 0x18565e
movl $0x143a, %r9d           # imm = 0x143A
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x11cc3f
movl 0x68(%rsp), %edi
movq 0x48(%rsp), %rsi
callq 0x11ce50
movq %rax, 0x20(%rsp)
jmp 0x11cd28
movq 0x18(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x11cd28
movq 0x18(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x28(%rsp)
ja 0x11cc80
cmpq $0x1, 0x40(%rsp)
jbe 0x11cccc
movq 0x48(%rsp), %rax
addq $0x40, %rax
shrq $0x6, %rax
cmpq $0x0, %rax
jne 0x11cc9f
movl $0x1, %eax
movq %rax, 0x8(%rsp)
jmp 0x11ccb9
movq 0x48(%rsp), %rax
addq $0x40, %rax
subq $0x1, %rax
shrq $0x6, %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
shlq $0x3, %rax
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x11cd28
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movl 0x54(%rsp), %edi
movq 0x48(%rsp), %rcx
movq 0x28(%rsp), %r8
movl $0x1, %esi
xorl %edx, %edx
callq 0x11ce80
movq %rax, %rcx
movq (%rsp), %rax
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x11cd28
movq 0x972cf(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
movl 0x54(%rsp), %edx
leaq 0x6979e(%rip), %rsi     # 0x1864b5
movb $0x0, %al
callq 0xb890
movl $0x2, %edi
callq 0xb780
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x70, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rax
shlq $0x4, %rax
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
movl 0x60(%rsp), %eax
shlq $0x3, %rax
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rax
shlq $0x0, %rax
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
movq 0x70(%rsp), %rax
shlq $0x0, %rax
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)