// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/reads2twobit.c
// Function: gt_reads2twobit_switch_to_varlen_mode
static void gt_reads2twobit_switch_to_varlen_mode(
    GtReads2TwobitEncodeState *state)
{
  GtUword seqnum;
  GtUword next_seppos;
  gt_assert(state->varlen_mode == false);
  state->varlen_mode = true;
  gt_assert(state->current.nofseqs > 1UL);
  gt_assert(state->current.seqlen_first != state->seqlen);
  gt_assert(state->seqlen > 1UL);
  gt_log_log("readset is varlen: sequences 0.."GT_WU" have length "GT_WU
             ", sequence "GT_WU" is "GT_WU" bp long",
      state->current.nofseqs - 2UL, state->current.seqlen_first - 1UL,
      state->current.nofseqs - 1UL, state->seqlen - 1UL);
  gt_reads2twobit_init_seppos(state,
      state->current.seqlen_first * (state->current.nofseqs - 2UL) +
      state->seqlen);
  next_seppos = 0;
  for (seqnum = 0; seqnum < state->current.nofseqs - 1UL; seqnum++)
  {
    next_seppos += state->current.seqlen_first;
    gt_reads2twobit_append_seppos(state, next_seppos - 1UL);
  }
  gt_assert(next_seppos + state->seqlen == state->current.globalpos);
  gt_reads2twobit_append_seppos(state, state->current.globalpos - 1UL);
  gt_assert(state->current.seppos_nextfree == state->current.nofseqs);
  state->current.seqlen_max = GT_MAX(state->current.seqlen_first,
                                     state->seqlen);
  state->current.seqlen_min = GT_MIN(state->current.seqlen_first,
                                     state->seqlen);
  state->current.seqlen_first = 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movb 0x8f0(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x2a6b76
movq 0x39545b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x26f4c4(%rip), %rsi    # 0x516013
leaq 0x2ded57(%rip), %rdx    # 0x5858ad
leaq 0x2ded6c(%rip), %rcx    # 0x5858c9
leaq 0x2de44c(%rip), %r8     # 0x584fb0
movl $0x1ab, %r9d            # imm = 0x1AB
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2a6b78
movq 0x20(%rsp), %rax
movb $0x1, 0x8f0(%rax)
movq 0x20(%rsp), %rax
cmpq $0x1, 0x860(%rax)
ja 0x2a6bcb
movq 0x395406(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x26f46f(%rip), %rsi    # 0x516013
leaq 0x2ded44(%rip), %rdx    # 0x5858ef
leaq 0x2ded17(%rip), %rcx    # 0x5858c9
leaq 0x2de3f7(%rip), %r8     # 0x584fb0
movl $0x1ad, %r9d            # imm = 0x1AD
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2a6bcd
jmp 0x2a6bcf
movq 0x20(%rsp), %rax
movq 0x880(%rax), %rax
movq 0x20(%rsp), %rcx
cmpq 0x808(%rcx), %rax
jne 0x2a6c21
movq 0x3953b0(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x26f419(%rip), %rsi    # 0x516013
leaq 0x2ded0b(%rip), %rdx    # 0x58590c
leaq 0x2decc1(%rip), %rcx    # 0x5858c9
leaq 0x2de3a1(%rip), %r8     # 0x584fb0
movl $0x1ae, %r9d            # imm = 0x1AE
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2a6c23
jmp 0x2a6c25
movq 0x20(%rsp), %rax
cmpq $0x1, 0x808(%rax)
ja 0x2a6c6c
movq 0x395365(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x26f3ce(%rip), %rsi    # 0x516013
leaq 0x2deced(%rip), %rdx    # 0x585939
leaq 0x2dec76(%rip), %rcx    # 0x5858c9
leaq 0x2de356(%rip), %r8     # 0x584fb0
movl $0x1af, %r9d            # imm = 0x1AF
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2a6c6e
movq 0x20(%rsp), %rax
movq 0x860(%rax), %rsi
subq $0x2, %rsi
movq 0x20(%rsp), %rax
movq 0x880(%rax), %rdx
subq $0x1, %rdx
movq 0x20(%rsp), %rax
movq 0x860(%rax), %rcx
subq $0x1, %rcx
movq 0x20(%rsp), %rax
movq 0x808(%rax), %r8
subq $0x1, %r8
leaq 0x2dec98(%rip), %rdi    # 0x58594d
movb $0x0, %al
callq 0xe7740
movq 0x20(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x880(%rax), %rsi
movq 0x20(%rsp), %rax
movq 0x860(%rax), %rax
subq $0x2, %rax
imulq %rax, %rsi
movq 0x20(%rsp), %rax
addq 0x808(%rax), %rsi
callq 0x2a6ed0
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq 0x860(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x2a6d57
movq 0x20(%rsp), %rax
movq 0x880(%rax), %rax
addq 0x10(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
subq $0x1, %rsi
callq 0x2a6a10
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x2a6d04
jmp 0x2a6d59
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %rcx
addq 0x808(%rcx), %rax
movq 0x20(%rsp), %rcx
cmpq 0x858(%rcx), %rax
je 0x2a6db0
movq 0x395221(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x26f28a(%rip), %rsi    # 0x516013
leaq 0x2dec0e(%rip), %rdx    # 0x58599e
leaq 0x2deb32(%rip), %rcx    # 0x5858c9
leaq 0x2de212(%rip), %r8     # 0x584fb0
movl $0x1bd, %r9d            # imm = 0x1BD
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2a6db2
movq 0x20(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0x858(%rax), %rsi
subq $0x1, %rsi
callq 0x2a6a10
movq 0x20(%rsp), %rax
movq 0x868(%rax), %rax
movq 0x20(%rsp), %rcx
cmpq 0x860(%rcx), %rax
je 0x2a6e1e
movq 0x3951b3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x26f21c(%rip), %rsi    # 0x516013
leaq 0x2debd8(%rip), %rdx    # 0x5859d6
leaq 0x2deac4(%rip), %rcx    # 0x5858c9
leaq 0x2de1a4(%rip), %r8     # 0x584fb0
movl $0x1bf, %r9d            # imm = 0x1BF
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2a6e20
movq 0x20(%rsp), %rax
movq 0x880(%rax), %rax
movq 0x20(%rsp), %rcx
cmpq 0x808(%rcx), %rax
jbe 0x2a6e4d
movq 0x20(%rsp), %rax
movq 0x880(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x2a6e5e
movq 0x20(%rsp), %rax
movq 0x808(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x870(%rax)
movq 0x20(%rsp), %rax
movq 0x880(%rax), %rax
movq 0x20(%rsp), %rcx
cmpq 0x808(%rcx), %rax
jae 0x2a6e9b
movq 0x20(%rsp), %rax
movq 0x880(%rax), %rax
movq %rax, (%rsp)
jmp 0x2a6eab
movq 0x20(%rsp), %rax
movq 0x808(%rax), %rax
movq %rax, (%rsp)
movq (%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x878(%rax)
movq 0x20(%rsp), %rax
movq $0x0, 0x880(%rax)
addq $0x28, %rsp
retq