// File: /workspace/github_c_makefile_star2_O3/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 $0x5f8, %rsp            # imm = 0x5F8
movq %r9, %rbx
movl %r8d, %ebp
movl %ecx, %r12d
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r15
xorl %eax, %eax
movq %rax, 0x48(%rsp)
movq %rax, 0x50(%rsp)
movq %rax, 0x30(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movups %xmm0, 0x90(%rsp)
movabsq $0x800000006, %rcx      # imm = 0x800000006
movq %rcx, 0x78(%rsp)
movups %xmm0, 0x80(%rsp)
movl %eax, 0x70(%rsp)
movq %rax, 0x68(%rsp)
movl %eax, 0x10c(%rsp)
movl %eax, 0x11c(%rsp)
movl %eax, 0x124(%rsp)
movl %eax, 0x148(%rsp)
movl %eax, 0x150(%rsp)
movups %xmm0, 0x170(%rsp)
movups %xmm0, 0x180(%rsp)
movups %xmm0, 0x190(%rsp)
movups %xmm0, 0xa0(%rsp)
movups %xmm0, 0xb0(%rsp)
movups %xmm0, 0xc0(%rsp)
movups %xmm0, 0xd0(%rsp)
movups %xmm0, 0xe0(%rsp)
movl %eax, 0xf0(%rsp)
movups %xmm0, 0x158(%rsp)
movq %rax, (%rdi)
movq %rax, (%rsi)
movl %eax, 0x1f0(%r9)
movl 0xc8(%r9), %edi
cmpl $0x3, %edi
je 0xa45c
cmpl $0x0, 0x80(%rbx)
je 0xa47e
movq $-0x101, %rax           # imm = 0xFEFF
movq 0xd8(%rbx), %rcx
addq %rax, %rcx
cmpq %rax, %rcx
ja 0xa47e
movl $0x44, 0x1f0(%rbx)
jmp 0xa4d5
cmpl $0x3, 0x38(%rbx)
jb 0xa490
movl $0x3d, 0x1f0(%rbx)
jmp 0xa4d5
cmpl $0x2, 0xc0(%rbx)
jb 0xa4a5
movl $0x47, 0x1f0(%rbx)
jmp 0xa4d5
movl 0xcc(%rbx), %esi
callq 0x843a
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
movl 0x90(%rbx), %edi
movl 0x94(%rbx), %esi
callq 0x843a
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
je 0xa511
leaq 0x68(%rsp), %rdi
callq 0x6198
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 $0x5f8, %rsp            # imm = 0x5F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb8(%rbx), %rsi
leaq 0x90(%rbx), %rax
movq %rax, 0x40(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x621d
cmpl $0x0, 0x68(%rbx)
je 0xa72e
xorl %eax, %eax
movq %rax, 0x1d8(%rsp)
movq %rax, 0x1c8(%rsp)
movq %rax, 0x1ce(%rsp)
movl $0x1, 0x5e0(%rsp)
movq %rax, 0x5e8(%rsp)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x5f0(%rsp)
cmpl $0x0, 0x1a0(%rbx)
movq 0x40(%rsp), %r8
je 0xa5db
cmpl $0x14, 0x1b8(%rbx)
jb 0xa5db
movq 0x1b0(%rbx), %rax
cmpb $0x47, 0x10(%rax)
jne 0xa5b8
cmpb $0x52, 0x11(%rax)
jne 0xa5b8
cmpb $0x41, 0x12(%rax)
jne 0xa5b8
cmpb $0x59, 0x13(%rax)
jne 0xa5b8
movl $0x0, 0x5f0(%rsp)
cmpb $0x52, 0x10(%rax)
jne 0xa5db
cmpb $0x47, 0x11(%rax)
jne 0xa5db
cmpb $0x42, 0x12(%rax)
jne 0xa5db
cmpb $0x20, 0x13(%rax)
jne 0xa5db
movl $0x0, 0x5f4(%rsp)
leaq 0x1c8(%rsp), %rdi
movq %r13, %rsi
movl %r12d, %edx
movl %ebp, %ecx
callq 0x77de
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
leaq 0xc8(%rbx), %r10
cmpl $0x0, 0xf0(%rbx)
movq %r10, 0x10(%rsp)
je 0xa6a9
xorl %eax, %eax
leaq 0x64(%rsp), %rcx
movl %eax, (%rcx)
movq %rcx, %rdi
leaq 0x60(%rsp), %rcx
movl %eax, (%rcx)
movq %rcx, %rsi
leaq 0x5c(%rsp), %rcx
movl %eax, (%rcx)
movq %rcx, %rdx
xorps %xmm0, %xmm0
leaq 0x1a0(%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 %r10, 0x8(%rsp)
movq %rax, (%rsp)
callq 0x762d
leaq 0x64(%rsp), %rax
movl (%rax), %esi
leaq 0x60(%rsp), %rax
movl (%rax), %edx
leaq 0x5c(%rsp), %rax
movl (%rax), %ecx
leaq 0x1c8(%rsp), %rdi
callq 0xadfd
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
leaq 0x1c8(%rsp), %rdx
leaq 0x78(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0xae56
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
cmpl $0x0, 0xf0(%rbx)
je 0xa72e
leaq 0xa4(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0xac(%rsp), %rdx
movl 0xf4(%rbx), %ecx
movl 0xf8(%rbx), %r8d
movl 0xfc(%rbx), %r9d
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x78(%rsp), %rax
movq %rax, (%rsp)
callq 0x762d
testl %eax, %eax
je 0xa72e
movl $0x68, 0x1f0(%rbx)
jmp 0xa4d5
cmpl $0x0, 0x1a0(%rbx)
movq 0x40(%rsp), %rdi
je 0xa7c7
xorl %eax, %eax
cmpl $0x14, 0x1b8(%rbx)
movl $0x0, %edx
jb 0xa79b
movq 0x1b0(%rbx), %rcx
movzbl 0x10(%rcx), %esi
xorl %eax, %eax
cmpl $0x52, %esi
je 0xa782
cmpl $0x47, %esi
jne 0xa79b
xorl %eax, %eax
cmpb $0x52, 0x11(%rcx)
jne 0xa79b
xorl %eax, %eax
cmpb $0x41, 0x12(%rcx)
jne 0xa79b
xorl %eax, %eax
cmpb $0x59, 0x13(%rcx)
sete %al
jmp 0xa799
cmpb $0x47, 0x11(%rcx)
jne 0xa79b
xorl %eax, %eax
cmpb $0x42, 0x12(%rcx)
jne 0xa799
cmpb $0x20, 0x13(%rcx)
sete %dl
jmp 0xa79b
xorl %edx, %edx
testl %eax, %eax
jne 0xa7b2
testb %dl, %dl
jne 0xa7b2
movl $0x64, 0x1f0(%rbx)
jmp 0xa4d5
xorl %ecx, %ecx
testl $0xfffffffb, 0x78(%rsp) # imm = 0xFFFFFFFB
sete %cl
cmpl %ecx, %eax
jne 0xac0c
leaq 0x38(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x78(%rsp), %rsi
callq 0x698e
testl %eax, %eax
je 0xabab
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x68(%rsp), %r9
movq %r13, %rdx
movl %r12d, %ecx
movl %ebp, %r8d
callq 0xb066
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
movl $0x8, %r13d
movl $0x8, %edi
callq 0x1140
testq %rax, %rax
je 0xac62
leaq 0x20(%rsp), %rdi
movq %r13, 0x10(%rdi)
movq %rax, (%rdi)
movq %r13, 0x8(%rdi)
movabsq $0xa1a0a0d474e5089, %rcx # imm = 0xA1A0A0D474E5089
movq %rcx, (%rax)
movl $0x0, 0x1f0(%rbx)
movl 0x70(%rsp), %r9d
movl 0x78(%rsp), %ecx
movl 0x7c(%rsp), %r8d
movl %r12d, %esi
movl %ebp, %edx
callq 0xb60d
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
movq 0x170(%rsp), %rsi
testq %rsi, %rsi
je 0xa8a9
movq 0x188(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0xb6a1
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
cmpl $0x0, 0x150(%rsp)
je 0xa8d5
leaq 0x20(%rsp), %rdi
leaq 0x68(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0xb70a
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
cmpl $0x0, 0x148(%rsp)
je 0xa914
movb 0x14c(%rsp), %al
leaq 0x1c8(%rsp), %rcx
movb %al, (%rcx)
leaq 0x83c8(%rip), %rdx      # 0x12cbf
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x5962
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
cmpl $0x0, 0x11c(%rsp)
je 0xa93b
leaq 0x20(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0xb806
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
cmpl $0x0, 0x124(%rsp)
je 0xa962
leaq 0x20(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0xb846
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
cmpl $0x3, 0x78(%rsp)
jne 0xa986
leaq 0x20(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0xb8d3
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
cmpl $0x0, 0x80(%rbx)
je 0xa9b8
movl 0x78(%rsp), %eax
andl $-0x5, %eax
cmpl $0x2, %eax
jne 0xa9b8
leaq 0x20(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0xb8d3
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
leaq 0x20(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0xb944
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
cmpl $0x0, 0xa0(%rsp)
je 0xa9fc
leaq 0x20(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0xba72
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
cmpl $0x0, 0x10c(%rsp)
je 0xaa23
leaq 0x20(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0xbb4d
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
movq 0x178(%rsp), %rsi
testq %rsi, %rsi
je 0xaa50
movq 0x190(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0xb6a1
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rcx
callq 0xbba1
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
cmpl $0x0, 0xf0(%rsp)
je 0xaaa1
leaq 0xf4(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0xbc0e
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
cmpq $0x0, 0xb0(%rsp)
je 0xacba
xorl %eax, %eax
leaq 0x20(%rsp), %r12
movq %rax, %r13
movq 0xb8(%rsp), %rax
movq (%rax,%r13,8), %rsi
movq $-0x1, %rax
cmpb $0x0, 0x1(%rsi,%rax)
leaq 0x1(%rax), %rax
jne 0xaacd
cmpq $0x4f, %rax
ja 0xaddf
xorl %eax, %eax
cmpb $0x0, (%rsi,%rax)
leaq 0x1(%rax), %rax
jne 0xaae4
cmpq $0x1, %rax
je 0xadee
cmpl $0x0, 0x88(%rbx)
movq 0xc0(%rsp), %rax
movq (%rax,%r13,8), %rdx
movq %r12, %rdi
je 0xab1c
movq 0x10(%rsp), %rcx
callq 0xbc6c
jmp 0xab21
callq 0xbd63
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
leaq 0x1(%r13), %rax
cmpq 0xb0(%rsp), %rax
jne 0xaab7
cmpl $0x0, 0x84(%rbx)
je 0xace9
testq %rax, %rax
je 0xacc3
movq $-0x1, %rax
movq 0xb8(%rsp), %rcx
movq 0x8(%rcx,%rax,8), %rdx
cmpb $0x4c, (%rdx)
jne 0xab9e
cmpb $0x6f, 0x1(%rdx)
jne 0xab9e
cmpb $0x64, 0x2(%rdx)
jne 0xab9e
cmpb $0x65, 0x3(%rdx)
jne 0xab9e
cmpb $0x50, 0x4(%rdx)
jne 0xab9e
cmpb $0x4e, 0x5(%rdx)
jne 0xab9e
cmpb $0x47, 0x6(%rdx)
jne 0xab9e
cmpb $0x0, 0x7(%rdx)
je 0xace9
incq %rax
cmpq %rax, %r13
jne 0xab66
jmp 0xacc3
movl %r12d, %eax
movl %ebp, %ecx
imulq %rax, %rcx
movq %rcx, 0x18(%rsp)
movl 0x78(%rsp), %edi
movl 0x7c(%rsp), %eax
movl %eax, 0x58(%rsp)
callq 0x5b92
imull 0x58(%rsp), %eax
imulq 0x18(%rsp), %rax
addq $0x7, %rax
movq %rax, 0x18(%rsp)
movq %rax, %rdi
shrq $0x3, %rdi
callq 0x1140
movq %rax, %rdi
testq %rax, %rax
setne %al
cmpq $0x8, 0x18(%rsp)
setb %cl
orb %al, %cl
jne 0xac23
movl $0x53, 0x1f0(%rbx)
jmp 0xac58
cmpl $0x1, 0x68(%rbx)
movl $0x66, %eax
sbbl $0x0, %eax
movl %eax, 0x1f0(%rbx)
jmp 0xa4d5
cmpl $0x0, 0x1f0(%rbx)
jne 0xac58
movq %rdi, 0x18(%rsp)
movq %r13, %rsi
leaq 0x78(%rsp), %rdx
movq 0x40(%rsp), %rcx
movl %r12d, %r8d
movl %ebp, %r9d
callq 0x6410
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
je 0xac71
movq 0x18(%rsp), %rdi
callq 0x1030
jmp 0xa4d5
movl $0x53, 0x1f0(%rbx)
jmp 0xa4d5
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x68(%rsp), %r9
movq 0x18(%rsp), %rdx
movl %r12d, %ecx
movl %ebp, %r8d
callq 0xb066
movl %eax, %r13d
movl %eax, 0x1f0(%rbx)
movq 0x18(%rsp), %rdi
callq 0x1030
testl %r13d, %r13d
jne 0xa4d5
jmp 0xa816
cmpl $0x0, 0x84(%rbx)
je 0xace9
movq 0xe44e(%rip), %rdx      # 0x19118
leaq 0x7ff8(%rip), %rsi      # 0x12cc9
leaq 0x20(%rsp), %rdi
callq 0xbd63
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
cmpq $0x0, 0xc8(%rsp)
je 0xad98
xorl %r13d, %r13d
leaq 0x20(%rsp), %r12
movq 0xd0(%rsp), %rax
movq (%rax,%r13,8), %rdx
movq $-0x1, %rax
cmpb $0x0, 0x1(%rdx,%rax)
leaq 0x1(%rax), %rax
jne 0xad13
cmpq $0x4f, %rax
ja 0xaddf
xorl %eax, %eax
cmpb $0x0, (%rdx,%rax)
leaq 0x1(%rax), %rax
jne 0xad2a
cmpq $0x1, %rax
je 0xadee
movl 0x88(%rbx), %esi
movq 0xd8(%rsp), %rax
movq 0xe0(%rsp), %rdi
movq (%rax,%r13,8), %rcx
movq (%rdi,%r13,8), %r8
movq 0xe8(%rsp), %rax
movq (%rax,%r13,8), %r9
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r12, %rdi
callq 0xbe1c
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
incq %r13
cmpq 0xc8(%rsp), %r13
jne 0xad00
movq 0x180(%rsp), %rsi
testq %rsi, %rsi
je 0xadc5
movq 0x198(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0xb6a1
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0xa4d5
leaq 0x90dd(%rip), %rdx      # 0x13ea9
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x5962
jmp 0xac18
movl $0x42, 0x1f0(%rbx)
jmp 0xa4d5
movl $0x43, 0x1f0(%rbx)
jmp 0xa4d5