// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/reads2twobit.c
// Function: gt_reads2twobit_set_separators_to_less_frequent_char
static void gt_reads2twobit_set_separators_to_less_frequent_char(
    GtReads2Twobit *r2t)
{
  GtUword seqnum, pos, codenum, posincode;
  GtTwobitencoding sepcode, code, mask, shift;
  sepcode = gt_reads2twobit_less_frequent_char(r2t);
  if (sepcode != r2t->current_sepcode && r2t->nofseqs > 1UL)
  {
    GtUword from, to;
    gt_log_log("changing sepcode from "GT_WU" to "GT_WU"",
                (GtUword) r2t->current_sepcode,
                (GtUword) sepcode);
    from = r2t->seqlen_eqlen > 0 ? 1UL : 0;
    to = r2t->seqlen_eqlen > 0 ? r2t->nofseqs - 1UL : r2t->nofseqs - 2UL;
    for (seqnum = from; seqnum <= to; seqnum++)
    {
      pos = r2t->seqlen_eqlen > 0
        ? seqnum * r2t->seqlen_eqlen - 1UL
        : r2t->seppos[seqnum];
      codenum = GT_DIVBYUNITSIN2BITENC(pos);
      posincode = GT_MODBYUNITSIN2BITENC(pos);
      code = r2t->twobitencoding[codenum];
      shift = (GtTwobitencoding)GT_MULT2(GT_UNITSIN2BITENC - 1UL - posincode);
      mask = ~((GtTwobitencoding)(3UL) << shift);
      gt_assert((code & ~mask) >> shift ==
          (GtTwobitencoding)r2t->current_sepcode);
      code = (code & mask) | ((GtTwobitencoding)sepcode << shift);
      r2t->twobitencoding[codenum] = code;
    }
    r2t->current_sepcode = sepcode;
  }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rdi
callq 0x2a8c20
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq 0x60(%rsp), %rcx
cmpq 0x68(%rcx), %rax
je 0x2a8b72
movq 0x60(%rsp), %rax
cmpq $0x1, 0x40(%rax)
jbe 0x2a8b72
movq 0x60(%rsp), %rax
movq 0x68(%rax), %rsi
movq 0x38(%rsp), %rdx
leaq 0x2dd433(%rip), %rdi    # 0x585dd4
movb $0x0, %al
callq 0xe7740
movq 0x60(%rsp), %rax
movq 0x48(%rax), %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovaq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x60(%rsp), %rax
cmpq $0x0, 0x48(%rax)
jbe 0x2a89e5
movq 0x60(%rsp), %rax
movq 0x40(%rax), %rax
subq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x2a89f7
movq 0x60(%rsp), %rax
movq 0x40(%rax), %rax
subq $0x2, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
cmpq 0x10(%rsp), %rax
ja 0x2a8b64
movq 0x60(%rsp), %rax
cmpq $0x0, 0x48(%rax)
jbe 0x2a8a40
movq 0x58(%rsp), %rax
movq 0x60(%rsp), %rcx
imulq 0x48(%rcx), %rax
subq $0x1, %rax
movq %rax, (%rsp)
jmp 0x2a8a56
movq 0x60(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x58(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
shrq $0x5, %rax
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rax
andq $0x1f, %rax
movq %rax, 0x40(%rsp)
movq 0x60(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x48(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x30(%rsp)
movl $0x1f, %eax
subq 0x40(%rsp), %rax
shlq %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rcx
movl $0x3, %eax
shlq %cl, %rax
xorq $-0x1, %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq 0x20(%rsp), %rcx
shrq %cl, %rax
movq 0x60(%rsp), %rcx
cmpq 0x68(%rcx), %rax
je 0x2a8b16
movq 0x3934bb(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x26d524(%rip), %rsi    # 0x516013
leaq 0x2dd2ff(%rip), %rdx    # 0x585df5
leaq 0x2dd33a(%rip), %rcx    # 0x585e37
leaq 0x2dc4ac(%rip), %r8     # 0x584fb0
movl $0x7b8, %r9d            # imm = 0x7B8
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2a8b18
movq 0x30(%rsp), %rax
andq 0x28(%rsp), %rax
movq 0x38(%rsp), %rdx
movq 0x20(%rsp), %rcx
shlq %cl, %rdx
movq %rdx, %rcx
orq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdx
movq 0x60(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x48(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x58(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
jmp 0x2a8a0b
movq 0x38(%rsp), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x68(%rax)
addq $0x68, %rsp
retq
nopw (%rax,%rax)