// File: /workspace/github_c_makefile_star2_O2/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 $0x158, %rsp            # imm = 0x158
movq (%rdi), %rax
movq %rax, 0xd0(%rsp)
testq %rax, %rax
je 0xb058a
movq 0x8(%rdi), %rax
movq %rax, 0xd8(%rsp)
movq 0x70(%rdi), %rax
movq %rax, 0xa8(%rsp)
movq %rdi, 0x50(%rsp)
movq 0x78(%rdi), %rax
movq %rax, 0xc8(%rsp)
callq 0xa12bc
movq %rax, 0x70(%rsp)
callq 0xa12bc
movq %rax, 0x78(%rsp)
movb $0x1, %r14b
callq 0xbe778
movq %rax, 0x68(%rsp)
movq $0x0, 0xb0(%rsp)
movq $0x0, 0xb8(%rsp)
movq $0x0, 0x98(%rsp)
movq $0x0, 0xa0(%rsp)
xorl %ecx, %ecx
movb $0x1, %al
movl %eax, 0x80(%rsp)
movq $0x0, 0x60(%rsp)
xorl %edx, %edx
xorl %r12d, %r12d
xorl %esi, %esi
xorl %ebx, %ebx
cmpq %rbx, 0xd8(%rsp)
je 0xb010c
movq 0xd0(%rsp), %rax
movb (%rax,%rbx), %r15b
movzbl %r14b, %ebp
cmpb $-0x3, %r15b
ja 0xaffb6
movq %rcx, 0x58(%rsp)
movl 0x80(%rsp), %eax
testb $0x1, %al
movzbl %al, %eax
movl %eax, %ecx
movl $0x0, %eax
cmovnel %eax, %ecx
movl %ecx, 0x80(%rsp)
testb $0x1, %r14b
cmovnel %eax, %ebp
testq %rsi, %rsi
je 0xaff35
movq 0x70(%rsp), %rdi
movq %rdx, %r14
callq 0xa12d1
movq %r14, %rdx
testq %rdx, %rdx
movq 0x78(%rsp), %rdi
movq 0x68(%rsp), %r14
je 0xaff4c
movq %rdx, %rsi
callq 0xa12d1
incq %r12
testq %r14, %r14
je 0xaffa8
movq 0x60(%rsp), %rax
cmpq $0x40, %rax
jne 0xaff74
movq %r14, %rdi
leaq 0xe0(%rsp), %rsi
pushq $0x40
popq %rdx
callq 0xbe818
xorl %eax, %eax
movq %rax, %r13
callq 0xb0b0
movq (%rax), %r14
movzbl %r15b, %esi
movq 0xa8(%rsp), %rdi
callq 0x9bed8
movsbq %al, %rax
movb (%r14,%rax,4), %al
movb %al, 0xe0(%rsp,%r13)
incq %r13
movq %r13, 0x60(%rsp)
movq 0x58(%rsp), %r13
xorl %edx, %edx
xorl %esi, %esi
jmp 0xb00fe
cmpq %rcx, %r12
movq %rcx, %r13
cmovaq %r12, %r13
testq %r12, %r12
cmoveq %rcx, %r13
cmpb $-0x2, %r15b
jne 0xb005d
movl %r14d, %eax
andb $0x1, %al
movzbl %al, %eax
addq %rax, 0xa0(%rsp)
incq %rdx
incq 0x98(%rsp)
cmpq $0x0, 0x68(%rsp)
je 0xb00d9
movq %rdx, 0x58(%rsp)
movq %rsi, %r12
movq 0x60(%rsp), %rbp
cmpq $0x40, %rbp
jne 0xb0022
movq 0x68(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
pushq $0x40
popq %rdx
callq 0xbe818
xorl %ebp, %ebp
callq 0xb0b0
movq (%rax), %r15
movq 0xa8(%rsp), %rdi
movl $0xfe, %esi
callq 0x9bed8
movsbq %al, %rax
movb (%r15,%rax,4), %al
movb %al, 0xe0(%rsp,%rbp)
incq %rbp
movq %rbp, 0x60(%rsp)
movq %r12, %rsi
movq 0x58(%rsp), %rdx
jmp 0xb00d9
testb $0x1, %bpl
movl $0x0, %eax
cmovnel %eax, %ebp
testq %rdx, %rdx
movq 0x78(%rsp), %rdi
je 0xb0081
movq %rsi, %r14
movq %rdx, %rsi
callq 0xa12d1
movq %r14, %rsi
movq 0x68(%rsp), %r14
testq %r14, %r14
je 0xb00d4
movq %r14, %rdi
movq %rsi, %r15
leaq 0xe0(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0xbe818
movq %r14, %rdi
leaq 0x120(%rsp), %rsi
leaq 0x130(%rsp), %rdx
callq 0xbec13
movq %r14, %rdi
callq 0xbe7b4
movq %r15, %rsi
movl %ebp, %r14d
movq $0x0, 0x60(%rsp)
jmp 0xb00d7
movl %ebp, %r14d
xorl %edx, %edx
movl 0x80(%rsp), %eax
andb $0x1, %al
movzbl %al, %eax
addq %rax, 0xb8(%rsp)
incq 0xb0(%rsp)
incq %rsi
movl %r14d, %ebp
xorl %r12d, %r12d
incq %rbx
movq %r13, %rcx
movl %ebp, %r14d
jmp 0xafecf
movq %rcx, 0x58(%rsp)
testq %rsi, %rsi
je 0xb012c
movq 0x70(%rsp), %rdi
movq %rsi, %rbx
movq %rdx, %r14
callq 0xa12d1
movq %r14, %rdx
movq %rbx, %rsi
movq %rsi, 0xc0(%rsp)
testq %rdx, %rdx
movq 0x50(%rsp), %rbx
movq 0x78(%rsp), %r12
movq %rdx, %rbp
je 0xb0151
movq %r12, %rdi
movq %rbp, %rsi
callq 0xa12d1
leaq 0x3becd(%rip), %rdi     # 0xec025
xorl %esi, %esi
xorl %edx, %edx
movq 0x70(%rsp), %r14
movq %r14, %rcx
movq 0xc8(%rsp), %r15
movq %r15, %r8
callq 0xb541f
movq %rax, %r13
leaq 0x40ec6(%rip), %rdi     # 0xf1044
pushq $0x1
popq %rsi
xorl %edx, %edx
movq %r12, %rcx
movq %r15, %r8
callq 0xb541f
movq %rax, %r15
movq %r14, %rdi
callq 0xa19c8
movq %r12, %rdi
callq 0xa19c8
movq 0x68(%rsp), %rdi
callq 0xbee0d
movq 0x8(%rbx), %r14
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rbx
movq 0x50(%rsp), %rax
movups 0x18(%rax), %xmm0
movaps %xmm0, 0x80(%rsp)
movq 0x50(%rsp), %rax
movq 0x70(%rax), %rdi
callq 0x9ad5a
movq 0x50(%rsp), %rcx
movq 0x78(%rcx), %rcx
movq %rcx, 0x40(%rsp)
movq %rax, 0x30(%rsp)
movdqa 0x80(%rsp), %xmm0
movdqu %xmm0, 0x8(%rsp)
andq $0x0, 0x28(%rsp)
andl $0x0, 0x20(%rsp)
andl $0x0, 0x18(%rsp)
andq $0x0, (%rsp)
movl $0x1, 0x38(%rsp)
xorl %edi, %edi
movq %r14, %rsi
movq %rbx, %rdx
movq 0x50(%rsp), %rbx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r15, %r9
callq 0xa4355
movq %rax, %r14
movq 0xb0(%rsp), %rax
movq %rax, 0x178(%r14)
movq %r13, 0x180(%r14)
movq %r13, 0x188(%r14)
movq 0xb8(%rsp), %rax
movq %rax, 0x190(%r14)
movq 0xc0(%rsp), %rax
movq %rax, 0x198(%r14)
movq 0x98(%rsp), %rax
movq %rax, 0x1a0(%r14)
movq %r15, 0x1a8(%r14)
movq %r15, 0x1b0(%r14)
movq 0xa0(%rsp), %rax
movq %rax, 0x1b8(%r14)
movq %rbp, 0x1c0(%r14)
movq 0x58(%rsp), %rax
movq %rax, 0x1c8(%r14)
pxor %xmm0, %xmm0
andq $0x0, 0x1e0(%r14)
movdqu %xmm0, 0x1d0(%r14)
movq (%rbx), %rax
movq %rax, 0x290(%r14)
movq 0x70(%rbx), %rdi
callq 0xb05f0
movq %rax, 0xf8(%r14)
callq 0x1532c
movq %rax, 0x1f8(%r14)
leaq 0x42007(%rip), %rsi     # 0xf22f6
movq %rax, %rdi
callq 0x15407
movq $0x1, 0x50(%r14)
movb 0x68(%rbx), %al
xorb $0x1, %al
movb %al, 0x298(%r14)
cmpb $0x1, 0x6a(%rbx)
jne 0xb0373
movb $0x1, 0x208(%r14)
movq 0x58(%rbx), %rdi
callq 0x14461
leaq 0x3b871(%rip), %rsi     # 0xebb9a
movq %rax, %rdi
movl $0x23d8, %edx           # imm = 0x23D8
callq 0xccb0
movq %rax, %r15
movq %rax, 0x200(%r14)
movq 0x58(%rbx), %rdi
callq 0x1441f
movq %rax, %r12
movq 0x58(%rbx), %rdi
callq 0x14461
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xb520
movq 0x58(%rbx), %rdi
callq 0x14461
movq %rax, 0x210(%r14)
movq 0x10(%rbx), %rsi
cmpq $0x2, %rsi
jb 0xb0439
cmpb $0x1, 0x6b(%rbx)
jne 0xb0439
movb $0x1, 0x209(%r14)
movq 0x8(%rbx), %rdi
decq %rsi
callq 0xa7174
movl %eax, 0x4(%r14)
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
movq %r14, %rdx
addq $0x240, %rdx            # imm = 0x240
callq 0xa7260
testq %rax, %rax
je 0xb05c2
movq %rax, %r15
xorl %r12d, %r12d
cmpq 0x8(%rbx), %r12
jae 0xb03f4
movq (%rbx), %rax
cmpb $-0x1, (%rax,%r12)
jne 0xb03e4
movq %r15, %rdi
movq %r12, %rsi
callq 0xa734f
movq %r15, %rdi
movq %r12, %rsi
callq 0xa73d4
incq %r12
jmp 0xb03c9
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0xb0429
movq 0x50(%rsp), %rax
leaq 0x40(%rax), %rbx
leaq 0x3b78d(%rip), %rsi     # 0xebb9a
movl $0x23e9, %edx           # imm = 0x23E9
callq 0xd249
pxor %xmm0, %xmm0
movdqu %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq 0x50(%rsp), %rbx
movq %r15, %rdi
callq 0xa73f5
movq %r15, %rdi
callq 0xa7414
xorl %eax, %eax
xorl %ecx, %ecx
cmpq 0x8(%rbx), %rax
jae 0xb0481
movq (%rbx), %rdx
movzbl (%rdx,%rax), %edx
cmpq $0xfd, %rdx
jbe 0xb045c
testq %rcx, %rcx
jne 0xb046f
xorl %ecx, %ecx
jmp 0xb046a
movq 0xf8(%r14), %rsi
incq (%rsi,%rdx,8)
incq %rcx
incq %rax
jmp 0xb043d
cmpq 0x1c8(%r14), %rcx
jbe 0xb0458
movq %rcx, 0x1c8(%r14)
jmp 0xb0458
testq %rcx, %rcx
je 0xb0496
cmpq 0x1c8(%r14), %rcx
jbe 0xb0496
movq %rcx, 0x1c8(%r14)
cmpb $0x1, 0x6c(%rbx)
jne 0xb04af
movb $0x1, 0x20a(%r14)
movq 0x28(%rbx), %rax
movq %rax, 0x218(%r14)
leaq 0x5708(%rip), %rax      # 0xb5bbe
movq %rax, 0x110(%r14)
leaq 0x40190(%rip), %rax     # 0xf0654
movq %rax, 0x118(%r14)
leaq 0x56fe(%rip), %rax      # 0xb5bd0
movq %rax, 0x120(%r14)
leaq 0x40192(%rip), %rax     # 0xf0672
movq %rax, 0x128(%r14)
leaq 0x57d9(%rip), %rax      # 0xb5cc7
movq %rax, 0x140(%r14)
leaq 0x40195(%rip), %rax     # 0xf0691
movq %rax, 0x148(%r14)
xorl %edi, %edi
callq 0xb955c
testb %al, %al
je 0xb052c
movl 0x4(%r14), %eax
cmpq $0x6, %rax
ja 0xb054a
imulq $0x70, %rax, %rax
leaq 0x7d3dd(%rip), %rcx     # 0x12d900
pshufd $0x4e, 0x50(%rax,%rcx), %xmm0 # xmm0 = mem[2,3,0,1]
jmp 0xb054e
leaq 0x57a3(%rip), %rax      # 0xb5cd6
movq %rax, 0x160(%r14)
leaq 0x4017f(%rip), %rax     # 0xf06c0
movq %rax, 0x168(%r14)
jmp 0xb0557
pxor %xmm0, %xmm0
movdqu %xmm0, 0x160(%r14)
movb $0x0, 0x3a9(%r14)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x10(%r14)
movb $0x1, 0x69(%rbx)
movq %rbx, %rdi
callq 0xafd48
movq %r14, %rax
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x7da27(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x19acb(%rip), %rsi     # 0xca066
leaq 0x3d9ec(%rip), %rdx     # 0xedf8e
leaq 0x3d9f2(%rip), %rcx     # 0xedf9b
leaq 0x3b5ea(%rip), %r8      # 0xebb9a
movl $0x23bb, %r9d           # imm = 0x23BB
xorl %eax, %eax
callq 0xb8c0
callq 0xb300
movq 0x7d9ef(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x19a93(%rip), %rsi     # 0xca066
leaq 0x3d9d9(%rip), %rdx     # 0xedfb3
leaq 0x3d9ba(%rip), %rcx     # 0xedf9b
leaq 0x3b5b2(%rip), %r8      # 0xebb9a
movl $0x23e3, %r9d           # imm = 0x23E3
jmp 0xb05b6