// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/reads2twobit.c
// Function: gt_reads2twobit_encode_unpaired_fastq_library
static int gt_reads2twobit_encode_unpaired_fastq_library(
    GtReads2TwobitEncodeState *state, GtReadsLibraryInfo *rli, FILE *file,
    char *line)
{
  int had_err = 0;
  GtUword qbuf_next = 0;
  bool qmode = false;
  char *fgetsretval = NULL;
  state->seqlen = 0;
  state->exp_qlen = 0;
  do {
    if (!qmode)
    {
      if (line[0] == '@')
      {
        if (state->current.nofseqs > rli->first_seqnum)
        {
          if (!state->invalid_mode)
            gt_reads2twobit_process_sequence_end(state);
          gt_reads2twobit_finalize_descriptions(state);
        }
        gt_reads2twobit_process_desc_line(state, line, false, false);
        GT_READS2TWOBIT_HANDLE_LONG_DESCRIPTIONS(line, file, fgetsretval,
            true, state, false);
        gt_reads2twobit_prepare_for_new_sequence(state);
      }
      else if (line[0] == '+')
      {
        GT_READS2TWOBIT_HANDLE_LONG_DESCRIPTIONS(line, file, fgetsretval,
            false, state, false);
        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);
  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)
movq $0x0, 0x8(%rsp)
movq 0x40(%rsp), %rax
movq $0x0, 0x808(%rax)
movq 0x40(%rsp), %rax
movq $0x0, 0x818(%rax)
testb $0x1, 0x17(%rsp)
jne 0x2a56d8
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x40, %eax
jne 0x2a55d4
movq 0x40(%rsp), %rax
movq 0x860(%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x38(%rcx), %rax
jbe 0x2a552c
movq 0x40(%rsp), %rax
testb $0x1, 0x8f1(%rax)
jne 0x2a5522
movq 0x40(%rsp), %rdi
callq 0x2a57b0
movq 0x40(%rsp), %rdi
callq 0x2a5b50
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x2a5c70
movq 0x28(%rsp), %rdi
callq 0x192b0
movq %rax, %rcx
xorl %eax, %eax
cmpq $0xff, %rcx
movb %al, 0x7(%rsp)
jne 0x2a557f
movq 0x28(%rsp), %rax
movsbl 0xfe(%rax), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, 0x7(%rsp)
je 0x2a557f
cmpq $0x0, 0x8(%rsp)
setne %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x2a5589
jmp 0x2a55c5
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rdx
movl $0x100, %esi            # imm = 0x100
callq 0x19b60
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x2a55c0
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x2a5c70
jmp 0x2a553f
movq 0x40(%rsp), %rdi
callq 0x2a5d20
jmp 0x2a56d6
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x2a56c5
jmp 0x2a55e7
movq 0x28(%rsp), %rdi
callq 0x192b0
movq %rax, %rcx
xorl %eax, %eax
cmpq $0xff, %rcx
movb %al, 0x6(%rsp)
jne 0x2a5627
movq 0x28(%rsp), %rax
movsbl 0xfe(%rax), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, 0x6(%rsp)
je 0x2a5627
cmpq $0x0, 0x8(%rsp)
setne %al
movb %al, 0x6(%rsp)
movb 0x6(%rsp), %al
testb $0x1, %al
jne 0x2a5631
jmp 0x2a564c
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rdx
movl $0x100, %esi            # imm = 0x100
callq 0x19b60
movq %rax, 0x8(%rsp)
jmp 0x2a55e7
movq 0x40(%rsp), %rax
movq 0x818(%rax), %rax
addq $0x1, %rax
movq 0x40(%rsp), %rcx
cmpq 0x938(%rcx), %rax
jbe 0x2a56be
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 0x2df90b(%rip), %rdx    # 0x584fb0
movl $0x315, %ecx            # imm = 0x315
callq 0xe8540
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x920(%rax)
movb $0x1, 0x17(%rsp)
jmp 0x2a56d4
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x2a5db0
jmp 0x2a56d6
jmp 0x2a5749
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 0x2a5747
movq 0x40(%rsp), %rax
cmpq $-0x1, 0x958(%rax)
je 0x2a5739
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 0x2a5749
jmp 0x2a574b
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 0x2a5782
cmpl $0x0, 0x24(%rsp)
setne %al
xorb $-0x1, %al
movb %al, 0x5(%rsp)
movb 0x5(%rsp), %al
testb $0x1, %al
jne 0x2a54d7
movq 0x40(%rsp), %rdi
callq 0x2a5b50
movl 0x24(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)