// File: lvandeve[P]lodepng/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 = ucvector_init(NULL, 0);
  LodePNGInfo info;
  const LodePNGInfo* info_png = &state->info_png;
  LodePNGColorMode auto_color;

  lodepng_info_init(&info);
  lodepng_color_mode_init(&auto_color);

  /*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)) {
    /*this error is returned even if auto_convert is enabled and thus encoder could
    generate the palette by itself: while allowing this could be possible in theory,
    it may complicate the code or edge cases, and always requiring to give a palette
    when setting this color type is a simpler contract*/
    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;
    unsigned allow_convert = 1;
    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(&auto_color, &state->info_raw, &stats);
    if(state->error) goto cleanup;
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
    if(info_png->sbit_defined) {
      /*if sbit is defined, due to strict requirements of which sbit values can be present for which color modes,
      auto_convert can't be done in many cases. However, do support a few cases here.
      TODO: more conversions may be possible, and it may also be possible to get a more appropriate color type out of
            auto_choose_color if knowledge about sbit is used beforehand
      */
      unsigned sbit_max = LODEPNG_MAX(LODEPNG_MAX(LODEPNG_MAX(info_png->sbit_r, info_png->sbit_g),
                           info_png->sbit_b), info_png->sbit_a);
      unsigned equal = (!info_png->sbit_g || info_png->sbit_g == info_png->sbit_r)
                    && (!info_png->sbit_b || info_png->sbit_b == info_png->sbit_r)
                    && (!info_png->sbit_a || info_png->sbit_a == info_png->sbit_r);
      allow_convert = 0;
      if(info.color.colortype == LCT_PALETTE &&
         auto_color.colortype == LCT_PALETTE) {
        /* input and output are palette, and in this case it may happen that palette data is
        expected to be copied from info_raw into the info_png */
        allow_convert = 1;
      }
      /*going from 8-bit RGB to palette (or 16-bit as long as sbit_max <= 8) is possible
      since both are 8-bit RGB for sBIT's purposes*/
      if(info.color.colortype == LCT_RGB &&
         auto_color.colortype == LCT_PALETTE && sbit_max <= 8) {
        allow_convert = 1;
      }
      /*going from 8-bit RGBA to palette is also ok but only if sbit_a is exactly 8*/
      if(info.color.colortype == LCT_RGBA && auto_color.colortype == LCT_PALETTE &&
         info_png->sbit_a == 8 && sbit_max <= 8) {
        allow_convert = 1;
      }
      /*going from 16-bit RGB(A) to 8-bit RGB(A) is ok if all sbit values are <= 8*/
      if((info.color.colortype == LCT_RGB || info.color.colortype == LCT_RGBA) && info.color.bitdepth == 16 &&
         auto_color.colortype == info.color.colortype && auto_color.bitdepth == 8 &&
         sbit_max <= 8) {
        allow_convert = 1;
      }
      /*going to less channels is ok if all bit values are equal (all possible values in sbit,
        as well as the chosen bitdepth of the result). Due to how auto_convert works,
        we already know that auto_color.colortype has less than or equal amount of channels than
        info.colortype. Palette is not used here. This conversion is not allowed if
        info_png->sbit_r < auto_color.bitdepth, because specifically for alpha, non-presence of
        an sbit value heavily implies that alpha's bit depth is equal to the PNG bit depth (rather
        than the bit depths set in the r, g and b sbit values, by how the PNG specification describes
        handling tRNS chunk case with sBIT), so be conservative here about ignoring user input.*/
      if(info.color.colortype != LCT_PALETTE && auto_color.colortype != LCT_PALETTE &&
         equal && info_png->sbit_r == auto_color.bitdepth) {
        allow_convert = 1;
      }
    }
#endif
    if(state->encoder.force_palette) {
      if(info.color.colortype != LCT_GREY && info.color.colortype != LCT_GREY_ALPHA &&
         (auto_color.colortype == LCT_GREY || auto_color.colortype == LCT_GREY_ALPHA)) {
        /*user speficially forced a PLTE palette, so cannot convert to grayscale types because
        the PNG specification only allows writing a suggested palette in PLTE for truecolor types*/
        allow_convert = 0;
      }
    }
    if(allow_convert) {
      lodepng_color_mode_copy(&info.color, &auto_color);
#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.cicp_defined) {
      state->error = addChunk_cICP(&outv, &info);
      if(state->error) goto cleanup;
    }
    if(info.mdcv_defined) {
      state->error = addChunk_mDCV(&outv, &info);
      if(state->error) goto cleanup;
    }
    if(info.clli_defined) {
      state->error = addChunk_cLLI(&outv, &info);
      if(state->error) goto cleanup;
    }
    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;
    }
    if(info_png->sbit_defined) {
      state->error = addChunk_sBIT(&outv, &info);
      if(state->error) goto cleanup;
    }
    if(info.exif_defined) {
      state->error = addChunk_eXIf(&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);
  lodepng_color_mode_cleanup(&auto_color);

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

  return state->error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x710, %rsp            # imm = 0x710
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movq %r9, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
leaq -0x50(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x42c0
movq -0x28(%rbp), %rax
addq $0xd0, %rax
movq %rax, -0x200(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x6530
leaq -0x228(%rbp), %rdi
callq 0x56a0
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x278(%rax)
movq -0x200(%rbp), %rax
cmpl $0x3, 0x10(%rax)
je 0xd759
movq -0x28(%rbp), %rax
cmpl $0x0, 0x98(%rax)
je 0xd78b
movq -0x200(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xd778
movq -0x200(%rbp), %rax
cmpq $0x100, 0x20(%rax)      # imm = 0x100
jbe 0xd78b
movq -0x28(%rbp), %rax
movl $0x44, 0x278(%rax)
jmp 0xe9dc
movq -0x28(%rbp), %rax
cmpl $0x2, 0x50(%rax)
jbe 0xd7a8
movq -0x28(%rbp), %rax
movl $0x3d, 0x278(%rax)
jmp 0xe9dc
movq -0x200(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jbe 0xd7c8
movq -0x28(%rbp), %rax
movl $0x47, 0x278(%rax)
jmp 0xe9dc
movq -0x200(%rbp), %rax
movl 0x10(%rax), %edi
movq -0x200(%rbp), %rax
movl 0x14(%rax), %esi
callq 0xa4f0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xd7ff
jmp 0xe9dc
movq -0x28(%rbp), %rax
movl 0xa8(%rax), %edi
movq -0x28(%rbp), %rax
movl 0xac(%rax), %esi
callq 0xa4f0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xd836
jmp 0xe9dc
movq -0x28(%rbp), %rsi
addq $0xd0, %rsi
leaq -0x1f8(%rbp), %rdi
callq 0x6920
movq -0x28(%rbp), %rax
cmpl $0x0, 0x80(%rax)
je 0xded3
movl $0x1, -0x65c(%rbp)
leaq -0x658(%rbp), %rdi
callq 0x92d0
movq -0x200(%rbp), %rax
cmpl $0x0, 0xfc(%rax)
je 0xd8b3
movq -0x200(%rbp), %rax
movq 0x108(%rax), %rdi
movq -0x200(%rbp), %rax
movl 0x110(%rax), %esi
callq 0xea30
cmpl $0x0, %eax
je 0xd8b3
movl $0x0, -0x230(%rbp)
movq -0x200(%rbp), %rax
cmpl $0x0, 0xfc(%rax)
je 0xd8f2
movq -0x200(%rbp), %rax
movq 0x108(%rax), %rdi
movq -0x200(%rbp), %rax
movl 0x110(%rax), %esi
callq 0xeab0
cmpl $0x0, %eax
je 0xd8f2
movl $0x0, -0x22c(%rbp)
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
movq -0x28(%rbp), %r8
addq $0xa8, %r8
leaq -0x658(%rbp), %rdi
callq 0x9360
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xd931
jmp 0xe9dc
movq -0x200(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0xda0f
movl $0x0, -0x660(%rbp)
movl $0x0, -0x664(%rbp)
movl $0x0, -0x668(%rbp)
leaq -0x690(%rbp), %rdi
movl $0x2, %esi
movl $0x10, %edx
callq 0x5870
movq -0x200(%rbp), %rax
movl 0x3c(%rax), %ecx
movq -0x200(%rbp), %rax
movl 0x40(%rax), %r8d
movq -0x200(%rbp), %rax
movl 0x44(%rax), %r9d
movq -0x200(%rbp), %rax
addq $0x10, %rax
leaq -0x660(%rbp), %rdi
leaq -0x664(%rbp), %rsi
leaq -0x668(%rbp), %rdx
leaq -0x690(%rbp), %r10
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x8ff0
movl -0x660(%rbp), %esi
movl -0x664(%rbp), %edx
movl -0x668(%rbp), %ecx
leaq -0x658(%rbp), %rdi
movl $0xffff, %r8d           # imm = 0xFFFF
callq 0xeb30
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xda0d
jmp 0xe9dc
jmp 0xda0f
movq -0x28(%rbp), %rsi
addq $0xa8, %rsi
leaq -0x228(%rbp), %rdi
leaq -0x658(%rbp), %rdx
callq 0xebd0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xda4b
jmp 0xe9dc
movq -0x200(%rbp), %rax
cmpl $0x0, 0x160(%rax)
je 0xdde2
movq -0x200(%rbp), %rax
movl 0x164(%rax), %eax
movq -0x200(%rbp), %rcx
cmpl 0x168(%rcx), %eax
jbe 0xda90
movq -0x200(%rbp), %rax
movl 0x164(%rax), %eax
movl %eax, -0x6d4(%rbp)
jmp 0xdaa3
movq -0x200(%rbp), %rax
movl 0x168(%rax), %eax
movl %eax, -0x6d4(%rbp)
movl -0x6d4(%rbp), %eax
movq -0x200(%rbp), %rcx
cmpl 0x16c(%rcx), %eax
jbe 0xdb0a
movq -0x200(%rbp), %rax
movl 0x164(%rax), %eax
movq -0x200(%rbp), %rcx
cmpl 0x168(%rcx), %eax
jbe 0xdae9
movq -0x200(%rbp), %rax
movl 0x164(%rax), %eax
movl %eax, -0x6d8(%rbp)
jmp 0xdafc
movq -0x200(%rbp), %rax
movl 0x168(%rax), %eax
movl %eax, -0x6d8(%rbp)
movl -0x6d8(%rbp), %eax
movl %eax, -0x6dc(%rbp)
jmp 0xdb1d
movq -0x200(%rbp), %rax
movl 0x16c(%rax), %eax
movl %eax, -0x6dc(%rbp)
movl -0x6dc(%rbp), %eax
movq -0x200(%rbp), %rcx
cmpl 0x170(%rcx), %eax
jbe 0xdc02
movq -0x200(%rbp), %rax
movl 0x164(%rax), %eax
movq -0x200(%rbp), %rcx
cmpl 0x168(%rcx), %eax
jbe 0xdb67
movq -0x200(%rbp), %rax
movl 0x164(%rax), %eax
movl %eax, -0x6e0(%rbp)
jmp 0xdb7a
movq -0x200(%rbp), %rax
movl 0x168(%rax), %eax
movl %eax, -0x6e0(%rbp)
movl -0x6e0(%rbp), %eax
movq -0x200(%rbp), %rcx
cmpl 0x16c(%rcx), %eax
jbe 0xdbe1
movq -0x200(%rbp), %rax
movl 0x164(%rax), %eax
movq -0x200(%rbp), %rcx
cmpl 0x168(%rcx), %eax
jbe 0xdbc0
movq -0x200(%rbp), %rax
movl 0x164(%rax), %eax
movl %eax, -0x6e4(%rbp)
jmp 0xdbd3
movq -0x200(%rbp), %rax
movl 0x168(%rax), %eax
movl %eax, -0x6e4(%rbp)
movl -0x6e4(%rbp), %eax
movl %eax, -0x6e8(%rbp)
jmp 0xdbf4
movq -0x200(%rbp), %rax
movl 0x16c(%rax), %eax
movl %eax, -0x6e8(%rbp)
movl -0x6e8(%rbp), %eax
movl %eax, -0x6ec(%rbp)
jmp 0xdc15
movq -0x200(%rbp), %rax
movl 0x170(%rax), %eax
movl %eax, -0x6ec(%rbp)
movl -0x6ec(%rbp), %eax
movl %eax, -0x694(%rbp)
movq -0x200(%rbp), %rax
cmpl $0x0, 0x168(%rax)
je 0xdc55
movq -0x200(%rbp), %rax
movl 0x168(%rax), %ecx
movq -0x200(%rbp), %rdx
xorl %eax, %eax
cmpl 0x164(%rdx), %ecx
movb %al, -0x6ed(%rbp)
jne 0xdcd0
movq -0x200(%rbp), %rax
cmpl $0x0, 0x16c(%rax)
je 0xdc89
movq -0x200(%rbp), %rax
movl 0x16c(%rax), %ecx
movq -0x200(%rbp), %rdx
xorl %eax, %eax
cmpl 0x164(%rdx), %ecx
movb %al, -0x6ed(%rbp)
jne 0xdcd0
movq -0x200(%rbp), %rcx
movb $0x1, %al
cmpl $0x0, 0x170(%rcx)
movb %al, -0x6ee(%rbp)
je 0xdcc4
movq -0x200(%rbp), %rax
movl 0x170(%rax), %eax
movq -0x200(%rbp), %rcx
cmpl 0x164(%rcx), %eax
sete %al
movb %al, -0x6ee(%rbp)
movb -0x6ee(%rbp), %al
movb %al, -0x6ed(%rbp)
movb -0x6ed(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x698(%rbp)
movl $0x0, -0x65c(%rbp)
cmpl $0x3, -0x1e8(%rbp)
jne 0xdd07
cmpl $0x3, -0x228(%rbp)
jne 0xdd07
movl $0x1, -0x65c(%rbp)
cmpl $0x2, -0x1e8(%rbp)
jne 0xdd2c
cmpl $0x3, -0x228(%rbp)
jne 0xdd2c
cmpl $0x8, -0x694(%rbp)
ja 0xdd2c
movl $0x1, -0x65c(%rbp)
cmpl $0x6, -0x1e8(%rbp)
jne 0xdd61
cmpl $0x3, -0x228(%rbp)
jne 0xdd61
movq -0x200(%rbp), %rax
cmpl $0x8, 0x170(%rax)
jne 0xdd61
cmpl $0x8, -0x694(%rbp)
ja 0xdd61
movl $0x1, -0x65c(%rbp)
cmpl $0x2, -0x1e8(%rbp)
je 0xdd73
cmpl $0x6, -0x1e8(%rbp)
jne 0xdda6
cmpl $0x10, -0x1e4(%rbp)
jne 0xdda6
movl -0x228(%rbp), %eax
cmpl -0x1e8(%rbp), %eax
jne 0xdda6
cmpl $0x8, -0x224(%rbp)
jne 0xdda6
cmpl $0x8, -0x694(%rbp)
ja 0xdda6
movl $0x1, -0x65c(%rbp)
cmpl $0x3, -0x1e8(%rbp)
je 0xdde0
cmpl $0x3, -0x228(%rbp)
je 0xdde0
cmpl $0x0, -0x698(%rbp)
je 0xdde0
movq -0x200(%rbp), %rax
movl 0x164(%rax), %eax
cmpl -0x224(%rbp), %eax
jne 0xdde0
movl $0x1, -0x65c(%rbp)
jmp 0xdde2
movq -0x28(%rbp), %rax
cmpl $0x0, 0x98(%rax)
je 0xde1f
cmpl $0x0, -0x1e8(%rbp)
je 0xde1d
cmpl $0x4, -0x1e8(%rbp)
je 0xde1d
cmpl $0x0, -0x228(%rbp)
je 0xde13
cmpl $0x4, -0x228(%rbp)
jne 0xde1d
movl $0x0, -0x65c(%rbp)
jmp 0xde1f
cmpl $0x0, -0x65c(%rbp)
je 0xded1
leaq -0x1f8(%rbp), %rdi
addq $0x10, %rdi
leaq -0x228(%rbp), %rsi
callq 0x5780
movq -0x200(%rbp), %rax
cmpl $0x0, 0x38(%rax)
je 0xdecf
leaq -0x1f8(%rbp), %rdi
addq $0x3c, %rdi
leaq -0x1f8(%rbp), %rsi
addq $0x40, %rsi
leaq -0x1f8(%rbp), %rdx
addq $0x44, %rdx
movq -0x200(%rbp), %rax
movl 0x3c(%rax), %ecx
movq -0x200(%rbp), %rax
movl 0x40(%rax), %r8d
movq -0x200(%rbp), %rax
movl 0x44(%rax), %r9d
leaq -0x1f8(%rbp), %r10
addq $0x10, %r10
movq -0x200(%rbp), %rax
addq $0x10, %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x8ff0
cmpl $0x0, %eax
je 0xdecd
movq -0x28(%rbp), %rax
movl $0x68, 0x278(%rax)
jmp 0xe9dc
jmp 0xdecf
jmp 0xded1
jmp 0xded3
movq -0x200(%rbp), %rax
cmpl $0x0, 0xfc(%rax)
je 0xdfc3
movq -0x200(%rbp), %rax
movq 0x108(%rax), %rdi
movq -0x200(%rbp), %rax
movl 0x110(%rax), %esi
callq 0xea30
movl %eax, -0x69c(%rbp)
movq -0x200(%rbp), %rax
movq 0x108(%rax), %rdi
movq -0x200(%rbp), %rax
movl 0x110(%rax), %esi
callq 0xeab0
movl %eax, -0x6a0(%rbp)
movb $0x1, %al
cmpl $0x0, -0x1e8(%rbp)
movb %al, -0x6ef(%rbp)
je 0xdf54
cmpl $0x4, -0x1e8(%rbp)
sete %al
movb %al, -0x6ef(%rbp)
movb -0x6ef(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x6a4(%rbp)
cmpl $0x0, -0x69c(%rbp)
jne 0xdf8a
cmpl $0x0, -0x6a0(%rbp)
jne 0xdf8a
movq -0x28(%rbp), %rax
movl $0x64, 0x278(%rax)
jmp 0xe9dc
movl -0x69c(%rbp), %eax
cmpl -0x6a4(%rbp), %eax
je 0xdfc1
movq -0x28(%rbp), %rax
movl 0x80(%rax), %edx
movl $0x65, %ecx
movl $0x66, %eax
cmpl $0x0, %edx
cmovnel %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
jmp 0xe9dc
jmp 0xdfc3
movq -0x28(%rbp), %rdi
addq $0xa8, %rdi
leaq -0x1f8(%rbp), %rsi
addq $0x10, %rsi
callq 0x71e0
cmpl $0x0, %eax
jne 0xe109
movl -0x1c(%rbp), %eax
movl -0x20(%rbp), %ecx
imulq %rcx, %rax
movq %rax, -0x6f8(%rbp)
leaq -0x1f8(%rbp), %rdi
addq $0x10, %rdi
callq 0x5a60
movl %eax, %ecx
movq -0x6f8(%rbp), %rax
movl %ecx, %ecx
imulq %rcx, %rax
addq $0x7, %rax
shrq $0x3, %rax
movq %rax, -0x6b8(%rbp)
movq -0x6b8(%rbp), %rdi
callq 0x3bc0
movq %rax, -0x6b0(%rbp)
cmpq $0x0, -0x6b0(%rbp)
jne 0xe05b
cmpq $0x0, -0x6b8(%rbp)
je 0xe05b
movq -0x28(%rbp), %rax
movl $0x53, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
jne 0xe0a2
movq -0x6b0(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x1f8(%rbp), %rdx
addq $0x10, %rdx
movq -0x28(%rbp), %rcx
addq $0xa8, %rcx
movl -0x1c(%rbp), %r8d
movl -0x20(%rbp), %r9d
callq 0x6d60
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
jne 0xe0e9
movq -0x6b0(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movl -0x20(%rbp), %r8d
movq -0x28(%rbp), %rax
addq $0x50, %rax
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x1f8(%rbp), %r9
movq %rax, (%rsp)
callq 0xef00
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x6b0(%rbp), %rdi
callq 0x4230
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe107
jmp 0xe9dc
jmp 0xe154
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movl -0x20(%rbp), %r8d
movq -0x28(%rbp), %rax
addq $0x50, %rax
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x1f8(%rbp), %r9
movq %rax, (%rsp)
callq 0xef00
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe152
jmp 0xe9dc
jmp 0xe154
leaq -0x50(%rbp), %rdi
callq 0xf300
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe17b
jmp 0xe9dc
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
movl -0x1e8(%rbp), %ecx
movl -0x1e4(%rbp), %r8d
movl -0x1f0(%rbp), %r9d
leaq -0x50(%rbp), %rdi
callq 0xf370
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe1bc
jmp 0xe9dc
cmpq $0x0, -0x80(%rbp)
je 0xe1f4
movq -0x80(%rbp), %rsi
movq -0x68(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0xf430
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe1f2
jmp 0xe9dc
jmp 0xe1f4
cmpl $0x0, -0xe4(%rbp)
je 0xe22d
leaq -0x50(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0xf4c0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe22b
jmp 0xe9dc
jmp 0xe22d
cmpl $0x0, -0xd0(%rbp)
je 0xe266
leaq -0x50(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0xf5d0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe264
jmp 0xe9dc
jmp 0xe266
cmpl $0x0, -0xa4(%rbp)
je 0xe29f
leaq -0x50(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0xf890
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe29d
jmp 0xe9dc
jmp 0xe29f
cmpl $0x0, -0xfc(%rbp)
je 0xe2e0
movq -0x28(%rbp), %rdx
addq $0x50, %rdx
leaq -0x50(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0xf920
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe2de
jmp 0xe9dc
jmp 0xe2e0
cmpl $0x0, -0x104(%rbp)
je 0xe319
leaq -0x50(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0xfa60
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe317
jmp 0xe9dc
jmp 0xe319
cmpl $0x0, -0x130(%rbp)
je 0xe352
leaq -0x50(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0xfaa0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe350
jmp 0xe9dc
jmp 0xe352
cmpl $0x0, -0x128(%rbp)
je 0xe38b
leaq -0x50(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0xfb10
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe389
jmp 0xe9dc
jmp 0xe38b
movq -0x200(%rbp), %rax
cmpl $0x0, 0x160(%rax)
je 0xe3cb
leaq -0x50(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0xfc20
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe3c9
jmp 0xe9dc
jmp 0xe3cb
cmpl $0x0, -0x170(%rbp)
je 0xe404
leaq -0x50(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0xffa0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe402
jmp 0xe9dc
jmp 0xe404
cmpl $0x3, -0x1e8(%rbp)
jne 0xe441
leaq -0x1f8(%rbp), %rsi
addq $0x10, %rsi
leaq -0x50(%rbp), %rdi
callq 0xffe0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe43f
jmp 0xe9dc
jmp 0xe441
movq -0x28(%rbp), %rax
cmpl $0x0, 0x98(%rax)
je 0xe494
cmpl $0x2, -0x1e8(%rbp)
je 0xe460
cmpl $0x6, -0x1e8(%rbp)
jne 0xe494
leaq -0x1f8(%rbp), %rsi
addq $0x10, %rsi
leaq -0x50(%rbp), %rdi
callq 0xffe0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe492
jmp 0xe9dc
jmp 0xe494
leaq -0x1f8(%rbp), %rsi
addq $0x10, %rsi
leaq -0x50(%rbp), %rdi
callq 0x10110
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe4c6
jmp 0xe9dc
cmpl $0x0, -0x1c0(%rbp)
je 0xe4ff
leaq -0x50(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x10360
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe4fd
jmp 0xe9dc
jmp 0xe4ff
cmpl $0x0, -0x140(%rbp)
je 0xe538
leaq -0x50(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x10520
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe536
jmp 0xe9dc
jmp 0xe538
cmpq $0x0, -0x78(%rbp)
je 0xe570
movq -0x78(%rbp), %rsi
movq -0x60(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0xf430
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe56e
jmp 0xe9dc
jmp 0xe570
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rcx
addq $0x50, %rcx
leaq -0x50(%rbp), %rdi
callq 0x105c0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe5a7
jmp 0xe9dc
cmpl $0x0, -0x15c(%rbp)
je 0xe5e7
leaq -0x1f8(%rbp), %rsi
addq $0xa0, %rsi
leaq -0x50(%rbp), %rdi
callq 0x106b0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe5e5
jmp 0xe9dc
jmp 0xe5e7
movq $0x0, -0x6c0(%rbp)
movq -0x6c0(%rbp), %rax
cmpq -0x1b0(%rbp), %rax
je 0xe72e
movq -0x1a8(%rbp), %rax
movq -0x6c0(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x4ed0
cmpq $0x4f, %rax
jbe 0xe636
movq -0x28(%rbp), %rax
movl $0x42, 0x278(%rax)
jmp 0xe9dc
movq -0x1a8(%rbp), %rax
movq -0x6c0(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x4ed0
cmpq $0x1, %rax
jae 0xe666
movq -0x28(%rbp), %rax
movl $0x43, 0x278(%rax)
jmp 0xe9dc
movq -0x28(%rbp), %rax
cmpl $0x0, 0xa0(%rax)
je 0xe6c8
movq -0x1a8(%rbp), %rax
movq -0x6c0(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x1a0(%rbp), %rax
movq -0x6c0(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x28(%rbp), %rcx
addq $0x50, %rcx
leaq -0x50(%rbp), %rdi
callq 0x10780
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe6c6
jmp 0xe9dc
jmp 0xe715
movq -0x1a8(%rbp), %rax
movq -0x6c0(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x1a0(%rbp), %rax
movq -0x6c0(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq -0x50(%rbp), %rdi
callq 0x108b0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe713
jmp 0xe9dc
jmp 0xe715
jmp 0xe717
movq -0x6c0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x6c0(%rbp)
jmp 0xe5f2
movq -0x28(%rbp), %rax
cmpl $0x0, 0x9c(%rax)
je 0xe867
movl $0x0, -0x6c4(%rbp)
movq $0x0, -0x6c0(%rbp)
movq -0x6c0(%rbp), %rax
cmpq -0x1b0(%rbp), %rax
je 0xe825
movq -0x1a8(%rbp), %rax
movq -0x6c0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x6d0(%rbp)
movq -0x6d0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x4c, %eax
jne 0xe80c
movq -0x6d0(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x6f, %eax
jne 0xe80c
movq -0x6d0(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x64, %eax
jne 0xe80c
movq -0x6d0(%rbp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x65, %eax
jne 0xe80c
movq -0x6d0(%rbp), %rax
movsbl 0x4(%rax), %eax
cmpl $0x50, %eax
jne 0xe80c
movq -0x6d0(%rbp), %rax
movsbl 0x5(%rax), %eax
cmpl $0x4e, %eax
jne 0xe80c
movq -0x6d0(%rbp), %rax
movsbl 0x6(%rax), %eax
cmpl $0x47, %eax
jne 0xe80c
movq -0x6d0(%rbp), %rax
movsbl 0x7(%rax), %eax
cmpl $0x0, %eax
jne 0xe80c
movl $0x1, -0x6c4(%rbp)
jmp 0xe825
jmp 0xe80e
movq -0x6c0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x6c0(%rbp)
jmp 0xe754
cmpl $0x0, -0x6c4(%rbp)
jne 0xe865
movq 0xe9a2b(%rip), %rdx     # 0xf8260
leaq -0x50(%rbp), %rdi
leaq 0xa2d75(%rip), %rsi     # 0xb15b5
callq 0x108b0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe863
jmp 0xe9dc
jmp 0xe865
jmp 0xe867
movq $0x0, -0x6c0(%rbp)
movq -0x6c0(%rbp), %rax
cmpq -0x198(%rbp), %rax
je 0xe981
movq -0x190(%rbp), %rax
movq -0x6c0(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x4ed0
cmpq $0x4f, %rax
jbe 0xe8b6
movq -0x28(%rbp), %rax
movl $0x42, 0x278(%rax)
jmp 0xe9dc
movq -0x190(%rbp), %rax
movq -0x6c0(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x4ed0
cmpq $0x1, %rax
jae 0xe8e6
movq -0x28(%rbp), %rax
movl $0x43, 0x278(%rax)
jmp 0xe9dc
movq -0x28(%rbp), %rax
movl 0xa0(%rax), %esi
movq -0x190(%rbp), %rax
movq -0x6c0(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x188(%rbp), %rax
movq -0x6c0(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq -0x180(%rbp), %rax
movq -0x6c0(%rbp), %rdi
movq (%rax,%rdi,8), %r8
movq -0x178(%rbp), %rax
movq -0x6c0(%rbp), %rdi
movq (%rax,%rdi,8), %r9
movq -0x28(%rbp), %rax
addq $0x50, %rax
leaq -0x50(%rbp), %rdi
movq %rax, (%rsp)
callq 0x10990
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe968
jmp 0xe9dc
jmp 0xe96a
movq -0x6c0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x6c0(%rbp)
jmp 0xe872
cmpq $0x0, -0x70(%rbp)
je 0xe9b6
movq -0x70(%rbp), %rsi
movq -0x58(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0xf430
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe9b4
jmp 0xe9dc
jmp 0xe9b6
leaq -0x50(%rbp), %rdi
callq 0x10c50
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x278(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x278(%rax)
je 0xe9da
jmp 0xe9dc
jmp 0xe9dc
leaq -0x1f8(%rbp), %rdi
callq 0x6890
movq -0x30(%rbp), %rdi
callq 0x4230
leaq -0x228(%rbp), %rdi
callq 0x5710
movq -0x50(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movl 0x278(%rax), %eax
addq $0x710, %rsp            # imm = 0x710
popq %rbp
retq
nopw %cs:(%rax,%rax)