// File: /workspace/github_cpp_makefile_star2_O3/drummyfish[P]flowchart/src/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)
{
  LodePNGInfo info;
  ucvector outv;
  unsigned char* data = 0; /*uncompressed version of the IDAT chunk data*/
  size_t datasize = 0;

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

  lodepng_info_init(&info);
  lodepng_info_copy(&info, &state->info_png);

  if((info.color.colortype == LCT_PALETTE || state->encoder.force_palette)
      && (info.color.palettesize == 0 || info.color.palettesize > 256))
  {
    state->error = 68; /*invalid palette size, it is only allowed to be 1-256*/
    return state->error;
  }

  if(state->encoder.auto_convert != LAC_NO)
  {
    state->error = doAutoChooseColor(&info.color, image, w, h, &state->info_raw,
                                     state->encoder.auto_convert);
  }
  if(state->error) return state->error;

  if(state->encoder.zlibsettings.windowsize > 32768)
  {
    CERROR_RETURN_ERROR(state->error, 60); /*error: windowsize larger than allowed*/
  }
  if(state->encoder.zlibsettings.btype > 2)
  {
    CERROR_RETURN_ERROR(state->error, 61); /*error: unexisting btype*/
  }
  if(state->info_png.interlace_method > 1)
  {
    CERROR_RETURN_ERROR(state->error, 71); /*error: unexisting interlace mode*/
  }

  state->error = checkColorValidity(info.color.colortype, info.color.bitdepth);
  if(state->error) return state->error; /*error: unexisting color type given*/
  state->error = checkColorValidity(state->info_raw.colortype, state->info_raw.bitdepth);
  if(state->error) return state->error; /*error: unexisting color type given*/

  if(!lodepng_color_mode_equal(&state->info_raw, &info.color))
  {
    unsigned char* converted;
    size_t size = (w * h * lodepng_get_bpp(&info.color) + 7) / 8;

    converted = (unsigned char*)mymalloc(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);
    myfree(converted);
  }
  else preProcessScanlines(&data, &datasize, image, w, h, &info, &state->encoder);

  ucvector_init(&outv);
  while(!state->error) /*while only executed once, to break on error*/
  {
#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) break;
    }
#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) addChunk_bKGD(&outv, &info);
    /*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) break;
    }
#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) break;
#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(strlen(info.text_keys[i]) > 79)
      {
        state->error = 66; /*text chunk too large*/
        break;
      }
      if(strlen(info.text_keys[i]) < 1)
      {
        state->error = 67; /*text chunk too small*/
        break;
      }
      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 alread_added_id_text = 0;
      for(i = 0; i < info.text_num; i++)
      {
        if(!strcmp(info.text_keys[i], "LodePNG"))
        {
          alread_added_id_text = 1;
          break;
        }
      }
      if(alread_added_id_text == 0)
        addChunk_tEXt(&outv, "LodePNG", VERSION_STRING); /*it's shorter as tEXt than as zTXt chunk*/
    }
    /*iTXt*/
    for(i = 0; i < info.itext_num; i++)
    {
      if(strlen(info.itext_keys[i]) > 79)
      {
        state->error = 66; /*text chunk too large*/
        break;
      }
      if(strlen(info.itext_keys[i]) < 1)
      {
        state->error = 67; /*text chunk too small*/
        break;
      }
      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) break;
    }
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
    /*IEND*/
    addChunk_IEND(&outv);

    break; /*this isn't really a while loop; no error happened so break out now!*/
  }

  lodepng_info_cleanup(&info);
  myfree(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 $0x198, %rsp            # imm = 0x198
movq %r9, %r15
movl %r8d, %ebp
movl %ecx, 0x64(%rsp)
movq %rdx, 0x78(%rsp)
movq %rsi, %rbx
movq %rdi, %r12
xorl %eax, %eax
movq %rax, 0x80(%rsp)
movq %rax, 0x98(%rsp)
movq %rax, (%rdi)
movq %rax, (%rsi)
movl %eax, 0x190(%r9)
pxor %xmm0, %xmm0
leaq 0xa8(%rsp), %r14
movdqu %xmm0, 0x28(%r14)
movabsq $0x800000006, %rcx      # imm = 0x800000006
movq %rcx, 0x10(%r14)
movdqu %xmm0, 0x18(%r14)
movl %eax, 0x8(%r14)
movq %rax, (%r14)
movl %eax, 0xa4(%r14)
movdqu %xmm0, 0xb8(%r14)
movdqu %xmm0, 0xc8(%r14)
movdqu %xmm0, 0xd8(%r14)
movdqu %xmm0, 0x38(%r14)
movdqu %xmm0, 0x48(%r14)
movdqu %xmm0, 0x58(%r14)
movdqu %xmm0, 0x68(%r14)
movdqu %xmm0, 0x78(%r14)
movl %eax, 0x88(%r14)
leaq 0xa8(%r9), %rsi
movq %r14, %rdi
callq 0x61ba
movl 0x10(%r14), %eax
cmpl $0x3, %eax
je 0x8892
cmpl $0x0, 0x70(%r15)
je 0x88be
movq $-0x101, %rcx           # imm = 0xFEFF
movq 0xc8(%rsp), %rdx
addq %rcx, %rdx
cmpq %rcx, %rdx
ja 0x88be
movl $0x44, 0x190(%r15)
movl $0x44, %ebp
jmp 0x926a
movl 0x60(%r15), %ecx
testl %ecx, %ecx
movq %r15, 0x10(%rsp)
movl %ebp, 0x68(%rsp)
movq %rbx, 0x70(%rsp)
movq %r12, 0x190(%rsp)
je 0x8921
leaq 0x80(%r15), %rsi
cmpl $0x1, %ecx
movl %ecx, 0x6c(%rsp)
jne 0x892d
orl $0x2, %eax
cmpl $0x6, %eax
jne 0x8e6a
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rsi, 0x90(%rsp)
callq 0xd2d8
movb $0x1, %al
movb %al, 0x3(%r14)
movb %al, 0x3c(%r14)
movb %al, 0x34(%r14)
movb %al, 0x1(%r14)
jmp 0x893f
movl 0x190(%r15), %ebp
jmp 0x91c8
leaq 0x20(%rsp), %rdi
movq %rsi, 0x90(%rsp)
callq 0xd2d8
movl %ebp, %r13d
imull 0x64(%rsp), %r13d
movl 0x84(%r15), %eax
cmpl $0x10, %eax
movq %r13, 0xa0(%rsp)
jne 0x8c19
testq %r13, %r13
je 0x8e71
xorl %r14d, %r14d
movq 0x90(%rsp), %rax
movq %rax, (%rsp)
leaq 0xa(%rsp), %rdi
leaq 0xe(%rsp), %rsi
leaq 0xc(%rsp), %rdx
leaq 0x1e(%rsp), %rcx
movq 0x78(%rsp), %r8
movq %r14, %r9
callq 0x6a28
movl %eax, %ebp
testl %eax, %eax
jne 0x8e61
cmpb $0x0, 0x21(%rsp)
jne 0x89e8
movzwl 0xa(%rsp), %eax
movzbl %al, %ecx
shrl $0x8, %eax
cmpl %eax, %ecx
jne 0x89d7
movzwl 0xe(%rsp), %eax
movzbl %al, %ecx
shrl $0x8, %eax
cmpl %eax, %ecx
jne 0x89d7
movzwl 0xc(%rsp), %eax
movzbl %al, %ecx
shrl $0x8, %eax
cmpl %eax, %ecx
je 0x89e8
movw $0x101, 0x20(%rsp)      # imm = 0x101
movb $0x1, %al
movb %al, 0x5c(%rsp)
movb %al, 0x54(%rsp)
cmpb $0x0, 0x23(%rsp)
jne 0x8a0e
movzwl 0xa(%rsp), %eax
cmpw 0xe(%rsp), %ax
jne 0x8a02
cmpw 0xc(%rsp), %ax
je 0x8a0e
movw $0x101, 0x22(%rsp)      # imm = 0x101
movb $0x1, 0x5c(%rsp)
cmpb $0x0, 0x2d(%rsp)
sete %al
movzwl 0x1e(%rsp), %r13d
cmpl $0xff, %r13d
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x8a8e
testq %r13, %r13
je 0x8a3e
movw $0x101, 0x2c(%rsp)      # imm = 0x101
jmp 0x8aee
cmpb $0x0, 0x24(%rsp)
je 0x8a6b
movzwl 0xa(%rsp), %eax
cmpw 0x26(%rsp), %ax
jne 0x8a32
movzwl 0xe(%rsp), %eax
cmpw 0x28(%rsp), %ax
jne 0x8a32
movzwl 0xc(%rsp), %eax
cmpw 0x2a(%rsp), %ax
jne 0x8a32
jmp 0x8a8e
movb $0x1, 0x24(%rsp)
movzwl 0xa(%rsp), %eax
movw %ax, 0x26(%rsp)
movzwl 0xe(%rsp), %eax
movw %ax, 0x28(%rsp)
movzwl 0xc(%rsp), %eax
movw %ax, 0x2a(%rsp)
cmpb $0x0, 0x5c(%rsp)
jne 0x8af3
movzwl 0xa(%rsp), %ecx
movl $0x1, %eax
testl %ecx, %ecx
je 0x8adb
cmpl $0xff, %ecx
je 0x8adb
imull $0xfffff0f1, %ecx, %eax # imm = 0xFFFFF0F1
movzwl %ax, %edx
movl $0x8, %eax
cmpl $0xf0f, %edx            # imm = 0xF0F
ja 0x8adb
imull $0xfffffcfd, %ecx, %eax # imm = 0xFFFFFCFD
movzwl %ax, %eax
xorl %ecx, %ecx
cmpl $0x304, %eax            # imm = 0x304
setae %cl
leal 0x2(,%rcx,2), %eax
movl 0x58(%rsp), %ecx
cmpl %ecx, %eax
jbe 0x8ae9
movl %eax, 0x58(%rsp)
movl %eax, %ecx
cmpl $0x8, %ecx
jb 0x8af3
movb $0x1, 0x5c(%rsp)
cmpb $0x0, 0x54(%rsp)
je 0x8b01
xorl %eax, %eax
jmp 0x8bdc
movzwl 0xa(%rsp), %ebx
movzbl %bl, %eax
movzwl 0xe(%rsp), %r12d
movzwl 0xc(%rsp), %r8d
movq 0x38(%rsp), %rdi
shll $0x4, %eax
movq (%rdi,%rax), %rax
testq %rax, %rax
je 0x8b5f
movq %r12, %rcx
movl $0xff, %edx
andq %rdx, %rcx
shll $0x4, %ecx
movq (%rax,%rcx), %rax
testq %rax, %rax
je 0x8b5f
movq %r8, %rcx
andq %rdx, %rcx
shll $0x4, %ecx
movq (%rax,%rcx), %rcx
testq %rcx, %rcx
je 0x8b5f
movzbl %r13b, %edx
shll $0x4, %edx
movb $0x1, %al
cmpl $0x0, 0x8(%rcx,%rdx)
jns 0x8bdc
movl 0x30(%rsp), %r15d
movzbl %bl, %esi
movzbl %r12b, %edx
movzbl %r8b, %ecx
movq %r8, 0x88(%rsp)
movzbl %r13b, %r8d
movl %r15d, %r9d
callq 0x6925
cmpq $0xff, %r15
ja 0x8bb7
movq 0x48(%rsp), %rax
movb %bl, (%rax,%r15,4)
shlq $0x2, %r15
movl %r15d, %ecx
movb %r12b, 0x1(%rax,%rcx)
movq 0x88(%rsp), %rdx
movb %dl, 0x2(%rax,%rcx)
movb %r13b, 0x3(%rax,%rcx)
movl 0x30(%rsp), %r15d
incl %r15d
movl %r15d, 0x30(%rsp)
cmpl 0x50(%rsp), %r15d
jae 0x8bd0
cmpb $0x0, 0x54(%rsp)
sete %al
jmp 0x8bd7
movb $0x1, 0x54(%rsp)
xorl %eax, %eax
movq 0x10(%rsp), %r15
cmpb $0x0, 0x2d(%rsp)
movq 0xa0(%rsp), %r13
je 0x8c08
testb %al, %al
jne 0x8c08
cmpb $0x0, 0x23(%rsp)
je 0x8c08
cmpb $0x0, 0x21(%rsp)
je 0x8c08
cmpb $0x0, 0x5c(%rsp)
jne 0x8e61
incq %r14
cmpq %r14, %r13
jne 0x896c
jmp 0x8e5f
testq %r13, %r13
je 0x8e75
xorl %r14d, %r14d
movq 0x90(%rsp), %rax
movq %rax, (%rsp)
leaq 0xa(%rsp), %rdi
leaq 0xe(%rsp), %rsi
leaq 0xc(%rsp), %rdx
leaq 0x1e(%rsp), %rcx
movq 0x78(%rsp), %r8
movq %r14, %r9
callq 0x6bbe
movl %eax, %ebp
testl %eax, %eax
jne 0x8e61
cmpb $0x0, 0x23(%rsp)
jne 0x8c7f
movb 0xa(%rsp), %al
cmpb 0xe(%rsp), %al
jne 0x8c73
cmpb 0xc(%rsp), %al
je 0x8c7f
movw $0x101, 0x22(%rsp)      # imm = 0x101
movb $0x1, 0x5c(%rsp)
cmpb $0x0, 0x2d(%rsp)
sete %al
movb 0x1e(%rsp), %r13b
cmpb $-0x1, %r13b
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x8cfb
testb %r13b, %r13b
je 0x8cab
movw $0x101, 0x2c(%rsp)      # imm = 0x101
jmp 0x8d54
cmpb $0x0, 0x24(%rsp)
je 0x8cd8
movzbl 0xa(%rsp), %eax
cmpw %ax, 0x26(%rsp)
jne 0x8c9f
movzbl 0xe(%rsp), %eax
cmpw %ax, 0x28(%rsp)
jne 0x8c9f
movzbl 0xc(%rsp), %eax
cmpw %ax, 0x2a(%rsp)
jne 0x8c9f
jmp 0x8cfb
movb $0x1, 0x24(%rsp)
movzbl 0xa(%rsp), %eax
movw %ax, 0x26(%rsp)
movzbl 0xe(%rsp), %eax
movw %ax, 0x28(%rsp)
movzbl 0xc(%rsp), %eax
movw %ax, 0x2a(%rsp)
cmpb $0x0, 0x5c(%rsp)
jne 0x8d59
movzbl 0xa(%rsp), %ecx
movl $0x1, %eax
testl %ecx, %ecx
je 0x8d41
cmpl $0xff, %ecx
je 0x8d41
movzbl %cl, %ecx
movl %ecx, %eax
shll $0x4, %eax
movl %ecx, %edx
subl %eax, %edx
movl $0x8, %eax
cmpb $0xf, %dl
ja 0x8d41
leal (%rcx,%rcx,2), %eax
negl %eax
xorl %ecx, %ecx
cmpb $0x4, %al
setae %cl
leal 0x2(,%rcx,2), %eax
movl 0x58(%rsp), %ecx
cmpl %ecx, %eax
jbe 0x8d4f
movl %eax, 0x58(%rsp)
movl %eax, %ecx
cmpl $0x8, %ecx
jb 0x8d59
movb $0x1, 0x5c(%rsp)
cmpb $0x0, 0x54(%rsp)
je 0x8d67
xorl %eax, %eax
jmp 0x8e32
movzbl %r13b, %r8d
movzbl 0xa(%rsp), %ebx
movb 0xe(%rsp), %r10b
movzbl %r10b, %edx
movb 0xc(%rsp), %r12b
movzbl %r12b, %ecx
movq 0x38(%rsp), %rdi
movl %ebx, %eax
shll $0x4, %eax
movq (%rdi,%rax), %rax
testq %rax, %rax
je 0x8dc2
movl %edx, %esi
shll $0x4, %esi
movq (%rax,%rsi), %rax
testq %rax, %rax
je 0x8dc2
movl %ecx, %esi
shll $0x4, %esi
movq (%rax,%rsi), %rsi
testq %rsi, %rsi
je 0x8dc2
movl %r8d, %r9d
shll $0x4, %r9d
movb $0x1, %al
cmpl $0x0, 0x8(%rsi,%r9)
jns 0x8e32
movb %r10b, 0x88(%rsp)
movl 0x30(%rsp), %r15d
movzbl %bl, %esi
movl %r15d, %r9d
callq 0x6925
cmpq $0xff, %r15
ja 0x8e0d
movq 0x48(%rsp), %rax
movb %bl, (%rax,%r15,4)
shlq $0x2, %r15
movl %r15d, %ecx
movb 0x88(%rsp), %dl
movb %dl, 0x1(%rax,%rcx)
movb %r12b, 0x2(%rax,%rcx)
movb %r13b, 0x3(%rax,%rcx)
movl 0x30(%rsp), %r15d
incl %r15d
movl %r15d, 0x30(%rsp)
cmpl 0x50(%rsp), %r15d
jae 0x8e26
cmpb $0x0, 0x54(%rsp)
sete %al
jmp 0x8e2d
movb $0x1, 0x54(%rsp)
xorl %eax, %eax
movq 0x10(%rsp), %r15
cmpb $0x0, 0x2d(%rsp)
movq 0xa0(%rsp), %r13
je 0x8e53
testb %al, %al
jne 0x8e53
cmpb $0x0, 0x23(%rsp)
je 0x8e53
cmpb $0x0, 0x5c(%rsp)
jne 0x8e61
incq %r14
cmpq %r14, %r13
jne 0x8c25
xorl %ebp, %ebp
movl 0x84(%r15), %eax
jmp 0x8e77
xorl %ebp, %ebp
jmp 0x91c1
xorl %ebp, %ebp
jmp 0x8ea6
xorl %ebp, %ebp
cmpl $0xf, %eax
ja 0x8ea6
movd 0x26(%rsp), %xmm0
movdqa %xmm0, %xmm1
psllw $0x8, %xmm1
paddw %xmm0, %xmm1
movd %xmm1, 0x26(%rsp)
movzwl 0x2a(%rsp), %eax
movl %eax, %ecx
shll $0x8, %ecx
addl %eax, %ecx
movw %cx, 0x2a(%rsp)
movl 0x6c(%rsp), %eax
cmpl $0x1, %eax
jne 0x8edb
testl %ebp, %ebp
jne 0x8edb
xorl %ebp, %ebp
cmpb $0x0, 0x2c(%rsp)
jne 0x913b
xorl %eax, %eax
cmpl $0x6, 0xb8(%rsp)
sete %al
addl %eax, %eax
movl %eax, 0xb8(%rsp)
jmp 0x913b
cmpl $0x1, %eax
je 0x913b
testl %ebp, %ebp
jne 0x913b
movl $0x0, 0xd0(%rsp)
cmpb $0x0, 0x20(%rsp)
je 0x8f34
movl $0x10, 0xbc(%rsp)
cmpb $0x0, 0x2c(%rsp)
movb 0x22(%rsp), %al
je 0x900c
xorl %ecx, %ecx
testb %al, %al
setne %cl
leal 0x4(,%rcx,2), %eax
movl %eax, 0xb8(%rsp)
xorl %ebp, %ebp
jmp 0x913b
movl 0x30(%rsp), %ecx
movl %ecx, %r14d
cmpl $0x101, %ecx            # imm = 0x101
setb %dl
leal (%rcx,%rcx), %eax
cmpl %r13d, %eax
setb %al
andb %dl, %al
movl $0x1, %r15d
cmpl $0x3, %ecx
jb 0x8f77
movl $0x2, %r15d
cmpl $0x5, %r14d
jb 0x8f77
xorl %ecx, %ecx
cmpl $0x11, %r14d
setae %cl
leal 0x4(,%rcx,4), %r15d
movb 0x22(%rsp), %cl
movb 0x2c(%rsp), %sil
movl %ecx, %edx
orb %sil, %dl
sete %dl
movl %eax, %edi
orb %dl, %dil
testb $0x1, %dil
je 0x9055
movl 0x58(%rsp), %ecx
cmpl %r15d, %ecx
setbe %sil
testb %al, %al
je 0x9081
andb %sil, %dl
jne 0x9081
testq %r14, %r14
je 0x9005
movq 0x48(%rsp), %rbx
shlq $0x2, %r14
xorl %r12d, %r12d
movl %r12d, %eax
movzbl (%rbx,%rax), %esi
leal 0x1(%r12), %eax
movzbl (%rbx,%rax), %edx
leal 0x2(%r12), %eax
movzbl (%rbx,%rax), %ecx
leal 0x3(%r12), %eax
movzbl (%rbx,%rax), %r8d
leaq 0xb8(%rsp), %rdi
callq 0x5b18
testl %eax, %eax
jne 0x9121
addq $0x4, %r12
cmpq %r12, %r14
jne 0x8fc4
xorl %ebp, %ebp
jmp 0x9123
xorl %ecx, %ecx
testb %al, %al
setne %cl
addl %ecx, %ecx
movl %ecx, 0xb8(%rsp)
xorl %ebp, %ebp
cmpb $0x0, 0x24(%rsp)
je 0x913b
movl $0x1, 0xd0(%rsp)
movd 0x26(%rsp), %xmm0
pxor %xmm1, %xmm1
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movq %xmm0, 0xd4(%rsp)
movzwl 0x2a(%rsp), %eax
jmp 0x9118
movl $0x8, 0xbc(%rsp)
testb %sil, %sil
je 0x90cb
xorl %eax, %eax
testb %cl, %cl
setne %al
leal 0x4(,%rax,2), %eax
movl %eax, 0xb8(%rsp)
xorl %ebp, %ebp
jmp 0x9136
movl $0x0, 0xb8(%rsp)
movl %ecx, 0xbc(%rsp)
xorl %ebp, %ebp
cmpb $0x0, 0x24(%rsp)
je 0x9136
movzwl 0x26(%rsp), %eax
decl %ecx
andl %eax, %ecx
movl $0x1, 0xd0(%rsp)
movl %ecx, 0xd4(%rsp)
movl %ecx, 0xd8(%rsp)
movl %ecx, 0xdc(%rsp)
jmp 0x9136
xorl %eax, %eax
testb %cl, %cl
setne %al
addl %eax, %eax
movl %eax, 0xb8(%rsp)
xorl %ebp, %ebp
cmpb $0x0, 0x24(%rsp)
movq 0x10(%rsp), %r15
je 0x913b
movl $0x1, 0xd0(%rsp)
movd 0x26(%rsp), %xmm0
pand 0x8f8e(%rip), %xmm0     # 0x12090
pxor %xmm1, %xmm1
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movq %xmm0, 0xd4(%rsp)
movzbl 0x2a(%rsp), %eax
movl %eax, 0xdc(%rsp)
jmp 0x913b
movl %eax, %ebp
movl $0x3, 0xb8(%rsp)
movl %r15d, 0xbc(%rsp)
movq 0x10(%rsp), %r15
leaq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0x6ecf
movq 0x10(%r14), %rdi
callq 0x2220
cmpl $0x3, 0xb8(%rsp)
jne 0x91a5
movq 0x90(%r15), %rax
cmpq 0xc8(%rsp), %rax
setne %cl
shlq $0x2, %rax
testq %rax, %rax
sete %al
orb %cl, %al
jne 0x91a5
xorl %eax, %eax
movq 0x88(%r15), %rcx
movb (%rcx,%rax), %cl
movq 0xc0(%rsp), %rdx
movb %cl, (%rdx,%rax)
incq %rax
movq 0x90(%r15), %rcx
shlq $0x2, %rcx
cmpq %rcx, %rax
jb 0x917d
cmpl $0x3, 0x6c(%rsp)
jne 0x91c1
cmpl $0x7, 0xbc(%rsp)
ja 0x91c1
movl $0x8, 0xbc(%rsp)
movl %ebp, 0x190(%r15)
testl %ebp, %ebp
jne 0x926a
cmpl $0x8001, 0x40(%r15)     # imm = 0x8001
jb 0x91ec
movl $0x3c, 0x190(%r15)
movl $0x3c, %ebp
jmp 0x926a
leaq 0x38(%r15), %r13
cmpl $0x3, (%r13)
jb 0x9209
movl $0x3d, 0x190(%r15)
movl $0x3d, %ebp
jmp 0x926a
cmpl $0x2, 0xb0(%r15)
jb 0x9225
movl $0x47, 0x190(%r15)
movl $0x47, %ebp
jmp 0x926a
movl 0xb8(%rsp), %r14d
movq %r15, %rbx
movl 0xbc(%rsp), %r15d
movl %r14d, %edi
movl %r15d, %esi
callq 0x715f
movl %eax, 0x190(%rbx)
testl %eax, %eax
jne 0x9268
movl 0x80(%rbx), %edi
movl 0x84(%rbx), %esi
callq 0x715f
movl %eax, 0x190(%rbx)
testl %eax, %eax
je 0x927e
movl %eax, %ebp
movl %ebp, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x80(%rbx), %rbp
movq %rbp, %rdi
leaq 0xb8(%rsp), %rsi
callq 0x68b8
testl %eax, %eax
je 0x92d6
movq %r13, (%rsp)
leaq 0x80(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0xa8(%rsp), %r9
movq 0x78(%rsp), %rdx
movl 0x64(%rsp), %r15d
movl %r15d, %ecx
movl 0x68(%rsp), %r8d
callq 0x97ad
movq 0x70(%rsp), %rbp
jmp 0x93a3
xorl %eax, %eax
cmpl $0x6, %r14d
ja 0x92e9
leaq 0x9397(%rip), %rax      # 0x1267c
movl (%rax,%r14,4), %eax
movl 0x68(%rsp), %r14d
movl %r14d, %ebx
movl 0x64(%rsp), %r12d
imull %r12d, %ebx
imull %eax, %ebx
imull %r15d, %ebx
addl $0x7, %ebx
movl %ebx, %edi
shrl $0x3, %edi
callq 0x2270
movq %rax, %r15
testq %rax, %rax
setne %al
cmpl $0x8, %ebx
setb %cl
orb %al, %cl
jne 0x9337
movq 0x10(%rsp), %rax
movl $0x53, 0x190(%rax)
movq 0x70(%rsp), %rbp
jmp 0x9396
movq %r15, %rdi
movq 0x78(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
movq %rbp, %rcx
movl %r12d, %r8d
movl %r14d, %r9d
callq 0x63af
movq 0x10(%rsp), %rcx
movl %eax, 0x190(%rcx)
testl %eax, %eax
movq 0x70(%rsp), %rbp
jne 0x9396
movq %r13, (%rsp)
leaq 0x80(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0xa8(%rsp), %r9
movq %r15, %rdx
movl 0x64(%rsp), %ecx
movl 0x68(%rsp), %r8d
callq 0x97ad
movq %r15, %rdi
callq 0x2220
movl 0x64(%rsp), %r15d
pxor %xmm0, %xmm0
movdqa %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x10(%rsp), %rbx
cmpl $0x0, 0x190(%rbx)
je 0x9402
leaq 0xa8(%rsp), %rdi
callq 0x616c
movq 0x80(%rsp), %rdi
callq 0x2220
movq 0x20(%rsp), %rax
movq 0x190(%rsp), %rcx
movq %rax, (%rcx)
movq 0x28(%rsp), %rax
movq %rax, (%rbp)
movl 0x190(%rbx), %ebp
jmp 0x926a
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x9dab
movl 0xb0(%rsp), %r9d
movl 0xb8(%rsp), %ecx
movl 0xbc(%rsp), %r8d
movq %r14, %rdi
movl %r15d, %esi
movl 0x68(%rsp), %edx
callq 0x9ea6
movq 0x160(%rsp), %rsi
testq %rsi, %rsi
je 0x9462
movq 0x178(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0xa0ab
movl %eax, 0x190(%rbx)
testl %eax, %eax
jne 0x93c4
movl 0xb8(%rsp), %eax
cmpl $0x3, %eax
jne 0x9487
leaq 0x20(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0xa114
movl 0xb8(%rsp), %eax
cmpl $0x0, 0x70(%rbx)
je 0x94b0
movl %eax, %ecx
andl $-0x5, %ecx
cmpl $0x2, %ecx
jne 0x94b0
leaq 0x20(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0xa114
movl 0xb8(%rsp), %eax
cmpl $0x3, %eax
jne 0x94e7
movq 0xc0(%rsp), %rdi
movq 0xc8(%rsp), %rsi
callq 0xa200
testl %eax, %eax
je 0x950a
leaq 0x20(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0xa2a4
movl 0xb8(%rsp), %eax
testl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
jne 0x950a
cmpl $0x0, 0xd0(%rsp)
je 0x950a
leaq 0x20(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0xa2a4
cmpl $0x0, 0xe0(%rsp)
je 0x9526
leaq 0x20(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0xa5af
cmpl $0x0, 0x14c(%rsp)
je 0x9542
leaq 0x20(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0xa811
movq 0x168(%rsp), %rsi
testq %rsi, %rsi
je 0x956f
movq 0x180(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0xa0ab
movl %eax, 0x190(%rbx)
testl %eax, %eax
jne 0x93c4
movq 0x80(%rsp), %rsi
movq 0x98(%rsp), %rdx
leaq 0x20(%rsp), %rdi
movq %r13, %rcx
callq 0xa8f9
movl %eax, 0x190(%rbx)
testl %eax, %eax
jne 0x93c4
cmpl $0x0, 0x130(%rsp)
je 0x95b6
leaq 0x134(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0xa984
movq 0xf0(%rsp), %r12
testq %r12, %r12
je 0x9651
movq 0xf8(%rsp), %rax
movq (%rax), %r15
movq %r15, %rdi
callq 0x20d0
movl $0x42, %ebx
cmpq $0x4f, %rax
ja 0x965e
movl $0x1, %ebp
leaq 0x20(%rsp), %r14
testq %rax, %rax
je 0x9659
movq 0x10(%rsp), %rax
cmpl $0x0, 0x78(%rax)
movq 0x100(%rsp), %rax
movq -0x8(%rax,%rbp,8), %rdx
movq %r14, %rdi
movq %r15, %rsi
je 0x961c
movq %r13, %rcx
callq 0xaa06
jmp 0x9621
callq 0xac38
movq 0xf0(%rsp), %r12
cmpq %r12, %rbp
jae 0x97a3
movq 0xf8(%rsp), %rax
movq (%rax,%rbp,8), %r15
movq %r15, %rdi
callq 0x20d0
incq %rbp
cmpq $0x4f, %rax
jbe 0x95ef
jmp 0x965e
cmpl $0x0, 0x74(%rbx)
jne 0x96a3
jmp 0x96bb
movl $0x43, %ebx
movq 0x10(%rsp), %rax
movl %ebx, 0x190(%rax)
movq 0x70(%rsp), %rbp
cmpl $0x0, 0x74(%rax)
je 0x96bb
testq %r12, %r12
je 0x96a3
movq 0xf8(%rsp), %rbx
xorl %r15d, %r15d
leaq 0x9013(%rip), %r14      # 0x1269e
movq (%rbx,%r15,8), %rdi
movq %r14, %rsi
callq 0x2290
testl %eax, %eax
je 0x96bb
incq %r15
cmpq %r15, %r12
jne 0x968b
leaq 0x8ff4(%rip), %rsi      # 0x1269e
leaq 0x8ff5(%rip), %rdx      # 0x126a6
leaq 0x20(%rsp), %rdi
callq 0xac38
cmpq $0x0, 0x108(%rsp)
je 0x9751
xorl %ebx, %ebx
leaq 0x20(%rsp), %r14
movq 0x110(%rsp), %rax
movq (%rax,%rbx,8), %r15
movq %r15, %rdi
callq 0x20d0
cmpq $0x4f, %rax
ja 0x973a
testq %rax, %rax
je 0x9741
movq 0x10(%rsp), %rax
movl 0x78(%rax), %esi
movq 0x118(%rsp), %rax
movq 0x120(%rsp), %rdx
movq (%rax,%rbx,8), %rcx
movq (%rdx,%rbx,8), %r8
movq 0x128(%rsp), %rax
movq (%rax,%rbx,8), %r9
movq %r13, (%rsp)
movq %r14, %rdi
movq %r15, %rdx
callq 0xad8e
incq %rbx
cmpq 0x108(%rsp), %rbx
jb 0x96d1
jmp 0x9751
movl $0x42, %eax
jmp 0x9746
movl $0x43, %eax
movq 0x10(%rsp), %rcx
movl %eax, 0x190(%rcx)
movq 0x170(%rsp), %rsi
testq %rsi, %rsi
movq 0x10(%rsp), %rbx
je 0x9783
movq 0x188(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0xa0ab
movl %eax, 0x190(%rbx)
testl %eax, %eax
jne 0x93c4
leaq 0x28(%rsp), %rsi
leaq 0x9d5b(%rip), %rcx      # 0x134ea
leaq 0x20(%rsp), %rdi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x5951
jmp 0x93c4
movq 0x10(%rsp), %rax
jmp 0x9669