// File: Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: unfilterScanline(unsigned char*, unsigned char const*, unsigned char const*, unsigned long, unsigned char, unsigned long)
static unsigned unfilterScanline(unsigned char* recon, const unsigned char* scanline, const unsigned char* precon,
                                 size_t bytewidth, unsigned char filterType, size_t length) {
  /*
  For PNG filter method 0
  unfilter a PNG image scanline by scanline. when the pixels are smaller than 1 byte,
  the filter works byte per byte (bytewidth = 1)
  precon is the previous unfiltered scanline, recon the result, scanline the current one
  the incoming scanlines do NOT include the filtertype byte, that one is given in the parameter filterType instead
  recon and scanline MAY be the same memory address! precon must be disjoint.
  */

  size_t i;
  switch(filterType) {
    case 0:
      for(i = 0; i != length; ++i) recon[i] = scanline[i];
      break;
    case 1:
      for(i = 0; i != bytewidth; ++i) recon[i] = scanline[i];
      for(i = bytewidth; i < length; ++i) recon[i] = scanline[i] + recon[i - bytewidth];
      break;
    case 2:
      if(precon) {
        for(i = 0; i != length; ++i) recon[i] = scanline[i] + precon[i];
      } else {
        for(i = 0; i != length; ++i) recon[i] = scanline[i];
      }
      break;
    case 3:
      if(precon) {
        for(i = 0; i != bytewidth; ++i) recon[i] = scanline[i] + (precon[i] >> 1u);
        for(i = bytewidth; i < length; ++i) recon[i] = scanline[i] + ((recon[i - bytewidth] + precon[i]) >> 1u);
      } else {
        for(i = 0; i != bytewidth; ++i) recon[i] = scanline[i];
        for(i = bytewidth; i < length; ++i) recon[i] = scanline[i] + (recon[i - bytewidth] >> 1u);
      }
      break;
    case 4:
      if(precon) {
        for(i = 0; i != bytewidth; ++i) {
          recon[i] = (scanline[i] + precon[i]); /*paethPredictor(0, precon[i], 0) is always precon[i]*/
        }

        /* Unroll independent paths of the paeth predictor. A 6x and 8x version would also be possible but that
        adds too much code. Whether this actually speeds anything up at all depends on compiler and settings. */
        if(bytewidth >= 4) {
          for(; i + 3 < length; i += 4) {
            size_t j = i - bytewidth;
            unsigned char s0 = scanline[i + 0], s1 = scanline[i + 1], s2 = scanline[i + 2], s3 = scanline[i + 3];
            unsigned char r0 = recon[j + 0], r1 = recon[j + 1], r2 = recon[j + 2], r3 = recon[j + 3];
            unsigned char p0 = precon[i + 0], p1 = precon[i + 1], p2 = precon[i + 2], p3 = precon[i + 3];
            unsigned char q0 = precon[j + 0], q1 = precon[j + 1], q2 = precon[j + 2], q3 = precon[j + 3];
            recon[i + 0] = s0 + paethPredictor(r0, p0, q0);
            recon[i + 1] = s1 + paethPredictor(r1, p1, q1);
            recon[i + 2] = s2 + paethPredictor(r2, p2, q2);
            recon[i + 3] = s3 + paethPredictor(r3, p3, q3);
          }
        } else if(bytewidth >= 3) {
          for(; i + 2 < length; i += 3) {
            size_t j = i - bytewidth;
            unsigned char s0 = scanline[i + 0], s1 = scanline[i + 1], s2 = scanline[i + 2];
            unsigned char r0 = recon[j + 0], r1 = recon[j + 1], r2 = recon[j + 2];
            unsigned char p0 = precon[i + 0], p1 = precon[i + 1], p2 = precon[i + 2];
            unsigned char q0 = precon[j + 0], q1 = precon[j + 1], q2 = precon[j + 2];
            recon[i + 0] = s0 + paethPredictor(r0, p0, q0);
            recon[i + 1] = s1 + paethPredictor(r1, p1, q1);
            recon[i + 2] = s2 + paethPredictor(r2, p2, q2);
          }
        } else if(bytewidth >= 2) {
          for(; i + 1 < length; i += 2) {
            size_t j = i - bytewidth;
            unsigned char s0 = scanline[i + 0], s1 = scanline[i + 1];
            unsigned char r0 = recon[j + 0], r1 = recon[j + 1];
            unsigned char p0 = precon[i + 0], p1 = precon[i + 1];
            unsigned char q0 = precon[j + 0], q1 = precon[j + 1];
            recon[i + 0] = s0 + paethPredictor(r0, p0, q0);
            recon[i + 1] = s1 + paethPredictor(r1, p1, q1);
          }
        }

        for(; i != length; ++i) {
          recon[i] = (scanline[i] + paethPredictor(recon[i - bytewidth], precon[i], precon[i - bytewidth]));
        }
      } else {
        for(i = 0; i != bytewidth; ++i) {
          recon[i] = scanline[i];
        }
        for(i = bytewidth; i < length; ++i) {
          /*paethPredictor(recon[i - bytewidth], 0, 0) is always recon[i - bytewidth]*/
          recon[i] = (scanline[i] + recon[i - bytewidth]);
        }
      }
      break;
    default: return 36; /*error: nonexistent filter type given*/
  }
  return 0;
}

// Assembly:
subq $0xb8, %rsp
movb %r8b, %al
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq %rdx, 0x98(%rsp)
movq %rcx, 0x90(%rsp)
movb %al, 0x8f(%rsp)
movq %r9, 0x80(%rsp)
movzbl 0x8f(%rsp), %eax
movq %rax, 0x30(%rsp)
subq $0x4, %rax
ja 0x151890
movq 0x30(%rsp), %rax
leaq 0x256a0(%rip), %rcx     # 0x17636c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq $0x0, 0x78(%rsp)
movq 0x78(%rsp), %rax
cmpq 0x80(%rsp), %rax
je 0x150d1d
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movb (%rax,%rcx), %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
jmp 0x150cde
jmp 0x15189d
movq $0x0, 0x78(%rsp)
movq 0x78(%rsp), %rax
cmpq 0x90(%rsp), %rax
je 0x150d6a
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movb (%rax,%rcx), %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
jmp 0x150d2b
movq 0x90(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rax
cmpq 0x80(%rsp), %rax
jae 0x150dd4
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movq 0xa8(%rsp), %rcx
movq 0x78(%rsp), %rdx
subq 0x90(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
addl %ecx, %eax
movb %al, %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
jmp 0x150d77
jmp 0x15189d
cmpq $0x0, 0x98(%rsp)
je 0x150e44
movq $0x0, 0x78(%rsp)
movq 0x78(%rsp), %rax
cmpq 0x80(%rsp), %rax
je 0x150e42
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movq 0x98(%rsp), %rcx
movq 0x78(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
addl %ecx, %eax
movb %al, %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
jmp 0x150ded
jmp 0x150e8e
movq $0x0, 0x78(%rsp)
movq 0x78(%rsp), %rax
cmpq 0x80(%rsp), %rax
je 0x150e8c
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movb (%rax,%rcx), %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
jmp 0x150e4d
jmp 0x150e8e
jmp 0x15189d
cmpq $0x0, 0x98(%rsp)
je 0x150f86
movq $0x0, 0x78(%rsp)
movq 0x78(%rsp), %rax
cmpq 0x90(%rsp), %rax
je 0x150f02
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movq 0x98(%rsp), %rcx
movq 0x78(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
sarl %ecx
addl %ecx, %eax
movb %al, %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
jmp 0x150eab
movq 0x90(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rax
cmpq 0x80(%rsp), %rax
jae 0x150f81
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movq 0xa8(%rsp), %rcx
movq 0x78(%rsp), %rdx
subq 0x90(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
movq 0x98(%rsp), %rdx
movq 0x78(%rsp), %rsi
movzbl (%rdx,%rsi), %edx
addl %edx, %ecx
sarl %ecx
addl %ecx, %eax
movb %al, %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
jmp 0x150f0f
jmp 0x15103c
movq $0x0, 0x78(%rsp)
movq 0x78(%rsp), %rax
cmpq 0x90(%rsp), %rax
je 0x150fce
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movb (%rax,%rcx), %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
jmp 0x150f8f
movq 0x90(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rax
cmpq 0x80(%rsp), %rax
jae 0x15103a
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movq 0xa8(%rsp), %rcx
movq 0x78(%rsp), %rdx
subq 0x90(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
sarl %ecx
addl %ecx, %eax
movb %al, %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
jmp 0x150fdb
jmp 0x15103c
jmp 0x15189d
cmpq $0x0, 0x98(%rsp)
je 0x1517da
movq $0x0, 0x78(%rsp)
movq 0x78(%rsp), %rax
cmpq 0x90(%rsp), %rax
je 0x1510ae
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movq 0x98(%rsp), %rcx
movq 0x78(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
addl %ecx, %eax
movb %al, %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
jmp 0x151059
cmpq $0x4, 0x90(%rsp)
jb 0x151373
jmp 0x1510bf
movq 0x78(%rsp), %rax
addq $0x3, %rax
cmpq 0x80(%rsp), %rax
jae 0x15136e
movq 0x78(%rsp), %rax
subq 0x90(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0x6f(%rsp)
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movb 0x1(%rax,%rcx), %al
movb %al, 0x6e(%rsp)
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movb 0x2(%rax,%rcx), %al
movb %al, 0x6d(%rsp)
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movb 0x3(%rax,%rcx), %al
movb %al, 0x6c(%rsp)
movq 0xa8(%rsp), %rax
movq 0x70(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0x6b(%rsp)
movq 0xa8(%rsp), %rax
movq 0x70(%rsp), %rcx
movb 0x1(%rax,%rcx), %al
movb %al, 0x6a(%rsp)
movq 0xa8(%rsp), %rax
movq 0x70(%rsp), %rcx
movb 0x2(%rax,%rcx), %al
movb %al, 0x69(%rsp)
movq 0xa8(%rsp), %rax
movq 0x70(%rsp), %rcx
movb 0x3(%rax,%rcx), %al
movb %al, 0x68(%rsp)
movq 0x98(%rsp), %rax
movq 0x78(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0x67(%rsp)
movq 0x98(%rsp), %rax
movq 0x78(%rsp), %rcx
movb 0x1(%rax,%rcx), %al
movb %al, 0x66(%rsp)
movq 0x98(%rsp), %rax
movq 0x78(%rsp), %rcx
movb 0x2(%rax,%rcx), %al
movb %al, 0x65(%rsp)
movq 0x98(%rsp), %rax
movq 0x78(%rsp), %rcx
movb 0x3(%rax,%rcx), %al
movb %al, 0x64(%rsp)
movq 0x98(%rsp), %rax
movq 0x70(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0x63(%rsp)
movq 0x98(%rsp), %rax
movq 0x70(%rsp), %rcx
movb 0x1(%rax,%rcx), %al
movb %al, 0x62(%rsp)
movq 0x98(%rsp), %rax
movq 0x70(%rsp), %rcx
movb 0x2(%rax,%rcx), %al
movb %al, 0x61(%rsp)
movq 0x98(%rsp), %rax
movq 0x70(%rsp), %rcx
movb 0x3(%rax,%rcx), %al
movb %al, 0x60(%rsp)
movzbl 0x6f(%rsp), %eax
movl %eax, 0x20(%rsp)
movzbl 0x6b(%rsp), %eax
movw %ax, %dx
movzbl 0x67(%rsp), %eax
movw %ax, %cx
movzbl 0x63(%rsp), %eax
movswl %dx, %edi
movswl %cx, %esi
movswl %ax, %edx
callq 0x1518c0
movb %al, %cl
movl 0x20(%rsp), %eax
movzbl %cl, %ecx
addl %ecx, %eax
movb %al, %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, (%rax,%rcx)
movzbl 0x6e(%rsp), %eax
movl %eax, 0x24(%rsp)
movzbl 0x6a(%rsp), %eax
movw %ax, %dx
movzbl 0x66(%rsp), %eax
movw %ax, %cx
movzbl 0x62(%rsp), %eax
movswl %dx, %edi
movswl %cx, %esi
movswl %ax, %edx
callq 0x1518c0
movb %al, %cl
movl 0x24(%rsp), %eax
movzbl %cl, %ecx
addl %ecx, %eax
movb %al, %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, 0x1(%rax,%rcx)
movzbl 0x6d(%rsp), %eax
movl %eax, 0x28(%rsp)
movzbl 0x69(%rsp), %eax
movw %ax, %dx
movzbl 0x65(%rsp), %eax
movw %ax, %cx
movzbl 0x61(%rsp), %eax
movswl %dx, %edi
movswl %cx, %esi
movswl %ax, %edx
callq 0x1518c0
movb %al, %cl
movl 0x28(%rsp), %eax
movzbl %cl, %ecx
addl %ecx, %eax
movb %al, %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, 0x2(%rax,%rcx)
movzbl 0x6c(%rsp), %eax
movl %eax, 0x2c(%rsp)
movzbl 0x68(%rsp), %eax
movw %ax, %dx
movzbl 0x64(%rsp), %eax
movw %ax, %cx
movzbl 0x60(%rsp), %eax
movswl %dx, %edi
movswl %cx, %esi
movswl %ax, %edx
callq 0x1518c0
movb %al, %cl
movl 0x2c(%rsp), %eax
movzbl %cl, %ecx
addl %ecx, %eax
movb %al, %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, 0x3(%rax,%rcx)
movq 0x78(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x78(%rsp)
jmp 0x1510bf
jmp 0x151724
cmpq $0x3, 0x90(%rsp)
jb 0x15159a
jmp 0x151384
movq 0x78(%rsp), %rax
addq $0x2, %rax
cmpq 0x80(%rsp), %rax
jae 0x151595
movq 0x78(%rsp), %rax
subq 0x90(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0x57(%rsp)
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movb 0x1(%rax,%rcx), %al
movb %al, 0x56(%rsp)
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movb 0x2(%rax,%rcx), %al
movb %al, 0x55(%rsp)
movq 0xa8(%rsp), %rax
movq 0x58(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0x54(%rsp)
movq 0xa8(%rsp), %rax
movq 0x58(%rsp), %rcx
movb 0x1(%rax,%rcx), %al
movb %al, 0x53(%rsp)
movq 0xa8(%rsp), %rax
movq 0x58(%rsp), %rcx
movb 0x2(%rax,%rcx), %al
movb %al, 0x52(%rsp)
movq 0x98(%rsp), %rax
movq 0x78(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0x51(%rsp)
movq 0x98(%rsp), %rax
movq 0x78(%rsp), %rcx
movb 0x1(%rax,%rcx), %al
movb %al, 0x50(%rsp)
movq 0x98(%rsp), %rax
movq 0x78(%rsp), %rcx
movb 0x2(%rax,%rcx), %al
movb %al, 0x4f(%rsp)
movq 0x98(%rsp), %rax
movq 0x58(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0x4e(%rsp)
movq 0x98(%rsp), %rax
movq 0x58(%rsp), %rcx
movb 0x1(%rax,%rcx), %al
movb %al, 0x4d(%rsp)
movq 0x98(%rsp), %rax
movq 0x58(%rsp), %rcx
movb 0x2(%rax,%rcx), %al
movb %al, 0x4c(%rsp)
movzbl 0x57(%rsp), %eax
movl %eax, 0x14(%rsp)
movzbl 0x54(%rsp), %eax
movw %ax, %dx
movzbl 0x51(%rsp), %eax
movw %ax, %cx
movzbl 0x4e(%rsp), %eax
movswl %dx, %edi
movswl %cx, %esi
movswl %ax, %edx
callq 0x1518c0
movb %al, %cl
movl 0x14(%rsp), %eax
movzbl %cl, %ecx
addl %ecx, %eax
movb %al, %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, (%rax,%rcx)
movzbl 0x56(%rsp), %eax
movl %eax, 0x18(%rsp)
movzbl 0x53(%rsp), %eax
movw %ax, %dx
movzbl 0x50(%rsp), %eax
movw %ax, %cx
movzbl 0x4d(%rsp), %eax
movswl %dx, %edi
movswl %cx, %esi
movswl %ax, %edx
callq 0x1518c0
movb %al, %cl
movl 0x18(%rsp), %eax
movzbl %cl, %ecx
addl %ecx, %eax
movb %al, %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, 0x1(%rax,%rcx)
movzbl 0x55(%rsp), %eax
movl %eax, 0x1c(%rsp)
movzbl 0x52(%rsp), %eax
movw %ax, %dx
movzbl 0x4f(%rsp), %eax
movw %ax, %cx
movzbl 0x4c(%rsp), %eax
movswl %dx, %edi
movswl %cx, %esi
movswl %ax, %edx
callq 0x1518c0
movb %al, %cl
movl 0x1c(%rsp), %eax
movzbl %cl, %ecx
addl %ecx, %eax
movb %al, %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, 0x2(%rax,%rcx)
movq 0x78(%rsp), %rax
addq $0x3, %rax
movq %rax, 0x78(%rsp)
jmp 0x151384
jmp 0x151722
cmpq $0x2, 0x90(%rsp)
jb 0x151720
jmp 0x1515ab
movq 0x78(%rsp), %rax
addq $0x1, %rax
cmpq 0x80(%rsp), %rax
jae 0x15171e
movq 0x78(%rsp), %rax
subq 0x90(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0x3f(%rsp)
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movb 0x1(%rax,%rcx), %al
movb %al, 0x3e(%rsp)
movq 0xa8(%rsp), %rax
movq 0x40(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0x3d(%rsp)
movq 0xa8(%rsp), %rax
movq 0x40(%rsp), %rcx
movb 0x1(%rax,%rcx), %al
movb %al, 0x3c(%rsp)
movq 0x98(%rsp), %rax
movq 0x78(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0x3b(%rsp)
movq 0x98(%rsp), %rax
movq 0x78(%rsp), %rcx
movb 0x1(%rax,%rcx), %al
movb %al, 0x3a(%rsp)
movq 0x98(%rsp), %rax
movq 0x40(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0x39(%rsp)
movq 0x98(%rsp), %rax
movq 0x40(%rsp), %rcx
movb 0x1(%rax,%rcx), %al
movb %al, 0x38(%rsp)
movzbl 0x3f(%rsp), %eax
movl %eax, 0xc(%rsp)
movzbl 0x3d(%rsp), %eax
movw %ax, %dx
movzbl 0x3b(%rsp), %eax
movw %ax, %cx
movzbl 0x39(%rsp), %eax
movswl %dx, %edi
movswl %cx, %esi
movswl %ax, %edx
callq 0x1518c0
movb %al, %cl
movl 0xc(%rsp), %eax
movzbl %cl, %ecx
addl %ecx, %eax
movb %al, %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, (%rax,%rcx)
movzbl 0x3e(%rsp), %eax
movl %eax, 0x10(%rsp)
movzbl 0x3c(%rsp), %eax
movw %ax, %dx
movzbl 0x3a(%rsp), %eax
movw %ax, %cx
movzbl 0x38(%rsp), %eax
movswl %dx, %edi
movswl %cx, %esi
movswl %ax, %edx
callq 0x1518c0
movb %al, %cl
movl 0x10(%rsp), %eax
movzbl %cl, %ecx
addl %ecx, %eax
movb %al, %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, 0x1(%rax,%rcx)
movq 0x78(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x78(%rsp)
jmp 0x1515ab
jmp 0x151720
jmp 0x151722
jmp 0x151724
jmp 0x151726
movq 0x78(%rsp), %rax
cmpq 0x80(%rsp), %rax
je 0x1517d5
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, 0x8(%rsp)
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
subq 0x90(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movw %ax, %dx
movq 0x98(%rsp), %rax
movq 0x78(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movw %ax, %cx
movq 0x98(%rsp), %rax
movq 0x78(%rsp), %rsi
subq 0x90(%rsp), %rsi
movzbl (%rax,%rsi), %eax
movswl %dx, %edi
movswl %cx, %esi
movswl %ax, %edx
callq 0x1518c0
movb %al, %cl
movl 0x8(%rsp), %eax
movzbl %cl, %ecx
addl %ecx, %eax
movb %al, %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
jmp 0x151726
jmp 0x15188e
movq $0x0, 0x78(%rsp)
movq 0x78(%rsp), %rax
cmpq 0x90(%rsp), %rax
je 0x151822
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movb (%rax,%rcx), %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
jmp 0x1517e3
movq 0x90(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rax
cmpq 0x80(%rsp), %rax
jae 0x15188c
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movq 0xa8(%rsp), %rcx
movq 0x78(%rsp), %rdx
subq 0x90(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
addl %ecx, %eax
movb %al, %dl
movq 0xa8(%rsp), %rax
movq 0x78(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
jmp 0x15182f
jmp 0x15188e
jmp 0x15189d
movl $0x24, 0xb4(%rsp)
jmp 0x1518a8
movl $0x0, 0xb4(%rsp)
movl 0xb4(%rsp), %eax
addq $0xb8, %rsp
retq
nopw (%rax,%rax)