// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/reads2twobit.c
// Function: gt_reads2twobit_encode_interleaved_paired_fastq_library
static int gt_reads2twobit_encode_interleaved_paired_fastq_library(
    GtReads2TwobitEncodeState *state, GtReadsLibraryInfo *rli, FILE *file,
    char *line)
{
  int had_err = 0;
  GtUword qbuf_next = 0;
  bool qmode = false;
  bool processing_mate = true;
  char *fgetsretval = line;
  state->seqlen = 0;
  state->exp_qlen = 0;
  do {
    if (!qmode)
    {
      if (line[0] == '@')
      {
        processing_mate = !processing_mate;
        if (state->current.nofseqs > rli->first_seqnum)
        {
          if (!state->invalid_mode)
            gt_reads2twobit_process_sequence_end(state);
        }
        if (!processing_mate && (state->current.nofseqs > rli->first_seqnum ||
              state->invalid_mode))
        {
          gt_reads2twobit_finalize_descriptions(state);
        }
        gt_reads2twobit_process_desc_line(state, line, processing_mate,
            false);
        GT_READS2TWOBIT_HANDLE_LONG_DESCRIPTIONS(line, file, fgetsretval,
            true, state, processing_mate);
        if (processing_mate)
        {
          if (!state->invalid_mode)
            state->current.nofseqs++;
          state->seqlen_mate = state->seqlen;
          state->seqlen = 0;
          state->exp_qlen = 0;
        }
        else
        {
          gt_reads2twobit_prepare_for_new_sequence(state);
        }
      }
      else if (line[0] == '+')
      {
        GT_READS2TWOBIT_HANDLE_LONG_DESCRIPTIONS(line, file, fgetsretval,
            false, state, processing_mate);
        if (state->exp_qlen + 1UL > (GtUword)(state->qbuf_size))
        {
          state->qbuf_size = (size_t)state->exp_qlen + 1;
          state->qbuf = gt_realloc(state->qbuf, state->qbuf_size);
        }
        qmode = true;
      }
      else
      {
        gt_reads2twobit_process_sequence_line(state, line);
      }
    }
    else
    {
      had_err = gt_reads2twobit_process_qualities_line(state, line,
          state->qbuf, &qbuf_next);
      if (qbuf_next == state->exp_qlen)
      {
        if (state->maxlow != GT_UNDEF_UWORD)
          gt_reads2twobit_apply_quality_filter(state, state->qbuf, qbuf_next);
        qbuf_next = 0;
        qmode = false;
      }
    }
  } while ((fgetsretval = fgets(line, (int)GT_READS2TWOBIT_READBUFFER_SIZE,
            file)) == line && !had_err);
  if (!had_err && !state->invalid_mode)
    gt_reads2twobit_process_sequence_end(state);
  if (state->current.nofseqs > rli->first_seqnum)
    gt_reads2twobit_finalize_descriptions(state);
  return had_err;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movq $0x0, 0x18(%rsp)
movb $0x0, 0x17(%rsp)
movb $0x1, 0x16(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rax
movq $0x0, 0x808(%rax)
movq 0x40(%rsp), %rax
movq $0x0, 0x818(%rax)
testb $0x1, 0x17(%rsp)
jne 0x2a778c
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x40, %eax
jne 0x2a7688
movb 0x16(%rsp), %al
xorb $-0x1, %al
andb $0x1, %al
movb %al, 0x16(%rsp)
movq 0x40(%rsp), %rax
movq 0x860(%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x38(%rcx), %rax
jbe 0x2a7536
movq 0x40(%rsp), %rax
testb $0x1, 0x8f1(%rax)
jne 0x2a7534
movq 0x40(%rsp), %rdi
callq 0x2a57b0
jmp 0x2a7536
testb $0x1, 0x16(%rsp)
jne 0x2a756c
movq 0x40(%rsp), %rax
movq 0x860(%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x38(%rcx), %rax
ja 0x2a7562
movq 0x40(%rsp), %rax
testb $0x1, 0x8f1(%rax)
je 0x2a756c
movq 0x40(%rsp), %rdi
callq 0x2a5b50
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
movb 0x16(%rsp), %al
xorl %ecx, %ecx
andb $0x1, %al
movzbl %al, %edx
callq 0x2a5c70
movq 0x28(%rsp), %rdi
callq 0x192b0
movq %rax, %rcx
xorl %eax, %eax
cmpq $0xff, %rcx
movb %al, 0x7(%rsp)
jne 0x2a75c6
movq 0x28(%rsp), %rax
movsbl 0xfe(%rax), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, 0x7(%rsp)
je 0x2a75c6
cmpq $0x0, 0x8(%rsp)
setne %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x2a75d0
jmp 0x2a7613
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rdx
movl $0x100, %esi            # imm = 0x100
callq 0x19b60
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x2a760e
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
movb 0x16(%rsp), %al
movl $0x1, %ecx
andb $0x1, %al
movzbl %al, %edx
callq 0x2a5c70
jmp 0x2a7586
testb $0x1, 0x16(%rsp)
je 0x2a7679
movq 0x40(%rsp), %rax
testb $0x1, 0x8f1(%rax)
jne 0x2a763f
movq 0x40(%rsp), %rax
movq 0x860(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x860(%rax)
movq 0x40(%rsp), %rax
movq 0x808(%rax), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x810(%rax)
movq 0x40(%rsp), %rax
movq $0x0, 0x808(%rax)
movq 0x40(%rsp), %rax
movq $0x0, 0x818(%rax)
jmp 0x2a7683
movq 0x40(%rsp), %rdi
callq 0x2a5d20
jmp 0x2a778a
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x2a7779
jmp 0x2a769b
movq 0x28(%rsp), %rdi
callq 0x192b0
movq %rax, %rcx
xorl %eax, %eax
cmpq $0xff, %rcx
movb %al, 0x6(%rsp)
jne 0x2a76db
movq 0x28(%rsp), %rax
movsbl 0xfe(%rax), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, 0x6(%rsp)
je 0x2a76db
cmpq $0x0, 0x8(%rsp)
setne %al
movb %al, 0x6(%rsp)
movb 0x6(%rsp), %al
testb $0x1, %al
jne 0x2a76e5
jmp 0x2a7700
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rdx
movl $0x100, %esi            # imm = 0x100
callq 0x19b60
movq %rax, 0x8(%rsp)
jmp 0x2a769b
movq 0x40(%rsp), %rax
movq 0x818(%rax), %rax
addq $0x1, %rax
movq 0x40(%rsp), %rcx
cmpq 0x938(%rcx), %rax
jbe 0x2a7772
movq 0x40(%rsp), %rax
movq 0x818(%rax), %rcx
addq $0x1, %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x938(%rax)
movq 0x40(%rsp), %rax
movq 0x920(%rax), %rdi
movq 0x40(%rsp), %rax
movq 0x938(%rax), %rsi
leaq 0x2dd857(%rip), %rdx    # 0x584fb0
movl $0x40d, %ecx            # imm = 0x40D
callq 0xe8540
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x920(%rax)
movb $0x1, 0x17(%rsp)
jmp 0x2a7788
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x2a5db0
jmp 0x2a778a
jmp 0x2a77fd
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x40(%rsp), %rax
movq 0x920(%rax), %rdx
leaq 0x18(%rsp), %rcx
callq 0x2a68c0
movl %eax, 0x24(%rsp)
movq 0x18(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq 0x818(%rcx), %rax
jne 0x2a77fb
movq 0x40(%rsp), %rax
cmpq $-0x1, 0x958(%rax)
je 0x2a77ed
movq 0x40(%rsp), %rdi
movq 0x40(%rsp), %rax
movq 0x920(%rax), %rsi
movq 0x18(%rsp), %rdx
callq 0x2a6980
movq $0x0, 0x18(%rsp)
movb $0x0, 0x17(%rsp)
jmp 0x2a77fd
jmp 0x2a77ff
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rdx
movl $0x100, %esi            # imm = 0x100
callq 0x19b60
movq %rax, %rcx
movq %rcx, 0x8(%rsp)
xorl %eax, %eax
cmpq 0x28(%rsp), %rcx
movb %al, 0x5(%rsp)
jne 0x2a7836
cmpl $0x0, 0x24(%rsp)
setne %al
xorb $-0x1, %al
movb %al, 0x5(%rsp)
movb 0x5(%rsp), %al
testb $0x1, %al
jne 0x2a74dd
cmpl $0x0, 0x24(%rsp)
jne 0x2a7861
movq 0x40(%rsp), %rax
testb $0x1, 0x8f1(%rax)
jne 0x2a7861
movq 0x40(%rsp), %rdi
callq 0x2a57b0
movq 0x40(%rsp), %rax
movq 0x860(%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x38(%rcx), %rax
jbe 0x2a7882
movq 0x40(%rsp), %rdi
callq 0x2a5b50
movl 0x24(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)