// File: phillip-h[P]fractal-gen/lodepng.cpp
// Function: decodeGeneric(unsigned char**, unsigned int*, unsigned int*, LodePNGState*, unsigned char const*, unsigned long)
static void decodeGeneric(unsigned char** out, unsigned* w, unsigned* h,
                          LodePNGState* state,
                          const unsigned char* in, size_t insize)
{
  unsigned char IEND = 0;
  const unsigned char* chunk;
  size_t i;
  ucvector idat; /*the data from idat chunks*/
  ucvector scanlines;
  size_t predict;
  size_t numpixels;
  size_t outsize = 0;

  /*for unknown chunk order*/
  unsigned unknown = 0;
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
  unsigned critical_pos = 1; /*1 = after IHDR, 2 = after PLTE, 3 = after IDAT*/
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/

  /*provide some proper output values if error will happen*/
  *out = 0;

  state->error = lodepng_inspect(w, h, state, in, insize); /*reads header and resets other parameters in state->info_png*/
  if(state->error) return;

  numpixels = *w * *h;

  /*multiplication overflow*/
  if(*h != 0 && numpixels / *h != *w) CERROR_RETURN(state->error, 92);
  /*multiplication overflow possible further below. Allows up to 2^31-1 pixel
  bytes with 16-bit RGBA, the rest is room for filter bytes.*/
  if(numpixels > 268435455) CERROR_RETURN(state->error, 92);

  ucvector_init(&idat);
  chunk = &in[33]; /*first byte of the first chunk after the header*/

  /*loop through the chunks, ignoring unknown chunks and stopping at IEND chunk.
  IDAT data is put at the start of the in buffer*/
  while(!IEND && !state->error)
  {
    unsigned chunkLength;
    const unsigned char* data; /*the data in the chunk*/

    /*error: size of the in buffer too small to contain next chunk*/
    if((size_t)((chunk - in) + 12) > insize || chunk < in) CERROR_BREAK(state->error, 30);

    /*length of the data of the chunk, excluding the length bytes, chunk type and CRC bytes*/
    chunkLength = lodepng_chunk_length(chunk);
    /*error: chunk length larger than the max PNG chunk size*/
    if(chunkLength > 2147483647) CERROR_BREAK(state->error, 63);

    if((size_t)((chunk - in) + chunkLength + 12) > insize || (chunk + chunkLength + 12) < in)
    {
      CERROR_BREAK(state->error, 64); /*error: size of the in buffer too small to contain next chunk*/
    }

    data = lodepng_chunk_data_const(chunk);

    /*IDAT chunk, containing compressed image data*/
    if(lodepng_chunk_type_equals(chunk, "IDAT"))
    {
      size_t oldsize = idat.size;
      if(!ucvector_resize(&idat, oldsize + chunkLength)) CERROR_BREAK(state->error, 83 /*alloc fail*/);
      for(i = 0; i != chunkLength; ++i) idat.data[oldsize + i] = data[i];
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
      critical_pos = 3;
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
    }
    /*IEND chunk*/
    else if(lodepng_chunk_type_equals(chunk, "IEND"))
    {
      IEND = 1;
    }
    /*palette chunk (PLTE)*/
    else if(lodepng_chunk_type_equals(chunk, "PLTE"))
    {
      state->error = readChunk_PLTE(&state->info_png.color, data, chunkLength);
      if(state->error) break;
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
      critical_pos = 2;
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
    }
    /*palette transparency chunk (tRNS)*/
    else if(lodepng_chunk_type_equals(chunk, "tRNS"))
    {
      state->error = readChunk_tRNS(&state->info_png.color, data, chunkLength);
      if(state->error) break;
    }
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
    /*background color chunk (bKGD)*/
    else if(lodepng_chunk_type_equals(chunk, "bKGD"))
    {
      state->error = readChunk_bKGD(&state->info_png, data, chunkLength);
      if(state->error) break;
    }
    /*text chunk (tEXt)*/
    else if(lodepng_chunk_type_equals(chunk, "tEXt"))
    {
      if(state->decoder.read_text_chunks)
      {
        state->error = readChunk_tEXt(&state->info_png, data, chunkLength);
        if(state->error) break;
      }
    }
    /*compressed text chunk (zTXt)*/
    else if(lodepng_chunk_type_equals(chunk, "zTXt"))
    {
      if(state->decoder.read_text_chunks)
      {
        state->error = readChunk_zTXt(&state->info_png, &state->decoder.zlibsettings, data, chunkLength);
        if(state->error) break;
      }
    }
    /*international text chunk (iTXt)*/
    else if(lodepng_chunk_type_equals(chunk, "iTXt"))
    {
      if(state->decoder.read_text_chunks)
      {
        state->error = readChunk_iTXt(&state->info_png, &state->decoder.zlibsettings, data, chunkLength);
        if(state->error) break;
      }
    }
    else if(lodepng_chunk_type_equals(chunk, "tIME"))
    {
      state->error = readChunk_tIME(&state->info_png, data, chunkLength);
      if(state->error) break;
    }
    else if(lodepng_chunk_type_equals(chunk, "pHYs"))
    {
      state->error = readChunk_pHYs(&state->info_png, data, chunkLength);
      if(state->error) break;
    }
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
    else /*it's not an implemented chunk type, so ignore it: skip over the data*/
    {
      /*error: unknown critical chunk (5th bit of first byte of chunk type is 0)*/
      if(!lodepng_chunk_ancillary(chunk)) CERROR_BREAK(state->error, 69);

      unknown = 1;
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
      if(state->decoder.remember_unknown_chunks)
      {
        state->error = lodepng_chunk_append(&state->info_png.unknown_chunks_data[critical_pos - 1],
                                            &state->info_png.unknown_chunks_size[critical_pos - 1], chunk);
        if(state->error) break;
      }
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
    }

    if(!state->decoder.ignore_crc && !unknown) /*check CRC if wanted, only on known chunk types*/
    {
      if(lodepng_chunk_check_crc(chunk)) CERROR_BREAK(state->error, 57); /*invalid CRC*/
    }

    if(!IEND) chunk = lodepng_chunk_next_const(chunk);
  }

// Assembly:
subq $0xc8, %rsp
movq %rdi, 0xc0(%rsp)
movq %rsi, 0xb8(%rsp)
movq %rdx, 0xb0(%rsp)
movq %rcx, 0xa8(%rsp)
movq %r8, 0xa0(%rsp)
movq %r9, 0x98(%rsp)
movb $0x0, 0x97(%rsp)
movq $0x0, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
movl $0x1, 0x30(%rsp)
movq 0xc0(%rsp), %rax
movq $0x0, (%rax)
movq 0xb8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movq 0xa0(%rsp), %rcx
movq 0x98(%rsp), %r8
callq 0xcf40
movl %eax, %ecx
movq 0xa8(%rsp), %rax
movl %ecx, 0x1a0(%rax)
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x1a0(%rax)
je 0xd64a
jmp 0xe209
movq 0xb8(%rsp), %rax
movl (%rax), %eax
movq 0xb0(%rsp), %rcx
imull (%rcx), %eax
movl %eax, %eax
movq %rax, 0x40(%rsp)
movq 0xb0(%rsp), %rax
cmpl $0x0, (%rax)
je 0xd6ad
movq 0x40(%rsp), %rax
movq 0xb0(%rsp), %rcx
movl (%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq 0xb8(%rsp), %rcx
movl (%rcx), %ecx
cmpq %rcx, %rax
je 0xd6ad
movq 0xa8(%rsp), %rax
movl $0x5c, 0x1a0(%rax)
jmp 0xe209
cmpq $0xfffffff, 0x40(%rsp)  # imm = 0xFFFFFFF
jbe 0xd6cf
movq 0xa8(%rsp), %rax
movl $0x5c, 0x1a0(%rax)
jmp 0xe209
leaq 0x68(%rsp), %rdi
callq 0xf580
movq 0xa0(%rsp), %rax
addq $0x21, %rax
movq %rax, 0x88(%rsp)
xorl %eax, %eax
cmpb $0x0, 0x97(%rsp)
movb %al, 0xf(%rsp)
jne 0xd715
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x1a0(%rax)
setne %al
xorb $-0x1, %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0xd722
jmp 0xdd87
movq 0x88(%rsp), %rax
movq 0xa0(%rsp), %rcx
subq %rcx, %rax
addq $0xc, %rax
cmpq 0x98(%rsp), %rax
ja 0xd755
movq 0x88(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0xd76c
movq 0xa8(%rsp), %rax
movl $0x1e, 0x1a0(%rax)
jmp 0xdd87
movq 0x88(%rsp), %rdi
callq 0x8450
movl %eax, 0x2c(%rsp)
cmpl $0x7fffffff, 0x2c(%rsp) # imm = 0x7FFFFFFF
jbe 0xd79e
movq 0xa8(%rsp), %rax
movl $0x3f, 0x1a0(%rax)
jmp 0xdd87
movq 0x88(%rsp), %rax
movq 0xa0(%rsp), %rcx
subq %rcx, %rax
movl 0x2c(%rsp), %ecx
addq %rcx, %rax
addq $0xc, %rax
cmpq 0x98(%rsp), %rax
ja 0xd7e3
movq 0x88(%rsp), %rax
movl 0x2c(%rsp), %ecx
addq %rcx, %rax
addq $0xc, %rax
cmpq 0xa0(%rsp), %rax
jae 0xd7fa
movq 0xa8(%rsp), %rax
movl $0x40, 0x1a0(%rax)
jmp 0xdd87
movq 0x88(%rsp), %rdi
callq 0x85d0
movq %rax, 0x20(%rsp)
movq 0x88(%rsp), %rdi
leaq 0xff48(%rip), %rsi      # 0x1d763
callq 0x84b0
cmpb $0x0, %al
je 0xd8c9
movq 0x70(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rsi
movl 0x2c(%rsp), %eax
addq %rax, %rsi
leaq 0x68(%rsp), %rdi
callq 0x12310
cmpl $0x0, %eax
jne 0xd864
movq 0xa8(%rsp), %rax
movl $0x53, 0x1a0(%rax)
jmp 0xdd87
movq $0x0, 0x80(%rsp)
movq 0x80(%rsp), %rax
movl 0x2c(%rsp), %ecx
cmpq %rcx, %rax
je 0xd8bc
movq 0x20(%rsp), %rax
movq 0x80(%rsp), %rcx
movb (%rax,%rcx), %dl
movq 0x68(%rsp), %rax
movq 0x18(%rsp), %rcx
addq 0x80(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x80(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x80(%rsp)
jmp 0xd870
movl $0x3, 0x30(%rsp)
jmp 0xdd26
movq 0x88(%rsp), %rdi
leaq 0xfe90(%rip), %rsi      # 0x1d768
callq 0x84b0
cmpb $0x0, %al
je 0xd8ee
movb $0x1, 0x97(%rsp)
jmp 0xdd24
movq 0x88(%rsp), %rdi
leaq 0xfe70(%rip), %rsi      # 0x1d76d
callq 0x84b0
cmpb $0x0, %al
je 0xd95c
movq 0xa8(%rsp), %rdi
addq $0xb8, %rdi
addq $0x10, %rdi
movq 0x20(%rsp), %rsi
movl 0x2c(%rsp), %eax
movl %eax, %edx
callq 0x16200
movl %eax, %ecx
movq 0xa8(%rsp), %rax
movl %ecx, 0x1a0(%rax)
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x1a0(%rax)
je 0xd94f
jmp 0xdd87
movl $0x2, 0x30(%rsp)
jmp 0xdd22
movq 0x88(%rsp), %rdi
leaq 0xfe07(%rip), %rsi      # 0x1d772
callq 0x84b0
cmpb $0x0, %al
je 0xd9c2
movq 0xa8(%rsp), %rdi
addq $0xb8, %rdi
addq $0x10, %rdi
movq 0x20(%rsp), %rsi
movl 0x2c(%rsp), %eax
movl %eax, %edx
callq 0x163a0
movl %eax, %ecx
movq 0xa8(%rsp), %rax
movl %ecx, 0x1a0(%rax)
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x1a0(%rax)
je 0xd9bd
jmp 0xdd87
jmp 0xdd20
movq 0x88(%rsp), %rdi
leaq 0xfda6(%rip), %rsi      # 0x1d777
callq 0x84b0
cmpb $0x0, %al
je 0xda24
movq 0xa8(%rsp), %rdi
addq $0xb8, %rdi
movq 0x20(%rsp), %rsi
movl 0x2c(%rsp), %eax
movl %eax, %edx
callq 0x16530
movl %eax, %ecx
movq 0xa8(%rsp), %rax
movl %ecx, 0x1a0(%rax)
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x1a0(%rax)
je 0xda1f
jmp 0xdd87
jmp 0xdd1e
movq 0x88(%rsp), %rdi
leaq 0xfd49(%rip), %rsi      # 0x1d77c
callq 0x84b0
cmpb $0x0, %al
je 0xda96
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x30(%rax)
je 0xda91
movq 0xa8(%rsp), %rdi
addq $0xb8, %rdi
movq 0x20(%rsp), %rsi
movl 0x2c(%rsp), %eax
movl %eax, %edx
callq 0x166a0
movl %eax, %ecx
movq 0xa8(%rsp), %rax
movl %ecx, 0x1a0(%rax)
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x1a0(%rax)
je 0xda8f
jmp 0xdd87
jmp 0xda91
jmp 0xdd1c
movq 0x88(%rsp), %rdi
leaq 0xfcdc(%rip), %rsi      # 0x1d781
callq 0x84b0
cmpb $0x0, %al
je 0xdb14
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x30(%rax)
je 0xdb0f
movq 0xa8(%rsp), %rdi
addq $0xb8, %rdi
movq 0xa8(%rsp), %rsi
addq $0x8, %rsi
movq 0x20(%rsp), %rdx
movl 0x2c(%rsp), %eax
movl %eax, %ecx
callq 0x168a0
movl %eax, %ecx
movq 0xa8(%rsp), %rax
movl %ecx, 0x1a0(%rax)
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x1a0(%rax)
je 0xdb0d
jmp 0xdd87
jmp 0xdb0f
jmp 0xdd1a
movq 0x88(%rsp), %rdi
leaq 0xfc63(%rip), %rsi      # 0x1d786
callq 0x84b0
cmpb $0x0, %al
je 0xdb92
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x30(%rax)
je 0xdb8d
movq 0xa8(%rsp), %rdi
addq $0xb8, %rdi
movq 0xa8(%rsp), %rsi
addq $0x8, %rsi
movq 0x20(%rsp), %rdx
movl 0x2c(%rsp), %eax
movl %eax, %ecx
callq 0x16ab0
movl %eax, %ecx
movq 0xa8(%rsp), %rax
movl %ecx, 0x1a0(%rax)
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x1a0(%rax)
je 0xdb8b
jmp 0xdd87
jmp 0xdb8d
jmp 0xdd18
movq 0x88(%rsp), %rdi
leaq 0xfbea(%rip), %rsi      # 0x1d78b
callq 0x84b0
cmpb $0x0, %al
je 0xdbf4
movq 0xa8(%rsp), %rdi
addq $0xb8, %rdi
movq 0x20(%rsp), %rsi
movl 0x2c(%rsp), %eax
movl %eax, %edx
callq 0x16f70
movl %eax, %ecx
movq 0xa8(%rsp), %rax
movl %ecx, 0x1a0(%rax)
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x1a0(%rax)
je 0xdbef
jmp 0xdd87
jmp 0xdd16
movq 0x88(%rsp), %rdi
leaq 0xfb8d(%rip), %rsi      # 0x1d790
callq 0x84b0
cmpb $0x0, %al
je 0xdc56
movq 0xa8(%rsp), %rdi
addq $0xb8, %rdi
movq 0x20(%rsp), %rsi
movl 0x2c(%rsp), %eax
movl %eax, %edx
callq 0x17040
movl %eax, %ecx
movq 0xa8(%rsp), %rax
movl %ecx, 0x1a0(%rax)
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x1a0(%rax)
je 0xdc51
jmp 0xdd87
jmp 0xdd14
movq 0x88(%rsp), %rdi
callq 0x8560
cmpb $0x0, %al
jne 0xdc7e
movq 0xa8(%rsp), %rax
movl $0x45, 0x1a0(%rax)
jmp 0xdd87
movl $0x1, 0x34(%rsp)
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x34(%rax)
je 0xdd12
movq 0xa8(%rsp), %rdi
addq $0xb8, %rdi
addq $0xb8, %rdi
movl 0x30(%rsp), %eax
subl $0x1, %eax
movl %eax, %eax
shlq $0x3, %rax
addq %rax, %rdi
movq 0xa8(%rsp), %rsi
addq $0xb8, %rsi
addq $0xd0, %rsi
movl 0x30(%rsp), %eax
subl $0x1, %eax
movl %eax, %eax
shlq $0x3, %rax
addq %rax, %rsi
movq 0x88(%rsp), %rdx
callq 0x8780
movl %eax, %ecx
movq 0xa8(%rsp), %rax
movl %ecx, 0x1a0(%rax)
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x1a0(%rax)
je 0xdd10
jmp 0xdd87
jmp 0xdd12
jmp 0xdd14
jmp 0xdd16
jmp 0xdd18
jmp 0xdd1a
jmp 0xdd1c
jmp 0xdd1e
jmp 0xdd20
jmp 0xdd22
jmp 0xdd24
jmp 0xdd26
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x28(%rax)
jne 0xdd63
cmpl $0x0, 0x34(%rsp)
jne 0xdd63
movq 0x88(%rsp), %rdi
callq 0x85e0
cmpl $0x0, %eax
je 0xdd61
movq 0xa8(%rsp), %rax
movl $0x39, 0x1a0(%rax)
jmp 0xdd87
jmp 0xdd63
cmpb $0x0, 0x97(%rsp)
jne 0xdd82
movq 0x88(%rsp), %rdi
callq 0x8750
movq %rax, 0x88(%rsp)
jmp 0xd6ed
leaq 0x50(%rsp), %rdi
callq 0xf580
movq 0xa8(%rsp), %rax
cmpl $0x0, 0xc0(%rax)
jne 0xdde5
movq 0xb8(%rsp), %rax
movl (%rax), %edi
movq 0xb0(%rsp), %rax
movl (%rax), %esi
movq 0xa8(%rsp), %rdx
addq $0xb8, %rdx
addq $0x10, %rdx
callq 0x17110
movq 0xb0(%rsp), %rcx
movl (%rcx), %ecx
addq %rcx, %rax
movq %rax, 0x48(%rsp)
jmp 0xe022
movq 0xa8(%rsp), %rax
addq $0xb8, %rax
addq $0x10, %rax
movq %rax, 0x10(%rsp)
movq $0x0, 0x48(%rsp)
movq 0xb8(%rsp), %rax
movl (%rax), %edi
addl $0x7, %edi
shrl $0x3, %edi
movq 0xb0(%rsp), %rax
movl (%rax), %esi
addl $0x7, %esi
shrl $0x3, %esi
movq 0x10(%rsp), %rdx
callq 0x17110
movq 0xb0(%rsp), %rcx
movl (%rcx), %ecx
addl $0x7, %ecx
shrl $0x3, %ecx
movl %ecx, %ecx
addq %rcx, %rax
addq 0x48(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xb8(%rsp), %rax
cmpl $0x4, (%rax)
jbe 0xdea4
movq 0xb8(%rsp), %rax
movl (%rax), %edi
addl $0x3, %edi
shrl $0x3, %edi
movq 0xb0(%rsp), %rax
movl (%rax), %esi
addl $0x7, %esi
shrl $0x3, %esi
movq 0x10(%rsp), %rdx
callq 0x17110
movq 0xb0(%rsp), %rcx
movl (%rcx), %ecx
addl $0x7, %ecx
shrl $0x3, %ecx
movl %ecx, %ecx
addq %rcx, %rax
addq 0x48(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xb8(%rsp), %rax
movl (%rax), %edi
addl $0x3, %edi
shrl $0x2, %edi
movq 0xb0(%rsp), %rax
movl (%rax), %esi
addl $0x3, %esi
shrl $0x3, %esi
movq 0x10(%rsp), %rdx
callq 0x17110
movq 0xb0(%rsp), %rcx
movl (%rcx), %ecx
addl $0x3, %ecx
shrl $0x3, %ecx
movl %ecx, %ecx
addq %rcx, %rax
addq 0x48(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xb8(%rsp), %rax
cmpl $0x2, (%rax)
jbe 0xdf43
movq 0xb8(%rsp), %rax
movl (%rax), %edi
addl $0x1, %edi
shrl $0x2, %edi
movq 0xb0(%rsp), %rax
movl (%rax), %esi
addl $0x3, %esi
shrl $0x2, %esi
movq 0x10(%rsp), %rdx
callq 0x17110
movq 0xb0(%rsp), %rcx
movl (%rcx), %ecx
addl $0x3, %ecx
shrl $0x2, %ecx
movl %ecx, %ecx
addq %rcx, %rax
addq 0x48(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xb8(%rsp), %rax
movl (%rax), %edi
addl $0x1, %edi
shrl %edi
movq 0xb0(%rsp), %rax
movl (%rax), %esi
addl $0x1, %esi
shrl $0x2, %esi
movq 0x10(%rsp), %rdx
callq 0x17110
movq 0xb0(%rsp), %rcx
movl (%rcx), %ecx
addl $0x1, %ecx
shrl $0x2, %ecx
movl %ecx, %ecx
addq %rcx, %rax
addq 0x48(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xb8(%rsp), %rax
cmpl $0x1, (%rax)
jbe 0xdfde
movq 0xb8(%rsp), %rax
movl (%rax), %edi
addl $0x0, %edi
shrl %edi
movq 0xb0(%rsp), %rax
movl (%rax), %esi
addl $0x1, %esi
shrl %esi
movq 0x10(%rsp), %rdx
callq 0x17110
movq 0xb0(%rsp), %rcx
movl (%rcx), %ecx
addl $0x1, %ecx
shrl %ecx
movl %ecx, %ecx
addq %rcx, %rax
addq 0x48(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xb8(%rsp), %rax
movl (%rax), %edi
addl $0x0, %edi
movq 0xb0(%rsp), %rax
movl (%rax), %esi
addl $0x0, %esi
shrl %esi
movq 0x10(%rsp), %rdx
callq 0x17110
movq 0xb0(%rsp), %rcx
movl (%rcx), %ecx
addl $0x0, %ecx
shrl %ecx
movl %ecx, %ecx
addq %rcx, %rax
addq 0x48(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x1a0(%rax)
jne 0xe059
movq 0x48(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0x12360
cmpl $0x0, %eax
jne 0xe059
movq 0xa8(%rsp), %rax
movl $0x53, 0x1a0(%rax)
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x1a0(%rax)
jne 0xe0d4
leaq 0x50(%rsp), %rdi
leaq 0x50(%rsp), %rsi
addq $0x8, %rsi
movq 0x68(%rsp), %rdx
movq 0x70(%rsp), %rcx
movq 0xa8(%rsp), %r8
addq $0x8, %r8
callq 0x10f10
movl %eax, %ecx
movq 0xa8(%rsp), %rax
movl %ecx, 0x1a0(%rax)
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x1a0(%rax)
jne 0xe0d2
movq 0x58(%rsp), %rax
cmpq 0x48(%rsp), %rax
je 0xe0d2
movq 0xa8(%rsp), %rax
movl $0x5b, 0x1a0(%rax)
jmp 0xe0d4
leaq 0x68(%rsp), %rdi
callq 0x17170
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x1a0(%rax)
jne 0xe15a
movq 0xb8(%rsp), %rax
movl (%rax), %edi
movq 0xb0(%rsp), %rax
movl (%rax), %esi
movq 0xa8(%rsp), %rdx
addq $0xb8, %rdx
addq $0x10, %rdx
callq 0x8ee0
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0x6cd0
movq %rax, %rcx
movq 0xc0(%rsp), %rax
movq %rcx, (%rax)
movq 0xc0(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xe158
movq 0xa8(%rsp), %rax
movl $0x53, 0x1a0(%rax)
jmp 0xe15a
movq 0xa8(%rsp), %rax
cmpl $0x0, 0x1a0(%rax)
jne 0xe1ff
movq $0x0, 0x80(%rsp)
movq 0x80(%rsp), %rax
cmpq 0x38(%rsp), %rax
jae 0xe1b7
movq 0xc0(%rsp), %rax
movq (%rax), %rax
movq 0x80(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x80(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x80(%rsp)
jmp 0xe17b
movq 0xc0(%rsp), %rax
movq (%rax), %rdi
movq 0x50(%rsp), %rsi
movq 0xb8(%rsp), %rax
movl (%rax), %edx
movq 0xb0(%rsp), %rax
movl (%rax), %ecx
movq 0xa8(%rsp), %r8
addq $0xb8, %r8
callq 0x171b0
movl %eax, %ecx
movq 0xa8(%rsp), %rax
movl %ecx, 0x1a0(%rax)
leaq 0x50(%rsp), %rdi
callq 0x17170
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)