// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, 0xb0c9(%rip)      # 0x14ad0
jne 0x9a4c
movl $0x3e8, -0x20(%rbp)     # imm = 0x3E8
imull $0x5, -0x20(%rbp), %eax
movslq %eax, %rdi
leaq 0x55a2(%rip), %rsi      # 0xefc0
callq 0x22c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x9a38
movl $0x1, %edi
callq 0x1260
movl -0x20(%rbp), %eax
movl %eax, 0x8917(%rip)      # 0x12358
movq -0x28(%rbp), %rax
movq %rax, 0xb084(%rip)      # 0x14ad0
movl 0xb086(%rip), %eax      # 0x14ad8
addl $0x1, %eax
movl %eax, 0xb07d(%rip)      # 0x14ad8
movq 0xb06e(%rip), %rdi      # 0x14ad0
movl 0x88f0(%rip), %esi      # 0x12358
movq -0x10(%rbp), %rdx
callq 0x1160
cmpq $0x0, %rax
jne 0x9a83
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9c52
movq 0xb046(%rip), %rdi      # 0x14ad0
callq 0x10d0
movl %eax, -0x1c(%rbp)
movq 0xb037(%rip), %rax      # 0x14ad0
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
je 0x9b76
movl 0x88a3(%rip), %eax      # 0x12358
shll $0x0, %eax
addl $0x3e8, %eax            # imm = 0x3E8
movl %eax, -0x20(%rbp)
movq 0xb009(%rip), %rdi      # 0x14ad0
imull $0x5, -0x20(%rbp), %eax
movslq %eax, %rsi
leaq 0x550b(%rip), %rdx      # 0xefe0
callq 0x2340
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x9aef
movl $0x1, %edi
callq 0x1260
movl -0x20(%rbp), %eax
movl %eax, 0x8860(%rip)      # 0x12358
movq -0x28(%rbp), %rax
movq %rax, 0xafcd(%rip)      # 0x14ad0
movq 0xafc6(%rip), %rdi      # 0x14ad0
movslq -0x1c(%rbp), %rax
addq %rax, %rdi
movl 0x8841(%rip), %esi      # 0x12358
subl -0x1c(%rbp), %esi
movq -0x10(%rbp), %rdx
callq 0x1160
cmpq $0x0, %rax
jne 0x9b51
movq 0x84c8(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movl 0xaf9f(%rip), %edx      # 0x14ad8
leaq 0x54c2(%rip), %rsi      # 0xf002
movb $0x0, %al
callq 0x1180
movl $0x1, %edi
callq 0x1260
movq 0xaf78(%rip), %rdi      # 0x14ad0
movslq -0x1c(%rbp), %rax
addq %rax, %rdi
callq 0x10d0
movq %rax, %rcx
movslq -0x1c(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x1c(%rbp)
jmp 0x9a92
movq 0xaf53(%rip), %rax      # 0x14ad0
movq %rax, -0x30(%rbp)
movl $0x1, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x9c49
movl 0x87be(%rip), %ecx      # 0x12358
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl 0xaf2a(%rip), %eax      # 0x14ad8
addl $0x1, %eax
movl %eax, 0xaf21(%rip)      # 0x14ad8
movq -0x30(%rbp), %rdi
movl 0x8797(%rip), %esi      # 0x12358
movq -0x10(%rbp), %rdx
callq 0x1160
cmpq $0x0, %rax
jne 0x9bf8
movq 0x8421(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movl 0xaef8(%rip), %edx      # 0x14ad8
leaq 0x544d(%rip), %rsi      # 0xf034
movb $0x0, %al
callq 0x1180
movl $0x1, %edi
callq 0x1260
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rdi
callq 0x10d0
movq %rax, %rcx
movl -0x34(%rbp), %eax
cmpl %ecx, %eax
je 0x9c39
movq 0x83e0(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movl 0xaeb7(%rip), %edx      # 0x14ad8
leaq 0x543a(%rip), %rsi      # 0xf062
movb $0x0, %al
callq 0x1180
movl $0x1, %edi
callq 0x1260
jmp 0x9c3b
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x9b88
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)