// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/str.c
// Function: gt_str_read_next_line_generic
int gt_str_read_next_line_generic(GtStr *s, GtFile *fpin)
{
  int cc;
  char c;
  gt_assert(s);
  for (;;) {
    cc = gt_file_xfgetc(fpin);
    if (cc == EOF)
      return EOF;
    if (cc == '\n') {
      if ((s->length+1) * sizeof (char) > s->allocated) {
        s->cstr = gt_dynalloc(s->cstr, &s->allocated,
                              (s->length+1) * sizeof (char));
      }
      s->cstr[s->length] = '\0';
      return 0;
    }
    else if (cc == '\r') {
      /* check if we have a Windows newline "\r\n" */
      int ncc;
      char nc;
      ncc = gt_file_xfgetc(fpin);
      if (ncc == EOF) {
        c = cc;
        if ((s->length+2) * sizeof (char) > s->allocated) {
          s->cstr = gt_dynalloc(s->cstr, &s->allocated,
                                (s->length+2) * sizeof (char));
        }
        s->cstr[s->length++] = c;
        return EOF;
      }
      if (ncc == '\n') {
        if ((s->length+1) * sizeof (char) > s->allocated) {
          s->cstr = gt_dynalloc(s->cstr, &s->allocated,
                                (s->length+1) * sizeof (char));
        }
        s->cstr[s->length] = '\0';
        return 0;
      }
      c = cc;
      nc = ncc;
      if ((s->length+3) * sizeof (char) > s->allocated) {
        s->cstr = gt_dynalloc(s->cstr, &s->allocated,
                              (s->length+3) * sizeof (char));
      }
      s->cstr[s->length++] = c;
      s->cstr[s->length++] = nc;
      continue;
    }
    c = cc;
    if ((s->length+2) * sizeof (char) > s->allocated) {
      s->cstr = gt_dynalloc(s->cstr, &s->allocated,
                            (s->length+2) * sizeof (char));
    }
    s->cstr[s->length++] = c;
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x1a19e
movq 0x199e6b(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x143eef(%rip), %rsi    # 0x15e066
leaq 0x151d30(%rip), %rdx    # 0x16beae
leaq 0x146544(%rip), %rcx    # 0x1606c9
leaq 0x146382(%rip), %r8     # 0x16050e
movl $0x144, %r9d            # imm = 0x144
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x1a1a0
jmp 0x1a1a2
movq 0x10(%rsp), %rdi
callq 0x83620
movl %eax, 0xc(%rsp)
cmpl $-0x1, 0xc(%rsp)
jne 0x1a1c4
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x1a485
cmpl $0xa, 0xc(%rsp)
jne 0x1a23b
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
addq $0x1, %rax
shlq $0x0, %rax
movq 0x18(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x1a219
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rsi
addq $0x10, %rsi
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdx
addq $0x1, %rdx
shlq $0x0, %rdx
callq 0x7f2b0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x8(%rcx), %rcx
movb $0x0, (%rax,%rcx)
movl $0x0, 0x24(%rsp)
jmp 0x1a485
cmpl $0xd, 0xc(%rsp)
jne 0x1a405
movq 0x10(%rsp), %rdi
callq 0x83620
movl %eax, 0x4(%rsp)
cmpl $-0x1, 0x4(%rsp)
jne 0x1a2e5
movl 0xc(%rsp), %eax
movb %al, 0xb(%rsp)
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
addq $0x2, %rax
shlq $0x0, %rax
movq 0x18(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x1a2b5
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rsi
addq $0x10, %rsi
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdx
addq $0x2, %rdx
shlq $0x0, %rdx
callq 0x7f2b0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movb 0xb(%rsp), %dl
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rsp), %rsi
movq 0x8(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x8(%rsi)
movb %dl, (%rax,%rcx)
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x1a485
cmpl $0xa, 0x4(%rsp)
jne 0x1a35c
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
addq $0x1, %rax
shlq $0x0, %rax
movq 0x18(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x1a33a
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rsi
addq $0x10, %rsi
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdx
addq $0x1, %rdx
shlq $0x0, %rdx
callq 0x7f2b0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x8(%rcx), %rcx
movb $0x0, (%rax,%rcx)
movl $0x0, 0x24(%rsp)
jmp 0x1a485
movl 0xc(%rsp), %eax
movb %al, 0xb(%rsp)
movl 0x4(%rsp), %eax
movb %al, 0x3(%rsp)
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
addq $0x3, %rax
shlq $0x0, %rax
movq 0x18(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x1a3ba
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rsi
addq $0x10, %rsi
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdx
addq $0x3, %rdx
shlq $0x0, %rdx
callq 0x7f2b0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movb 0xb(%rsp), %dl
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rsp), %rsi
movq 0x8(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x8(%rsi)
movb %dl, (%rax,%rcx)
movb 0x3(%rsp), %dl
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rsp), %rsi
movq 0x8(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x8(%rsi)
movb %dl, (%rax,%rcx)
jmp 0x1a1a2
jmp 0x1a407
movl 0xc(%rsp), %eax
movb %al, 0xb(%rsp)
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
addq $0x2, %rax
shlq $0x0, %rax
movq 0x18(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x1a45d
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rsi
addq $0x10, %rsi
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdx
addq $0x2, %rdx
shlq $0x0, %rdx
callq 0x7f2b0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movb 0xb(%rsp), %dl
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rsp), %rsi
movq 0x8(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x8(%rsi)
movb %dl, (%rax,%rcx)
jmp 0x1a1a2
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop