// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/reads2twobit.c
// Function: gt_reads2twobit_delete_sequences
void gt_reads2twobit_delete_sequences(GtReads2Twobit *r2t, GtBitsequence *list)
{
  GtTwobitencoding outputoffset = 0, *outputbuffer;
  GtUword libnum, seqnum, output_seqnum,
                noflibs = gt_array_size(r2t->collection),
                deleted_sequences = 0, deleted_chars = 0, output_startpos = 0;
  for (libnum = 0; libnum < noflibs; libnum++)
  {
    GtReadsLibraryInfo *rli = gt_array_get(r2t->collection, libnum);
    if (rli->nofseqs > 0)
    {
      GtUword deleted_sequences_in_lib = 0, deleted_chars_in_lib = 0,
                    last_seqnum = rli->first_seqnum + rli->nofseqs - 1UL;
      for (seqnum = rli->first_seqnum; seqnum <= last_seqnum; seqnum++)
      {
        if (!GT_ISIBITSET(list, seqnum))
        {
          if (deleted_sequences > 0)
          {
            gt_assert(seqnum >= deleted_sequences);
            output_seqnum = seqnum - deleted_sequences;
            output_startpos = (r2t->seqlen_eqlen > 0)
              ? r2t->seqlen_eqlen * output_seqnum
              : ((output_seqnum == 0) ? 0 :
              r2t->seppos[output_seqnum - 1UL] + 1UL);
            outputbuffer = r2t->twobitencoding +
              GT_DIVBYUNITSIN2BITENC(output_startpos);
            outputoffset = (GtTwobitencoding)
              GT_MODBYUNITSIN2BITENC(output_startpos);
            (void)gt_reads2twobit_write_encoded(r2t, seqnum, outputbuffer,
                outputoffset, &outputoffset);
            if (r2t->seqlen_eqlen == 0)
            {
              GtUword seqlen;
              gt_assert(seqnum > 0);
              seqlen = r2t->seppos[seqnum] - r2t->seppos[seqnum - 1UL];
              gt_assert(seqlen <= r2t->seqlen_max);
              gt_assert(output_startpos + seqlen <= r2t->total_seqlength);
              r2t->seppos[output_seqnum] = output_startpos + seqlen - 1UL;
            }
          }
        }
        else
        {
          deleted_chars_in_lib +=
            gt_reads2twobit_subtract_from_chardistri(r2t, seqnum);
          deleted_sequences++;
          deleted_sequences_in_lib++;
        }
      }
      deleted_chars += deleted_chars_in_lib;
      gt_assert(deleted_sequences_in_lib <= rli->nofseqs);
      if (rli->paired == true)
        gt_assert(deleted_sequences_in_lib % 2 == 0);
      rli->nofseqs -= deleted_sequences_in_lib;
      gt_assert(deleted_chars_in_lib <= rli->total_seqlength);
      rli->total_seqlength -= deleted_chars_in_lib;
    }
  }
  gt_assert(deleted_sequences <= r2t->nofseqs);
  r2t->nofseqs -= deleted_sequences;
  if (r2t->nofseqs == 0)
  {
    r2t->total_seqlength = 0;
  }
  else
  {
    gt_assert(deleted_chars <= r2t->total_seqlength);
    r2t->total_seqlength -= deleted_chars;
  }
  if (deleted_sequences > 0)
  {
    r2t->twobitencoding = gt_realloc(r2t->twobitencoding,
        sizeof (*r2t->twobitencoding) *
        (GT_DIVBYUNITSIN2BITENC(r2t->total_seqlength) + 2UL));
  }
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq $0x0, 0x80(%rsp)
movq 0x90(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x81370
movq %rax, 0x58(%rsp)
movq $0x0, 0x50(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0x70(%rsp)
movq 0x70(%rsp), %rax
cmpq 0x58(%rsp), %rax
jae 0x2a3b08
movq 0x90(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x70(%rsp), %rsi
callq 0x80b60
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
cmpq $0x0, 0x40(%rax)
jbe 0x2a3af3
movq $0x0, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x38(%rsp), %rcx
addq 0x40(%rcx), %rax
subq $0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
cmpq 0x20(%rsp), %rax
ja 0x2a39c8
movq 0x88(%rsp), %rax
movq 0x68(%rsp), %rcx
shrq $0x6, %rcx
movq (%rax,%rcx,8), %rax
movq 0x68(%rsp), %rcx
andq $0x3f, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
shrq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x2a397b
cmpq $0x0, 0x50(%rsp)
jbe 0x2a3979
jmp 0x2a370c
movq 0x68(%rsp), %rax
cmpq 0x50(%rsp), %rax
jae 0x2a3750
movq 0x398881(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2728ea(%rip), %rsi    # 0x516013
leaq 0x2e1b16(%rip), %rdx    # 0x585246
leaq 0x2e1b2b(%rip), %rcx    # 0x585262
leaq 0x2e1872(%rip), %r8     # 0x584fb0
movl $0x764, %r9d            # imm = 0x764
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2a3752
movq 0x68(%rsp), %rax
subq 0x50(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x90(%rsp), %rax
cmpq $0x0, 0x48(%rax)
jbe 0x2a3789
movq 0x90(%rsp), %rax
movq 0x48(%rax), %rax
imulq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x2a37c6
cmpq $0x0, 0x60(%rsp)
jne 0x2a379a
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0x2a37bc
movq 0x90(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x60(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x40(%rsp), %rcx
shrq $0x5, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x78(%rsp)
movq 0x40(%rsp), %rax
andq $0x1f, %rax
movq %rax, 0x80(%rsp)
movq 0x90(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x80(%rsp), %rcx
leaq 0x80(%rsp), %r8
callq 0x2a2d60
movq 0x90(%rsp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x2a3977
jmp 0x2a383e
cmpq $0x0, 0x68(%rsp)
ja 0x2a387e
movq 0x398753(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2727bc(%rip), %rsi    # 0x516013
leaq 0x2855cf(%rip), %rdx    # 0x528e2d
leaq 0x2e19fd(%rip), %rcx    # 0x585262
leaq 0x2e1744(%rip), %r8     # 0x584fb0
movl $0x773, %r9d            # imm = 0x773
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2a3880
movq 0x90(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x68(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x90(%rsp), %rcx
movq 0x38(%rcx), %rcx
movq 0x68(%rsp), %rdx
subq $0x1, %rdx
subq (%rcx,%rdx,8), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x90(%rsp), %rcx
cmpq 0x50(%rcx), %rax
jbe 0x2a38fe
movq 0x3986d3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x27273c(%rip), %rsi    # 0x516013
leaq 0x2e19a5(%rip), %rdx    # 0x585283
leaq 0x2e197d(%rip), %rcx    # 0x585262
leaq 0x2e16c4(%rip), %r8     # 0x584fb0
movl $0x775, %r9d            # imm = 0x775
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2a3900
jmp 0x2a3902
movq 0x40(%rsp), %rax
addq 0x18(%rsp), %rax
movq 0x90(%rsp), %rcx
cmpq 0x60(%rcx), %rax
jbe 0x2a3952
movq 0x39867f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2726e8(%rip), %rsi    # 0x516013
leaq 0x2e196b(%rip), %rdx    # 0x58529d
leaq 0x2e1929(%rip), %rcx    # 0x585262
leaq 0x2e1670(%rip), %r8     # 0x584fb0
movl $0x776, %r9d            # imm = 0x776
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2a3954
movq 0x40(%rsp), %rdx
addq 0x18(%rsp), %rdx
subq $0x1, %rdx
movq 0x90(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x60(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x2a3979
jmp 0x2a39b3
movq 0x90(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0x2a3c50
addq 0x28(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x50(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x50(%rsp)
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x2a39b5
movq 0x68(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x68(%rsp)
jmp 0x2a36b3
movq 0x28(%rsp), %rax
addq 0x48(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq 0x40(%rcx), %rax
jbe 0x2a3a1f
movq 0x3985b2(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x27261b(%rip), %rsi    # 0x516013
leaq 0x2e18cf(%rip), %rdx    # 0x5852ce
leaq 0x2e185c(%rip), %rcx    # 0x585262
leaq 0x2e15a3(%rip), %r8     # 0x584fb0
movl $0x784, %r9d            # imm = 0x784
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2a3a21
movq 0x38(%rsp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x2a3a7f
jmp 0x2a3a34
movq 0x30(%rsp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x2a3a7b
movq 0x398556(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2725bf(%rip), %rsi    # 0x516013
leaq 0x2e189c(%rip), %rdx    # 0x5852f7
leaq 0x2e1800(%rip), %rcx    # 0x585262
leaq 0x2e1547(%rip), %r8     # 0x584fb0
movl $0x786, %r9d            # imm = 0x786
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2a3a7d
jmp 0x2a3a7f
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rax
movq 0x40(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x40(%rax)
movq 0x28(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq 0x30(%rcx), %rax
jbe 0x2a3adc
movq 0x3984f5(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x27255e(%rip), %rsi    # 0x516013
leaq 0x2e185d(%rip), %rdx    # 0x585319
leaq 0x2e179f(%rip), %rcx    # 0x585262
leaq 0x2e14e6(%rip), %r8     # 0x584fb0
movl $0x788, %r9d            # imm = 0x788
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2a3ade
movq 0x28(%rsp), %rdx
movq 0x38(%rsp), %rax
movq 0x30(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x30(%rax)
jmp 0x2a3af5
movq 0x70(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x70(%rsp)
jmp 0x2a363d
jmp 0x2a3b0a
movq 0x50(%rsp), %rax
movq 0x90(%rsp), %rcx
cmpq 0x40(%rcx), %rax
jbe 0x2a3b55
movq 0x39847c(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2724e5(%rip), %rsi    # 0x516013
leaq 0x2e1811(%rip), %rdx    # 0x585346
leaq 0x2e1726(%rip), %rcx    # 0x585262
leaq 0x2e146d(%rip), %r8     # 0x584fb0
movl $0x78c, %r9d            # imm = 0x78C
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2a3b57
movq 0x50(%rsp), %rdx
movq 0x90(%rsp), %rax
movq 0x40(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x40(%rax)
movq 0x90(%rsp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x2a3b90
movq 0x90(%rsp), %rax
movq $0x0, 0x60(%rax)
jmp 0x2a3bf7
jmp 0x2a3b92
movq 0x48(%rsp), %rax
movq 0x90(%rsp), %rcx
cmpq 0x60(%rcx), %rax
jbe 0x2a3bdd
movq 0x3983f4(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x27245d(%rip), %rsi    # 0x516013
leaq 0x2e17ab(%rip), %rdx    # 0x585368
leaq 0x2e169e(%rip), %rcx    # 0x585262
leaq 0x2e13e5(%rip), %r8     # 0x584fb0
movl $0x794, %r9d            # imm = 0x794
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2a3bdf
movq 0x48(%rsp), %rdx
movq 0x90(%rsp), %rax
movq 0x60(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x60(%rax)
cmpq $0x0, 0x50(%rsp)
jbe 0x2a3c43
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x90(%rsp), %rax
movq 0x60(%rax), %rsi
shrq $0x5, %rsi
addq $0x2, %rsi
shlq $0x3, %rsi
leaq 0x2e1386(%rip), %rdx    # 0x584fb0
movl $0x79b, %ecx            # imm = 0x79B
callq 0xe8540
movq %rax, %rcx
movq 0x90(%rsp), %rax
movq %rcx, 0x10(%rax)
addq $0x98, %rsp
retq
nopl (%rax,%rax)