// File: /workspace/github_cpp_makefile_star2_O2/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_encode(unsigned char**, unsigned long*, unsigned char const*, unsigned int, unsigned int, LodePNGState*)
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;
  LodePNGInfo info;
  const LodePNGInfo* info_png = &state->info_png;

  ucvector_init(&outv);
  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: nonexistent btype*/
    goto cleanup;
  }
  if(info_png->interlace_method > 1) {
    state->error = 71; /*error: nonexistent interlace mode*/
    goto cleanup;
  }
  state->error = checkColorValidity(info_png->color.colortype, info_png->color.bitdepth);
  if(state->error) goto cleanup; /*error: nonexistent color type given*/
  state->error = checkColorValidity(state->info_raw.colortype, state->info_raw.bitdepth);
  if(state->error) goto cleanup; /*error: nonexistent 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 */
    lodepng_compute_color_stats(&stats, image, w, h, &state->info_raw);
#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);
      lodepng_color_stats_add(&stats, r, g, b, 65535);
    }
#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) preProcessScanlines(&data, &datasize, converted, w, h, &info, &state->encoder);
    lodepng_free(converted);
    if(state->error) goto cleanup;
  }
  else preProcessScanlines(&data, &datasize, image, w, h, &info, &state->encoder);

  /* output all PNG chunks */ {
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
    size_t i;
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
    /*write signature and chunks*/
    writeSignature(&outv);
    /*IHDR*/
    addChunk_IHDR(&outv, w, h, info.color.colortype, info.color.bitdepth, info.interlace_method);
#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) addChunk_iCCP(&outv, &info, &state->encoder.zlibsettings);
    if(info.srgb_defined) addChunk_sRGB(&outv, &info);
    if(info.gama_defined) addChunk_gAMA(&outv, &info);
    if(info.chrm_defined) addChunk_cHRM(&outv, &info);
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
    /*PLTE*/
    if(info.color.colortype == LCT_PALETTE) {
      addChunk_PLTE(&outv, &info.color);
    }
    if(state->encoder.force_palette && (info.color.colortype == LCT_RGB || info.color.colortype == LCT_RGBA)) {
      addChunk_PLTE(&outv, &info.color);
    }
    /*tRNS*/
    if(info.color.colortype == LCT_PALETTE && getPaletteTranslucency(info.color.palette, info.color.palettesize) != 0) {
      addChunk_tRNS(&outv, &info.color);
    }
    if((info.color.colortype == LCT_GREY || info.color.colortype == LCT_RGB) && info.color.key_defined) {
      addChunk_tRNS(&outv, &info.color);
    }
#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) addChunk_pHYs(&outv, &info);

    /*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) addChunk_tIME(&outv, &info.time);
    /*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) {
        addChunk_zTXt(&outv, info.text_keys[i], info.text_strings[i], &state->encoder.zlibsettings);
      } else {
        addChunk_tEXt(&outv, info.text_keys[i], info.text_strings[i]);
      }
    }
    /*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) {
        addChunk_tEXt(&outv, "LodePNG", LODEPNG_VERSION_STRING); /*it's shorter as tEXt than as zTXt chunk*/
      }
    }
    /*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;
      }
      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);
    }

    /*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*/
    addChunk_IEND(&outv);
  }

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 $0x628, %rsp            # imm = 0x628
movq %rdx, %rbp
movq %r9, %rbx
movq %rsi, %r14
movl %r8d, 0x10(%rsp)
movl %ecx, %r13d
movq %rdi, %r15
andq $0x0, 0x38(%rsp)
andq $0x0, 0x70(%rsp)
pxor %xmm0, %xmm0
movdqa %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x76558
andq $0x0, (%r15)
andq $0x0, (%r14)
andl $0x0, 0x1f0(%rbx)
movl 0xc8(%rbx), %edi
cmpl $0x3, %edi
je 0x7a034
cmpl $0x0, 0x80(%rbx)
je 0x7a056
movq $-0x101, %rax           # imm = 0xFEFF
movq 0xd8(%rbx), %rcx
addq %rax, %rcx
cmpq %rax, %rcx
ja 0x7a056
movl $0x44, 0x1f0(%rbx)
jmp 0x7a0ad
cmpl $0x3, 0x38(%rbx)
jb 0x7a068
movl $0x3d, 0x1f0(%rbx)
jmp 0x7a0ad
cmpl $0x2, 0xc0(%rbx)
jb 0x7a07d
movl $0x47, 0x1f0(%rbx)
jmp 0x7a0ad
movl 0xcc(%rbx), %esi
callq 0x78486
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0x7a0ad
movl 0x90(%rbx), %edi
movl 0x94(%rbx), %esi
callq 0x78486
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
je 0x7a0ec
leaq 0x88(%rsp), %rdi
callq 0x765ed
movq 0x38(%rsp), %rdi
callq 0x52530
movq 0x20(%rsp), %rax
movq %rax, (%r15)
movq 0x28(%rsp), %rax
movq %rax, (%r14)
movl 0x1f0(%rbx), %eax
addq $0x628, %rsp            # imm = 0x628
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb8(%rbx), %rsi
leaq 0x90(%rbx), %r12
leaq 0x88(%rsp), %rdi
callq 0x76642
cmpl $0x0, 0x68(%rbx)
movq %r12, 0x18(%rsp)
je 0x7a57f
andq $0x0, 0x1e0(%rsp)
andq $0x0, 0x1d0(%rsp)
andq $0x0, 0x1d6(%rsp)
movl $0x1, 0x5e8(%rsp)
andq $0x0, 0x5f0(%rsp)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x5f8(%rsp)
cmpl $0x0, 0x1a0(%rbx)
je 0x7a1a5
movq 0x1b0(%rbx), %rdi
movl 0x1b8(%rbx), %r12d
movq %rdi, 0x8(%rsp)
movl %r12d, %esi
callq 0x7b1f1
testl %eax, %eax
je 0x7a187
andl $0x0, 0x5f8(%rsp)
movq 0x8(%rsp), %rdi
movl %r12d, %esi
callq 0x7b214
testl %eax, %eax
movq 0x18(%rsp), %r12
je 0x7a1a5
andl $0x0, 0x5fc(%rsp)
leaq 0xc8(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x1d0(%rsp), %rdi
movq %rbp, %rsi
movl %r13d, %edx
movl 0x10(%rsp), %ecx
movq %r12, %r8
callq 0x77a51
cmpl $0x0, 0xf0(%rbx)
je 0x7a2c0
leaq 0x7c(%rsp), %rax
andl $0x0, (%rax)
movq %rax, %rdi
leaq 0x78(%rsp), %rax
andl $0x0, (%rax)
movq %rax, %rsi
leaq 0x1cc(%rsp), %r12
andl $0x0, (%r12)
pxor %xmm0, %xmm0
leaq 0x600(%rsp), %rax
movdqu %xmm0, 0x18(%rax)
movdqu %xmm0, 0x8(%rax)
movabsq $0x1000000002, %rcx     # imm = 0x1000000002
movq %rcx, (%rax)
movl 0xf4(%rbx), %ecx
movl 0xf8(%rbx), %r8d
movl 0xfc(%rbx), %r9d
movq %r12, %rdx
pushq 0x8(%rsp)
pushq %rax
callq 0x778aa
popq %rcx
popq %rdx
leaq 0x7c(%rsp), %rax
movl (%rax), %edx
leaq 0x78(%rsp), %rax
movl (%rax), %ecx
movl (%r12), %eax
leaq 0x40(%rsp), %r12
movb %dh, 0x80(%rsp)
leaq 0x80(%rsp), %rsi
movb %dl, 0x1(%rsi)
movb %ch, 0x82(%rsp)
movb %cl, 0x3(%rsi)
movb %ah, 0x84(%rsp)
movb %al, 0x5(%rsi)
orw $-0x1, 0x6(%rsi)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x18(%r12)
movdqu %xmm0, 0x8(%r12)
movabsq $0x1000000006, %rax     # imm = 0x1000000006
movq %rax, (%r12)
leaq 0x1d0(%rsp), %rdi
pushq $0x1
popq %rcx
movl %ecx, %edx
movq %r12, %r8
callq 0x77a51
movq %r12, %rdi
callq 0x75f56
movq 0x5f0(%rsp), %rsi
movl 0x1e0(%rsp), %r8d
movl 0x1d0(%rsp), %edi
movl 0x1d4(%rsp), %eax
andl $0x0, 0xb0(%rsp)
movl 0x5e8(%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, 0x5fc(%rsp)
setne %dil
andb %r9b, %dil
cmpl $0x8, %r10d
cmovael %r10d, %ecx
testb %dil, %dil
cmovnel %r10d, %ecx
movl 0x1e4(%rsp), %r9d
cmpq $0x3, %r9
jae 0x7a346
pushq $0x1
jmp 0x7a34e
cmpl $0x5, %r9d
jae 0x7a352
pushq $0x2
popq %r11
jmp 0x7a365
xorl %r10d, %r10d
cmpl $0x11, %r9d
setae %r10b
leal 0x4(,%r10,4), %r11d
testl %r8d, %r8d
sete %r8b
andb %r8b, %dl
cmpl %r11d, %ecx
setbe %r8b
cmpl $0x0, 0x5f8(%rsp)
je 0x7a49a
movl %edi, %r10d
andb %dl, %r10b
andb %r8b, %r10b
jne 0x7a49a
leal -0x101(%r9), %r8d
cmpl $0xffffff00, %r8d       # imm = 0xFFFFFF00
jb 0x7a49a
addq %r9, %r9
cmpq %r9, %rsi
jb 0x7a49a
cmpl $0x8, %ecx
ja 0x7a49a
movl %r11d, 0x68(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x75f56
movq $0x0, (%rsp)
xorl %r12d, %r12d
movl 0x1e4(%rsp), %eax
cmpq %rax, %r12
je 0x7a421
movzbl 0x1e8(%rsp,%r12,4), %esi
movzbl 0x1e9(%rsp,%r12,4), %edx
movzbl 0x1ea(%rsp,%r12,4), %ecx
movzbl 0x1eb(%rsp,%r12,4), %r8d
leaq 0x98(%rsp), %rdi
callq 0x75ffb
incq %r12
testl %eax, %eax
je 0x7a3d9
movq %rax, (%rsp)
movl $0x3, 0x98(%rsp)
movl 0x68(%rsp), %ecx
movl %ecx, 0x9c(%rsp)
movq 0x18(%rsp), %r12
cmpl $0x3, (%r12)
movq 0x8(%rsp), %r10
jne 0x7a483
movq 0xa0(%rbx), %rax
cmpq 0xa8(%rsp), %rax
jb 0x7a483
cmpl %ecx, 0x94(%rbx)
jne 0x7a483
leaq 0x98(%rsp), %rdi
callq 0x75f56
leaq 0x98(%rsp), %rdi
movq %r12, %rsi
callq 0x75f6c
movq 0x8(%rsp), %r10
movq (%rsp), %rax
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0x7a0ad
jmp 0x7a525
cmpq $0x11, %rsi
setae %sil
movl %ecx, 0x9c(%rsp)
xorb $0x1, %dil
movzbl %dil, %edi
leal 0x4(,%rdi,2), %r8d
addl %edi, %edi
testb %dl, %dl
cmovel %r8d, %edi
movl %edi, 0x98(%rsp)
testl %eax, %eax
setne %al
andb %sil, %al
cmpb $0x1, %al
jne 0x7a519
pushq $-0x1
popq %rax
shll %cl, %eax
notl %eax
movzwl 0x1d8(%rsp), %ecx
andl %eax, %ecx
movl %ecx, 0xb4(%rsp)
movzwl 0x1da(%rsp), %ecx
andl %eax, %ecx
movl %ecx, 0xb8(%rsp)
movzwl 0x1dc(%rsp), %ecx
andl %eax, %ecx
movl %ecx, 0xbc(%rsp)
movl $0x1, 0xb0(%rsp)
andl $0x0, 0x1f0(%rbx)
movq 0x8(%rsp), %r10
cmpl $0x0, 0xf0(%rbx)
je 0x7a57f
leaq 0xc4(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0xcc(%rsp), %rdx
movl 0xf4(%rbx), %ecx
movl 0xf8(%rbx), %r8d
movl 0xfc(%rbx), %r9d
pushq %r10
leaq 0xa0(%rsp), %rax
pushq %rax
callq 0x778aa
popq %rcx
popq %rdx
testl %eax, %eax
je 0x7a57f
movl $0x68, 0x1f0(%rbx)
jmp 0x7a0ad
cmpl $0x0, 0x1a0(%rbx)
je 0x7a5d3
movq 0x1b0(%rbx), %r12
movl 0x1b8(%rbx), %esi
movl %esi, 0x8(%rsp)
movq %r12, %rdi
callq 0x7b1f1
movl %eax, (%rsp)
movq %r12, %rdi
movl 0x8(%rsp), %esi
callq 0x7b214
movl (%rsp), %ecx
orl %ecx, %eax
je 0x7a791
xorl %eax, %eax
testl $0xfffffffb, 0x98(%rsp) # imm = 0xFFFFFFFB
sete %al
cmpl %eax, %ecx
jne 0x7a7fb
leaq 0x38(%rbx), %r12
leaq 0x98(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0x7732f
testl %eax, %eax
movq %r12, 0x8(%rsp)
je 0x7a7a0
subq $0x8, %rsp
leaq 0x40(%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0x90(%rsp), %r9
movq %rbp, %rdx
movl %r13d, %ecx
movl 0x18(%rsp), %r8d
pushq %r12
callq 0x7b237
popq %rax
popq %rcx
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movl $0x89, %esi
callq 0x7c707
pushq $0x50
popq %rsi
movq %r12, %rdi
callq 0x7c707
pushq $0x4e
popq %rsi
movq %r12, %rdi
callq 0x7c707
pushq $0x47
popq %rsi
movq %r12, %rdi
callq 0x7c707
pushq $0xd
popq %rsi
movq %r12, %rdi
callq 0x7c707
pushq $0xa
popq %rbp
movq %r12, %rdi
movl %ebp, %esi
callq 0x7c707
pushq $0x1a
popq %rsi
movq %r12, %rdi
callq 0x7c707
movq %r12, %rdi
movl %ebp, %esi
callq 0x7c707
movb 0x90(%rsp), %r8b
movb 0x98(%rsp), %cl
movb 0x9c(%rsp), %sil
movl %r13d, %eax
movl %r13d, %edi
shrl $0x18, %edi
leaq 0x1d0(%rsp), %rdx
movb %dil, (%rdx)
movl %r13d, %edi
shrl $0x10, %edi
movb %dil, 0x1(%rdx)
movb %ah, 0x1d2(%rsp)
movb %al, 0x3(%rdx)
movl 0x10(%rsp), %eax
movl %eax, %edi
shrl $0x18, %edi
movb %dil, 0x4(%rdx)
movl %eax, %edi
shrl $0x10, %edi
movb %dil, 0x5(%rdx)
movb %ah, 0x1d6(%rsp)
movb %al, 0x7(%rdx)
movb %sil, 0x8(%rdx)
movb %cl, 0x9(%rdx)
andw $0x0, 0xa(%rdx)
movb %r8b, 0xc(%rdx)
leaq 0x1686e(%rip), %rsi     # 0x90f64
pushq $0xd
popq %rcx
movq %r12, %rdi
movq 0x8(%rsp), %r12
callq 0x7e276
movq 0x190(%rsp), %rsi
testq %rsi, %rsi
je 0x7a733
movq 0x1a8(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0x7b711
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0x7a0ad
cmpl $0x0, 0x170(%rsp)
je 0x7a917
movq %r12, %rbp
pushq $-0x50
popq %r13
pxor %xmm0, %xmm0
leaq 0x1d0(%rsp), %r12
movdqa %xmm0, (%r12)
andq $0x0, 0x10(%r12)
movdqa %xmm0, 0x40(%rsp)
andq $0x0, 0x50(%rsp)
movq 0x178(%rsp), %rax
movb 0x50(%rax,%r13), %al
testb %al, %al
je 0x7a810
movzbl %al, %esi
movq %r12, %rdi
callq 0x7c707
incq %r13
jmp 0x7a76c
movl $0x64, 0x1f0(%rbx)
jmp 0x7a0ad
movl %r13d, %eax
movl 0x10(%rsp), %ecx
imulq %rax, %rcx
movq %rcx, (%rsp)
leaq 0x98(%rsp), %rdi
callq 0x7607a
movl %eax, %r12d
imulq (%rsp), %r12
addq $0x7, %r12
movq %r12, %rdi
shrq $0x3, %rdi
callq 0x525b0
movq %rax, %rdi
testq %rax, %rax
setne %al
cmpq $0x8, %r12
setb %cl
orb %al, %cl
jne 0x7a891
movl $0x53, 0x1f0(%rbx)
jmp 0x7a8d2
cmpl $0x1, 0x68(%rbx)
pushq $0x66
popq %rax
sbbl $0x0, %eax
movl %eax, 0x1f0(%rbx)
jmp 0x7a0ad
cmpq $-0x4f, %r13
movq %rbp, %r12
jb 0x7a917
movq %r12, %r13
leaq 0x1d0(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x7c707
movq %r12, %rdi
movq %r13, %r12
xorl %esi, %esi
callq 0x7c707
leaq 0x48(%rsp), %rsi
movq 0x180(%rsp), %rdx
movl 0x188(%rsp), %ecx
leaq 0x40(%rsp), %rdi
movq %r13, %r8
callq 0x7bc2f
testl %eax, %eax
jne 0x7a900
xorl %r13d, %r13d
leaq 0x1d0(%rsp), %r12
cmpq 0x48(%rsp), %r13
je 0x7a8dc
movq 0x40(%rsp), %rax
movzbl (%rax,%r13), %esi
movq %r12, %rdi
callq 0x7c707
incq %r13
jmp 0x7a873
cmpl $0x0, 0x1f0(%rbx)
jne 0x7a8d2
movq %rdi, (%rsp)
movq %rbp, %rsi
leaq 0x98(%rsp), %rdx
movq 0x18(%rsp), %rcx
movl %r13d, %r12d
movl %r13d, %r8d
movl 0x10(%rsp), %ebp
movl %ebp, %r9d
callq 0x767e5
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
je 0x7aec2
movq (%rsp), %rdi
callq 0x52530
jmp 0x7a0ad
movq 0x1d0(%rsp), %rdx
movq 0x1d8(%rsp), %rcx
leaq 0x166ad(%rip), %rsi     # 0x90fa0
leaq 0x20(%rsp), %rdi
callq 0x7e276
movq %rbp, %r12
leaq 0x40(%rsp), %rdi
callq 0x7d131
leaq 0x1d0(%rsp), %rdi
callq 0x7d131
cmpl $0x0, 0x168(%rsp)
leaq 0x98(%rsp), %rbp
je 0x7a94e
movb 0x16c(%rsp), %al
leaq 0x1d0(%rsp), %rdx
movb %al, (%rdx)
leaq 0x1665a(%rip), %rsi     # 0x90f9b
leaq 0x20(%rsp), %rdi
pushq $0x1
popq %rcx
callq 0x7e276
cmpl $0x0, 0x13c(%rsp)
je 0x7a97f
movl 0x140(%rsp), %eax
bswapl %eax
leaq 0x1d0(%rsp), %rdx
movl %eax, (%rdx)
leaq 0x1661f(%rip), %rsi     # 0x90f91
leaq 0x20(%rsp), %rdi
pushq $0x4
popq %rcx
callq 0x7e276
cmpl $0x0, 0x144(%rsp)
je 0x7aa04
movl 0x148(%rsp), %eax
movl 0x14c(%rsp), %ecx
bswapl %eax
leaq 0x1d0(%rsp), %rdx
movl %eax, (%rdx)
bswapl %ecx
movl %ecx, 0x4(%rdx)
movl 0x150(%rsp), %eax
bswapl %eax
movl %eax, 0x8(%rdx)
movl 0x154(%rsp), %eax
bswapl %eax
movl %eax, 0xc(%rdx)
movl 0x158(%rsp), %eax
bswapl %eax
movl %eax, 0x10(%rdx)
movl 0x15c(%rsp), %eax
bswapl %eax
movl %eax, 0x14(%rdx)
movl 0x160(%rsp), %eax
bswapl %eax
movl %eax, 0x18(%rdx)
movl 0x164(%rsp), %eax
bswapl %eax
movl %eax, 0x1c(%rdx)
leaq 0x1659f(%rip), %rsi     # 0x90f96
leaq 0x20(%rsp), %rdi
pushq $0x20
popq %rcx
callq 0x7e276
movl 0x98(%rsp), %eax
cmpl $0x3, %eax
jne 0x7aa24
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x7b776
movl 0x98(%rsp), %eax
cmpl $0x0, 0x80(%rbx)
je 0x7aa4b
movl %eax, %ecx
andl $-0x5, %ecx
cmpl $0x2, %ecx
jne 0x7aa4b
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x7b776
movl 0x98(%rsp), %eax
cmpl $0x3, %eax
jne 0x7ab0f
movq %rbp, %r13
movq 0xa0(%rsp), %rax
movq 0xa8(%rsp), %rcx
xorl %edi, %edi
pushq $0x1
popq %rdx
pushq $-0x1
popq %rsi
xorl %r11d, %r11d
xorl %r8d, %r8d
xorl %r9d, %r9d
xorl %r10d, %r10d
cmpq %rcx, %rdi
je 0x7aaea
leaq (,%rdi,4), %r12
movzbl 0x3(%rax,%rdi,4), %ebp
testl %r11d, %r11d
je 0x7aabf
cmpl $0xff, %ebp
jne 0x7aaf3
movzbl (%rax,%r12), %r11d
cmpl %r11d, %r8d
jne 0x7aae2
movzbl 0x1(%rax,%r12), %r11d
cmpl %r11d, %r9d
jne 0x7aae2
movzbl 0x2(%rax,%r12), %ebp
movl %edx, %r11d
cmpl %ebp, %r10d
jne 0x7aae5
jmp 0x7aaf3
xorl %r11d, %r11d
cmpl $0xff, %ebp
je 0x7aae5
testl %ebp, %ebp
jne 0x7aaf3
movzbl (%rax,%r12), %r8d
movzbl 0x1(%rax,%r12), %r9d
movzbl 0x2(%rax,%r12), %r10d
movq %rsi, %rdi
movl %edx, %r11d
incq %rdi
jmp 0x7aa7b
testl %r11d, %r11d
je 0x7aeb2
leaq 0x20(%rsp), %rdi
movq %r13, %rbp
movq %r13, %rsi
callq 0x7b7f2
movl 0x98(%rsp), %eax
movq 0x8(%rsp), %r12
testl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
jne 0x7ab2d
cmpl $0x0, 0xb0(%rsp)
je 0x7ab2d
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x7b7f2
cmpl $0x0, 0xc0(%rsp)
je 0x7abd8
movl 0x98(%rsp), %eax
xorl %ecx, %ecx
cmpq $0x6, %rax
ja 0x7abb1
leaq 0x15aa7(%rip), %rdx     # 0x905f8
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movzwl 0xc4(%rsp), %eax
rolw $0x8, %ax
movw %ax, 0x1d0(%rsp)
pushq $0x2
jmp 0x7abb0
movzwl 0xc4(%rsp), %eax
movzwl 0xc8(%rsp), %ecx
rolw $0x8, %ax
movw %ax, 0x1d0(%rsp)
rolw $0x8, %cx
movw %cx, 0x1d2(%rsp)
movzwl 0xcc(%rsp), %eax
rolw $0x8, %ax
movw %ax, 0x1d4(%rsp)
pushq $0x6
popq %rcx
leaq 0x163bb(%rip), %rsi     # 0x90f73
leaq 0x20(%rsp), %rdi
leaq 0x1d0(%rsp), %rdx
callq 0x7e276
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0x7a0ad
cmpl $0x0, 0x12c(%rsp)
je 0x7ac1f
movl 0x130(%rsp), %eax
movl 0x134(%rsp), %ecx
bswapl %eax
leaq 0x1d0(%rsp), %rdx
movl %eax, (%rdx)
bswapl %ecx
movl %ecx, 0x4(%rdx)
movb 0x138(%rsp), %al
movb %al, 0x8(%rdx)
leaq 0x1637a(%rip), %rsi     # 0x90f8c
leaq 0x20(%rsp), %rdi
pushq $0x9
popq %rcx
callq 0x7e276
movq 0x198(%rsp), %rsi
testq %rsi, %rsi
je 0x7ac4c
movq 0x1b0(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0x7b711
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0x7a0ad
movq 0x38(%rsp), %rdx
movq 0x70(%rsp), %rcx
pxor %xmm0, %xmm0
leaq 0x1d8(%rsp), %rsi
movdqa %xmm0, -0x8(%rsi)
andq $0x0, 0x8(%rsi)
leaq 0x1d0(%rsp), %rdi
movq %r12, %r8
callq 0x7bc2f
movl %eax, %ebp
testl %eax, %eax
jne 0x7aca5
movq 0x1d0(%rsp), %rdx
movq 0x1d8(%rsp), %rcx
leaq 0x174f3(%rip), %rsi     # 0x9218c
leaq 0x20(%rsp), %rdi
callq 0x7e276
movl %eax, %ebp
leaq 0x1d0(%rsp), %rdi
callq 0x7d131
movl %ebp, 0x1f0(%rbx)
testl %ebp, %ebp
jne 0x7a0ad
cmpl $0x0, 0x110(%rsp)
je 0x7ad26
movdqu 0x114(%rsp), %xmm0
movl 0x114(%rsp), %eax
movb %ah, 0x1d0(%rsp)
pand 0x157e7(%rip), %xmm0    # 0x904d0
packuswb %xmm0, %xmm0
packuswb %xmm0, %xmm0
leaq 0x1d0(%rsp), %rdx
movd %xmm0, 0x1(%rdx)
movb 0x124(%rsp), %al
movb %al, 0x5(%rdx)
movb 0x128(%rsp), %al
movb %al, 0x6(%rdx)
leaq 0x1626e(%rip), %rsi     # 0x90f87
leaq 0x20(%rsp), %rdi
pushq $0x7
popq %rcx
callq 0x7e276
xorl %esi, %esi
leaq 0x1d0(%rsp), %rbp
cmpq 0xd0(%rsp), %rsi
je 0x7af0d
movq %r12, %r13
movq 0xd8(%rsp), %rax
movq %rsi, 0x10(%rsp)
movq (%rax,%rsi,8), %r12
movq %r12, %rdi
callq 0x75bb0
cmpq $0x50, %rax
jae 0x7b18c
testq %rax, %rax
je 0x7b19b
cmpl $0x0, 0x88(%rbx)
movq 0xe0(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
je 0x7ae44
movq %rdx, 0x18(%rsp)
movq %rdx, %rdi
callq 0x75bb0
movq %rax, (%rsp)
pxor %xmm0, %xmm0
movdqa %xmm0, 0x1d0(%rsp)
andq $0x0, 0x1e0(%rsp)
movdqa %xmm0, 0x40(%rsp)
andq $0x0, 0x50(%rsp)
pushq $-0x50
popq %r13
movb 0x50(%r12,%r13), %al
testb %al, %al
je 0x7addb
movzbl %al, %esi
movq %rbp, %rdi
callq 0x7c707
incq %r13
jmp 0x7adc2
cmpq $-0x4f, %r13
movq 0x8(%rsp), %r12
leaq 0x40(%rsp), %r13
jb 0x7ae8f
movq %rbp, %rdi
xorl %esi, %esi
callq 0x7c707
movq %rbp, %rdi
xorl %esi, %esi
callq 0x7c707
movq %r13, %rdi
leaq 0x48(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq (%rsp), %rcx
movq %r12, %r8
callq 0x7bc2f
testl %eax, %eax
jne 0x7ae7f
movq %r12, %r13
xorl %r12d, %r12d
cmpq 0x48(%rsp), %r12
je 0x7ae56
movq 0x40(%rsp), %rax
movzbl (%rax,%r12), %esi
movq %rbp, %rdi
callq 0x7c707
incq %r12
jmp 0x7ae26
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x7b902
movq %r13, %r12
jmp 0x7ae8f
movq 0x1d0(%rsp), %rdx
movq 0x1d8(%rsp), %rcx
leaq 0x20(%rsp), %rdi
leaq 0x1610b(%rip), %rsi     # 0x90f7d
callq 0x7e276
movq %r13, %r12
leaq 0x40(%rsp), %r13
movq %r13, %rdi
callq 0x7d131
movq %rbp, %rdi
callq 0x7d131
movq 0x10(%rsp), %rsi
incq %rsi
jmp 0x7ad30
pushq $0x1
popq %rcx
movb 0xc4(%rsp), %al
movb %al, 0x1d0(%rsp)
jmp 0x7abb1
pushq $0x3
popq %rax
movq 0x8(%rsp), %r12
movq %r13, %rbp
jmp 0x7ab0f
subq $0x8, %rsp
leaq 0x40(%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0x90(%rsp), %r9
movq 0x8(%rsp), %rdx
movl %r12d, %ecx
movl %ebp, %r8d
movq 0x10(%rsp), %r12
pushq %r12
callq 0x7b237
popq %rax
popq %rcx
movl 0x1f0(%rbx), %ebp
movq (%rsp), %rdi
callq 0x52530
testl %ebp, %ebp
jne 0x7a0ad
jmp 0x7a620
cmpl $0x0, 0x84(%rbx)
je 0x7af75
movq 0xd8(%rsp), %rax
xorl %ecx, %ecx
cmpq %rcx, %rsi
je 0x7af5d
movq (%rax,%rcx,8), %rdx
cmpb $0x4c, (%rdx)
jne 0x7af58
cmpb $0x6f, 0x1(%rdx)
jne 0x7af58
cmpb $0x64, 0x2(%rdx)
jne 0x7af58
cmpb $0x65, 0x3(%rdx)
jne 0x7af58
cmpb $0x50, 0x4(%rdx)
jne 0x7af58
cmpb $0x4e, 0x5(%rdx)
jne 0x7af58
cmpb $0x47, 0x6(%rdx)
jne 0x7af58
cmpb $0x0, 0x7(%rdx)
je 0x7af75
incq %rcx
jmp 0x7af20
movq 0x3790c(%rip), %rdx     # 0xb2870
leaq 0x1603a(%rip), %rsi     # 0x90fa5
leaq 0x20(%rsp), %rdi
callq 0x7b902
xorl %r12d, %r12d
cmpq 0xe8(%rsp), %r12
je 0x7b1aa
movq 0xf0(%rsp), %rax
movq (%rax,%r12,8), %rbp
movq %rbp, %rdi
callq 0x75bb0
cmpq $0x50, %rax
jae 0x7b18c
testq %rax, %rax
je 0x7b19b
movl 0x88(%rbx), %eax
movl %eax, 0x18(%rsp)
movq 0xf8(%rsp), %rax
movq 0x100(%rsp), %rcx
movq (%rax,%r12,8), %r13
movq (%rcx,%r12,8), %rax
movq %rax, 0x68(%rsp)
movq 0x108(%rsp), %rax
movq %r12, 0x10(%rsp)
movq (%rax,%r12,8), %rdi
movq %rdi, (%rsp)
callq 0x75bb0
movq %rax, 0x1c0(%rsp)
pxor %xmm0, %xmm0
movdqa %xmm0, 0x1d0(%rsp)
andq $0x0, 0x1e0(%rsp)
pushq $-0x50
popq %r12
movb 0x50(%rbp,%r12), %al
testb %al, %al
je 0x7b02e
movzbl %al, %esi
leaq 0x1d0(%rsp), %rdi
callq 0x7c707
incq %r12
jmp 0x7b010
cmpq $-0x4f, %r12
movq 0x10(%rsp), %r12
leaq 0x1d0(%rsp), %rbp
jb 0x7b184
movq %rbp, %rdi
xorl %esi, %esi
callq 0x7c707
xorl %esi, %esi
cmpl $0x0, 0x18(%rsp)
setne %sil
movq %rbp, %rdi
callq 0x7c707
movq %rbp, %rdi
xorl %esi, %esi
callq 0x7c707
movb (%r13), %al
testb %al, %al
je 0x7b084
movzbl %al, %esi
movq %rbp, %rdi
callq 0x7c707
incq %r13
jmp 0x7b06c
movq %rbp, %rdi
xorl %esi, %esi
callq 0x7c707
leaq 0x40(%rsp), %r13
movq 0x68(%rsp), %rcx
movb (%rcx), %al
testb %al, %al
je 0x7b0ba
movzbl %al, %esi
movq %rbp, %rdi
movq %r13, %r12
movq %rcx, %r13
callq 0x7c707
movq %r13, %rcx
movq %r12, %r13
incq %rcx
jmp 0x7b098
movq %rbp, %rdi
xorl %esi, %esi
callq 0x7c707
cmpl $0x0, 0x18(%rsp)
je 0x7b10c
pxor %xmm0, %xmm0
movdqa %xmm0, 0x40(%rsp)
andq $0x0, 0x50(%rsp)
movq %r13, %rdi
leaq 0x48(%rsp), %rsi
movq (%rsp), %rdx
movq 0x1c0(%rsp), %rcx
movq 0x8(%rsp), %r8
callq 0x7bc2f
testl %eax, %eax
je 0x7b12d
movq %r13, %rdi
callq 0x7d131
movq 0x10(%rsp), %r12
jmp 0x7b17c
movq 0x10(%rsp), %r12
movq (%rsp), %r13
movb (%r13), %al
testb %al, %al
je 0x7b15b
movzbl %al, %esi
movq %rbp, %rdi
callq 0x7c707
incq %r13
jmp 0x7b115
xorl %r12d, %r12d
cmpq 0x48(%rsp), %r12
je 0x7b14e
movq 0x40(%rsp), %rax
movzbl (%rax,%r12), %esi
movq %rbp, %rdi
callq 0x7c707
incq %r12
jmp 0x7b130
movq %r13, %rdi
callq 0x7d131
movq 0x10(%rsp), %r12
movq 0x1d0(%rsp), %rdx
movq 0x1d8(%rsp), %rcx
leaq 0x20(%rsp), %rdi
leaq 0x15e0b(%rip), %rsi     # 0x90f82
callq 0x7e276
movq %rbp, %rdi
callq 0x7d131
incq %r12
jmp 0x7af78
movl $0x42, 0x1f0(%rbx)
jmp 0x7a0ad
movl $0x43, 0x1f0(%rbx)
jmp 0x7a0ad
movq 0x1a0(%rsp), %rsi
testq %rsi, %rsi
je 0x7b1d7
movq 0x1b8(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0x7b711
movl %eax, 0x1f0(%rbx)
testl %eax, %eax
jne 0x7a0ad
leaq 0x16fb3(%rip), %rsi     # 0x92191
leaq 0x20(%rsp), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x7e276
jmp 0x7a0ad