// File: /workspace/github_c_makefile_star2_O2/thegenemyers[P]DASCRUBBER/QV.c
// Function: Read_Lines
int Read_Lines(FILE *input, int nlines)
{ int   i, rlen;
  int   tmax;
  char *tread;
  char *other;

  if (Read == NULL)
    { tmax  = MIN_BUFFER;
      tread = (char *) Malloc(5*tmax,"Allocating QV entry read buffer");
      if (tread == NULL)
        EXIT(-2);
      Rmax = tmax;
      Read = tread;
    }

  Nline += 1;
  if (fgets(Read,Rmax,input) == NULL)
    return (-1);

  rlen = strlen(Read);
  while (Read[rlen-1] != '\n')
    { tmax  = ((int) 1.4*Rmax) + MIN_BUFFER;
      tread = (char *) Realloc(Read,5*tmax,"Reallocating QV entry read buffer");
      if (tread == NULL)
        EXIT(-2);
      Rmax = tmax;
      Read = tread;
      if (fgets(Read+rlen,Rmax-rlen,input) == NULL)
        { EPRINTF(EPLACE,"Line %d: Last line does not end with a newline !\n",Nline);
          EXIT(-2);
        }
      rlen += strlen(Read+rlen);
    }
  other = Read;
  for (i = 1; i < nlines; i++)
    { other += Rmax;
      Nline += 1;
      if (fgets(other,Rmax,input) == NULL)
        { EPRINTF(EPLACE,"Line %d: incomplete last entry of .quiv file\n",Nline);
          EXIT(-2);
        }
      if (rlen != (int) strlen(other))
        { EPRINTF(EPLACE,"Line %d: Lines for an entry are not the same length\n",Nline);
          EXIT(-2);
        }
    }
  return (rlen-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0xa21b(%rip), %rdi      # 0x10930
testq %rdi, %rdi
je 0x6722
movl 0x7a98(%rip), %esi      # 0xe1b8
jmp 0x6755
leaq 0x3a1f(%rip), %rsi      # 0xa148
movl $0x1388, %edi           # imm = 0x1388
callq 0x1bad
testq %rax, %rax
je 0x689d
movq %rax, %rdi
movl $0x3e8, 0x7a6f(%rip)    # imm = 0x3E8
movq %rax, 0xa1e0(%rip)      # 0x10930
movl $0x3e8, %esi            # imm = 0x3E8
incl 0xa1dd(%rip)            # 0x10938
movq %r14, %rdx
callq 0x1180
testq %rax, %rax
je 0x6852
movq 0xa1bd(%rip), %r12      # 0x10930
movq %r12, %rdi
callq 0x10e0
movq %rax, %r15
movslq %r15d, %rbp
cmpb $0xa, -0x1(%r12,%rbp)
je 0x67fe
movslq 0x7a28(%rip), %rbp      # 0xe1b8
addq $0x3e8, %rbp            # imm = 0x3E8
leaq (,%rbp,4), %rsi
addq %rbp, %rsi
movq %r12, %rdi
leaq 0x39bc(%rip), %rdx      # 0xa168
callq 0x1c05
testq %rax, %rax
je 0x689d
movl %ebp, 0x79f8(%rip)      # 0xe1b8
movq %rax, 0xa169(%rip)      # 0x10930
movslq %r15d, %r13
addq %r13, %rax
subl %r15d, %ebp
movq %rax, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x1180
testq %rax, %rax
je 0x6866
movq 0xa143(%rip), %r12      # 0x10930
leaq (%r12,%r13), %rdi
callq 0x10e0
movq %rax, %r15
addq %r13, %r15
jmp 0x677e
decq %rbp
xorl %r13d, %r13d
incl %r13d
cmpl %ebx, %r13d
jge 0x6855
movslq 0x79a5(%rip), %rsi      # 0xe1b8
addq %rsi, %r12
incl 0xa11c(%rip)            # 0x10938
movq %r12, %rdi
movq %r14, %rdx
callq 0x1180
testq %rax, %rax
je 0x687f
movq %r12, %rdi
callq 0x10e0
cmpl %eax, %r15d
je 0x6804
movq 0x77b8(%rip), %rax      # 0xdff8
movq (%rax), %rdi
movl 0xa0ef(%rip), %edx      # 0x10938
leaq 0x399a(%rip), %rsi      # 0xa1ea
jmp 0x6896
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x778b(%rip), %rax      # 0xdff8
movq (%rax), %rdi
movl 0xa0c2(%rip), %edx      # 0x10938
leaq 0x390d(%rip), %rsi      # 0xa18a
jmp 0x6896
movq 0x7772(%rip), %rax      # 0xdff8
movq (%rax), %rdi
movl 0xa0a9(%rip), %edx      # 0x10938
leaq 0x3926(%rip), %rsi      # 0xa1bc
xorl %eax, %eax
callq 0x11a0
pushq $0x1
popq %rdi
callq 0x1270