// File: /workspace/github_c_makefile_star2_O0/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:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movq %rcx, 0x88(%rsp)
movq %r8, 0x80(%rsp)
cmpq $0x1, 0x90(%rsp)
ja 0x11b362
movq 0x98ca7(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x42d2b(%rip), %rsi     # 0x15e066
leaq 0x6e001(%rip), %rdx     # 0x189343
leaq 0x6ae95(%rip), %rcx     # 0x1861de
leaq 0x6a30e(%rip), %r8      # 0x18565e
movl $0x119d, %r9d           # imm = 0x119D
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x11b364
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rsi
subq $0x1, %rsi
callq 0x11b530
movl %eax, 0xc(%rsp)
movq 0x98(%rsp), %rsi
movl 0xc(%rsp), %edx
movq 0x90(%rsp), %rcx
subq $0x1, %rcx
leaq 0x48(%rsp), %rdi
callq 0x11b620
movl 0xc(%rsp), %edi
leaq 0x48(%rsp), %rsi
callq 0x118cc0
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x11b750
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
je 0x11b3e3
cmpq $0x0, 0x88(%rsp)
jne 0x11b41b
movq 0x98bee(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x42c72(%rip), %rsi     # 0x15e066
leaq 0x6adfb(%rip), %rdx     # 0x1861f6
leaq 0x6addc(%rip), %rcx     # 0x1861de
leaq 0x6a255(%rip), %r8      # 0x18565e
movl $0x11a2, %r9d           # imm = 0x11A2
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x11b41d
movq $0x0, 0x38(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
cmpq 0x98(%rsp), %rax
jae 0x11b4b7
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
cmpq (%rcx), %rax
jne 0x11b495
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x11ba00
movq 0x30(%rsp), %rax
movq 0x88(%rsp), %rcx
movq 0x90(%rsp), %rdx
shlq $0x3, %rdx
addq %rdx, %rcx
addq $-0x10, %rcx
cmpq %rcx, %rax
jae 0x11b493
movq 0x30(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x30(%rsp)
jmp 0x11b495
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x11bb30
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x11b433
movq 0x40(%rsp), %rdi
callq 0x11bb80
movq 0x40(%rsp), %rdi
callq 0x11bbb0
movq 0x98(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x20(%rsp)
leaq 0x48(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x80(%rsp), %rdx
leaq 0x10(%rsp), %rsi
callq 0x11bbe0
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %edi
leaq 0x48(%rsp), %rsi
callq 0x118ab0
movl 0x8(%rsp), %eax
addq $0xa8, %rsp
retq
nop