// File: /workspace/github_cpp_makefile_star2_O2/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_convert(unsigned char*, unsigned char const*, LodePNG_InfoColor*, LodePNG_InfoColor*, unsigned int, unsigned int)
unsigned LodePNG_convert(unsigned char* out, const unsigned char* in, LodePNG_InfoColor* infoOut, LodePNG_InfoColor* infoIn, unsigned w, unsigned h)
{
  const size_t numpixels = w * h; /*amount of pixels*/
  const unsigned OUT_BYTES = LodePNG_InfoColor_getBpp(infoOut) / 8; /*bytes per pixel in the output image*/
  const unsigned OUT_ALPHA = LodePNG_InfoColor_isAlphaType(infoOut); /*use 8-bit alpha channel*/
  size_t i, c, bp = 0; /*bitpointer, used by less-than-8-bit color types*/
  
  /*cases where in and out already have the same format*/
  if(LodePNG_InfoColor_equal(infoIn, infoOut))
  {
    size_t i, size = (w * h * LodePNG_InfoColor_getBpp(infoIn) + 7) / 8;
    for(i = 0; i < size; i++) out[i] = in[i];
    return 0;
  }

  if((infoOut->colorType == 2 || infoOut->colorType == 6) && infoOut->bitDepth == 8)
  {
    if(infoIn->bitDepth == 8)
    {
      switch(infoIn->colorType)
      {
        case 0: /*greyscale color*/
          for(i = 0; i < numpixels; i++)
          {
            if(OUT_ALPHA) out[OUT_BYTES * i + 3] = 255;
            out[OUT_BYTES * i + 0] = out[OUT_BYTES * i + 1] = out[OUT_BYTES * i + 2] = in[i];
            if(OUT_ALPHA && infoIn->key_defined && in[i] == infoIn->key_r) out[OUT_BYTES * i + 3] = 0;
          }
        break;
        case 2: /*RGB color*/
          for(i = 0; i < numpixels; i++)
          {
            if(OUT_ALPHA) out[OUT_BYTES * i + 3] = 255;
            for(c = 0; c < 3; c++) out[OUT_BYTES * i + c] = in[3 * i + c];
            if(OUT_ALPHA && infoIn->key_defined == 1 && in[3 * i + 0] == infoIn->key_r && in[3 * i + 1] == infoIn->key_g && in[3 * i + 2] == infoIn->key_b) out[OUT_BYTES * i + 3] = 0;
          }
        break;
        case 3: /*indexed color (palette)*/
          for(i = 0; i < numpixels; i++)
          {
            if(OUT_ALPHA) out[OUT_BYTES * i + 3] = 255;
            if(in[i] >= infoIn->palettesize) return 46;
            for(c = 0; c < OUT_BYTES; c++) out[OUT_BYTES * i + c] = infoIn->palette[4 * in[i] + c]; /*get rgb colors from the palette*/
          }
        break;
        case 4: /*greyscale with alpha*/
          for(i = 0; i < numpixels; i++)
          {
            out[OUT_BYTES * i + 0] = out[OUT_BYTES * i + 1] = out[OUT_BYTES * i + 2] = in[2 * i + 0];
            if(OUT_ALPHA) out[OUT_BYTES * i + 3] = in[2 * i + 1];
          }
        break;
        case 6: /*RGB with alpha*/
          for(i = 0; i < numpixels; i++)
          {
            for(c = 0; c < OUT_BYTES; c++) out[OUT_BYTES * i + c] = in[4 * i + c];
          }
        break;
        default: break;
      }
    }
    else if(infoIn->bitDepth == 16)
    {
      switch(infoIn->colorType)
      {
        case 0: /*greyscale color*/
          for(i = 0; i < numpixels; i++)
          {
            if(OUT_ALPHA) out[OUT_BYTES * i + 3] = 255;
            out[OUT_BYTES * i + 0] = out[OUT_BYTES * i + 1] = out[OUT_BYTES * i + 2] = in[2 * i];
            if(OUT_ALPHA && infoIn->key_defined && 256U * in[i] + in[i + 1] == infoIn->key_r) out[OUT_BYTES * i + 3] = 0;
          }
        break;
        case 2: /*RGB color*/
          for(i = 0; i < numpixels; i++)
          {
            if(OUT_ALPHA) out[OUT_BYTES * i + 3] = 255;
            for(c = 0; c < 3; c++) out[OUT_BYTES * i + c] = in[6 * i + 2 * c];
            if(OUT_ALPHA && infoIn->key_defined && 256U * in[6 * i + 0] + in[6 * i + 1] == infoIn->key_r && 256U * in[6 * i + 2] + in[6 * i + 3] == infoIn->key_g && 256U * in[6 * i + 4] + in[6 * i + 5] == infoIn->key_b) out[OUT_BYTES * i + 3] = 0;
          }
        break;
        case 4: /*greyscale with alpha*/
          for(i = 0; i < numpixels; i++)
          {
            out[OUT_BYTES * i + 0] = out[OUT_BYTES * i + 1] = out[OUT_BYTES * i + 2] = in[4 * i]; /*most significant byte*/
            if(OUT_ALPHA) out[OUT_BYTES * i + 3] = in[4 * i + 2];
          }
        break;
        case 6: /*RGB with alpha*/
          for(i = 0; i < numpixels; i++)
          {
            for(c = 0; c < OUT_BYTES; c++) out[OUT_BYTES * i + c] = in[8 * i + 2 * c];
          }
          break;
        default: break;
      }
    }
    else /*infoIn->bitDepth is less than 8 bit per channel*/
    {
      switch(infoIn->colorType)
      {
        case 0: /*greyscale color*/
          for(i = 0; i < numpixels; i++)
          {
            unsigned value = readBitsFromReversedStream(&bp, in, infoIn->bitDepth);
            if(OUT_ALPHA) out[OUT_BYTES * i + 3] = 255;
            if(OUT_ALPHA && infoIn->key_defined && value && ((1U << infoIn->bitDepth) - 1U) == infoIn->key_r && ((1U << infoIn->bitDepth) - 1U)) out[OUT_BYTES * i + 3] = 0;
            value = (value * 255) / ((1 << infoIn->bitDepth) - 1); /*scale value from 0 to 255*/
            out[OUT_BYTES * i + 0] = out[OUT_BYTES * i + 1] = out[OUT_BYTES * i + 2] = (unsigned char)(value);
          }
        break;
        case 3: /*indexed color (palette)*/
          for(i = 0; i < numpixels; i++)
          {
            unsigned value = readBitsFromReversedStream(&bp, in, infoIn->bitDepth);
            if(OUT_ALPHA) out[OUT_BYTES * i + 3] = 255;
            if(value >= infoIn->palettesize) return 47;
            for(c = 0; c < OUT_BYTES; c++) out[OUT_BYTES * i + c] = infoIn->palette[4 * value + c]; /*get rgb colors from the palette*/
          }
        break;
        default: break;
      }
    }
  }
  else if(LodePNG_InfoColor_isGreyscaleType(infoOut) && infoOut->bitDepth == 8) /*conversion from greyscale to greyscale*/
  {
    if(!LodePNG_InfoColor_isGreyscaleType(infoIn)) return 62;
    if(infoIn->bitDepth == 8)
    {
      switch(infoIn->colorType)
      {
        case 0: /*greyscale color*/
          for(i = 0; i < numpixels; i++)
          {
            if(OUT_ALPHA) out[OUT_BYTES * i + 1] = 255;
            out[OUT_BYTES * i] = in[i];
            if(OUT_ALPHA && infoIn->key_defined && in[i] == infoIn->key_r) out[OUT_BYTES * i + 1] = 0;
          }
        break;
        case 4: /*greyscale with alpha*/
          for(i = 0; i < numpixels; i++)
          {
            out[OUT_BYTES * i + 0] = in[2 * i + 0];
            if(OUT_ALPHA) out[OUT_BYTES * i + 1] = in[2 * i + 1];
          }
        break;
        default: return 31;
      }
    }
    else if(infoIn->bitDepth == 16)
    {
      switch(infoIn->colorType)
      {
        case 0: /*greyscale color*/
          for(i = 0; i < numpixels; i++)
          {
            if(OUT_ALPHA) out[OUT_BYTES * i + 1] = 255;
            out[OUT_BYTES * i] = in[2 * i];
            if(OUT_ALPHA && infoIn->key_defined && 256U * in[i] + in[i + 1] == infoIn->key_r) out[OUT_BYTES * i + 1] = 0;
          }
        break;
        case 4: /*greyscale with alpha*/
          for(i = 0; i < numpixels; i++)
          {
            out[OUT_BYTES * i] = in[4 * i]; /*most significant byte*/
            if(OUT_ALPHA) out[OUT_BYTES * i + 1] = in[4 * i + 2]; /*most significant byte*/
          }
        break;
        default: return 31;
      }
    }
    else /*infoIn->bitDepth is less than 8 bit per channel*/
    {
      if(infoIn->colorType != 0) return 31; /*colorType 0 is the only greyscale type with < 8 bits per channel*/
      for(i = 0; i < numpixels; i++)
      {
        unsigned value = readBitsFromReversedStream(&bp, in, infoIn->bitDepth);
        if(OUT_ALPHA) out[OUT_BYTES * i + 1] = 255;
        if(OUT_ALPHA && infoIn->key_defined && value && ((1U << infoIn->bitDepth) - 1U) == infoIn->key_r && ((1U << infoIn->bitDepth) - 1U)) out[OUT_BYTES * i + 1] = 0;
        value = (value * 255) / ((1 << infoIn->bitDepth) - 1); /*scale value from 0 to 255*/
        out[OUT_BYTES * i] = (unsigned char)(value);
      }
    }
  }
  else return 59;
  
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %r14d
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
imull %r9d, %r14d
movq %rdx, %rdi
callq 0x11cfc
movl (%r12), %edx
andq $0x0, -0x48(%rbp)
movl (%r13), %ecx
cmpl %edx, %ecx
jne 0x125ec
movl 0x4(%r13), %esi
cmpl 0x4(%r12), %esi
jne 0x125ec
movq %r13, %rdi
callq 0x11cfc
imull %r14d, %eax
addl $0x7, %eax
shrl $0x3, %eax
movq $0x0, -0x30(%rbp)
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x12ba3
movb (%rbx,%rcx), %dl
movb %dl, (%r15,%rcx)
incq %rcx
jmp 0x125d7
shrl $0x3, %eax
movl %edx, %r11d
shrl $0x2, %r11d
movl %edx, %esi
orl $0x4, %esi
cmpl $0x6, %esi
jne 0x1269e
cmpl $0x8, 0x4(%r12)
jne 0x1269e
movl 0x4(%r13), %esi
movl %ecx, %edx
cmpl $0x10, %esi
je 0x126d0
cmpl $0x8, %esi
jne 0x1274d
movq $0x0, -0x30(%rbp)
cmpl $0x6, %ecx
ja 0x12ba3
leaq 0x101bc(%rip), %rcx     # 0x227fc
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
addq $0x3, %r15
movl %eax, %eax
movq $0x0, -0x30(%rbp)
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x12ba3
testb $0x1, %r11b
je 0x1266c
movb $-0x1, (%r15)
movb (%rbx,%rcx), %dl
movb %dl, -0x1(%r15)
movb %dl, -0x2(%r15)
movb %dl, -0x3(%r15)
testb $0x1, %r11b
je 0x12696
cmpl $0x0, 0x18(%r13)
je 0x12696
movzbl (%rbx,%rcx), %edx
cmpl %edx, 0x1c(%r13)
jne 0x12696
movb $0x0, (%r15)
incq %rcx
addq %rax, %r15
jmp 0x12659
pushq $0x3b
popq %rsi
movq %rsi, -0x30(%rbp)
testl $0xfffffffb, %edx       # imm = 0xFFFFFFFB
jne 0x12ba3
cmpl $0x8, 0x4(%r12)
jne 0x12ba3
testl $0xfffffffb, %ecx       # imm = 0xFFFFFFFB
je 0x127e8
pushq $0x3e
jmp 0x12b9e
movq $0x0, -0x30(%rbp)
cmpl $0x6, %ecx
ja 0x12ba3
leaq 0x100f8(%rip), %rcx     # 0x227e0
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
addq $0x3, %r15
movl %eax, %eax
movq $0x0, -0x30(%rbp)
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x12ba3
testb $0x1, %r11b
je 0x12714
movb $-0x1, (%r15)
movb (%rbx,%rcx,2), %dl
movb %dl, -0x1(%r15)
movb %dl, -0x2(%r15)
movb %dl, -0x3(%r15)
testb $0x1, %r11b
je 0x12745
cmpl $0x0, 0x18(%r13)
je 0x12745
movzwl (%rbx,%rcx), %edx
rolw $0x8, %dx
movzwl %dx, %edx
cmpl 0x1c(%r13), %edx
jne 0x12745
movb $0x0, (%r15)
incq %rcx
addq %rax, %r15
jmp 0x12701
testl %ecx, %ecx
je 0x12843
movq $0x0, -0x30(%rbp)
cmpl $0x3, %ecx
jne 0x12ba3
movq %r14, -0x40(%rbp)
movl %eax, %r12d
movq $0x0, -0x30(%rbp)
movq %r15, %r14
xorl %esi, %esi
movl %r11d, -0x4c(%rbp)
cmpq -0x40(%rbp), %rsi
je 0x12ba3
movl 0x4(%r13), %edx
leaq -0x48(%rbp), %rdi
movq %rsi, -0x38(%rbp)
movq %rbx, %rsi
callq 0x12ceb
movq -0x38(%rbp), %rsi
movl -0x4c(%rbp), %r11d
testb $0x1, %r11b
je 0x127b7
movq %rsi, %rcx
imulq %r12, %rcx
movb $-0x1, 0x3(%r15,%rcx)
movl %eax, %ecx
cmpq %rcx, 0x10(%r13)
jbe 0x12b56
shll $0x2, %eax
xorl %ecx, %ecx
cmpq %rcx, %r12
je 0x127e0
movq 0x8(%r13), %rdx
addq %rax, %rdx
movb (%rcx,%rdx), %dl
movb %dl, (%r14,%rcx)
incq %rcx
jmp 0x127c8
incq %rsi
addq %r12, %r14
jmp 0x1277e
movl 0x4(%r13), %edx
cmpl $0x10, %edx
je 0x12b5b
cmpl $0x8, %edx
jne 0x12b98
testl %ecx, %ecx
je 0x12c49
cmpl $0x4, %ecx
jne 0x12b9c
movl %eax, %eax
incq %r15
movq $0x0, -0x30(%rbp)
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x12ba3
movb (%rbx,%rcx,2), %dl
movb %dl, -0x1(%r15)
testb $0x1, %r11b
je 0x1283b
movb 0x1(%rbx,%rcx,2), %dl
movb %dl, (%r15)
incq %rcx
addq %rax, %r15
jmp 0x1281e
addq $0x3, %r15
movl %eax, %eax
movq %rax, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
subq $0x1, %r14
jb 0x12ba3
movq %r14, -0x40(%rbp)
movl 0x4(%r13), %r12d
leaq -0x48(%rbp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl %r11d, %r14d
callq 0x12ceb
movl %r14d, %r11d
testb $0x1, %r11b
jne 0x128ac
imull $0xff, %eax, %eax
pushq $-0x1
popq %rsi
movl %r12d, %ecx
shll %cl, %esi
notl %esi
xorl %edx, %edx
divl %esi
movb %al, -0x1(%r15)
movb %al, -0x2(%r15)
movb %al, -0x3(%r15)
addq -0x38(%rbp), %r15
movq -0x40(%rbp), %r14
jmp 0x12855
movb $-0x1, (%r15)
movl 0x4(%r13), %r12d
testl %eax, %eax
je 0x12882
cmpl $0x0, 0x18(%r13)
je 0x12882
pushq $-0x1
popq %rdx
movl %r12d, %ecx
shll %cl, %edx
testl %r12d, %r12d
je 0x12882
xorl 0x1c(%r13), %edx
cmpl $-0x1, %edx
jne 0x12882
movb $0x0, (%r15)
movl 0x4(%r13), %r12d
jmp 0x12882
movl %eax, %eax
addq $0x3, %r15
movq $0x0, -0x30(%rbp)
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x12ba3
movb (%rbx,%rcx,4), %dl
movb %dl, -0x1(%r15)
movb %dl, -0x2(%r15)
movb %dl, -0x3(%r15)
testb $0x1, %r11b
je 0x12914
movb 0x2(%rbx,%rcx,4), %dl
movb %dl, (%r15)
incq %rcx
addq %rax, %r15
jmp 0x128ef
movl %eax, %eax
movq $0x0, -0x30(%rbp)
movq %rbx, %rcx
movq %r15, %rdx
xorl %esi, %esi
cmpq %r14, %rsi
je 0x12ba3
movq %rsi, %rdi
imulq %rax, %rdi
testb $0x1, %r11b
je 0x1294a
movb $-0x1, 0x3(%r15,%rdi)
imulq $0x6, %rsi, %r8
xorl %r9d, %r9d
cmpq $0x3, %r9
je 0x12964
movb (%rcx,%r9,2), %r10b
movb %r10b, (%rdx,%r9)
incq %r9
jmp 0x12951
testb $0x1, %r11b
je 0x129b5
cmpl $0x0, 0x18(%r13)
je 0x129b5
movzwl (%rbx,%r8), %r9d
rolw $0x8, %r9w
movzwl %r9w, %r9d
cmpl 0x1c(%r13), %r9d
jne 0x129b5
movzwl 0x2(%rbx,%r8), %r9d
rolw $0x8, %r9w
movzwl %r9w, %r9d
cmpl 0x20(%r13), %r9d
jne 0x129b5
movzwl 0x4(%rbx,%r8), %r8d
rolw $0x8, %r8w
movzwl %r8w, %r8d
cmpl 0x24(%r13), %r8d
jne 0x129b5
movb $0x0, 0x3(%r15,%rdi)
incq %rsi
addq %rax, %rdx
addq $0x6, %rcx
jmp 0x1292e
movl %eax, %eax
movq $0x0, -0x30(%rbp)
xorl %ecx, %ecx
cmpq %r14, %rcx
je 0x12ba3
xorl %edx, %edx
cmpq %rdx, %rax
je 0x129ed
movb (%rbx,%rdx,2), %sil
movb %sil, (%r15,%rdx)
incq %rdx
jmp 0x129db
incq %rcx
addq %rax, %r15
addq $0x8, %rbx
jmp 0x129d0
movl %eax, %eax
movq $0x0, -0x30(%rbp)
pushq $0x2e
popq %rcx
movq %r15, %rdx
xorl %esi, %esi
cmpq %r14, %rsi
je 0x12ba3
testb $0x1, %r11b
je 0x12a27
movq %rsi, %rdi
imulq %rax, %rdi
movb $-0x1, 0x3(%r15,%rdi)
movzbl (%rbx,%rsi), %edi
cmpq %rdi, 0x10(%r13)
jbe 0x12bb6
xorl %edi, %edi
cmpq %rdi, %rax
je 0x12a56
movzbl (%rbx,%rsi), %r8d
shlq $0x2, %r8
addq 0x8(%r13), %r8
movb (%rdi,%r8), %r8b
movb %r8b, (%rdx,%rdi)
incq %rdi
jmp 0x12a37
incq %rsi
addq %rax, %rdx
jmp 0x12a0b
movl %eax, %eax
movq $0x0, -0x30(%rbp)
movq %rbx, %rcx
movq %r15, %rdx
xorl %esi, %esi
cmpq %r14, %rsi
je 0x12ba3
movq %rsi, %rdi
imulq %rax, %rdi
testb $0x1, %r11b
je 0x12a8c
movb $-0x1, 0x3(%r15,%rdi)
leaq (%rsi,%rsi,2), %r8
xorl %r9d, %r9d
cmpq $0x3, %r9
je 0x12aa6
movb (%rcx,%r9), %r10b
movb %r10b, (%rdx,%r9)
incq %r9
jmp 0x12a93
testb $0x1, %r11b
je 0x12adc
cmpl $0x1, 0x18(%r13)
jne 0x12adc
movzbl (%rbx,%r8), %r9d
cmpl %r9d, 0x1c(%r13)
jne 0x12adc
movzbl 0x1(%rbx,%r8), %r9d
cmpl %r9d, 0x20(%r13)
jne 0x12adc
movzbl 0x2(%rbx,%r8), %r8d
cmpl %r8d, 0x24(%r13)
jne 0x12adc
movb $0x0, 0x3(%r15,%rdi)
incq %rsi
addq %rax, %rdx
addq $0x3, %rcx
jmp 0x12a70
movl %eax, %eax
addq $0x3, %r15
movq $0x0, -0x30(%rbp)
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x12ba3
movb (%rbx,%rcx,2), %dl
movb %dl, -0x1(%r15)
movb %dl, -0x2(%r15)
movb %dl, -0x3(%r15)
testb $0x1, %r11b
je 0x12b1d
movb 0x1(%rbx,%rcx,2), %dl
movb %dl, (%r15)
incq %rcx
addq %rax, %r15
jmp 0x12af8
movl %eax, %eax
movq $0x0, -0x30(%rbp)
xorl %ecx, %ecx
cmpq %r14, %rcx
je 0x12ba3
xorl %edx, %edx
cmpq %rdx, %rax
je 0x12b4a
movb (%rbx,%rdx), %sil
movb %sil, (%r15,%rdx)
incq %rdx
jmp 0x12b38
incq %rcx
addq %rax, %r15
addq $0x4, %rbx
jmp 0x12b31
pushq $0x2f
popq %rax
jmp 0x12b9f
testl %ecx, %ecx
je 0x12c95
cmpl $0x4, %ecx
jne 0x12b9c
movl %eax, %eax
incq %r15
movq $0x0, -0x30(%rbp)
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x12ba3
movb (%rbx,%rcx,4), %dl
movb %dl, -0x1(%r15)
testb $0x1, %r11b
je 0x12b90
movb 0x2(%rbx,%rcx,4), %dl
movb %dl, (%r15)
incq %rcx
addq %rax, %r15
jmp 0x12b77
testl %ecx, %ecx
je 0x12bba
pushq $0x1f
popq %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ecx, %eax
jmp 0x12b9f
incq %r15
movl %eax, %eax
movq %rax, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
subq $0x1, %r14
jb 0x12ba3
movq %r14, -0x40(%rbp)
movl 0x4(%r13), %r12d
leaq -0x48(%rbp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl %r11d, %r14d
callq 0x12ceb
movl %r14d, %r11d
testb $0x1, %r11b
jne 0x12c16
pushq $-0x1
popq %rsi
movl %r12d, %ecx
shll %cl, %esi
imull $0xff, %eax, %eax
notl %esi
xorl %edx, %edx
divl %esi
movb %al, -0x1(%r15)
addq -0x38(%rbp), %r15
movq -0x40(%rbp), %r14
jmp 0x12bcb
movb $-0x1, (%r15)
movl 0x4(%r13), %r12d
testl %eax, %eax
je 0x12bf4
cmpl $0x0, 0x18(%r13)
je 0x12bf4
pushq $-0x1
popq %rdx
movl %r12d, %ecx
shll %cl, %edx
testl %r12d, %r12d
je 0x12bf4
xorl 0x1c(%r13), %edx
cmpl $-0x1, %edx
jne 0x12bf4
movb $0x0, (%r15)
movl 0x4(%r13), %r12d
jmp 0x12bf4
incq %r15
movl %eax, %eax
movq $0x0, -0x30(%rbp)
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x12ba3
testb $0x1, %r11b
jne 0x12c70
movb (%rbx,%rcx), %dl
movb %dl, -0x1(%r15)
jmp 0x12c8d
movb $-0x1, (%r15)
movzbl (%rbx,%rcx), %edx
movb %dl, -0x1(%r15)
cmpl $0x0, 0x18(%r13)
je 0x12c8d
cmpl %edx, 0x1c(%r13)
jne 0x12c8d
movb $0x0, (%r15)
incq %rcx
addq %rax, %r15
jmp 0x12c58
incq %r15
movl %eax, %eax
movq $0x0, -0x30(%rbp)
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x12ba3
testb $0x1, %r11b
jne 0x12cbc
movb (%rbx,%rcx,2), %dl
movb %dl, -0x1(%r15)
jmp 0x12ce3
movb $-0x1, (%r15)
movb (%rbx,%rcx,2), %dl
movb %dl, -0x1(%r15)
cmpl $0x0, 0x18(%r13)
je 0x12ce3
movzwl (%rbx,%rcx), %edx
rolw $0x8, %dx
movzwl %dx, %edx
cmpl 0x1c(%r13), %edx
jne 0x12ce3
movb $0x0, (%r15)
incq %rcx
addq %rax, %r15
jmp 0x12ca4