// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/reads2twobit.c
// Function: gt_reads2twobit_process_sequence_end
static inline void gt_reads2twobit_process_sequence_end(
    GtReads2TwobitEncodeState *state)
{
  GT_READS2TWOBIT_WRITECODE_NOCOUNT(state->current,
      GT_READS2TWOBIT_DEFAULT_SEPARATOR, state->seqlen);
  if (state->use_rle)
  {
    gt_assert(state->current.globalpos > 1UL);
    gt_hplstore_set(state->hplengths, state->current.globalpos - 2UL,
        state->hplength);
    state->hsum += state->hplength;
    state->nofh++;
    gt_hplstore_set(state->hplengths, state->current.globalpos - 1UL, 0);
    state->prevcode = GT_READS2TWOBIT_CODE_UNDEF;
  }
  state->exp_qlen++;
  gt_assert(!state->invalid_mode);
  if (state->varlen_mode)
  {
    if (state->seqlen > state->current.seqlen_max)
      state->current.seqlen_max = state->seqlen;
    if (state->seqlen < state->current.seqlen_min)
      state->current.seqlen_min = state->seqlen;
    gt_reads2twobit_append_seppos(state, state->current.globalpos - 1UL);
  }
  else
  {
    if (state->current.nofseqs > 1UL)
    {
      if (state->seqlen != state->current.seqlen_first)
        gt_reads2twobit_switch_to_varlen_mode(state);
    }
    else
    {
      state->current.seqlen_first = state->seqlen;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
incq 0x808(%rdi)
incq 0x858(%rdi)
movq 0x828(%rdi), %rax
leaq 0x3(,%rax,4), %rax
movq %rax, 0x828(%rdi)
movl 0x830(%rdi), %ecx
incl %ecx
movw %cx, 0x830(%rdi)
cmpw $0x20, %cx
jne 0x1de329
movq 0x820(%rbx), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, 0x820(%rbx)
movq %rax, (%rcx)
movw $0x0, 0x830(%rbx)
movq $0x0, 0x828(%rbx)
cmpb $0x1, 0x960(%rbx)
jne 0x1de3a5
movq 0x858(%rbx), %rsi
cmpq $0x1, %rsi
jbe 0x1de5a2
movq 0x970(%rbx), %rdi
addq $-0x2, %rsi
movzbl 0x978(%rbx), %edx
callq 0x31f624
movzbl 0x978(%rbx), %eax
movdqu 0x980(%rbx), %xmm0
movd %eax, %xmm1
shufpd $0x2, 0x17a6aa(%rip), %xmm1 # xmm1 = xmm1[0],mem[1]
paddq %xmm0, %xmm1
movdqu %xmm1, 0x980(%rbx)
movq 0x858(%rbx), %rsi
movq 0x970(%rbx), %rdi
decq %rsi
xorl %edx, %edx
callq 0x31f624
movq $-0x1, 0x968(%rbx)
incq 0x818(%rbx)
cmpb $0x1, 0x8f1(%rbx)
je 0x1de59d
movb 0x8f0(%rbx), %al
cmpb $0x1, %al
jne 0x1de401
movq 0x808(%rbx), %rax
cmpq 0x870(%rbx), %rax
jbe 0x1de3da
movq %rax, 0x870(%rbx)
cmpq 0x878(%rbx), %rax
jae 0x1de3ea
movq %rax, 0x878(%rbx)
movq 0x858(%rbx), %rsi
decq %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1dec31
movq 0x808(%rbx), %r8
movq 0x860(%rbx), %rcx
cmpq $0x2, %rcx
jb 0x1de590
movq 0x880(%rbx), %rdx
cmpq %rdx, %r8
je 0x1de597
testb %al, %al
jne 0x1de5a7
movb $0x1, 0x8f0(%rbx)
cmpq $0x1, %r8
jbe 0x1de5ac
leaq -0x2(%rcx), %rsi
decq %rdx
decq %rcx
decq %r8
leaq 0x1d46c1(%rip), %rdi    # 0x3b2b17
xorl %eax, %eax
callq 0x103d72
cmpq $0x0, 0x908(%rbx)
jne 0x1de5b1
movq 0x860(%rbx), %rcx
addq $-0x2, %rcx
imulq 0x880(%rbx), %rcx
addq 0x808(%rbx), %rcx
je 0x1de5b6
movq 0x800(%rbx), %rax
cmpq %rcx, %rax
jbe 0x1de5bb
xorl %r14d, %r14d
xorl %edx, %edx
divq %rcx
movq %rax, 0x910(%rbx)
leaq 0x1d4794(%rip), %rdi    # 0x3b2c45
movq %rax, %rsi
xorl %eax, %eax
callq 0x103d72
movq 0x910(%rbx), %rdi
shlq $0x3, %rdi
leaq 0x1d3d27(%rip), %rsi    # 0x3b21f4
movl $0x192, %edx            # imm = 0x192
callq 0x104226
movq %rax, 0x908(%rbx)
movq $0x0, 0x868(%rbx)
cmpq $0x1, 0x860(%rbx)
je 0x1de527
xorl %eax, %eax
xorl %r15d, %r15d
movq 0x880(%rbx), %rcx
leaq (%rcx,%rax), %r14
leaq (%rcx,%rax), %rsi
decq %rsi
movq %rbx, %rdi
callq 0x1dec31
incq %r15
movq 0x860(%rbx), %rcx
decq %rcx
movq %r14, %rax
cmpq %rcx, %r15
jb 0x1de4f8
addq 0x808(%rbx), %r14
cmpq 0x858(%rbx), %r14
jne 0x1de5c0
decq %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1dec31
movq 0x868(%rbx), %rax
cmpq 0x860(%rbx), %rax
jne 0x1de5c5
movq 0x808(%rbx), %rax
movq 0x880(%rbx), %rcx
cmpq %rax, %rcx
movq %rax, %rdx
cmovaq %rcx, %rdx
movq %rdx, 0x870(%rbx)
cmovbq %rcx, %rax
movq %rax, 0x878(%rbx)
movq $0x0, 0x880(%rbx)
jmp 0x1de597
movq %r8, 0x880(%rbx)
popq %rbx
popq %r14
popq %r15
retq
callq 0x73cac
callq 0x73ae4
callq 0x73b1d
callq 0x73b56
callq 0x73b8f
callq 0x73c73
callq 0x73bc8
callq 0x73c01
callq 0x73c3a