// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/core/encseq.c
// Function: gt_encseq_seppos2ssptab
int gt_encseq_seppos2ssptab(const char *indexname,
                            GtUword totallength,
                            GtUword numofdbsequences,
                            const GtUword *seppostab,
                            GtError *err)
{
  GtSWtable ssptab;
  Gtssptaboutinfo *ssptaboutinfo;
  GtUword idx;
  const GtUword *sepposptr;
  Gtssptransferinfo ssptransferinfo;
  GtEncseqAccessType satsep;
  int ret;

  gt_assert (numofdbsequences > 1UL);
  satsep = determineoptimalsssptablerep(totallength, numofdbsequences-1);
  initSWtable(&ssptab, totallength, satsep, numofdbsequences-1);
  setencsequtablesNULL(satsep, &ssptab);
  ssptaboutinfo = ssptaboutinfo_new(totallength, numofdbsequences, &ssptab);
  gt_assert(ssptaboutinfo != NULL && seppostab != NULL);
  for (idx=0, sepposptr = seppostab; idx < totallength; idx++) {
    if (idx == *sepposptr) {
      ssptaboutinfo_processseppos(ssptaboutinfo, idx);
      if (sepposptr < seppostab + numofdbsequences - 2)
        sepposptr++;
    }
    ssptaboutinfo_processanyposition(ssptaboutinfo, idx);
  }
  ssptaboutinfo_finalize(ssptaboutinfo);
  ssptaboutinfo_delete(ssptaboutinfo);
  ssptransferinfo.totallength = totallength;
  ssptransferinfo.numofdbsequences = numofdbsequences;
  ssptransferinfo.satsep = satsep;
  ssptransferinfo.ssptabptr = &ssptab;

  ret = flushssptab2file(indexname, &ssptransferinfo, err);
  gt_ssptab_delete(satsep, &ssptab);
  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
cmpq $0x1, %rdx
jbe 0xa710e
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, 0x10(%rsp)
movq %r8, 0x18(%rsp)
leaq -0x1(%rdx), %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0xa7174
leaq 0x20(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movl %eax, 0xc(%rsp)
movl %eax, %edx
movq %r14, %rcx
callq 0xa7212
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%r13)
movaps %xmm0, (%r13)
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xa7260
testq %rbx, %rbx
je 0xa713c
movq %rax, %r14
testq %rax, %rax
je 0xa713c
leaq (%rbx,%r15,8), %rbp
addq $-0x10, %rbp
xorl %r13d, %r13d
cmpq %r13, %r12
je 0xa70b6
cmpq (%rbx), %r13
jne 0xa70a6
movq %r14, %rdi
movq %r13, %rsi
callq 0xa734f
xorl %eax, %eax
cmpq %rbp, %rbx
setb %al
leaq (%rbx,%rax,8), %rbx
movq %r14, %rdi
movq %r13, %rsi
callq 0xa73d4
incq %r13
jmp 0xa7085
movq %r14, %rdi
callq 0xa73f5
movq %r14, %rdi
callq 0xa7414
leaq 0x58(%rsp), %rsi
movq %r12, (%rsi)
movq %r15, 0x8(%rsi)
movl 0xc(%rsp), %ebp
movl %ebp, 0x10(%rsi)
leaq 0x20(%rsp), %r14
movq %r14, 0x18(%rsi)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
callq 0xa742b
movl %eax, %ebx
movl %ebp, %edi
movq %r14, %rsi
callq 0xa555e
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x86ea3(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x22f47(%rip), %rsi     # 0xca066
leaq 0x455d0(%rip), %rdx     # 0xec6f6
leaq 0x455e0(%rip), %rcx     # 0xec70d
leaq 0x44a66(%rip), %r8      # 0xebb9a
movl $0x119d, %r9d           # imm = 0x119D
jmp 0xa7168
movq 0x86e75(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x22f19(%rip), %rsi     # 0xca066
leaq 0x455d1(%rip), %rdx     # 0xec725
leaq 0x455b2(%rip), %rcx     # 0xec70d
leaq 0x44a38(%rip), %r8      # 0xebb9a
movl $0x11a2, %r9d           # imm = 0x11A2
xorl %eax, %eax
callq 0xb8c0
callq 0xb300