// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl -0x14(%rbp), %eax
movl -0x18(%rbp), %ecx
imulq %rcx, %rax
movq %rax, -0xb8(%rbp)
movl $0x0, -0xbc(%rbp)
movq -0x20(%rbp), %rdi
callq 0x6780
movl %eax, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0xc0(%rbp)
movq -0x20(%rbp), %rdi
callq 0x6850
movl %eax, %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0xc4(%rbp)
movl $0x0, -0xc8(%rbp)
movq -0x20(%rbp), %rdi
callq 0x6680
movl %eax, -0xcc(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl $0x1, 0x418(%rcx)
movb %al, -0x10d(%rbp)
jne 0x9d62
cmpl $0x1, -0xcc(%rbp)
sete %al
movb %al, -0x10d(%rbp)
movb -0x10d(%rbp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0xd0(%rbp)
movl $0x0, -0xd4(%rbp)
movl $0x101, -0xd8(%rbp)     # imm = 0x101
cmpl $0x8, -0xcc(%rbp)
ja 0x9dfa
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x114(%rbp)
movl -0xcc(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl -0x114(%rbp), %ecx
addl %eax, %ecx
movl $0x101, %eax            # imm = 0x101
cmpl %ecx, %eax
jae 0x9dd0
movl $0x101, %eax            # imm = 0x101
movl %eax, -0x118(%rbp)
jmp 0x9dee
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl -0xcc(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
addl %ecx, %eax
movl %eax, -0x118(%rbp)
movl -0x118(%rbp), %eax
movl %eax, -0xd8(%rbp)
movq -0xb8(%rbp), %rcx
movq -0x8(%rbp), %rax
addq 0x420(%rax), %rcx
movq %rcx, 0x420(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x428(%rax)
jne 0x9e2a
movl $0x1, -0xc8(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x7c70
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x9e4a
movl $0x1, -0xc4(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
je 0x9e5d
movl $0x1, -0xc0(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x10, 0x418(%rax)
jne 0x9e74
movl $0x1, -0xc8(%rbp)
movq -0x8(%rbp), %rax
movl 0x418(%rax), %eax
cmpl -0xcc(%rbp), %eax
jb 0x9e90
movl $0x1, -0xd0(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
cmpl -0xd8(%rbp), %eax
jb 0x9ea9
movl $0x1, -0xc8(%rbp)
cmpl $0x0, -0xc8(%rbp)
jne 0x9f5e
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x14(%rcx), %ecx
cmpq %rcx, %rax
jae 0x9f5c
movq -0x8(%rbp), %rax
addq $0x18, %rax
movq -0x28(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movb (%rax), %sil
movq -0xe0(%rbp), %rax
movb 0x1(%rax), %dl
movq -0xe0(%rbp), %rax
movb 0x2(%rax), %cl
movq -0xe0(%rbp), %rax
movb 0x3(%rax), %al
movq -0x28(%rbp), %rdi
movl %edi, %r9d
leaq -0xb0(%rbp), %rdi
movzbl %sil, %esi
movzbl %dl, %edx
movzbl %cl, %ecx
movzbl %al, %r8d
callq 0x7ca0
movl %eax, -0xbc(%rbp)
cmpl $0x0, -0xbc(%rbp)
je 0x9f49
jmp 0xa99b
jmp 0x9f4b
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x9ebe
jmp 0x9f5e
movq -0x20(%rbp), %rax
cmpl $0x10, 0x4(%rax)
jne 0xa0aa
cmpl $0x0, -0xd4(%rbp)
jne 0xa0aa
movw $0x0, -0xe2(%rbp)
movw $0x0, -0xe4(%rbp)
movw $0x0, -0xe6(%rbp)
movw $0x0, -0xe8(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0xb8(%rbp), %rax
je 0xa0a8
movq -0x10(%rbp), %r8
movq -0x28(%rbp), %r9
movq -0x20(%rbp), %rax
leaq -0xe2(%rbp), %rdi
leaq -0xe4(%rbp), %rsi
leaq -0xe6(%rbp), %rdx
leaq -0xe8(%rbp), %rcx
movq %rax, (%rsp)
callq 0x7db0
movzwl -0xe2(%rbp), %eax
andl $0xff, %eax
movzwl -0xe2(%rbp), %ecx
sarl $0x8, %ecx
andl $0xff, %ecx
cmpl %ecx, %eax
jne 0xa067
movzwl -0xe4(%rbp), %eax
andl $0xff, %eax
movzwl -0xe4(%rbp), %ecx
sarl $0x8, %ecx
andl $0xff, %ecx
cmpl %ecx, %eax
jne 0xa067
movzwl -0xe6(%rbp), %eax
andl $0xff, %eax
movzwl -0xe6(%rbp), %ecx
sarl $0x8, %ecx
andl $0xff, %ecx
cmpl %ecx, %eax
jne 0xa067
movzwl -0xe8(%rbp), %eax
andl $0xff, %eax
movzwl -0xe8(%rbp), %ecx
sarl $0x8, %ecx
andl $0xff, %ecx
cmpl %ecx, %eax
je 0xa095
movq -0x8(%rbp), %rax
movl $0x10, 0x418(%rax)
movl $0x1, -0xd4(%rbp)
movl $0x1, -0xd0(%rbp)
movl $0x1, -0xc8(%rbp)
jmp 0xa0a8
jmp 0xa097
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x9fa5
jmp 0xa0aa
cmpl $0x0, -0xd4(%rbp)
je 0xa3e5
movw $0x0, -0xea(%rbp)
movw $0x0, -0xec(%rbp)
movw $0x0, -0xee(%rbp)
movw $0x0, -0xf0(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0xb8(%rbp), %rax
je 0xa300
movq -0x10(%rbp), %r8
movq -0x28(%rbp), %r9
movq -0x20(%rbp), %rax
leaq -0xea(%rbp), %rdi
leaq -0xec(%rbp), %rsi
leaq -0xee(%rbp), %rdx
leaq -0xf0(%rbp), %rcx
movq %rax, (%rsp)
callq 0x7db0
cmpl $0x0, -0xc0(%rbp)
jne 0xa166
movzwl -0xea(%rbp), %eax
movzwl -0xec(%rbp), %ecx
cmpl %ecx, %eax
jne 0xa152
movzwl -0xea(%rbp), %eax
movzwl -0xee(%rbp), %ecx
cmpl %ecx, %eax
je 0xa166
movq -0x8(%rbp), %rax
movl $0x1, (%rax)
movl $0x1, -0xc0(%rbp)
cmpl $0x0, -0xc4(%rbp)
jne 0xa2c7
movzwl -0xea(%rbp), %ecx
movq -0x8(%rbp), %rax
movzwl 0x8(%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x119(%rbp)
jne 0xa1c3
movzwl -0xec(%rbp), %ecx
movq -0x8(%rbp), %rax
movzwl 0xa(%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x119(%rbp)
jne 0xa1c3
movzwl -0xee(%rbp), %eax
movq -0x8(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x119(%rbp)
movb -0x119(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xf4(%rbp)
movzwl -0xf0(%rbp), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0xa226
movzwl -0xf0(%rbp), %eax
cmpl $0x0, %eax
jne 0xa201
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0xa226
cmpl $0x0, -0xf4(%rbp)
jne 0xa226
movq -0x8(%rbp), %rax
movl $0x1, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movl $0x1, -0xc4(%rbp)
jmp 0xa2c5
movzwl -0xf0(%rbp), %eax
cmpl $0x0, %eax
jne 0xa280
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0xa280
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0xa280
movq -0x8(%rbp), %rax
movl $0x1, 0x4(%rax)
movw -0xea(%rbp), %cx
movq -0x8(%rbp), %rax
movw %cx, 0x8(%rax)
movw -0xec(%rbp), %cx
movq -0x8(%rbp), %rax
movw %cx, 0xa(%rax)
movw -0xee(%rbp), %cx
movq -0x8(%rbp), %rax
movw %cx, 0xc(%rax)
jmp 0xa2c3
movzwl -0xf0(%rbp), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0xa2c1
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0xa2c1
cmpl $0x0, -0xf4(%rbp)
je 0xa2c1
movq -0x8(%rbp), %rax
movl $0x1, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movl $0x1, -0xc4(%rbp)
jmp 0xa2c3
jmp 0xa2c5
jmp 0xa2c7
cmpl $0x0, -0xc4(%rbp)
je 0xa2ed
cmpl $0x0, -0xc8(%rbp)
je 0xa2ed
cmpl $0x0, -0xc0(%rbp)
je 0xa2ed
cmpl $0x0, -0xd0(%rbp)
je 0xa2ed
jmp 0xa300
jmp 0xa2ef
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xa0e3
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0xa3e0
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0xa3e0
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0xb8(%rbp), %rax
je 0xa3de
movq -0x10(%rbp), %r8
movq -0x28(%rbp), %r9
movq -0x20(%rbp), %rax
leaq -0xea(%rbp), %rdi
leaq -0xec(%rbp), %rsi
leaq -0xee(%rbp), %rdx
leaq -0xf0(%rbp), %rcx
movq %rax, (%rsp)
callq 0x7db0
movzwl -0xf0(%rbp), %eax
cmpl $0x0, %eax
je 0xa3cb
movzwl -0xea(%rbp), %eax
movq -0x8(%rbp), %rcx
movzwl 0x8(%rcx), %ecx
cmpl %ecx, %eax
jne 0xa3cb
movzwl -0xec(%rbp), %eax
movq -0x8(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
cmpl %ecx, %eax
jne 0xa3cb
movzwl -0xee(%rbp), %eax
movq -0x8(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
cmpl %ecx, %eax
jne 0xa3cb
movq -0x8(%rbp), %rax
movl $0x1, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movl $0x1, -0xc4(%rbp)
jmp 0xa3cd
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xa324
jmp 0xa3e0
jmp 0xa999
movb $0x0, -0xf5(%rbp)
movb $0x0, -0xf6(%rbp)
movb $0x0, -0xf7(%rbp)
movb $0x0, -0xf8(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0xb8(%rbp), %rax
je 0xa851
movq -0x10(%rbp), %r8
movq -0x28(%rbp), %r9
movq -0x20(%rbp), %rax
leaq -0xf5(%rbp), %rdi
leaq -0xf6(%rbp), %rsi
leaq -0xf7(%rbp), %rdx
leaq -0xf8(%rbp), %rcx
movq %rax, (%rsp)
callq 0x8ff0
cmpl $0x0, -0xd0(%rbp)
jne 0xa497
movq -0x8(%rbp), %rax
cmpl $0x8, 0x418(%rax)
jae 0xa497
movzbl -0xf5(%rbp), %edi
callq 0xa9c0
movl %eax, -0xfc(%rbp)
movl -0xfc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x418(%rcx), %eax
jbe 0xa495
movl -0xfc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x418(%rax)
jmp 0xa497
movq -0x8(%rbp), %rax
movl 0x418(%rax), %eax
cmpl -0xcc(%rbp), %eax
setae %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xd0(%rbp)
cmpl $0x0, -0xc0(%rbp)
jne 0xa513
movzbl -0xf5(%rbp), %eax
movzbl -0xf6(%rbp), %ecx
cmpl %ecx, %eax
jne 0xa4e2
movzbl -0xf5(%rbp), %eax
movzbl -0xf7(%rbp), %ecx
cmpl %ecx, %eax
je 0xa513
movq -0x8(%rbp), %rax
movl $0x1, (%rax)
movl $0x1, -0xc0(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x8, 0x418(%rax)
jae 0xa511
movq -0x8(%rbp), %rax
movl $0x8, 0x418(%rax)
jmp 0xa513
cmpl $0x0, -0xc4(%rbp)
jne 0xa6b5
movzbl -0xf5(%rbp), %ecx
movq -0x8(%rbp), %rax
movzwl 0x8(%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x11a(%rbp)
jne 0xa570
movzbl -0xf6(%rbp), %ecx
movq -0x8(%rbp), %rax
movzwl 0xa(%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x11a(%rbp)
jne 0xa570
movzbl -0xf7(%rbp), %eax
movq -0x8(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x11a(%rbp)
movb -0x11a(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x100(%rbp)
movzbl -0xf8(%rbp), %eax
cmpl $0xff, %eax
je 0xa5ee
movzbl -0xf8(%rbp), %eax
cmpl $0x0, %eax
jne 0xa5ae
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0xa5ee
cmpl $0x0, -0x100(%rbp)
jne 0xa5ee
movq -0x8(%rbp), %rax
movl $0x1, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movl $0x1, -0xc4(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x8, 0x418(%rax)
jae 0xa5e9
movq -0x8(%rbp), %rax
movl $0x8, 0x418(%rax)
jmp 0xa6b3
movzbl -0xf8(%rbp), %eax
cmpl $0x0, %eax
jne 0xa651
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0xa651
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0xa651
movq -0x8(%rbp), %rax
movl $0x1, 0x4(%rax)
movzbl -0xf5(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x8(%rax)
movzbl -0xf6(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0xa(%rax)
movzbl -0xf7(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0xc(%rax)
jmp 0xa6b1
movzbl -0xf8(%rbp), %eax
cmpl $0xff, %eax
jne 0xa6af
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0xa6af
cmpl $0x0, -0x100(%rbp)
je 0xa6af
movq -0x8(%rbp), %rax
movl $0x1, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movl $0x1, -0xc4(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x8, 0x418(%rax)
jae 0xa6ad
movq -0x8(%rbp), %rax
movl $0x8, 0x418(%rax)
jmp 0xa6af
jmp 0xa6b1
jmp 0xa6b3
jmp 0xa6b5
cmpl $0x0, -0xc8(%rbp)
jne 0xa818
movb -0xf5(%rbp), %dl
movb -0xf6(%rbp), %cl
movb -0xf7(%rbp), %al
leaq -0xb0(%rbp), %rdi
movzbl %dl, %esi
movzbl %cl, %edx
movzbl %al, %ecx
movzbl -0xf8(%rbp), %r8d
callq 0xaa30
cmpl $0x0, %eax
jne 0xa816
movb -0xf5(%rbp), %sil
movb -0xf6(%rbp), %dl
movb -0xf7(%rbp), %cl
movb -0xf8(%rbp), %al
movq -0x8(%rbp), %rdi
movl 0x14(%rdi), %r9d
leaq -0xb0(%rbp), %rdi
movzbl %sil, %esi
movzbl %dl, %edx
movzbl %cl, %ecx
movzbl %al, %r8d
callq 0x7ca0
movl %eax, -0xbc(%rbp)
cmpl $0x0, -0xbc(%rbp)
je 0xa749
jmp 0xa99b
movq -0x8(%rbp), %rax
cmpl $0x100, 0x14(%rax)      # imm = 0x100
jae 0xa7ee
movq -0x8(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x108(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x10c(%rbp)
movb -0xf5(%rbp), %dl
movq -0x108(%rbp), %rax
movl -0x10c(%rbp), %ecx
shll $0x2, %ecx
addl $0x0, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movb -0xf6(%rbp), %dl
movq -0x108(%rbp), %rax
movl -0x10c(%rbp), %ecx
shll $0x2, %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movb -0xf7(%rbp), %dl
movq -0x108(%rbp), %rax
movl -0x10c(%rbp), %ecx
shll $0x2, %ecx
addl $0x2, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movb -0xf8(%rbp), %dl
movq -0x108(%rbp), %rax
movl -0x10c(%rbp), %ecx
shll $0x2, %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
cmpl -0xd8(%rbp), %eax
setae %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xc8(%rbp)
jmp 0xa818
cmpl $0x0, -0xc4(%rbp)
je 0xa83e
cmpl $0x0, -0xc8(%rbp)
je 0xa83e
cmpl $0x0, -0xc0(%rbp)
je 0xa83e
cmpl $0x0, -0xd0(%rbp)
je 0xa83e
jmp 0xa851
jmp 0xa840
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xa409
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0xa94e
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0xa94e
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0xb8(%rbp), %rax
je 0xa94c
movq -0x10(%rbp), %r8
movq -0x28(%rbp), %r9
movq -0x20(%rbp), %rax
leaq -0xf5(%rbp), %rdi
leaq -0xf6(%rbp), %rsi
leaq -0xf7(%rbp), %rdx
leaq -0xf8(%rbp), %rcx
movq %rax, (%rsp)
callq 0x8ff0
movzbl -0xf8(%rbp), %eax
cmpl $0x0, %eax
je 0xa939
movzbl -0xf5(%rbp), %eax
movq -0x8(%rbp), %rcx
movzwl 0x8(%rcx), %ecx
cmpl %ecx, %eax
jne 0xa939
movzbl -0xf6(%rbp), %eax
movq -0x8(%rbp), %rcx
movzwl 0xa(%rcx), %ecx
cmpl %ecx, %eax
jne 0xa939
movzbl -0xf7(%rbp), %eax
movq -0x8(%rbp), %rcx
movzwl 0xc(%rcx), %ecx
cmpl %ecx, %eax
jne 0xa939
movq -0x8(%rbp), %rax
movl $0x1, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movl $0x1, -0xc4(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x8, 0x418(%rax)
jae 0xa937
movq -0x8(%rbp), %rax
movl $0x8, 0x418(%rax)
jmp 0xa939
jmp 0xa93b
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xa875
jmp 0xa94e
movq -0x8(%rbp), %rax
movzwl 0x8(%rax), %edx
shll $0x8, %edx
movq -0x8(%rbp), %rax
movzwl 0x8(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x8(%rax)
movq -0x8(%rbp), %rax
movzwl 0xa(%rax), %edx
shll $0x8, %edx
movq -0x8(%rbp), %rax
movzwl 0xa(%rax), %ecx
addl %edx, %ecx
movw %cx, 0xa(%rax)
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %edx
shll $0x8, %edx
movq -0x8(%rbp), %rax
movzwl 0xc(%rax), %ecx
addl %edx, %ecx
movw %cx, 0xc(%rax)
jmp 0xa99b
leaq -0xb0(%rbp), %rdi
callq 0x98e0
movl -0xbc(%rbp), %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw %cs:(%rax,%rax)