// File: /workspace/github_c_makefile_star2_O0/thegenemyers[P]DASCRUBBER/QV.c
// Function: Decode_Run
static int Decode_Run(HScheme *neme, HScheme *reme, FILE *in, char *read,
                      int rlen, int rchar)
{ int    *nlook, *nlens;
  int    *rlook, *rlens;
  int     nsignal, ilen;
  uint64  icode;
  uint32 *ipart;
  uint16 *xpart;
  uint8  *cpart;
  int     j, n, c, k;

  if (LittleEndian)
    { ipart = ((uint32 *) (&icode));
      xpart = ((uint16 *) (&icode)) + 2;
      cpart = ((uint8  *) (&icode)) + 5;
    }
  else
    { ipart = ((uint32 *) (&icode)) + 1;
      xpart = ((uint16 *) (&icode)) + 1;
      cpart = ((uint8  *) (&icode)) + 2;
    }

  if (neme->type == 2)
    nsignal = 255;
  else
    nsignal = 256;
  nlens = neme->codelens;
  nlook = neme->lookup;

  rlens = reme->codelens;
  rlook = reme->lookup;

  n     = 16;
  ilen  = 0;
  icode = 0;
  if (Flip)
    for (j = 0; j < rlen; j++)
      { GETFLIP
        c = rlook[*xpart];
        n = rlens[c];
        if (c == 255)
          { GETFLIP
            c = *xpart;
            n = 16;
          }
        for (k = 0; k < c; k++)
          read[j++] = (char) rchar;

        if (j < rlen)
          { GETFLIP
            c = nlook[*xpart];
            n = nlens[c];
            if (c == nsignal)
              { GETFLIP
                c = *cpart;
                n = 8;
              }
            read[j] = (char) c;
          }
      }
  else
    for (j = 0; j < rlen; j++)
      { GET
        c = rlook[*xpart];
        n = rlens[c];
        if (c == 255)
          { GET
            c = *xpart;
            n = 16;
          }
        for (k = 0; k < c; k++)
          read[j++] = (char) rchar;

        if (j < rlen)
          { GET
            c = nlook[*xpart];
            n = nlens[c];
            if (c == nsignal)
              { GET
                c = *cpart;
                n = 8;
              }
            read[j] = (char) c;
          }
      }

  return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movl %r9d, -0x30(%rbp)
cmpl $0x0, 0xaf9a(%rip)      # 0x17b84
je 0xcc0e
leaq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x70(%rbp)
leaq -0x60(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x78(%rbp)
jmp 0xcc32
leaq -0x60(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x70(%rbp)
leaq -0x60(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0xcc44
movl $0xff, -0x54(%rbp)
jmp 0xcc4b
movl $0x100, -0x54(%rbp)     # imm = 0x100
movq -0x10(%rbp), %rax
addq $0x404, %rax            # imm = 0x404
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
addq $0x804, %rax            # imm = 0x804
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
addq $0x404, %rax            # imm = 0x404
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
addq $0x804, %rax            # imm = 0x804
movq %rax, -0x48(%rbp)
movl $0x10, -0x80(%rbp)
movl $0x0, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
cmpl $0x0, 0xaee0(%rip)      # 0x17b80
je 0xd05d
movl $0x0, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0xd058
movl -0x80(%rbp), %eax
cmpl -0x58(%rbp), %eax
jle 0xcd45
movl -0x58(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x10a0
cmpq $0x1, %rax
je 0xcd16
movq 0x52ff(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x25f9(%rip), %rsi      # 0xf2fc
movb $0x0, %al
callq 0x1180
movl $0x1, -0x4(%rbp)
jmp 0xd3e4
movq -0x68(%rbp), %rdi
callq 0xb5e0
movl -0x80(%rbp), %eax
subl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movl $0x20, %eax
subl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
jmp 0xcd60
movl -0x80(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movl -0x80(%rbp), %ecx
movl -0x58(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x58(%rbp)
movq -0x48(%rbp), %rax
movq -0x70(%rbp), %rcx
movzwl (%rcx), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x84(%rbp)
movq -0x50(%rbp), %rax
movslq -0x84(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x80(%rbp)
cmpl $0xff, -0x84(%rbp)
jne 0xce50
movl -0x80(%rbp), %eax
cmpl -0x58(%rbp), %eax
jle 0xce21
movl -0x58(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x10a0
cmpq $0x1, %rax
je 0xcdf2
movq 0x5223(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x251d(%rip), %rsi      # 0xf2fc
movb $0x0, %al
callq 0x1180
movl $0x1, -0x4(%rbp)
jmp 0xd3e4
movq -0x68(%rbp), %rdi
callq 0xb5e0
movl -0x80(%rbp), %eax
subl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movl $0x20, %eax
subl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
jmp 0xce3c
movl -0x80(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movl -0x80(%rbp), %ecx
movl -0x58(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x58(%rbp)
movq -0x70(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x84(%rbp)
movl $0x10, -0x80(%rbp)
movl $0x0, -0x88(%rbp)
movl -0x88(%rbp), %eax
cmpl -0x84(%rbp), %eax
jge 0xce93
movl -0x30(%rbp), %eax
movb %al, %dl
movq -0x28(%rbp), %rax
movl -0x7c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x7c(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0xce5a
movl -0x7c(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0xd048
movl -0x80(%rbp), %eax
cmpl -0x58(%rbp), %eax
jle 0xcf2b
movl -0x58(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x10a0
cmpq $0x1, %rax
je 0xcefc
movq 0x5119(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x2413(%rip), %rsi      # 0xf2fc
movb $0x0, %al
callq 0x1180
movl $0x1, -0x4(%rbp)
jmp 0xd3e4
movq -0x68(%rbp), %rdi
callq 0xb5e0
movl -0x80(%rbp), %eax
subl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movl $0x20, %eax
subl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
jmp 0xcf46
movl -0x80(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movl -0x80(%rbp), %ecx
movl -0x58(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq -0x70(%rbp), %rcx
movzwl (%rcx), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x84(%rbp)
movq -0x40(%rbp), %rax
movslq -0x84(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x80(%rbp)
movl -0x84(%rbp), %eax
cmpl -0x54(%rbp), %eax
jne 0xd035
movl -0x80(%rbp), %eax
cmpl -0x58(%rbp), %eax
jle 0xd006
movl -0x58(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x10a0
cmpq $0x1, %rax
je 0xcfd7
movq 0x503e(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x2338(%rip), %rsi      # 0xf2fc
movb $0x0, %al
callq 0x1180
movl $0x1, -0x4(%rbp)
jmp 0xd3e4
movq -0x68(%rbp), %rdi
callq 0xb5e0
movl -0x80(%rbp), %eax
subl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movl $0x20, %eax
subl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
jmp 0xd021
movl -0x80(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movl -0x80(%rbp), %ecx
movl -0x58(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x58(%rbp)
movq -0x78(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x84(%rbp)
movl $0x8, -0x80(%rbp)
movl -0x84(%rbp), %eax
movb %al, %dl
movq -0x28(%rbp), %rax
movslq -0x7c(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0xd04a
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0xccad
jmp 0xd3dd
movl $0x0, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0xd3db
movl -0x80(%rbp), %eax
cmpl -0x58(%rbp), %eax
jle 0xd0ef
movl -0x58(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x10a0
cmpq $0x1, %rax
je 0xd0c9
movq 0x4f4c(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x2246(%rip), %rsi      # 0xf2fc
movb $0x0, %al
callq 0x1180
movl $0x1, -0x4(%rbp)
jmp 0xd3e4
movl -0x80(%rbp), %eax
subl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movl $0x20, %eax
subl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
jmp 0xd10a
movl -0x80(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movl -0x80(%rbp), %ecx
movl -0x58(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x58(%rbp)
movq -0x48(%rbp), %rax
movq -0x70(%rbp), %rcx
movzwl (%rcx), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x84(%rbp)
movq -0x50(%rbp), %rax
movslq -0x84(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x80(%rbp)
cmpl $0xff, -0x84(%rbp)
jne 0xd1ed
movl -0x80(%rbp), %eax
cmpl -0x58(%rbp), %eax
jle 0xd1be
movl -0x58(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x10a0
cmpq $0x1, %rax
je 0xd198
movq 0x4e7d(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x2177(%rip), %rsi      # 0xf2fc
movb $0x0, %al
callq 0x1180
movl $0x1, -0x4(%rbp)
jmp 0xd3e4
movl -0x80(%rbp), %eax
subl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movl $0x20, %eax
subl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
jmp 0xd1d9
movl -0x80(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movl -0x80(%rbp), %ecx
movl -0x58(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x58(%rbp)
movq -0x70(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x84(%rbp)
movl $0x10, -0x80(%rbp)
movl $0x0, -0x88(%rbp)
movl -0x88(%rbp), %eax
cmpl -0x84(%rbp), %eax
jge 0xd230
movl -0x30(%rbp), %eax
movb %al, %dl
movq -0x28(%rbp), %rax
movl -0x7c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x7c(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0xd1f7
movl -0x7c(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0xd3cb
movl -0x80(%rbp), %eax
cmpl -0x58(%rbp), %eax
jle 0xd2bb
movl -0x58(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x10a0
cmpq $0x1, %rax
je 0xd295
movq 0x4d80(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x207a(%rip), %rsi      # 0xf2fc
movb $0x0, %al
callq 0x1180
movl $0x1, -0x4(%rbp)
jmp 0xd3e4
movl -0x80(%rbp), %eax
subl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movl $0x20, %eax
subl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
jmp 0xd2d6
movl -0x80(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movl -0x80(%rbp), %ecx
movl -0x58(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq -0x70(%rbp), %rcx
movzwl (%rcx), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x84(%rbp)
movq -0x40(%rbp), %rax
movslq -0x84(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x80(%rbp)
movl -0x84(%rbp), %eax
cmpl -0x54(%rbp), %eax
jne 0xd3b8
movl -0x80(%rbp), %eax
cmpl -0x58(%rbp), %eax
jle 0xd389
movl -0x58(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x10a0
cmpq $0x1, %rax
je 0xd363
movq 0x4cb2(%rip), %rax      # 0x11ff8
movq (%rax), %rdi
leaq 0x1fac(%rip), %rsi      # 0xf2fc
movb $0x0, %al
callq 0x1180
movl $0x1, -0x4(%rbp)
jmp 0xd3e4
movl -0x80(%rbp), %eax
subl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movl $0x20, %eax
subl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
jmp 0xd3a4
movl -0x80(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x60(%rbp)
movl -0x80(%rbp), %ecx
movl -0x58(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x58(%rbp)
movq -0x78(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x84(%rbp)
movl $0x8, -0x80(%rbp)
movl -0x84(%rbp), %eax
movb %al, %dl
movq -0x28(%rbp), %rax
movslq -0x7c(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0xd3cd
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0xd064
jmp 0xd3dd
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq