// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_compute_color_stats(LodePNGColorStats*, unsigned char const*, unsigned int, unsigned int, LodePNGColorMode const*)
void lodepng_compute_color_stats(LodePNGColorStats* stats,
                                 const unsigned char* in, unsigned w, unsigned h,
                                 const LodePNGColorMode* mode_in) {
  size_t i;
  ColorTree tree;
  size_t numpixels = (size_t)w * (size_t)h;

  /* mark things as done already if it would be impossible to have a more expensive case */
  unsigned colored_done = lodepng_is_greyscale_type(mode_in) ? 1 : 0;
  unsigned alpha_done = lodepng_can_have_alpha(mode_in) ? 0 : 1;
  unsigned numcolors_done = 0;
  unsigned bpp = lodepng_get_bpp(mode_in);
  unsigned bits_done = (stats->bits == 1 && bpp == 1) ? 1 : 0;
  unsigned sixteen = 0; /* whether the input image is 16 bit */
  unsigned maxnumcolors = 257;
  if(bpp <= 8) maxnumcolors = LODEPNG_MIN(257, stats->numcolors + (1u << bpp));

  stats->numpixels += numpixels;

  /*if palette not allowed, no need to compute numcolors*/
  if(!stats->allow_palette) numcolors_done = 1;

  color_tree_init(&tree);

  /*If the stats was already filled in from previous data, fill its palette in tree
  and mark things as done already if we know they are the most expensive case already*/
  if(stats->alpha) alpha_done = 1;
  if(stats->colored) colored_done = 1;
  if(stats->bits == 16) numcolors_done = 1;
  if(stats->bits >= bpp) bits_done = 1;
  if(stats->numcolors >= maxnumcolors) numcolors_done = 1;

  if(!numcolors_done) {
    for(i = 0; i < stats->numcolors; i++) {
      const unsigned char* color = &stats->palette[i * 4];
      color_tree_add(&tree, color[0], color[1], color[2], color[3], (unsigned int) i);
    }
  }

  /*Check if the 16-bit input is truly 16-bit*/
  if(mode_in->bitdepth == 16 && !sixteen) {
    unsigned short r, g, b, a;
    for(i = 0; i != numpixels; ++i) {
      getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in);
      if((r & 255) != ((r >> 8) & 255) || (g & 255) != ((g >> 8) & 255) ||
         (b & 255) != ((b >> 8) & 255) || (a & 255) != ((a >> 8) & 255)) /*first and second byte differ*/ {
        stats->bits = 16;
        sixteen = 1;
        bits_done = 1;
        numcolors_done = 1; /*counting colors no longer useful, palette doesn't support 16-bit*/
        break;
      }
    }
  }

  if(sixteen) {
    unsigned short r = 0, g = 0, b = 0, a = 0;

    for(i = 0; i != numpixels; ++i) {
      getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in);

      if(!colored_done && (r != g || r != b)) {
        stats->colored = 1;
        colored_done = 1;
      }

      if(!alpha_done) {
        unsigned matchkey = (r == stats->key_r && g == stats->key_g && b == stats->key_b);
        if(a != 65535 && (a != 0 || (stats->key && !matchkey))) {
          stats->alpha = 1;
          stats->key = 0;
          alpha_done = 1;
        } else if(a == 0 && !stats->alpha && !stats->key) {
          stats->key = 1;
          stats->key_r = r;
          stats->key_g = g;
          stats->key_b = b;
        } else if(a == 65535 && stats->key && matchkey) {
          /* Color key cannot be used if an opaque pixel also has that RGB color. */
          stats->alpha = 1;
          stats->key = 0;
          alpha_done = 1;
        }
      }
      if(alpha_done && numcolors_done && colored_done && bits_done) break;
    }

    if(stats->key && !stats->alpha) {
      for(i = 0; i != numpixels; ++i) {
        getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in);
        if(a != 0 && r == stats->key_r && g == stats->key_g && b == stats->key_b) {
          /* Color key cannot be used if an opaque pixel also has that RGB color. */
          stats->alpha = 1;
          stats->key = 0;
          alpha_done = 1;
        }
      }
    }
  } else /* < 16-bit */ {
    unsigned char r = 0, g = 0, b = 0, a = 0;
    for(i = 0; i != numpixels; ++i) {
      getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode_in);

      if(!bits_done && stats->bits < 8) {
        /*only r is checked, < 8 bits is only relevant for grayscale*/
        unsigned bits = getValueRequiredBits(r);
        if(bits > stats->bits) stats->bits = bits;
      }
      bits_done = (stats->bits >= bpp);

      if(!colored_done && (r != g || r != b)) {
        stats->colored = 1;
        colored_done = 1;
        if(stats->bits < 8) stats->bits = 8; /*PNG has no colored modes with less than 8-bit per channel*/
      }

      if(!alpha_done) {
        unsigned matchkey = (r == stats->key_r && g == stats->key_g && b == stats->key_b);
        if(a != 255 && (a != 0 || (stats->key && !matchkey))) {
          stats->alpha = 1;
          stats->key = 0;
          alpha_done = 1;
          if(stats->bits < 8) stats->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/
        } else if(a == 0 && !stats->alpha && !stats->key) {
          stats->key = 1;
          stats->key_r = r;
          stats->key_g = g;
          stats->key_b = b;
        } else if(a == 255 && stats->key && matchkey) {
          /* Color key cannot be used if an opaque pixel also has that RGB color. */
          stats->alpha = 1;
          stats->key = 0;
          alpha_done = 1;
          if(stats->bits < 8) stats->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/
        }
      }

      if(!numcolors_done) {
        if(!color_tree_has(&tree, r, g, b, a)) {
          color_tree_add(&tree, r, g, b, a, stats->numcolors);
          if(stats->numcolors < 256) {
            unsigned char* p = stats->palette;
            unsigned n = stats->numcolors;
            p[n * 4 + 0] = r;
            p[n * 4 + 1] = g;
            p[n * 4 + 2] = b;
            p[n * 4 + 3] = a;
          }
          ++stats->numcolors;
          numcolors_done = stats->numcolors >= maxnumcolors;
        }
      }

      if(alpha_done && numcolors_done && colored_done && bits_done) break;
    }

    if(stats->key && !stats->alpha) {
      for(i = 0; i != numpixels; ++i) {
        getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode_in);
        if(a != 0 && r == stats->key_r && g == stats->key_g && b == stats->key_b) {
          /* Color key cannot be used if an opaque pixel also has that RGB color. */
          stats->alpha = 1;
          stats->key = 0;
          alpha_done = 1;
          if(stats->bits < 8) stats->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/
        }
      }
    }

    /*make the stats's key always 16-bit for consistency - repeat each byte twice*/
    stats->key_r += (stats->key_r << 8);
    stats->key_g += (stats->key_g << 8);
    stats->key_b += (stats->key_b << 8);
  }

  color_tree_cleanup(&tree);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r8, %r15
movq %rsi, 0x48(%rsp)
movq %rdi, 0x38(%rsp)
movl %edx, %r14d
movl %ecx, %eax
movq %rax, 0x28(%rsp)
movl (%r8), %ebx
movq %r8, %rdi
callq 0x68475
xorl %r8d, %r8d
movq %r15, 0x40(%rsp)
movl 0x4(%r15), %ecx
cmpq $0x6, %rbx
ja 0x6a088
leaq 0x1fdf8(%rip), %rdx     # 0x89e7c
movl (%rdx,%rbx,4), %r8d
imull %ecx, %r8d
movq 0x28(%rsp), %rcx
imulq %r14, %rcx
movq %rcx, 0x28(%rsp)
xorl $0x1, %eax
movq 0x38(%rsp), %rdi
movl 0x418(%rdi), %edx
movl %edx, %ecx
xorl $0x1, %ecx
movl %r8d, %esi
xorl $0x1, %esi
orl %ecx, %esi
sete %sil
movl $0x101, %r9d            # imm = 0x101
cmpl $0x8, %r8d
ja 0x6a0e1
movl $0x1, %r9d
movl %r8d, %ecx
shll %cl, %r9d
addl 0x14(%rdi), %r9d
movl $0x101, %ecx            # imm = 0x101
cmpl %ecx, %r9d
cmovael %ecx, %r9d
testl $0xfffffffb, %ebx       # imm = 0xFFFFFFFB
sete 0x20(%rsp)
movq 0x28(%rsp), %rcx
addq %rcx, 0x420(%rdi)
cmpl $0x0, 0x428(%rdi)
sete %cl
pxor %xmm0, %xmm0
movdqa %xmm0, 0xe0(%rsp)
movdqa %xmm0, 0xd0(%rsp)
movdqa %xmm0, 0xc0(%rsp)
movdqa %xmm0, 0xb0(%rsp)
movdqa %xmm0, 0xa0(%rsp)
movdqa %xmm0, 0x90(%rsp)
movdqa %xmm0, 0x80(%rsp)
movdqa %xmm0, 0x70(%rsp)
movl $0xffffffff, 0xf0(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x10(%rdi)
movl $0x1, %r10d
cmovel %eax, %r10d
movl %r10d, 0x1c(%rsp)
cmpl $0x0, (%rdi)
setne %bpl
cmpl $0x10, %edx
sete %r14b
movl %r8d, 0x34(%rsp)
cmpl %r8d, %edx
setae %r13b
orb %sil, %r13b
movl %r9d, 0x58(%rsp)
cmpl %r9d, 0x14(%rdi)
setae %al
orb %cl, %r14b
orb %al, %r14b
jne 0x6a1d9
movq %rdi, %rbx
cmpl $0x0, 0x14(%rdi)
je 0x6a1d9
xorl %r15d, %r15d
leaq 0x70(%rsp), %r12
movzbl 0x18(%rbx,%r15,4), %esi
movzbl 0x19(%rbx,%r15,4), %edx
movzbl 0x1a(%rbx,%r15,4), %ecx
movzbl 0x1b(%rbx,%r15,4), %r8d
movq %r12, %rdi
movl %r15d, %r9d
callq 0x69947
incq %r15
movl 0x14(%rbx), %eax
cmpq %rax, %r15
jb 0x6a1ab
movb 0x20(%rsp), %bl
orb %bpl, %bl
movzbl %r13b, %r15d
movzbl %r14b, %ecx
movb $0x1, %bpl
movq 0x40(%rsp), %rax
cmpl $0x10, 0x4(%rax)
jne 0x6a2da
cmpq $0x0, 0x28(%rsp)
sete %bpl
movl 0x34(%rsp), %r13d
je 0x6a2e1
movl %ecx, 0x20(%rsp)
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
leaq 0x16(%rsp), %r14
leaq 0x14(%rsp), %rsi
leaq 0x12(%rsp), %rdx
leaq 0x18(%rsp), %rcx
movq %r14, %rdi
movq 0x48(%rsp), %r8
xorl %r9d, %r9d
callq 0x69a03
movzwl (%r14), %eax
movzbl %al, %ecx
shrl $0x8, %eax
cmpl %eax, %ecx
jne 0x6a2e8
movl $0x1, %r12d
leaq 0x18(%rsp), %r13
movq 0x38(%rsp), %r14
movzwl 0x14(%rsp), %eax
movzbl %al, %ecx
shrl $0x8, %eax
cmpl %eax, %ecx
jne 0x6a2ed
movzwl 0x12(%rsp), %eax
movzbl %al, %ecx
shrl $0x8, %eax
cmpl %eax, %ecx
jne 0x6a2ed
movzwl 0x18(%rsp), %eax
movzbl %al, %ecx
shrl $0x8, %eax
cmpl %eax, %ecx
jne 0x6a2ed
cmpq %r12, 0x28(%rsp)
sete %bpl
je 0x6a9e7
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
leaq 0x16(%rsp), %rdi
leaq 0x14(%rsp), %rsi
leaq 0x12(%rsp), %rdx
movq %r13, %rcx
movq 0x48(%rsp), %r8
movq %r12, %r9
callq 0x69a03
movzwl 0x16(%rsp), %eax
movzbl %al, %ecx
shrl $0x8, %eax
incq %r12
cmpl %eax, %ecx
je 0x6a262
jmp 0x6a2ed
movq 0x38(%rsp), %r14
jmp 0x6a303
movq 0x38(%rsp), %r14
jmp 0x6a308
movq 0x38(%rsp), %r14
movl $0x10, 0x418(%r14)
movl $0x1, %r15d
movl $0x1, %ecx
movl 0x34(%rsp), %r13d
movzbl %bl, %eax
movl %eax, 0x20(%rsp)
xorl %eax, %eax
testb $0x1, %bpl
je 0x6a699
movb %al, 0x16(%rsp)
movb %al, 0x14(%rsp)
movb %al, 0x12(%rsp)
movb %al, 0x18(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0x6a847
movq 0x28(%rsp), %rax
decq %rax
movq %rax, 0x60(%rsp)
xorl %ebx, %ebx
movl %ecx, %ebp
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
leaq 0x16(%rsp), %rdi
leaq 0x14(%rsp), %rsi
leaq 0x12(%rsp), %rdx
leaq 0x18(%rsp), %rcx
movq 0x48(%rsp), %r8
movq %rbx, %r9
callq 0x69b82
testl %r15d, %r15d
movl 0x1c(%rsp), %edi
jne 0x6a3d0
movl 0x418(%r14), %eax
cmpl $0x7, %eax
ja 0x6a3d0
movzbl 0x16(%rsp), %ecx
leal 0x1(%rcx), %esi
movl $0x1, %edx
cmpb $0x2, %sil
jb 0x6a3c5
imull $0xf0f0f0f1, %ecx, %esi # imm = 0xF0F0F0F1
movl $0x8, %edx
cmpl $0xf0f0f0f, %esi        # imm = 0xF0F0F0F
ja 0x6a3c5
imull $0xfcfcfcfd, %ecx, %ecx # imm = 0xFCFCFCFD
xorl %edx, %edx
cmpl $0x3030304, %ecx        # imm = 0x3030304
setae %dl
leal 0x2(,%rdx,2), %edx
cmpl %eax, %edx
jbe 0x6a3d0
movl %edx, 0x418(%r14)
movq %rbx, 0x68(%rsp)
movl 0x418(%r14), %r9d
cmpl %r13d, %r9d
setae %r11b
movb $0x1, %r12b
movb $0x1, %r10b
cmpl $0x0, 0x20(%rsp)
movl $0x1, %edx
jne 0x6a430
movb 0x16(%rsp), %al
cmpb 0x14(%rsp), %al
jne 0x6a40d
xorl %r10d, %r10d
movl $0x0, %edx
cmpb 0x12(%rsp), %al
je 0x6a430
movl $0x1, (%r14)
movb $0x1, %r10b
movl $0x1, %edx
cmpl $0x7, %r9d
ja 0x6a430
movl $0x8, 0x418(%r14)
movb $0x1, %r10b
testl %edi, %edi
movl %edx, 0x20(%rsp)
je 0x6a581
movb $0x1, %r12b
movl $0x1, %esi
movl %esi, 0x1c(%rsp)
testl %ebp, %ebp
movl $0x1, %ecx
jne 0x6a540
movb 0x16(%rsp), %al
movb 0x14(%rsp), %cl
movb 0x12(%rsp), %bl
movb 0x18(%rsp), %bpl
movb %al, 0x26(%rsp)
movzbl %al, %r15d
movb %cl, 0x27(%rsp)
movzbl %cl, %r13d
movzbl %bl, %r14d
movzbl %bpl, %r8d
leaq 0x70(%rsp), %rdi
movl %r15d, %esi
movl %r13d, %edx
movl %r14d, %ecx
movb %r11b, 0x1b(%rsp)
movl %r8d, 0x5c(%rsp)
movl %r9d, 0x54(%rsp)
movl %r10d, 0x50(%rsp)
callq 0x71230
movl 0x50(%rsp), %r10d
movl 0x54(%rsp), %r9d
movb 0x1b(%rsp), %r11b
xorl %ecx, %ecx
testl %eax, %eax
jns 0x6a540
movb %bpl, 0x24(%rsp)
movb %bl, 0x25(%rsp)
movq 0x38(%rsp), %rax
movl 0x14(%rax), %r9d
leaq 0x70(%rsp), %rdi
movl %r15d, %esi
movl %r13d, %edx
movl %r14d, %ecx
movq %rax, %r14
movl 0x5c(%rsp), %r8d
callq 0x69947
movl 0x14(%r14), %eax
cmpq $0xff, %rax
ja 0x6a522
leal (,%rax,4), %ecx
movb 0x26(%rsp), %dl
movb %dl, 0x18(%r14,%rax,4)
movb 0x27(%rsp), %dl
movb %dl, 0x19(%r14,%rcx)
movb 0x25(%rsp), %dl
movb %dl, 0x1a(%r14,%rcx)
movb 0x24(%rsp), %dl
movb %dl, 0x1b(%r14,%rcx)
incl %eax
movl %eax, 0x14(%r14)
xorl %ecx, %ecx
cmpl 0x58(%rsp), %eax
setae %cl
movb 0x1b(%rsp), %r11b
movl 0x54(%rsp), %r9d
movl 0x50(%rsp), %r10d
movl 0x34(%rsp), %r13d
cmpl %r13d, %r9d
setae %al
andb %cl, %r12b
andb %r12b, %r10b
testb %al, %r10b
movq 0x38(%rsp), %r14
movl $0x0, %r15d
movq 0x68(%rsp), %rdx
jne 0x6a847
movb %r11b, %r15b
leaq 0x1(%rdx), %rbx
cmpq %rdx, 0x60(%rsp)
jne 0x6a346
jmp 0x6a847
movzbl 0x16(%rsp), %eax
cmpw %ax, 0x8(%r14)
jne 0x6a5a8
movzbl 0x14(%rsp), %ecx
cmpw %cx, 0xa(%r14)
jne 0x6a5a8
movzbl 0x12(%rsp), %ecx
cmpw %cx, 0xc(%r14)
sete %cl
jmp 0x6a5aa
xorl %ecx, %ecx
movzbl 0x18(%rsp), %edx
cmpl $0xff, %edx
je 0x6a606
testl %edx, %edx
jne 0x6a640
cmpl $0x0, 0x4(%r14)
sete %sil
orb %cl, %sil
testb $0x1, %sil
je 0x6a640
cmpl $0xff, %edx
je 0x6a606
xorl %r12d, %r12d
movl $0x0, %esi
testl %edx, %edx
jne 0x6a444
cmpl $0x0, 0x10(%r14)
jne 0x6a5f7
cmpl $0x0, 0x4(%r14)
je 0x6a66e
xorl %r12d, %r12d
cmpl $0xff, %edx
jne 0x6a444
cmpl $0x0, 0x4(%r14)
setne %al
andb %cl, %al
xorl %r12d, %r12d
movl $0x0, %esi
cmpb $0x1, %al
jne 0x6a444
movl $0x1, 0x10(%r14)
movl $0x0, 0x4(%r14)
cmpl $0x7, 0x418(%r14)
ja 0x6a43c
jmp 0x6a65e
movl $0x1, 0x10(%r14)
movl $0x0, 0x4(%r14)
cmpl $0x7, 0x418(%r14)
ja 0x6a43f
movl $0x8, 0x418(%r14)
jmp 0x6a43c
movl $0x1, 0x4(%r14)
movw %ax, 0x8(%r14)
movzbl 0x14(%rsp), %eax
movw %ax, 0xa(%r14)
movzbl 0x12(%rsp), %eax
movw %ax, 0xc(%r14)
xorl %r12d, %r12d
xorl %esi, %esi
jmp 0x6a444
movw %ax, 0x16(%rsp)
movw %ax, 0x14(%rsp)
movw %ax, 0x12(%rsp)
movw %ax, 0x18(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0x6a92c
movl %ecx, %r13d
movq 0x28(%rsp), %rax
leaq -0x1(%rax), %rbx
xorl %r12d, %r12d
leaq 0x18(%rsp), %rbp
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
leaq 0x16(%rsp), %rdi
leaq 0x14(%rsp), %rsi
leaq 0x12(%rsp), %rdx
movq %rbp, %rcx
movq 0x48(%rsp), %r8
movq %r12, %r9
callq 0x69a03
movb $0x1, %cl
movb $0x1, %al
cmpl $0x0, 0x20(%rsp)
movl $0x1, %esi
jne 0x6a72d
movzwl 0x16(%rsp), %edx
cmpw 0x14(%rsp), %dx
jne 0x6a71f
xorl %eax, %eax
movl $0x0, %esi
cmpw 0x12(%rsp), %dx
je 0x6a72d
movl $0x1, (%r14)
movb $0x1, %al
movl $0x1, %esi
cmpl $0x0, 0x1c(%rsp)
movl %esi, 0x20(%rsp)
jne 0x6a7e9
movzwl 0x16(%rsp), %edx
cmpw 0x8(%r14), %dx
jne 0x6a764
movzwl 0x14(%rsp), %ecx
cmpw 0xa(%r14), %cx
jne 0x6a764
movzwl 0x12(%rsp), %ecx
cmpw 0xc(%r14), %cx
sete %sil
jmp 0x6a766
xorl %esi, %esi
movzwl 0x18(%rsp), %edi
cmpl $0xffff, %edi           # imm = 0xFFFF
je 0x6a7bd
testl %edi, %edi
jne 0x6a7d7
cmpl $0x0, 0x4(%r14)
sete %cl
orb %sil, %cl
testb $0x1, %cl
je 0x6a7d7
cmpl $0xffff, %edi           # imm = 0xFFFF
je 0x6a7bd
xorl %ecx, %ecx
movl $0x0, 0x1c(%rsp)
testl %edi, %edi
jne 0x6a7f1
cmpl $0x0, 0x10(%r14)
jne 0x6a7ab
cmpl $0x0, 0x4(%r14)
je 0x6a81a
xorl %ecx, %ecx
movl $0x0, 0x1c(%rsp)
cmpl $0xffff, %edi           # imm = 0xFFFF
jne 0x6a7f1
cmpl $0x0, 0x4(%r14)
setne %dl
andb %sil, %dl
xorl %ecx, %ecx
movl $0x0, 0x1c(%rsp)
cmpb $0x1, %dl
jne 0x6a7f1
movl $0x1, 0x10(%r14)
movl $0x0, 0x4(%r14)
movb $0x1, %cl
movl $0x1, 0x1c(%rsp)
testl %r15d, %r15d
setne %dl
andb %r13b, %cl
andb %cl, %al
testb %dl, %al
jne 0x6a92c
leaq 0x1(%r12), %rax
cmpq %r12, %rbx
movq %rax, %r12
jne 0x6a6cd
jmp 0x6a92c
movl $0x1, 0x4(%r14)
movw %dx, 0x8(%r14)
movzwl 0x14(%rsp), %ecx
movw %cx, 0xa(%r14)
movzwl 0x12(%rsp), %ecx
movw %cx, 0xc(%r14)
xorl %ecx, %ecx
movl $0x0, 0x1c(%rsp)
jmp 0x6a7f1
cmpl $0x0, 0x4(%r14)
je 0x6a8fe
cmpl $0x0, 0x10(%r14)
setne %al
cmpq $0x0, 0x28(%rsp)
sete %cl
orb %al, %cl
jne 0x6a8fe
xorl %r12d, %r12d
leaq 0x16(%rsp), %rbx
leaq 0x14(%rsp), %rbp
leaq 0x12(%rsp), %r15
leaq 0x18(%rsp), %r13
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movq %r13, %rcx
movq 0x48(%rsp), %r8
movq %r12, %r9
callq 0x69b82
cmpb $0x0, 0x18(%rsp)
je 0x6a8f4
movzbl 0x16(%rsp), %eax
cmpw %ax, 0x8(%r14)
jne 0x6a8f4
movzbl 0x14(%rsp), %eax
cmpw %ax, 0xa(%r14)
jne 0x6a8f4
movzbl 0x12(%rsp), %eax
cmpw %ax, 0xc(%r14)
jne 0x6a8f4
movl $0x1, 0x10(%r14)
movl $0x0, 0x4(%r14)
cmpl $0x7, 0x418(%r14)
ja 0x6a8f4
movl $0x8, 0x418(%r14)
incq %r12
cmpq %r12, 0x28(%rsp)
jne 0x6a882
movq 0x8(%r14), %xmm0
movdqa %xmm0, %xmm1
psllw $0x8, %xmm1
paddw %xmm0, %xmm1
movd %xmm1, 0x8(%r14)
movl 0xc(%r14), %eax
movl %eax, %ecx
shll $0x8, %ecx
addl %eax, %ecx
movw %cx, 0xc(%r14)
jmp 0x6a9cb
cmpl $0x0, 0x4(%r14)
je 0x6a9cb
cmpl $0x0, 0x10(%r14)
setne %al
cmpq $0x0, 0x28(%rsp)
sete %cl
orb %al, %cl
jne 0x6a9cb
xorl %r15d, %r15d
leaq 0x16(%rsp), %rbx
leaq 0x14(%rsp), %r13
leaq 0x12(%rsp), %rbp
leaq 0x18(%rsp), %r12
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %r12, %rcx
movq 0x48(%rsp), %r8
movq %r15, %r9
callq 0x69a03
cmpw $0x0, 0x18(%rsp)
je 0x6a9c1
movzwl 0x16(%rsp), %eax
cmpw 0x8(%r14), %ax
jne 0x6a9c1
movzwl 0x14(%rsp), %eax
cmpw 0xa(%r14), %ax
jne 0x6a9c1
movzwl 0x12(%rsp), %eax
cmpw 0xc(%r14), %ax
jne 0x6a9c1
movl $0x1, 0x10(%r14)
movl $0x0, 0x4(%r14)
incq %r15
cmpq %r15, 0x28(%rsp)
jne 0x6a963
leaq 0x70(%rsp), %rdi
callq 0x69e55
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x20(%rsp), %ecx
jmp 0x6a303