// File: /workspace/github_c_makefile_star2_O3/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_compute_color_stats
unsigned 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;
  unsigned error = 0;

  /* 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];
      error = color_tree_add(&tree, color[0], color[1], color[2], color[3], i);
      if(error) goto cleanup;
    }
  }

  /*Check if the 16-bit input is truly 16-bit*/
  if(mode_in->bitdepth == 16 && !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((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)) {
          error = color_tree_add(&tree, r, g, b, a, stats->numcolors);
          if(error) goto cleanup;
          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);
  }

cleanup:
  color_tree_cleanup(&tree);
  return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %r8, %rbx
movq %rsi, 0x48(%rsp)
movq %rdi, %r12
movl %edx, %eax
movl %ecx, %ecx
imulq %rax, %rcx
movq %rcx, 0x30(%rsp)
movl (%r8), %r14d
movq %r8, %rdi
callq 0x5c0f
movl %eax, %r13d
xorl $0x1, %r13d
movq %rbx, 0x40(%rsp)
movl 0x4(%rbx), %r15d
movl %r14d, %edi
callq 0x5b92
imull %r15d, %eax
movl 0x418(%r12), %esi
movl %esi, %ecx
xorl $0x1, %ecx
movl %eax, %edx
xorl $0x1, %edx
orl %ecx, %edx
sete %r9b
movl 0x14(%r12), %r8d
movl $0x101, %edx            # imm = 0x101
cmpl $0x8, %eax
ja 0x786b
movl $0x1, %edx
movl %eax, %ecx
shll %cl, %edx
addl %r8d, %edx
movl $0x101, %ecx            # imm = 0x101
cmpl %ecx, %edx
cmovael %ecx, %edx
testl $0xfffffffb, %r14d      # imm = 0xFFFFFFFB
sete %bl
movq 0x30(%rsp), %rcx
addq %rcx, 0x420(%r12)
cmpl $0x0, 0x428(%r12)
sete %cl
pxor %xmm0, %xmm0
movdqa %xmm0, 0xf0(%rsp)
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)
movl $0xffffffff, 0x100(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x10(%r12)
movl $0x1, %edi
cmovel %r13d, %edi
movl %edi, 0x28(%rsp)
cmpl $0x0, (%r12)
setne %r13b
cmpl $0x10, %esi
sete %bpl
cmpl %eax, %esi
setae 0x1f(%rsp)
movl %edx, 0x64(%rsp)
cmpl %edx, %r8d
setae %dl
orb %cl, %bpl
orb %dl, %bpl
movl %eax, %r14d
je 0x792b
movq %r8, 0x58(%rsp)
jmp 0x79a0
testl %r8d, %r8d
je 0x7997
movb %r9b, 0x20(%rsp)
movl %r14d, 0x3c(%rsp)
xorl %r14d, %r14d
leaq 0x80(%rsp), %r15
movzbl 0x18(%r12,%r14,4), %esi
movzbl 0x19(%r12,%r14,4), %edx
movzbl 0x1a(%r12,%r14,4), %ecx
movzbl 0x1b(%r12,%r14,4), %r8d
movq %r15, %rdi
movl %r14d, %r9d
callq 0x69fb
testl %eax, %eax
jne 0x814b
incq %r14
movl 0x14(%r12), %eax
cmpq %rax, %r14
jb 0x7945
movq %rax, 0x58(%rsp)
movq 0x40(%rsp), %rax
movl 0x4(%rax), %r15d
movl 0x3c(%rsp), %r14d
movb 0x20(%rsp), %r9b
jmp 0x79a0
movq $0x0, 0x58(%rsp)
orb %bl, %r13b
movzbl %r13b, %eax
cmpl $0x10, %r15d
movl %eax, %r15d
movq %r12, 0x20(%rsp)
jne 0x7a64
movl %r9d, %ebx
xorl %eax, %eax
movw %ax, 0x1a(%rsp)
movw %ax, 0x16(%rsp)
movw %ax, 0x18(%rsp)
movw %ax, 0x1c(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x7a61
xorl %r13d, %r13d
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
leaq 0x1a(%rsp), %rdi
leaq 0x16(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x1c(%rsp), %rcx
movq 0x48(%rsp), %r8
movq %r13, %r9
callq 0x6acd
movzwl 0x1a(%rsp), %eax
movzbl %al, %ecx
shrl $0x8, %eax
cmpl %eax, %ecx
jne 0x7f34
movzwl 0x16(%rsp), %eax
movzbl %al, %ecx
shrl $0x8, %eax
cmpl %eax, %ecx
jne 0x7f34
movzwl 0x18(%rsp), %eax
movzbl %al, %ecx
shrl $0x8, %eax
cmpl %eax, %ecx
jne 0x7f34
movzwl 0x1c(%rsp), %eax
movzbl %al, %ecx
shrl $0x8, %eax
cmpl %eax, %ecx
jne 0x7f34
incq %r13
cmpq %r13, 0x30(%rsp)
jne 0x79e1
movl %ebx, %r9d
xorl %eax, %eax
movb %al, 0x1a(%rsp)
movb %al, 0x16(%rsp)
movb %al, 0x18(%rsp)
movb %al, 0x1c(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x7e13
orb %r9b, 0x1f(%rsp)
movzbl %bpl, %ebp
xorl %ebx, %ebx
movl %r14d, 0x3c(%rsp)
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
leaq 0x1a(%rsp), %rdi
leaq 0x16(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x1c(%rsp), %rcx
movq 0x48(%rsp), %r8
movq %rbx, %r9
callq 0x7329
movl 0x418(%r12), %r9d
cmpl $0x8, %r9d
setae %al
orb 0x1f(%rsp), %al
testb $0x1, %al
je 0x7add
leaq 0x80(%rsp), %rdi
jmp 0x7b2f
movb 0x1a(%rsp), %cl
leal 0x1(%rcx), %edx
movl $0x1, %eax
cmpb $0x2, %dl
jb 0x7b17
movzbl %cl, %ecx
movl %ecx, %eax
shll $0x4, %eax
movl %ecx, %edx
subl %eax, %edx
movl $0x8, %eax
cmpb $0xf, %dl
ja 0x7b17
leal (%rcx,%rcx,2), %eax
negl %eax
xorl %ecx, %ecx
cmpb $0x4, %al
setae %cl
leal 0x2(,%rcx,2), %eax
cmpl %r9d, %eax
leaq 0x80(%rsp), %rdi
jbe 0x7b2f
movl %eax, 0x418(%r12)
movl %eax, %r9d
cmpl %r14d, %r9d
setae 0x1f(%rsp)
movb $0x1, %r11b
movl %r9d, %eax
movb $0x1, %r10b
testl %r15d, %r15d
movl $0x1, %r15d
jne 0x7b95
movb 0x1a(%rsp), %cl
cmpb 0x16(%rsp), %cl
jne 0x7b67
xorl %r10d, %r10d
movl %r9d, %eax
movl $0x0, %r15d
cmpb 0x18(%rsp), %cl
je 0x7b95
movl $0x1, (%r12)
movl %r9d, %eax
movb $0x1, %r10b
movl $0x1, %r15d
cmpl $0x7, %r9d
ja 0x7b95
movl $0x8, 0x418(%r12)
movl $0x8, %eax
movb $0x1, %r10b
cmpl $0x0, 0x28(%rsp)
je 0x7bce
movb $0x1, %r11b
movl $0x1, 0x28(%rsp)
movl $0x1, %ecx
testl %ebp, %ebp
je 0x7c03
andb %cl, %r11b
andb %r11b, %r10b
cmpb $0x1, %r10b
jne 0x7c72
cmpl %r14d, %r9d
jb 0x7c72
jmp 0x7e13
movzbl 0x1a(%rsp), %ecx
cmpw %cx, 0x8(%r12)
jne 0x7c87
movzbl 0x16(%rsp), %edx
cmpw %dx, 0xa(%r12)
jne 0x7c87
movzbl 0x18(%rsp), %edx
cmpw %dx, 0xc(%r12)
sete %dl
jmp 0x7c89
movq %rbx, 0x78(%rsp)
movl %r11d, 0x68(%rsp)
movl %r10d, 0x6c(%rsp)
movl %r9d, 0x70(%rsp)
movl %r15d, 0x54(%rsp)
movb 0x1a(%rsp), %bpl
movb 0x16(%rsp), %al
movb 0x18(%rsp), %r13b
movb 0x1c(%rsp), %bl
movzbl %bpl, %r14d
movb %al, 0x2f(%rsp)
movzbl %al, %r15d
movzbl %r13b, %ecx
movzbl %bl, %r12d
movl %r14d, %esi
movl %r15d, %edx
movl %ecx, 0x74(%rsp)
movl %r12d, %r8d
callq 0xd336
xorl %ecx, %ecx
testl %eax, %eax
js 0x7d1d
movq 0x20(%rsp), %r12
movl 0x3c(%rsp), %r14d
movl 0x54(%rsp), %r15d
movq 0x78(%rsp), %rbx
incq %rbx
movl %ecx, %ebp
cmpq %rbx, 0x30(%rsp)
jne 0x7a92
jmp 0x7e13
xorl %edx, %edx
movzbl 0x1c(%rsp), %esi
cmpl $0xff, %esi
je 0x7dc8
testl %esi, %esi
jne 0x7cfd
movl 0x4(%r12), %esi
testl %esi, %esi
sete %r8b
orb %dl, %r8b
testb $0x1, %r8b
je 0x7cfd
xorl %r11d, %r11d
orl 0x10(%r12), %esi
movl $0x0, 0x28(%rsp)
jne 0x7ba7
movl $0x1, 0x4(%r12)
movw %cx, 0x8(%r12)
movzbl 0x16(%rsp), %eax
movw %ax, 0xa(%r12)
movzbl 0x18(%rsp), %eax
movw %ax, 0xc(%r12)
xorl %r11d, %r11d
movl $0x0, 0x28(%rsp)
jmp 0x7ba7
movl $0x1, 0x10(%r12)
movl $0x0, 0x4(%r12)
cmpl $0x7, %eax
ja 0x7b9f
jmp 0x7e02
movb %bpl, 0x2c(%rsp)
movb %bl, 0x2d(%rsp)
movb %r13b, 0x2e(%rsp)
leaq 0x80(%rsp), %rdi
movl %r14d, %esi
movl %r15d, %edx
movl 0x74(%rsp), %ecx
movl %r12d, %r8d
movq 0x58(%rsp), %r9
callq 0x69fb
testl %eax, %eax
jne 0x814b
movq 0x20(%rsp), %r12
movl 0x14(%r12), %edx
cmpq $0xff, %rdx
ja 0x7d90
leal (,%rdx,4), %eax
movb 0x2c(%rsp), %cl
movb %cl, 0x18(%r12,%rdx,4)
movb 0x2f(%rsp), %cl
movb %cl, 0x19(%r12,%rax)
movb 0x2e(%rsp), %cl
movb %cl, 0x1a(%r12,%rax)
movb 0x2d(%rsp), %cl
movb %cl, 0x1b(%r12,%rax)
incl %edx
movl %edx, 0x14(%r12)
xorl %ecx, %ecx
movq %rdx, 0x58(%rsp)
cmpl 0x64(%rsp), %edx
setae %cl
movl 0x3c(%rsp), %r14d
movl 0x54(%rsp), %r15d
movl 0x70(%rsp), %r9d
movl 0x6c(%rsp), %r10d
movl 0x68(%rsp), %r11d
movq 0x78(%rsp), %rbx
jmp 0x7bb0
cmpl $0x0, 0x4(%r12)
setne %cl
andb %dl, %cl
xorl %r11d, %r11d
movl $0x0, 0x28(%rsp)
cmpb $0x1, %cl
jne 0x7ba7
movl $0x1, 0x10(%r12)
movl $0x0, 0x4(%r12)
cmpl $0x7, %eax
ja 0x7b9c
movl $0x8, 0x418(%r12)
jmp 0x7b9c
cmpl $0x0, 0x4(%r12)
je 0x7ee5
cmpq $0x0, 0x30(%rsp)
sete %al
movq 0x20(%rsp), %rcx
cmpl $0x0, 0x10(%rcx)
setne %cl
orb %al, %cl
jne 0x7ee5
xorl %r12d, %r12d
leaq 0x1a(%rsp), %r13
leaq 0x16(%rsp), %rbp
leaq 0x18(%rsp), %r15
leaq 0x1c(%rsp), %r14
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq 0x48(%rsp), %r8
movq %r12, %r9
callq 0x7329
cmpb $0x0, 0x1c(%rsp)
je 0x7ed7
movzbl 0x1a(%rsp), %eax
movq 0x20(%rsp), %rcx
cmpw %ax, 0x8(%rcx)
jne 0x7ed7
movzbl 0x16(%rsp), %eax
movq 0x20(%rsp), %rcx
cmpw %ax, 0xa(%rcx)
jne 0x7ed7
movzbl 0x18(%rsp), %eax
movq 0x20(%rsp), %rcx
cmpw %ax, 0xc(%rcx)
jne 0x7ed7
movq 0x20(%rsp), %rax
movl $0x1, 0x10(%rax)
movl $0x0, 0x4(%rax)
cmpl $0x7, 0x418(%rax)
ja 0x7ed7
movq 0x20(%rsp), %rax
movl $0x8, 0x418(%rax)
incq %r12
cmpq %r12, 0x30(%rsp)
jne 0x7e53
movq 0x20(%rsp), %rdx
movq 0x8(%rdx), %xmm0
movdqa %xmm0, %xmm1
psllw $0x8, %xmm1
paddw %xmm0, %xmm1
movd %xmm1, 0x8(%rdx)
movl 0xc(%rdx), %eax
movl %eax, %ecx
shll $0x8, %ecx
addl %eax, %ecx
movw %cx, 0xc(%rdx)
xorl %r12d, %r12d
leaq 0x80(%rsp), %rdi
callq 0x75fb
movl %r12d, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, 0x418(%r12)
xorl %r12d, %r12d
leaq 0x1a(%rsp), %rax
movw %r12w, (%rax)
leaq 0x16(%rsp), %rax
movw %r12w, (%rax)
leaq 0x18(%rsp), %r13
movw %r12w, (%r13)
leaq 0x1c(%rsp), %rbp
movw %r12w, (%rbp)
movl 0x28(%rsp), %r14d
movl %r15d, %ebx
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
leaq 0x1a(%rsp), %rdi
leaq 0x16(%rsp), %rsi
movq %r13, %rdx
movq %rbp, %rcx
movq 0x48(%rsp), %r8
movq %r12, %r9
callq 0x6acd
movl $0x1, %r15d
movb $0x1, %al
testl %ebx, %ebx
jne 0x7fd1
movzwl 0x1a(%rsp), %ecx
cmpw 0x16(%rsp), %cx
jne 0x7fbe
xorl %eax, %eax
movl $0x0, %r15d
cmpw 0x18(%rsp), %cx
je 0x7fd1
movq 0x20(%rsp), %rax
movl $0x1, (%rax)
movb $0x1, %al
movl $0x1, %r15d
testl %r14d, %r14d
jne 0x8082
movzwl 0x1a(%rsp), %ecx
movq 0x20(%rsp), %rsi
cmpw 0x8(%rsi), %cx
jne 0x8003
movzwl 0x16(%rsp), %edx
cmpw 0xa(%rsi), %dx
jne 0x8003
movzwl 0x18(%rsp), %edx
cmpw 0xc(%rsi), %dx
sete %dl
jmp 0x8005
xorl %edx, %edx
movzwl 0x1c(%rsp), %esi
cmpl $0xffff, %esi           # imm = 0xFFFF
je 0x8059
testl %esi, %esi
jne 0x806f
movq 0x20(%rsp), %rsi
movl 0x4(%rsi), %esi
testl %esi, %esi
sete %dil
orb %dl, %dil
testb $0x1, %dil
je 0x806f
xorl %r14d, %r14d
movq 0x20(%rsp), %rdx
orl 0x10(%rdx), %esi
jne 0x808c
movl $0x1, 0x4(%rdx)
movw %cx, 0x8(%rdx)
movzwl 0x16(%rsp), %eax
movw %ax, 0xa(%rdx)
movzwl 0x18(%rsp), %eax
movw %ax, 0xc(%rdx)
jmp 0x808c
movq 0x20(%rsp), %rcx
cmpl $0x0, 0x4(%rcx)
setne %cl
andb %dl, %cl
xorl %r14d, %r14d
cmpb $0x1, %cl
jne 0x808c
movq 0x20(%rsp), %rcx
movl $0x1, 0x10(%rcx)
movl $0x0, 0x4(%rcx)
movl $0x1, %r14d
testb %al, %al
jne 0x809a
incq %r12
cmpq %r12, 0x30(%rsp)
jne 0x7f6e
movq 0x20(%rsp), %rax
cmpl $0x0, 0x4(%rax)
je 0x7f0f
movq 0x20(%rsp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x7f0f
xorl %r14d, %r14d
leaq 0x1a(%rsp), %r15
leaq 0x16(%rsp), %r12
leaq 0x18(%rsp), %r13
leaq 0x1c(%rsp), %rbp
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
movq 0x48(%rsp), %r8
movq %r14, %r9
callq 0x6acd
cmpw $0x0, 0x1c(%rsp)
je 0x813c
movzwl 0x1a(%rsp), %eax
movq 0x20(%rsp), %rcx
cmpw 0x8(%rcx), %ax
jne 0x813c
movzwl 0x16(%rsp), %eax
movq 0x20(%rsp), %rcx
cmpw 0xa(%rcx), %ax
jne 0x813c
movzwl 0x18(%rsp), %eax
movq 0x20(%rsp), %rcx
cmpw 0xc(%rcx), %ax
jne 0x813c
movq 0x20(%rsp), %rax
movl $0x1, 0x10(%rax)
movl $0x0, 0x4(%rax)
incq %r14
cmpq %r14, 0x30(%rsp)
jne 0x80cf
jmp 0x7f0f
movl %eax, %r12d
jmp 0x7f12