// File: /workspace/github_c_makefile_star2_O0/thegenemyers[P]DASCRUBBER/QV.c
// Function: Compress_Next_QVentry
int Compress_Next_QVentry(FILE *input, FILE *output, QVcoding *coding, int lossy)
{ int rlen, clen;

  //  Get all 5 streams, compress each with its scheme, and output

  rlen = Read_Lines(input,5);
  if (rlen < 0)
    { if (rlen == -1)
        EPRINTF(EPLACE,"Line %d: incomplete last entry of .quiv file\n",Nline);
      EXIT (-1);
    }

  if (coding->delChar < 0)
    { Encode(coding->delScheme, output, (uint8 *) Read, rlen);
      clen = rlen;
    }
  else
    { Encode_Run(coding->delScheme, coding->dRunScheme, output,
                 (uint8 *) Read, rlen, coding->delChar);
      clen = Pack_Tag(Read+Rmax,Read,rlen,coding->delChar);
    }
  Number_Read(Read+Rmax);
  Compress_Read(clen,Read+Rmax);
  fwrite(Read+Rmax,1,COMPRESSED_LEN(clen),output);

  if (lossy)
    { uint8 *insert = (uint8 *) (Read+2*Rmax);
      uint8 *merge  = (uint8 *) (Read+3*Rmax);
      int    k;

      for (k = 0; k < rlen; k++)
        { insert[k] = (uint8) ((insert[k] >> 1) << 1);
          merge[k]  = (uint8) (( merge[k] >> 2) << 2);
        }
    }

  Encode(coding->insScheme, output, (uint8 *) (Read+2*Rmax), rlen);
  Encode(coding->mrgScheme, output, (uint8 *) (Read+3*Rmax), rlen);
  if (coding->subChar < 0)
    Encode(coding->subScheme, output, (uint8 *) (Read+4*Rmax), rlen);
  else
    Encode_Run(coding->subScheme, coding->sRunScheme, output,
               (uint8 *) (Read+4*Rmax), rlen, coding->subChar);

  return (rlen);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movl $0x5, %esi
callq 0x99f0
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jge 0xc2bc
cmpl $-0x1, -0x20(%rbp)
jne 0xc2b2
movq 0x5d5d(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
movl 0x8834(%rip), %edx      # 0x14ad8
leaq 0x2d89(%rip), %rsi      # 0xf034
movb $0x0, %al
callq 0x1180
movl $0x1, %edi
callq 0x1260
movq -0x18(%rbp), %rax
cmpl $0x0, 0x30(%rax)
jge 0xc2e8
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movq 0x87f8(%rip), %rdx      # 0x14ad0
movl -0x20(%rbp), %ecx
callq 0xbb00
movl -0x20(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0xc33d
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x10(%rbp), %rdx
movq 0x87ce(%rip), %rcx      # 0x14ad0
movl -0x20(%rbp), %r8d
movq -0x18(%rbp), %rax
movl 0x30(%rax), %r9d
callq 0xbd50
movq 0x87b6(%rip), %rdi      # 0x14ad0
movslq 0x6037(%rip), %rax      # 0x12358
addq %rax, %rdi
movq 0x87a5(%rip), %rsi      # 0x14ad0
movl -0x20(%rbp), %edx
movq -0x18(%rbp), %rax
movl 0x30(%rax), %ecx
callq 0xc1e0
movl %eax, -0x24(%rbp)
movq 0x878c(%rip), %rdi      # 0x14ad0
movslq 0x600d(%rip), %rax      # 0x12358
addq %rax, %rdi
callq 0x3100
movl -0x24(%rbp), %edi
movq 0x8773(%rip), %rsi      # 0x14ad0
movslq 0x5ff4(%rip), %rax      # 0x12358
addq %rax, %rsi
callq 0x2e10
movq 0x875d(%rip), %rdi      # 0x14ad0
movslq 0x5fde(%rip), %rax      # 0x12358
addq %rax, %rdi
movl -0x24(%rbp), %eax
addl $0x3, %eax
sarl $0x2, %eax
movslq %eax, %rdx
movq -0x10(%rbp), %rcx
movl $0x1, %esi
callq 0x1270
cmpl $0x0, -0x1c(%rbp)
je 0xc42a
movq 0x8728(%rip), %rax      # 0x14ad0
movl 0x5faa(%rip), %ecx      # 0x12358
shll %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq 0x870f(%rip), %rax      # 0x14ad0
imull $0x3, 0x5f90(%rip), %ecx # 0x12358
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0xc428
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
sarl %eax
shll %eax
movb %al, %dl
movq -0x30(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
sarl $0x2, %eax
shll $0x2, %eax
movb %al, %dl
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xc3d9
jmp 0xc42a
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq 0x8693(%rip), %rdx      # 0x14ad0
movl 0x5f15(%rip), %eax      # 0x12358
shll %eax
cltq
addq %rax, %rdx
movl -0x20(%rbp), %ecx
callq 0xbb00
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
movq 0x866b(%rip), %rdx      # 0x14ad0
imull $0x3, 0x5eec(%rip), %eax # 0x12358
cltq
addq %rax, %rdx
movl -0x20(%rbp), %ecx
callq 0xbb00
movq -0x18(%rbp), %rax
cmpl $0x0, 0x34(%rax)
jge 0xc4ae
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rsi
movq 0x863a(%rip), %rdx      # 0x14ad0
movl 0x5ebc(%rip), %eax      # 0x12358
shll $0x2, %eax
cltq
addq %rax, %rdx
movl -0x20(%rbp), %ecx
callq 0xbb00
jmp 0xc4e8
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x10(%rbp), %rdx
movq 0x8607(%rip), %rcx      # 0x14ad0
movl 0x5e89(%rip), %eax      # 0x12358
shll $0x2, %eax
cltq
addq %rax, %rcx
movl -0x20(%rbp), %r8d
movq -0x18(%rbp), %rax
movl 0x34(%rax), %r9d
callq 0xbd50
movl -0x20(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)