// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/core/encseq.c
// Function: gt_encseq_builder_build
GtEncseq* gt_encseq_builder_build(GtEncseqBuilder *eb, GT_UNUSED GtError *err)
{
  GtEncseq *encseq = NULL;
  const GtEncseqAccessType sat = GT_ACCESS_TYPE_DIRECTACCESS;
  Gtssptaboutinfo *ssptaboutinfo;
  GtUword i, lastnonspecialrangelength = 0;
  GtSpecialcharinfo samplespecialcharinfo =
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

  gt_assert(eb->plainseq);
  sequence2specialcharinfo(&samplespecialcharinfo, eb->plainseq,
                           eb->seqlen, eb->alpha, eb->logger);
  encseq = determineencseqkeyvalues(sat,
                                    eb->seqlen,
                                    eb->nof_seqs,
                                    0,
                                    0,
                                    samplespecialcharinfo.wildcardranges,
                                    0,
                                    eb->minseqlen,
                                    eb->maxseqlen,
                                    false,
                                    false,
                                    NULL,
                                    gt_alphabet_ref(eb->alpha),
                                    true,
                                    eb->logger);
  encseq->specialcharinfo = samplespecialcharinfo;
  encseq->plainseq = eb->plainseq;
  encseq->headerptr.characterdistribution
    = initcharacterdistribution(eb->alpha);
  encseq->filenametab = gt_str_array_new();
  gt_str_array_add_cstr(encseq->filenametab, "generated");
  encseq->numofdbfiles = 1UL;
  encseq->hasplainseqptr = !(eb->own);
  if (eb->wdestab) {
    encseq->hasallocateddestab = true;
    encseq->destab =
                  gt_malloc((size_t) gt_str_length(eb->destab) * sizeof (char));
    memcpy(encseq->destab,
           gt_str_get_mem(eb->destab),
           (size_t)  gt_str_length(eb->destab) * sizeof (char));
    encseq->destablength = gt_str_length(eb->destab);
  }
  /* create `new style' SSP tab */
  if (eb->nof_seqs > 1UL && eb->wssptab) {
    encseq->hasallocatedssptab = true;
    encseq->satsep = determineoptimalsssptablerep(eb->seqlen, eb->nof_seqs-1);
    ssptaboutinfo = ssptaboutinfo_new(eb->seqlen,eb->nof_seqs, &encseq->ssptab);
    gt_assert(ssptaboutinfo != NULL);
    for (i = 0; i < eb->seqlen; i++) {
      if (eb->plainseq[i] == (GtUchar) GT_SEPARATOR)
        ssptaboutinfo_processseppos(ssptaboutinfo, i);
      ssptaboutinfo_processanyposition(ssptaboutinfo, i);
    }
    GT_FREEARRAY(&eb->ssptab, GtUword);
    ssptaboutinfo_finalize(ssptaboutinfo);
    ssptaboutinfo_delete(ssptaboutinfo);
  }
  for (i = 0; i < eb->seqlen; i++) {
    if (!GT_ISSPECIAL(eb->plainseq[i])) {
      encseq->headerptr.characterdistribution[eb->plainseq[i]]++;
      lastnonspecialrangelength++;
    } else {
      if (lastnonspecialrangelength > 0) {
        if (lastnonspecialrangelength
              > encseq->specialcharinfo.lengthoflongestnonspecial) {
          encseq->specialcharinfo.lengthoflongestnonspecial =
                                                  lastnonspecialrangelength;
        }
        lastnonspecialrangelength = 0;
      }
    }
  }
  if (lastnonspecialrangelength > 0) {
    if (lastnonspecialrangelength
          > encseq->specialcharinfo.lengthoflongestnonspecial) {
      encseq->specialcharinfo.lengthoflongestnonspecial =
                                              lastnonspecialrangelength;
    }
  }
  if (eb->wsdstab) {
    encseq->hasallocatedsdstab = true;
    encseq->sdstab = eb->sdstab.spaceGtUword;
  }
  ALLASSIGNAPPENDFUNC(sat, encseq->satsep);
  encseq->mappedptr = NULL;
  encseq->ssptabmappedptr = NULL;
  encseq->accesstype_via_utables = false;
  eb->created_encseq = true;
  gt_encseq_builder_reset(eb);
  return encseq;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq (%rdi), %rax
movq %rax, 0xd8(%rsp)
testq %rax, %rax
je 0xcaa17
movq 0x8(%rdi), %rbx
movq 0x70(%rdi), %rax
movq %rax, 0xb8(%rsp)
movq %rdi, 0xc8(%rsp)
movq 0x78(%rdi), %rax
movq %rax, 0xc0(%rsp)
callq 0xbe2a0
movq %rax, 0x80(%rsp)
callq 0xbe2a0
movq %rax, 0x88(%rsp)
callq 0xd6b60
movq %rax, 0x60(%rsp)
movq %rbx, 0xd0(%rsp)
testq %rbx, %rbx
je 0xca51d
movb $0x1, %al
movl %eax, 0xa0(%rsp)
movq $0x0, 0x90(%rsp)
movq $0x0, 0x98(%rsp)
movq $0x0, 0x68(%rsp)
movq $0x0, 0x70(%rsp)
xorl %ebx, %ebx
xorl %r12d, %r12d
xorl %esi, %esi
xorl %r13d, %r13d
xorl %edx, %edx
movq $0x0, 0x58(%rsp)
movb $0x1, %bpl
movq 0xd8(%rsp), %rax
movb (%rax,%r12), %r15b
cmpb $-0x3, %r15b
ja 0xca3be
movl 0xa0(%rsp), %eax
testb $0x1, %al
movzbl %al, %eax
movl %eax, %ecx
movl $0x0, %eax
cmovnel %eax, %ecx
movl %ecx, 0xa0(%rsp)
testb $0x1, %bpl
movzbl %bpl, %ebp
cmovnel %eax, %ebp
testq %rsi, %rsi
je 0xca32e
movq 0x80(%rsp), %rdi
movq %rdx, %r14
callq 0xbe2bb
movq %r14, %rdx
testq %rdx, %rdx
je 0xca343
movq 0x88(%rsp), %rdi
movq %rdx, %rsi
callq 0xbe2bb
incq %r13
cmpq $0x0, 0x60(%rsp)
je 0xca500
movq %r13, 0x50(%rsp)
movq 0x58(%rsp), %r13
cmpq $0x40, %r13
jne 0xca37c
movl $0x40, %edx
movq 0x60(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0xd6bcf
xorl %r13d, %r13d
callq 0xb0b0
movq (%rax), %r14
movzbl %r15b, %esi
movq 0xb8(%rsp), %rdi
callq 0xb9d4b
movsbq %al, %rax
movb (%r14,%rax,4), %al
movb %al, 0xe0(%rsp,%r13)
incq %r13
movq %r13, 0x58(%rsp)
movq %rbx, %r14
xorl %edx, %edx
xorl %esi, %esi
movq 0x50(%rsp), %r13
jmp 0xca507
cmpq %rbx, %r13
movq %rbx, %r14
cmovaq %r13, %r14
testq %r13, %r13
cmoveq %rbx, %r14
cmpb $-0x2, %r15b
jne 0xca461
movl %ebp, %eax
andb $0x1, %al
movzbl %al, %eax
addq %rax, 0x70(%rsp)
incq %rdx
incq 0x68(%rsp)
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0xca4dc
movq %rdx, 0x78(%rsp)
movq %rsi, 0x50(%rsp)
movq 0x58(%rsp), %r13
cmpq $0x40, %r13
jne 0xca425
movl $0x40, %edx
leaq 0xe0(%rsp), %rsi
callq 0xd6bcf
xorl %r13d, %r13d
callq 0xb0b0
movq (%rax), %rbx
movzbl %r15b, %esi
movq 0xb8(%rsp), %rdi
callq 0xb9d4b
movsbq %al, %rax
movb (%rbx,%rax,4), %al
movb %al, 0xe0(%rsp,%r13)
incq %r13
movq %r13, 0x58(%rsp)
movq 0x50(%rsp), %rsi
movq 0x78(%rsp), %rdx
jmp 0xca4dc
movzbl %bpl, %ebp
testb $0x1, %bpl
movl $0x0, %eax
cmovnel %eax, %ebp
testq %rdx, %rdx
movq 0x60(%rsp), %rbx
je 0xca491
movq 0x88(%rsp), %rdi
movq %rsi, %r15
movq %rdx, %rsi
callq 0xbe2bb
movq %r15, %rsi
testq %rbx, %rbx
je 0xca4da
movq %rbx, %rdi
movq %rsi, %r15
leaq 0xe0(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0xd6bcf
movq %rbx, %rdi
leaq 0x120(%rsp), %rsi
leaq 0x160(%rsp), %rdx
callq 0xd6fcd
movq %rbx, %rdi
callq 0xd6b9e
movq %r15, %rsi
movq $0x0, 0x58(%rsp)
xorl %edx, %edx
movl 0xa0(%rsp), %eax
andb $0x1, %al
movzbl %al, %eax
addq %rax, 0x98(%rsp)
incq 0x90(%rsp)
incq %rsi
xorl %r13d, %r13d
jmp 0xca507
movq %rbx, %r14
xorl %edx, %edx
xorl %esi, %esi
incq %r12
movq %r14, %rbx
cmpq %r12, 0xd0(%rsp)
jne 0xca2d8
jmp 0xca54e
movq $0x0, 0x90(%rsp)
movq $0x0, 0x98(%rsp)
movq $0x0, 0x68(%rsp)
movq $0x0, 0x70(%rsp)
xorl %r14d, %r14d
xorl %edx, %edx
xorl %esi, %esi
movq %rsi, 0x50(%rsp)
testq %rsi, %rsi
je 0xca570
movq 0x80(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq %rdx, %rbx
callq 0xbe2bb
movq %rbx, %rdx
testq %rdx, %rdx
movq 0x88(%rsp), %r13
movq %rdx, %rbx
je 0xca58b
movq %r13, %rdi
movq %rbx, %rsi
callq 0xbe2bb
leaq 0x38923(%rip), %rax     # 0x102eb5
movq %rbx, 0x78(%rsp)
leaq 0x130(%rsp), %rbx
movq %rax, 0x28(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rbx)
movaps %xmm0, 0x10(%rbx)
xorl %eax, %eax
movq %rax, 0x20(%rbx)
leaq 0x4bac(%rip), %r15      # 0xcf166
movq 0x80(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xbe4a3
movq 0x20(%rbx), %rbp
leaq 0x3d995(%rip), %rax     # 0x107f70
movq %rax, 0x28(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movups %xmm0, 0x18(%rbx)
movq 0xc0(%rsp), %rax
movq %rax, (%rbx)
leaq 0x130(%rsp), %rbx
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xbe4a3
movq 0x20(%rbx), %r15
movq %r12, %rdi
callq 0xbe8ba
movq %r13, %rdi
callq 0xbe8ba
movq 0x60(%rsp), %rdi
callq 0xd7178
movq 0xc8(%rsp), %r13
movq 0x8(%r13), %rbx
movq 0x10(%r13), %r12
movups 0x18(%r13), %xmm0
movaps %xmm0, 0xa0(%rsp)
movq 0x70(%r13), %rdi
callq 0xb8fab
movq 0x78(%r13), %rcx
movq %rcx, 0x40(%rsp)
movq %rax, 0x30(%rsp)
xorl %eax, %eax
movq %rax, 0x28(%rsp)
movl %eax, 0x20(%rsp)
movl %eax, 0x18(%rsp)
movdqa 0xa0(%rsp), %xmm0
movdqu %xmm0, 0x8(%rsp)
movq %rax, (%rsp)
movl $0x1, 0x38(%rsp)
xorl %edi, %edi
movq %rbx, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r15, %r9
callq 0xc0a73
movq %rax, %rbx
movq 0x90(%rsp), %rax
movq %rax, 0x178(%rbx)
movq %rbp, 0x180(%rbx)
movq %rbp, 0x188(%rbx)
movq 0x98(%rsp), %rax
movq %rax, 0x190(%rbx)
movq 0x50(%rsp), %rax
movq %rax, 0x198(%rbx)
movq 0x68(%rsp), %rax
movq %rax, 0x1a0(%rbx)
movq %r15, 0x1a8(%rbx)
movq %r15, 0x1b0(%rbx)
movq 0x70(%rsp), %rax
movq %rax, 0x1b8(%rbx)
movq 0x78(%rsp), %rax
movq %rax, 0x1c0(%rbx)
movq %r14, 0x1c8(%rbx)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x1d0(%rbx)
xorl %eax, %eax
movq %rax, 0x1e0(%rbx)
movq (%r13), %rax
movq %rax, 0x290(%rbx)
movq 0x70(%r13), %rdi
callq 0xcaa21
movq %rax, 0xf8(%rbx)
callq 0x3d23c
movq %rax, 0x1f8(%rbx)
leaq 0x3eacf(%rip), %rsi     # 0x109222
movq %rax, %rdi
callq 0x3d318
movq $0x1, 0x50(%rbx)
movb 0x68(%r13), %al
xorb $0x1, %al
movb %al, 0x298(%rbx)
cmpb $0x1, 0x6a(%r13)
jne 0xca7d7
movb $0x1, 0x208(%rbx)
movq 0x58(%r13), %rdi
callq 0x3c434
leaq 0x3829d(%rip), %rsi     # 0x102a2a
movq %rax, %rdi
movl $0x23d8, %edx           # imm = 0x23D8
callq 0x35ee2
movq %rax, %r15
movq %rax, 0x200(%rbx)
movq 0x58(%r13), %rdi
callq 0x3c425
movq %rax, %r12
movq 0x58(%r13), %rdi
callq 0x3c434
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xb520
movq 0x58(%r13), %rdi
callq 0x3c434
movq %rax, 0x210(%rbx)
movq 0x10(%r13), %rsi
cmpq $0x2, %rsi
jb 0xca8bf
cmpb $0x1, 0x6b(%r13)
jne 0xca8bf
movb $0x1, 0x209(%rbx)
movq 0x8(%r13), %rdi
decq %rsi
callq 0xc323c
movl %eax, 0x4(%rbx)
movq 0x8(%r13), %rdi
movq 0x10(%r13), %rsi
movq %rbx, %rdx
addq $0x240, %rdx            # imm = 0x240
callq 0xc32f3
testq %rax, %rax
je 0xcaa1c
movq %rax, %r15
cmpq $0x0, 0x8(%r13)
je 0xca868
xorl %r12d, %r12d
movq (%r13), %rax
cmpb $-0x1, (%rax,%r12)
jne 0xca849
movq %r15, %rdi
movq %r12, %rsi
callq 0xc33e4
cmpq 0x10(%r15), %r12
jne 0xca85f
movq %r15, %rdi
callq 0xce5a4
movq 0x18(%r15), %rax
addq %rax, 0x10(%r15)
incq %r12
cmpq 0x8(%r13), %r12
jb 0xca833
movq 0x40(%r13), %rdi
testq %rdi, %rdi
je 0xca8a1
leaq 0x40(%r13), %r14
leaq 0x381ae(%rip), %rsi     # 0x102a2a
movl $0x23e9, %edx           # imm = 0x23E9
callq 0x362a0
pxor %xmm0, %xmm0
movdqu %xmm0, (%r14)
movq $0x0, 0x10(%r14)
jmp 0xca8a1
movq %r15, %rdi
callq 0xce5a4
movq 0x20(%r15), %rax
cmpq 0x30(%r15), %rax
jb 0xca899
leaq 0x38178(%rip), %rsi     # 0x102a2a
movq %r15, %rdi
movl $0x72e, %edx            # imm = 0x72E
callq 0x362a0
cmpq $0x0, 0x8(%r13)
je 0xca90f
movq (%r13), %rcx
xorl %eax, %eax
xorl %edx, %edx
movzbl (%rcx,%rdx), %esi
cmpq $0xfd, %rsi
jbe 0xca8e4
testq %rax, %rax
jne 0xca8fd
xorl %eax, %eax
jmp 0xca8f2
movq 0xf8(%rbx), %rdi
incq (%rdi,%rsi,8)
incq %rax
incq %rdx
cmpq 0x8(%r13), %rdx
jb 0xca8ce
jmp 0xca911
cmpq 0x1c8(%rbx), %rax
jbe 0xca8e0
movq %rax, 0x1c8(%rbx)
jmp 0xca8e0
xorl %eax, %eax
testq %rax, %rax
je 0xca926
cmpq 0x1c8(%rbx), %rax
jbe 0xca926
movq %rax, 0x1c8(%rbx)
cmpb $0x1, 0x6c(%r13)
jne 0xca93f
movb $0x1, 0x20a(%rbx)
movq 0x28(%r13), %rax
movq %rax, 0x218(%rbx)
leaq 0x4f11(%rip), %rax      # 0xcf857
movq %rax, 0x110(%rbx)
leaq 0x3cc2b(%rip), %rax     # 0x10757f
movq %rax, 0x118(%rbx)
leaq 0x4f07(%rip), %rax      # 0xcf869
movq %rax, 0x120(%rbx)
leaq 0x3cc2d(%rip), %rax     # 0x10759d
movq %rax, 0x128(%rbx)
leaq 0x4f88(%rip), %rax      # 0xcf906
movq %rax, 0x140(%rbx)
leaq 0x3cc30(%rip), %rax     # 0x1075bc
movq %rax, 0x148(%rbx)
xorl %edi, %edi
callq 0xd2b4d
testb %al, %al
je 0xca9bb
movl 0x4(%rbx), %eax
cmpq $0x6, %rax
ja 0xca9d9
imulq $0x70, %rax, %rax
leaq 0x85f6e(%rip), %rcx     # 0x150920
pshufd $0x4e, 0x50(%rax,%rcx), %xmm0 # xmm0 = mem[2,3,0,1]
jmp 0xca9dd
leaq 0x4f53(%rip), %rax      # 0xcf915
movq %rax, 0x160(%rbx)
leaq 0x3cc1b(%rip), %rax     # 0x1075eb
movq %rax, 0x168(%rbx)
jmp 0xca9e5
pxor %xmm0, %xmm0
movdqu %xmm0, 0x160(%rbx)
movb $0x0, 0x3a9(%rbx)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x10(%rbx)
movb $0x1, 0x69(%r13)
movq %r13, %rdi
callq 0xca15a
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2e6c1
callq 0x2e688