// File: /workspace/github_c_makefile_star2_O2/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: lodepng_encode
unsigned lodepng_encode(unsigned char** out, size_t* outsize,
                        const unsigned char* image, unsigned w, unsigned h,
                        LodePNGState* state) {
  unsigned char* data = 0; /*uncompressed version of the IDAT chunk data*/
  size_t datasize = 0;
  ucvector outv = ucvector_init(NULL, 0);
  LodePNGInfo info;
  const LodePNGInfo* info_png = &state->info_png;

  lodepng_info_init(&info);

  /*provide some proper output values if error will happen*/
  *out = 0;
  *outsize = 0;
  state->error = 0;

  /*check input values validity*/
  if((info_png->color.colortype == LCT_PALETTE || state->encoder.force_palette)
      && (info_png->color.palettesize == 0 || info_png->color.palettesize > 256)) {
    state->error = 68; /*invalid palette size, it is only allowed to be 1-256*/
    goto cleanup;
  }
  if(state->encoder.zlibsettings.btype > 2) {
    state->error = 61; /*error: invalid btype*/
    goto cleanup;
  }
  if(info_png->interlace_method > 1) {
    state->error = 71; /*error: invalid interlace mode*/
    goto cleanup;
  }
  state->error = checkColorValidity(info_png->color.colortype, info_png->color.bitdepth);
  if(state->error) goto cleanup; /*error: invalid color type given*/
  state->error = checkColorValidity(state->info_raw.colortype, state->info_raw.bitdepth);
  if(state->error) goto cleanup; /*error: invalid color type given*/

  /* color convert and compute scanline filter types */
  lodepng_info_copy(&info, &state->info_png);
  if(state->encoder.auto_convert) {
    LodePNGColorStats stats;
    lodepng_color_stats_init(&stats);
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
    if(info_png->iccp_defined &&
        isGrayICCProfile(info_png->iccp_profile, info_png->iccp_profile_size)) {
      /*the PNG specification does not allow to use palette with a GRAY ICC profile, even
      if the palette has only gray colors, so disallow it.*/
      stats.allow_palette = 0;
    }
    if(info_png->iccp_defined &&
        isRGBICCProfile(info_png->iccp_profile, info_png->iccp_profile_size)) {
      /*the PNG specification does not allow to use grayscale color with RGB ICC profile, so disallow gray.*/
      stats.allow_greyscale = 0;
    }
#endif /* LODEPNG_COMPILE_ANCILLARY_CHUNKS */
    state->error = lodepng_compute_color_stats(&stats, image, w, h, &state->info_raw);
    if(state->error) goto cleanup;
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
    if(info_png->background_defined) {
      /*the background chunk's color must be taken into account as well*/
      unsigned r = 0, g = 0, b = 0;
      LodePNGColorMode mode16 = lodepng_color_mode_make(LCT_RGB, 16);
      lodepng_convert_rgb(&r, &g, &b, info_png->background_r, info_png->background_g, info_png->background_b, &mode16, &info_png->color);
      state->error = lodepng_color_stats_add(&stats, r, g, b, 65535);
      if(state->error) goto cleanup;
    }
#endif /* LODEPNG_COMPILE_ANCILLARY_CHUNKS */
    state->error = auto_choose_color(&info.color, &state->info_raw, &stats);
    if(state->error) goto cleanup;
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
    /*also convert the background chunk*/
    if(info_png->background_defined) {
      if(lodepng_convert_rgb(&info.background_r, &info.background_g, &info.background_b,
          info_png->background_r, info_png->background_g, info_png->background_b, &info.color, &info_png->color)) {
        state->error = 104;
        goto cleanup;
      }
    }
#endif /* LODEPNG_COMPILE_ANCILLARY_CHUNKS */
  }
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
  if(info_png->iccp_defined) {
    unsigned gray_icc = isGrayICCProfile(info_png->iccp_profile, info_png->iccp_profile_size);
    unsigned rgb_icc = isRGBICCProfile(info_png->iccp_profile, info_png->iccp_profile_size);
    unsigned gray_png = info.color.colortype == LCT_GREY || info.color.colortype == LCT_GREY_ALPHA;
    if(!gray_icc && !rgb_icc) {
      state->error = 100; /* Disallowed profile color type for PNG */
      goto cleanup;
    }
    if(gray_icc != gray_png) {
      /*Not allowed to use RGB/RGBA/palette with GRAY ICC profile or vice versa,
      or in case of auto_convert, it wasn't possible to find appropriate model*/
      state->error = state->encoder.auto_convert ? 102 : 101;
      goto cleanup;
    }
  }
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
  if(!lodepng_color_mode_equal(&state->info_raw, &info.color)) {
    unsigned char* converted;
    size_t size = ((size_t)w * (size_t)h * (size_t)lodepng_get_bpp(&info.color) + 7u) / 8u;

    converted = (unsigned char*)lodepng_malloc(size);
    if(!converted && size) state->error = 83; /*alloc fail*/
    if(!state->error) {
      state->error = lodepng_convert(converted, image, &info.color, &state->info_raw, w, h);
    }
    if(!state->error) {
      state->error = preProcessScanlines(&data, &datasize, converted, w, h, &info, &state->encoder);
    }
    lodepng_free(converted);
    if(state->error) goto cleanup;
  } else {
    state->error = preProcessScanlines(&data, &datasize, image, w, h, &info, &state->encoder);
    if(state->error) goto cleanup;
  }

  /* output all PNG chunks */ {
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
    size_t i;
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
    /*write signature and chunks*/
    state->error = writeSignature(&outv);
    if(state->error) goto cleanup;
    /*IHDR*/
    state->error = addChunk_IHDR(&outv, w, h, info.color.colortype, info.color.bitdepth, info.interlace_method);
    if(state->error) goto cleanup;
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
    /*unknown chunks between IHDR and PLTE*/
    if(info.unknown_chunks_data[0]) {
      state->error = addUnknownChunks(&outv, info.unknown_chunks_data[0], info.unknown_chunks_size[0]);
      if(state->error) goto cleanup;
    }
    /*color profile chunks must come before PLTE */
    if(info.iccp_defined) {
      state->error = addChunk_iCCP(&outv, &info, &state->encoder.zlibsettings);
      if(state->error) goto cleanup;
    }
    if(info.srgb_defined) {
      state->error = addChunk_sRGB(&outv, &info);
      if(state->error) goto cleanup;
    }
    if(info.gama_defined) {
      state->error = addChunk_gAMA(&outv, &info);
      if(state->error) goto cleanup;
    }
    if(info.chrm_defined) {
      state->error = addChunk_cHRM(&outv, &info);
      if(state->error) goto cleanup;
    }
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
    /*PLTE*/
    if(info.color.colortype == LCT_PALETTE) {
      state->error = addChunk_PLTE(&outv, &info.color);
      if(state->error) goto cleanup;
    }
    if(state->encoder.force_palette && (info.color.colortype == LCT_RGB || info.color.colortype == LCT_RGBA)) {
      /*force_palette means: write suggested palette for truecolor in PLTE chunk*/
      state->error = addChunk_PLTE(&outv, &info.color);
      if(state->error) goto cleanup;
    }
    /*tRNS (this will only add if when necessary) */
    state->error = addChunk_tRNS(&outv, &info.color);
    if(state->error) goto cleanup;
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
    /*bKGD (must come between PLTE and the IDAt chunks*/
    if(info.background_defined) {
      state->error = addChunk_bKGD(&outv, &info);
      if(state->error) goto cleanup;
    }
    /*pHYs (must come before the IDAT chunks)*/
    if(info.phys_defined) {
      state->error = addChunk_pHYs(&outv, &info);
      if(state->error) goto cleanup;
    }

    /*unknown chunks between PLTE and IDAT*/
    if(info.unknown_chunks_data[1]) {
      state->error = addUnknownChunks(&outv, info.unknown_chunks_data[1], info.unknown_chunks_size[1]);
      if(state->error) goto cleanup;
    }
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
    /*IDAT (multiple IDAT chunks must be consecutive)*/
    state->error = addChunk_IDAT(&outv, data, datasize, &state->encoder.zlibsettings);
    if(state->error) goto cleanup;
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
    /*tIME*/
    if(info.time_defined) {
      state->error = addChunk_tIME(&outv, &info.time);
      if(state->error) goto cleanup;
    }
    /*tEXt and/or zTXt*/
    for(i = 0; i != info.text_num; ++i) {
      if(lodepng_strlen(info.text_keys[i]) > 79) {
        state->error = 66; /*text chunk too large*/
        goto cleanup;
      }
      if(lodepng_strlen(info.text_keys[i]) < 1) {
        state->error = 67; /*text chunk too small*/
        goto cleanup;
      }
      if(state->encoder.text_compression) {
        state->error = addChunk_zTXt(&outv, info.text_keys[i], info.text_strings[i], &state->encoder.zlibsettings);
        if(state->error) goto cleanup;
      } else {
        state->error = addChunk_tEXt(&outv, info.text_keys[i], info.text_strings[i]);
        if(state->error) goto cleanup;
      }
    }
    /*LodePNG version id in text chunk*/
    if(state->encoder.add_id) {
      unsigned already_added_id_text = 0;
      for(i = 0; i != info.text_num; ++i) {
        const char* k = info.text_keys[i];
        /* Could use strcmp, but we're not calling or reimplementing this C library function for this use only */
        if(k[0] == 'L' && k[1] == 'o' && k[2] == 'd' && k[3] == 'e' &&
           k[4] == 'P' && k[5] == 'N' && k[6] == 'G' && k[7] == '\0') {
          already_added_id_text = 1;
          break;
        }
      }
      if(already_added_id_text == 0) {
        state->error = addChunk_tEXt(&outv, "LodePNG", LODEPNG_VERSION_STRING); /*it's shorter as tEXt than as zTXt chunk*/
        if(state->error) goto cleanup;
      }
    }
    /*iTXt*/
    for(i = 0; i != info.itext_num; ++i) {
      if(lodepng_strlen(info.itext_keys[i]) > 79) {
        state->error = 66; /*text chunk too large*/
        goto cleanup;
      }
      if(lodepng_strlen(info.itext_keys[i]) < 1) {
        state->error = 67; /*text chunk too small*/
        goto cleanup;
      }
      state->error = addChunk_iTXt(
          &outv, state->encoder.text_compression,
          info.itext_keys[i], info.itext_langtags[i], info.itext_transkeys[i], info.itext_strings[i],
          &state->encoder.zlibsettings);
      if(state->error) goto cleanup;
    }

    /*unknown chunks between IDAT and IEND*/
    if(info.unknown_chunks_data[2]) {
      state->error = addUnknownChunks(&outv, info.unknown_chunks_data[2], info.unknown_chunks_size[2]);
      if(state->error) goto cleanup;
    }
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
    state->error = addChunk_IEND(&outv);
    if(state->error) goto cleanup;
  }

cleanup:
  lodepng_info_cleanup(&info);
  lodepng_free(data);

  /*instead of cleaning the vector up, give it to the output*/
  *out = outv.data;
  *outsize = outv.size;

  return state->error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x648, %rsp            # imm = 0x648
movq %rdx, %r13
movq %r9, %rbx
movq %rsi, %r14
movl %r8d, 0x8(%rsp)
movl %ecx, %r12d
movq %rdi, %r15
andq $0x0, 0x48(%rsp)
andq $0x0, 0x58(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x502e
andq $0x0, (%r15)
andq $0x0, (%r14)
andl $0x0, 0x1f0(%rbx)
movl 0xc8(%rbx), %edi
cmpl $0x3, %edi
je 0x8b7b
cmpl $0x0, 0x80(%rbx)
je 0x8b9d
movq $-0x101, %rax           # imm = 0xFEFF
movq 0xd8(%rbx), %rcx
addq %rax, %rcx
cmpq %rax, %rcx
ja 0x8b9d
movl $0x44, 0x1f0(%rbx)
jmp 0x8bf4
cmpl $0x3, 0x38(%rbx)
jb 0x8baf
movl $0x3d, 0x1f0(%rbx)
jmp 0x8bf4
cmpl $0x2, 0xc0(%rbx)
jb 0x8bc4
movl $0x47, 0x1f0(%rbx)
jmp 0x8bf4
movl 0xcc(%rbx), %esi
callq 0x6faa
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0x8bf4
movl 0x90(%rbx), %edi
movl 0x94(%rbx), %esi
callq 0x6faa
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
je 0x8c33
leaq 0xa0(%rsp), %rdi
callq 0x50c3
movq 0x48(%rsp), %rdi
callq 0x1030
movq 0x20(%rsp), %rax
movq %rax, (%r15)
movq 0x28(%rsp), %rax
movq %rax, (%r14)
movl 0x1f0(%rbx), %eax
addq $0x648, %rsp            # imm = 0x648
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb8(%rbx), %rsi
leaq 0x90(%rbx), %rbp
leaq 0xa0(%rsp), %rdi
callq 0x5118
cmpl $0x0, 0x68(%rbx)
movq %rbp, 0x10(%rsp)
je 0x90c0
andq $0x0, 0x228(%rsp)
andq $0x0, 0x218(%rsp)
andq $0x0, 0x21e(%rsp)
movl $0x1, 0x630(%rsp)
andq $0x0, 0x638(%rsp)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x640(%rsp)
cmpl $0x0, 0x1a0(%rbx)
je 0x8ce7
movq 0x1b0(%rbx), %rdi
movl 0x1b8(%rbx), %ebp
movq %rdi, (%rsp)
movl %ebp, %esi
callq 0x9f09
testl %eax, %eax
je 0x8ccb
andl $0x0, 0x640(%rsp)
movq (%rsp), %rdi
movl %ebp, %esi
callq 0x9f2c
testl %eax, %eax
movq 0x10(%rsp), %rbp
je 0x8ce7
andl $0x0, 0x644(%rsp)
leaq 0x218(%rsp), %rdi
movq %r13, %rsi
movl %r12d, %edx
movl 0x8(%rsp), %ecx
movq %rbp, %r8
callq 0x6505
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0x8bf4
leaq 0xc8(%rbx), %r11
cmpl $0x0, 0xf0(%rbx)
movq %r11, (%rsp)
je 0x8e0a
leaq 0x64(%rsp), %rax
andl $0x0, (%rax)
movq %rax, %rdi
leaq 0x60(%rsp), %rax
andl $0x0, (%rax)
movq %rax, %rsi
leaq 0x214(%rsp), %rbp
andl $0x0, (%rbp)
xorps %xmm0, %xmm0
leaq 0x1d8(%rsp), %rax
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x8(%rax)
movabsq $0x1000000002, %rcx     # imm = 0x1000000002
movq %rcx, (%rax)
movl 0xf4(%rbx), %ecx
movl 0xf8(%rbx), %r8d
movl 0xfc(%rbx), %r9d
movq %rbp, %rdx
pushq %r11
pushq %rax
callq 0x635e
popq %rcx
popq %rdx
leaq 0x64(%rsp), %rax
movl (%rax), %edx
leaq 0x60(%rsp), %rax
movl (%rax), %ecx
movl (%rbp), %eax
leaq 0x70(%rsp), %rdi
movb %dh, 0x68(%rsp)
leaq 0x68(%rsp), %rsi
movb %dl, 0x1(%rsi)
movb %ch, 0x6a(%rsp)
movb %cl, 0x3(%rsi)
movb %ah, 0x6c(%rsp)
movb %al, 0x5(%rsi)
orw $-0x1, 0x6(%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
movabsq $0x1000000006, %rax     # imm = 0x1000000006
movq %rax, (%rdi)
movq %rdi, %r8
leaq 0x218(%rsp), %rdi
pushq $0x1
popq %rcx
movl %ecx, %edx
callq 0x6505
movl %eax, %ebp
leaq 0x70(%rsp), %rdi
callq 0x49b9
movq (%rsp), %r11
movl %ebp, 0x1f0(%rbx)
testl %ebp, %ebp
jne 0x8bf4
movq 0x638(%rsp), %rsi
movl 0x228(%rsp), %r8d
movl 0x218(%rsp), %edi
movl 0x21c(%rsp), %eax
andl $0x0, 0xc8(%rsp)
movl 0x630(%rsp), %r9d
testl %eax, %eax
sete %cl
cmpq $0x11, %rsi
setae %dl
orb %cl, %dl
cmpl $0x9, %r9d
pushq $0x8
popq %rcx
movl %ecx, %r10d
cmovael %r9d, %r10d
testb %dl, %dl
cmovnel %r9d, %r10d
testl %edi, %edi
sete %r9b
cmpl $0x0, 0x644(%rsp)
setne %dil
andb %r9b, %dil
cmpl $0x8, %r10d
cmovael %r10d, %ecx
testb %dil, %dil
cmovnel %r10d, %ecx
movl 0x22c(%rsp), %r9d
cmpq $0x3, %r9
jae 0x8e90
pushq $0x1
jmp 0x8e98
cmpl $0x5, %r9d
jae 0x8e9c
pushq $0x2
popq %r10
jmp 0x8eaf
xorl %r10d, %r10d
cmpl $0x11, %r9d
setae %r10b
leal 0x4(,%r10,4), %r10d
testl %r8d, %r8d
sete %r8b
andb %r8b, %dl
movl %r10d, 0x18(%rsp)
cmpl %r10d, %ecx
setbe %r8b
cmpl $0x0, 0x640(%rsp)
je 0x8fe0
movl %edi, %r10d
andb %dl, %r10b
andb %r8b, %r10b
jne 0x8fe0
leal -0x101(%r9), %r8d
cmpl $0xffffff00, %r8d       # imm = 0xFFFFFF00
jb 0x8fe0
addq %r9, %r9
cmpq %r9, %rsi
jb 0x8fe0
cmpl $0x8, %ecx
ja 0x8fe0
leaq 0xb0(%rsp), %rdi
callq 0x49b9
movq $0x0, 0x40(%rsp)
xorl %ebp, %ebp
movl 0x22c(%rsp), %eax
cmpq %rax, %rbp
je 0x8f69
movzbl 0x230(%rsp,%rbp,4), %esi
movzbl 0x231(%rsp,%rbp,4), %edx
movzbl 0x232(%rsp,%rbp,4), %ecx
movzbl 0x233(%rsp,%rbp,4), %r8d
leaq 0xb0(%rsp), %rdi
callq 0x4a5a
incq %rbp
testl %eax, %eax
je 0x8f23
movq %rax, 0x40(%rsp)
movl $0x3, 0xb0(%rsp)
movl 0x18(%rsp), %ecx
movl %ecx, 0xb4(%rsp)
movq 0x10(%rsp), %rbp
cmpl $0x3, (%rbp)
movq (%rsp), %r11
jne 0x8fc8
movq 0xa0(%rbx), %rax
cmpq 0xc0(%rsp), %rax
jb 0x8fc8
cmpl %ecx, 0x94(%rbx)
jne 0x8fc8
leaq 0xb0(%rsp), %rdi
callq 0x49b9
leaq 0xb0(%rsp), %rdi
movq %rbp, %rsi
callq 0x49cf
movq (%rsp), %r11
movq 0x40(%rsp), %rax
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0x8bf4
jmp 0x9066
cmpq $0x11, %rsi
setae %sil
movl %ecx, 0xb4(%rsp)
xorb $0x1, %dil
movzbl %dil, %edi
leal 0x4(,%rdi,2), %r8d
addl %edi, %edi
testb %dl, %dl
cmovel %r8d, %edi
movl %edi, 0xb0(%rsp)
testl %eax, %eax
setne %al
andb %sil, %al
cmpb $0x1, %al
jne 0x905f
pushq $-0x1
popq %rax
shll %cl, %eax
notl %eax
movzwl 0x220(%rsp), %ecx
andl %eax, %ecx
movl %ecx, 0xcc(%rsp)
movzwl 0x222(%rsp), %ecx
andl %eax, %ecx
movl %ecx, 0xd0(%rsp)
movzwl 0x224(%rsp), %ecx
andl %eax, %ecx
movl %ecx, 0xd4(%rsp)
movl $0x1, 0xc8(%rsp)
andl $0x0, 0x1f0(%rbx)
cmpl $0x0, 0xf0(%rbx)
je 0x90c0
leaq 0xdc(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
leaq 0xe4(%rsp), %rdx
movl 0xf4(%rbx), %ecx
movl 0xf8(%rbx), %r8d
movl 0xfc(%rbx), %r9d
pushq %r11
leaq 0xb8(%rsp), %rax
pushq %rax
callq 0x635e
popq %rcx
popq %rdx
testl %eax, %eax
je 0x90c0
movl $0x68, 0x1f0(%rbx)
jmp 0x8bf4
cmpl $0x0, 0x1a0(%rbx)
je 0x9114
movq 0x1b0(%rbx), %rbp
movl 0x1b8(%rbx), %esi
movl %esi, (%rsp)
movq %rbp, %rdi
callq 0x9f09
movl %eax, 0x18(%rsp)
movq %rbp, %rdi
movl (%rsp), %esi
callq 0x9f2c
movl 0x18(%rsp), %ecx
orl %ecx, %eax
je 0x92d7
xorl %eax, %eax
testl $0xfffffffb, 0xb0(%rsp) # imm = 0xFFFFFFFB
sete %al
cmpl %eax, %ecx
jne 0x933e
leaq 0x38(%rbx), %rbp
leaq 0xb0(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x5dcc
testl %eax, %eax
je 0x92e6
subq $0x8, %rsp
leaq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0xa8(%rsp), %r9
movq %r13, %rdx
movl %r12d, %ecx
movl 0x10(%rsp), %r8d
pushq %rbp
callq 0x9f4f
popq %rcx
popq %rdx
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0x8bf4
movabsq $0xa1a0a0d474e5089, %rax # imm = 0xA1A0A0D474E5089
movq %rax, 0x218(%rsp)
leaq 0x20(%rsp), %rdi
pushq $0x8
popq %rsi
callq 0xa6f2
testl %eax, %eax
je 0x9399
movq %rbp, 0x18(%rsp)
leaq 0x20(%rsp), %r13
movq (%r13), %rdi
leaq 0x218(%rsp), %rsi
pushq $0x8
popq %rdx
callq 0x4a33
andl $0x0, 0x1f0(%rbx)
movl 0xa8(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0xb0(%rsp), %eax
movl %eax, (%rsp)
movl 0xb4(%rsp), %ebp
leaq 0x69c0(%rip), %rcx      # 0xfb98
leaq 0x218(%rsp), %rdi
pushq $0xd
popq %rdx
movq %r13, %rsi
callq 0xb5d9
testl %eax, %eax
jne 0x9348
movq 0x218(%rsp), %rdi
movl %r12d, %ecx
movl %r12d, %eax
shrl $0x18, %eax
movb %al, 0x8(%rdi)
movl %r12d, %eax
shrl $0x10, %eax
movb %al, 0x9(%rdi)
movb %ch, 0xa(%rdi)
movb %cl, 0xb(%rdi)
movl 0x8(%rsp), %ecx
movl %ecx, %eax
shrl $0x18, %eax
movb %al, 0xc(%rdi)
movl %ecx, %eax
shrl $0x10, %eax
movb %al, 0xd(%rdi)
movb %ch, 0xe(%rdi)
movb %cl, 0xf(%rdi)
movb %bpl, 0x10(%rdi)
movl (%rsp), %eax
movb %al, 0x11(%rdi)
andw $0x0, 0x12(%rdi)
movl 0x10(%rsp), %eax
movb %al, 0x14(%rdi)
callq 0x46f3
andl $0x0, 0x1f0(%rbx)
movq 0x1a8(%rsp), %rsi
testq %rsi, %rsi
movq 0x18(%rsp), %r12
je 0x9284
movq 0x1c0(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0xa438
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0x8bf4
cmpl $0x0, 0x188(%rsp)
je 0x9469
andq $0x0, 0x218(%rsp)
andq $0x0, 0x70(%rsp)
andq $0x0, 0x1d8(%rsp)
movq 0x190(%rsp), %rdi
callq 0x4681
movq %rax, %r13
addq $-0x50, %rax
cmpq $-0x50, %rax
ja 0x93f8
movl $0x59, 0x1f0(%rbx)
jmp 0x8bf4
movl $0x64, 0x1f0(%rbx)
jmp 0x8bf4
movq %rbp, 0x18(%rsp)
movl %r12d, %eax
movl 0x8(%rsp), %ecx
imulq %rax, %rcx
movq %rcx, (%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x4b2b
movl %eax, %ebp
imulq (%rsp), %rbp
addq $0x7, %rbp
movq %rbp, %rdi
shrq $0x3, %rdi
callq 0x1130
movq %rax, %rdx
testq %rax, %rax
setne %al
cmpq $0x8, %rbp
setb %cl
orb %al, %cl
jne 0x9353
movl $0x53, 0x1f0(%rbx)
jmp 0x938c
cmpl $0x1, 0x68(%rbx)
pushq $0x66
popq %rax
sbbl $0x0, %eax
movl %eax, 0x1f0(%rbx)
jmp 0x8bf4
cmpl $0x0, 0x1f0(%rbx)
jne 0x938c
movq %rdx, %rdi
movq %r13, %rsi
movq %rdx, %r13
leaq 0xb0(%rsp), %rdx
movq 0x10(%rsp), %rcx
movl %r12d, %r8d
movl 0x8(%rsp), %r9d
callq 0x52bb
movq %r13, %rdx
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
je 0x93a8
movq %rdx, %rdi
callq 0x1030
jmp 0x8bf4
movl $0x53, 0x1f0(%rbx)
jmp 0x8bf4
subq $0x8, %rsp
leaq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0xa8(%rsp), %r9
movq %rdx, 0x8(%rsp)
movl %r12d, %ecx
movl 0x10(%rsp), %r8d
movq 0x20(%rsp), %rbp
pushq %rbp
callq 0x9f4f
popq %rcx
popq %rdx
movl %eax, %r13d
movl %eax, 0x1f0(%rbx)
movq (%rsp), %rdi
callq 0x1030
testl %r13d, %r13d
jne 0x8bf4
jmp 0x9169
movq 0x198(%rsp), %rdx
movl 0x1a0(%rsp), %ecx
leaq 0x70(%rsp), %rdi
leaq 0x1d8(%rsp), %rsi
movq %r12, %r8
callq 0xc9a9
testl %eax, %eax
jne 0x944f
movl 0x1d8(%rsp), %eax
leal (%rax,%r13), %edx
addl $0x2, %edx
leaq 0x679f(%rip), %rcx      # 0xfbd4
leaq 0x218(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0xb5d9
testl %eax, %eax
je 0x969a
movl %eax, %ebp
movq 0x70(%rsp), %rdi
callq 0x1030
movl %ebp, 0x1f0(%rbx)
testl %ebp, %ebp
jne 0x8bf4
cmpl $0x0, 0x180(%rsp)
je 0x94a6
movb 0x184(%rsp), %al
leaq 0x218(%rsp), %rcx
movb %al, (%rcx)
leaq 0x6744(%rip), %rdx      # 0xfbcf
leaq 0x20(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x494f
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0x8bf4
cmpl $0x0, 0x154(%rsp)
je 0x94f4
leaq 0x670e(%rip), %rcx      # 0xfbc5
leaq 0x218(%rsp), %rdi
leaq 0x20(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0xb5d9
testl %eax, %eax
jne 0x9348
movq 0x218(%rsp), %rdi
movl 0x158(%rsp), %eax
bswapl %eax
movl %eax, 0x8(%rdi)
callq 0x46f3
andl $0x0, 0x1f0(%rbx)
cmpl $0x0, 0x15c(%rsp)
je 0x959a
leaq 0x66c1(%rip), %rcx      # 0xfbca
leaq 0x218(%rsp), %rdi
leaq 0x20(%rsp), %rsi
pushq $0x20
popq %rdx
callq 0xb5d9
testl %eax, %eax
jne 0x9348
movq 0x218(%rsp), %rdi
movl 0x160(%rsp), %eax
bswapl %eax
movl %eax, 0x8(%rdi)
movl 0x164(%rsp), %eax
bswapl %eax
movl %eax, 0xc(%rdi)
movl 0x168(%rsp), %eax
bswapl %eax
movl %eax, 0x10(%rdi)
movl 0x16c(%rsp), %eax
bswapl %eax
movl %eax, 0x14(%rdi)
movl 0x170(%rsp), %eax
bswapl %eax
movl %eax, 0x18(%rdi)
movl 0x174(%rsp), %eax
bswapl %eax
movl %eax, 0x1c(%rdi)
movl 0x178(%rsp), %eax
bswapl %eax
movl %eax, 0x20(%rdi)
movl 0x17c(%rsp), %eax
bswapl %eax
movl %eax, 0x24(%rdi)
callq 0x46f3
andl $0x0, 0x1f0(%rbx)
movl 0xb0(%rsp), %eax
cmpl $0x3, %eax
jne 0x95cd
leaq 0x20(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0xa49d
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0x8bf4
movl 0xb0(%rsp), %eax
cmpl $0x0, 0x80(%rbx)
je 0x9607
movl %eax, %ecx
andl $-0x5, %ecx
cmpl $0x2, %ecx
jne 0x9607
leaq 0x20(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0xa49d
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0x8bf4
movl 0xb0(%rsp), %eax
andq $0x0, 0x218(%rsp)
testl %eax, %eax
je 0x975f
cmpl $0x2, %eax
je 0x96e7
cmpl $0x3, %eax
jne 0x97b5
movq 0xb8(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq %rcx, %r12
subq $0x1, %rcx
jb 0x97b5
cmpb $-0x1, 0x3(%rax,%rcx,4)
je 0x963a
leaq 0x654d(%rip), %rcx      # 0xfba2
leaq 0x218(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl %r12d, %edx
callq 0xb5d9
testl %eax, %eax
jne 0x9348
movq 0x218(%rsp), %rdi
xorl %eax, %eax
cmpq %rax, %r12
je 0x97ab
movq 0xb8(%rsp), %rcx
movb 0x3(%rcx,%rax,4), %cl
movb %cl, 0x8(%rdi,%rax)
incq %rax
jmp 0x967c
movq 0x218(%rsp), %r12
leaq 0x8(%r12), %rdi
movq 0x190(%rsp), %rsi
movq %r13, %rdx
callq 0x4a33
andw $0x0, 0x8(%r12,%r13)
leaq (%r12,%r13), %rdi
addq $0xa, %rdi
movq 0x70(%rsp), %rsi
movq 0x1d8(%rsp), %rdx
callq 0x4a33
movq %r12, %rdi
callq 0x46f3
xorl %ebp, %ebp
jmp 0x9451
cmpl $0x0, 0xc8(%rsp)
je 0x97b5
leaq 0x64a6(%rip), %rcx      # 0xfba2
leaq 0x218(%rsp), %rdi
leaq 0x20(%rsp), %rsi
pushq $0x6
popq %rdx
callq 0xb5d9
testl %eax, %eax
jne 0x9348
movb 0xcd(%rsp), %al
movq 0x218(%rsp), %rdi
movb %al, 0x8(%rdi)
movb 0xcc(%rsp), %al
movb %al, 0x9(%rdi)
movb 0xd1(%rsp), %al
movb %al, 0xa(%rdi)
movb 0xd0(%rsp), %al
movb %al, 0xb(%rdi)
movb 0xd5(%rsp), %al
movb %al, 0xc(%rdi)
movb 0xd4(%rsp), %al
movb %al, 0xd(%rdi)
jmp 0x97b0
cmpl $0x0, 0xc8(%rsp)
je 0x97b5
leaq 0x6432(%rip), %rcx      # 0xfba2
leaq 0x218(%rsp), %rdi
leaq 0x20(%rsp), %rsi
pushq $0x2
popq %rdx
callq 0xb5d9
testl %eax, %eax
jne 0x9348
movb 0xcd(%rsp), %al
movq 0x218(%rsp), %rdi
movb %al, 0x8(%rdi)
movb 0xcc(%rsp), %al
movb %al, 0x9(%rdi)
jmp 0x97b0
testq %rdi, %rdi
je 0x97b5
callq 0x46f3
andl $0x0, 0x1f0(%rbx)
cmpl $0x0, 0xd8(%rsp)
je 0x98e5
andq $0x0, 0x218(%rsp)
movl 0xb0(%rsp), %eax
cmpq $0x6, %rax
ja 0x98de
leaq 0x5a59(%rip), %rcx      # 0xf244
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x63ac(%rip), %rcx      # 0xfba7
leaq 0x218(%rsp), %rdi
leaq 0x20(%rsp), %rsi
pushq $0x2
popq %rdx
callq 0xb5d9
testl %eax, %eax
jne 0x9348
movb 0xdd(%rsp), %al
movq 0x218(%rsp), %rdi
movb %al, 0x8(%rdi)
movb 0xdc(%rsp), %al
movb %al, 0x9(%rdi)
jmp 0x98d9
leaq 0x6367(%rip), %rcx      # 0xfba7
leaq 0x218(%rsp), %rdi
leaq 0x20(%rsp), %rsi
pushq $0x6
popq %rdx
callq 0xb5d9
testl %eax, %eax
jne 0x9348
movb 0xdd(%rsp), %al
movq 0x218(%rsp), %rdi
movb %al, 0x8(%rdi)
movb 0xdc(%rsp), %al
movb %al, 0x9(%rdi)
movb 0xe1(%rsp), %al
movb %al, 0xa(%rdi)
movb 0xe0(%rsp), %al
movb %al, 0xb(%rdi)
movb 0xe5(%rsp), %al
movb %al, 0xc(%rdi)
movb 0xe4(%rsp), %al
movb %al, 0xd(%rdi)
jmp 0x98d9
leaq 0x62fd(%rip), %rcx      # 0xfba7
leaq 0x218(%rsp), %rdi
leaq 0x20(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0xb5d9
testl %eax, %eax
jne 0x9348
movb 0xdc(%rsp), %al
movq 0x218(%rsp), %rdi
movb %al, 0x8(%rdi)
callq 0x46f3
andl $0x0, 0x1f0(%rbx)
cmpl $0x0, 0x144(%rsp)
je 0x9949
leaq 0x62ca(%rip), %rcx      # 0xfbc0
leaq 0x218(%rsp), %rdi
leaq 0x20(%rsp), %rsi
pushq $0x9
popq %rdx
callq 0xb5d9
testl %eax, %eax
jne 0x9348
movq 0x218(%rsp), %rdi
movl 0x148(%rsp), %eax
bswapl %eax
movl %eax, 0x8(%rdi)
movl 0x14c(%rsp), %eax
bswapl %eax
movl %eax, 0xc(%rdi)
movb 0x150(%rsp), %al
movb %al, 0x10(%rdi)
callq 0x46f3
andl $0x0, 0x1f0(%rbx)
movq 0x1b0(%rsp), %rsi
testq %rsi, %rsi
movq 0x18(%rsp), %r12
je 0x997b
movq 0x1c8(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0xa438
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0x8bf4
movq 0x48(%rsp), %rdx
movq 0x58(%rsp), %rcx
leaq 0x218(%rsp), %rdi
andq $0x0, (%rdi)
leaq 0x70(%rsp), %rsi
andq $0x0, (%rsi)
movq %r12, %r8
callq 0xc9a9
movl %eax, %ebp
testl %eax, %eax
jne 0x99c7
movl 0x70(%rsp), %esi
movq 0x218(%rsp), %rcx
leaq 0x73f9(%rip), %rdx      # 0x10db4
leaq 0x20(%rsp), %rdi
callq 0x494f
movl %eax, %ebp
movq 0x218(%rsp), %rdi
callq 0x1030
movl %ebp, 0x1f0(%rbx)
testl %ebp, %ebp
jne 0x8bf4
cmpl $0x0, 0x128(%rsp)
je 0x9a6a
leaq 0x61c8(%rip), %rcx      # 0xfbbb
leaq 0x218(%rsp), %rdi
leaq 0x20(%rsp), %rsi
pushq $0x7
popq %rdx
callq 0xb5d9
testl %eax, %eax
jne 0x9348
movb 0x12d(%rsp), %al
movq 0x218(%rsp), %rdi
movb %al, 0x8(%rdi)
movb 0x12c(%rsp), %al
movb %al, 0x9(%rdi)
movb 0x130(%rsp), %al
movb %al, 0xa(%rdi)
movb 0x134(%rsp), %al
movb %al, 0xb(%rdi)
movb 0x138(%rsp), %al
movb %al, 0xc(%rdi)
movb 0x13c(%rsp), %al
movb %al, 0xd(%rdi)
movb 0x140(%rsp), %al
movb %al, 0xe(%rdi)
callq 0x46f3
andl $0x0, 0x1f0(%rbx)
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq 0xe8(%rsp), %rax
je 0x9bed
movq 0xf0(%rsp), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %r12
movq %r12, %rdi
callq 0x4681
cmpq $0x50, %rax
jae 0x9ea4
testq %rax, %rax
je 0x9eb3
cmpl $0x0, 0x88(%rbx)
movq 0xf8(%rsp), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rbp
je 0x9b79
andq $0x0, 0x218(%rsp)
andq $0x0, 0x70(%rsp)
andq $0x0, 0x1d8(%rsp)
movq %rbp, %rdi
callq 0x4681
movq %rax, %r13
movq %r12, %rdi
callq 0x4681
movq %rax, 0x10(%rsp)
addq $-0x50, %rax
cmpq $-0x50, %rax
jbe 0x92c8
leaq 0x70(%rsp), %rdi
leaq 0x1d8(%rsp), %rsi
movq %rbp, %rdx
movq %r13, %rcx
movq 0x18(%rsp), %r8
callq 0xc9a9
testl %eax, %eax
jne 0x9b5e
movl 0x1d8(%rsp), %eax
movq 0x10(%rsp), %rcx
leal (%rcx,%rax), %edx
addl $0x2, %edx
leaq 0x218(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x605c(%rip), %rcx      # 0xfbb1
callq 0xb5d9
testl %eax, %eax
je 0x9ba1
movl %eax, %ebp
movq 0x70(%rsp), %rdi
callq 0x1030
movl %ebp, 0x1f0(%rbx)
testl %ebp, %ebp
je 0x9b97
jmp 0x8bf4
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0xa507
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0x8bf4
incq 0x8(%rsp)
jmp 0x9a73
movq 0x218(%rsp), %r13
leaq 0x8(%r13), %rdi
movq %r12, %rsi
movq 0x10(%rsp), %r12
movq %r12, %rdx
callq 0x4a33
andw $0x0, 0x8(%r13,%r12)
leaq (%r12,%r13), %rdi
addq $0xa, %rdi
movq 0x70(%rsp), %rsi
movq 0x1d8(%rsp), %rdx
callq 0x4a33
movq %r13, %rdi
callq 0x46f3
xorl %ebp, %ebp
jmp 0x9b60
cmpl $0x0, 0x84(%rbx)
je 0x9c65
movq 0xf0(%rsp), %rax
xorl %ecx, %ecx
cmpq %rcx, 0x8(%rsp)
je 0x9c3f
movq (%rax,%rcx,8), %rdx
cmpb $0x4c, (%rdx)
jne 0x9c3a
cmpb $0x6f, 0x1(%rdx)
jne 0x9c3a
cmpb $0x64, 0x2(%rdx)
jne 0x9c3a
cmpb $0x65, 0x3(%rdx)
jne 0x9c3a
cmpb $0x50, 0x4(%rdx)
jne 0x9c3a
cmpb $0x4e, 0x5(%rdx)
jne 0x9c3a
cmpb $0x47, 0x6(%rdx)
jne 0x9c3a
cmpb $0x0, 0x7(%rdx)
je 0x9c65
incq %rcx
jmp 0x9c00
movq 0xd4ca(%rip), %rdx      # 0x17110
leaq 0x5f8c(%rip), %rsi      # 0xfbd9
leaq 0x20(%rsp), %rdi
callq 0xa507
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0x8bf4
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq 0x100(%rsp), %rax
je 0x9ec2
movq 0x108(%rsp), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq %rdi, 0x40(%rsp)
callq 0x4681
cmpq $0x50, %rax
jae 0x9ea4
testq %rax, %rax
je 0x9eb3
movl 0x88(%rbx), %eax
movl %eax, (%rsp)
movq 0x110(%rsp), %rax
movq 0x118(%rsp), %rcx
movq 0x8(%rsp), %rdx
movq (%rax,%rdx,8), %r13
movq (%rcx,%rdx,8), %r12
movq 0x120(%rsp), %rax
movq (%rax,%rdx,8), %rdi
andq $0x0, 0x218(%rsp)
andq $0x0, 0x70(%rsp)
andq $0x0, 0x1d8(%rsp)
movq %rdi, 0x98(%rsp)
callq 0x4681
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %rdi
callq 0x4681
movq %rax, %rbp
movq %r13, 0x200(%rsp)
movq %r13, %rdi
callq 0x4681
movq %rax, 0x50(%rsp)
movq %r12, 0x208(%rsp)
movq %r12, %rdi
callq 0x4681
movq %rax, %r13
leaq -0x50(%rbp), %rax
cmpq $-0x50, %rax
jbe 0x92c8
movq 0x10(%rsp), %rax
cmpl $0x0, (%rsp)
je 0x9d89
leaq 0x70(%rsp), %rdi
leaq 0x1d8(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %r8
callq 0xc9a9
testl %eax, %eax
jne 0x9db4
movq 0x1d8(%rsp), %rax
movq 0x50(%rsp), %rcx
addl %ebp, %ecx
addl %r13d, %ecx
leal 0x5(%rax,%rcx), %edx
leaq 0x218(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x5e0b(%rip), %rcx      # 0xfbb6
callq 0xb5d9
testl %eax, %eax
je 0x9dbc
movl %eax, %r12d
jmp 0x9e80
movq 0x218(%rsp), %r12
leaq 0x8(%r12), %rdi
movq 0x40(%rsp), %rsi
movq %rbp, %rdx
callq 0x4a33
cmpl $0x0, (%rsp)
movl $0x0, %eax
movb %al, 0x8(%r12,%rbp)
setne 0x9(%r12,%rbp)
movb %al, 0xa(%r12,%rbp)
leaq (%r12,%rbp), %rdi
addq $0xb, %rdi
movq 0x200(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x4a33
movq 0x50(%rsp), %rax
addq %rbp, %rax
addq $0xb, %rax
leaq (%r12,%rax), %rbp
movq %r12, 0x40(%rsp)
leaq (%r12,%rax), %rdi
incq %rdi
xorl %r12d, %r12d
movb %r12b, -0x1(%rdi)
movq 0x208(%rsp), %rsi
movq %r13, %rdx
callq 0x4a33
movb %r12b, 0x1(%r13,%rbp)
leaq 0x2(,%rbp), %rdi
addq %r13, %rdi
cmpl $0x0, (%rsp)
je 0x9e61
movq 0x70(%rsp), %rsi
movq 0x1d8(%rsp), %rdx
jmp 0x9e6e
movq 0x98(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x4a33
movq 0x40(%rsp), %rdi
callq 0x46f3
xorl %r12d, %r12d
movq 0x70(%rsp), %rdi
callq 0x1030
movl %r12d, 0x1f0(%rbx)
incq 0x8(%rsp)
testl %r12d, %r12d
je 0x9c6e
jmp 0x8bf4
movl $0x42, 0x1f0(%rbx)
jmp 0x8bf4
movl $0x43, 0x1f0(%rbx)
jmp 0x8bf4
movq 0x1b8(%rsp), %rsi
testq %rsi, %rsi
je 0x9eef
movq 0x1d0(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0xa438
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0x8bf4
leaq 0x6ec3(%rip), %rdx      # 0x10db9
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x494f
jmp 0x9348