// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: getPixelColorsRGBA8
static void getPixelColorsRGBA8(unsigned char* LODEPNG_RESTRICT buffer, size_t numpixels,
                                const unsigned char* LODEPNG_RESTRICT in,
                                const LodePNGColorMode* mode) {
  unsigned num_channels = 4;
  size_t i;
  if(mode->colortype == LCT_GREY) {
    if(mode->bitdepth == 8) {
      for(i = 0; i != numpixels; ++i, buffer += num_channels) {
        buffer[0] = buffer[1] = buffer[2] = in[i];
        buffer[3] = 255;
      }
      if(mode->key_defined) {
        buffer -= numpixels * num_channels;
        for(i = 0; i != numpixels; ++i, buffer += num_channels) {
          if(buffer[0] == mode->key_r) buffer[3] = 0;
        }
      }
    } else if(mode->bitdepth == 16) {
      for(i = 0; i != numpixels; ++i, buffer += num_channels) {
        buffer[0] = buffer[1] = buffer[2] = in[i * 2];
        buffer[3] = mode->key_defined && 256U * in[i * 2 + 0] + in[i * 2 + 1] == mode->key_r ? 0 : 255;
      }
    } else {
      unsigned highest = ((1U << mode->bitdepth) - 1U); /*highest possible value for this bit depth*/
      size_t j = 0;
      for(i = 0; i != numpixels; ++i, buffer += num_channels) {
        unsigned value = readBitsFromReversedStream(&j, in, mode->bitdepth);
        buffer[0] = buffer[1] = buffer[2] = (value * 255) / highest;
        buffer[3] = mode->key_defined && value == mode->key_r ? 0 : 255;
      }
    }
  } else if(mode->colortype == LCT_RGB) {
    if(mode->bitdepth == 8) {
      for(i = 0; i != numpixels; ++i, buffer += num_channels) {
        lodepng_memcpy(buffer, &in[i * 3], 3);
        buffer[3] = 255;
      }
      if(mode->key_defined) {
        buffer -= numpixels * num_channels;
        for(i = 0; i != numpixels; ++i, buffer += num_channels) {
          if(buffer[0] == mode->key_r && buffer[1]== mode->key_g && buffer[2] == mode->key_b) buffer[3] = 0;
        }
      }
    } else {
      for(i = 0; i != numpixels; ++i, buffer += num_channels) {
        buffer[0] = in[i * 6 + 0];
        buffer[1] = in[i * 6 + 2];
        buffer[2] = in[i * 6 + 4];
        buffer[3] = mode->key_defined
           && 256U * in[i * 6 + 0] + in[i * 6 + 1] == mode->key_r
           && 256U * in[i * 6 + 2] + in[i * 6 + 3] == mode->key_g
           && 256U * in[i * 6 + 4] + in[i * 6 + 5] == mode->key_b ? 0 : 255;
      }
    }
  } else if(mode->colortype == LCT_PALETTE) {
    if(mode->bitdepth == 8) {
      for(i = 0; i != numpixels; ++i, buffer += num_channels) {
        unsigned index = in[i];
        /*out of bounds of palette not checked: see lodepng_color_mode_alloc_palette.*/
        lodepng_memcpy(buffer, &mode->palette[index * 4], 4);
      }
    } else {
      size_t j = 0;
      for(i = 0; i != numpixels; ++i, buffer += num_channels) {
        unsigned index = readBitsFromReversedStream(&j, in, mode->bitdepth);
        /*out of bounds of palette not checked: see lodepng_color_mode_alloc_palette.*/
        lodepng_memcpy(buffer, &mode->palette[index * 4], 4);
      }
    }
  } else if(mode->colortype == LCT_GREY_ALPHA) {
    if(mode->bitdepth == 8) {
      for(i = 0; i != numpixels; ++i, buffer += num_channels) {
        buffer[0] = buffer[1] = buffer[2] = in[i * 2 + 0];
        buffer[3] = in[i * 2 + 1];
      }
    } else {
      for(i = 0; i != numpixels; ++i, buffer += num_channels) {
        buffer[0] = buffer[1] = buffer[2] = in[i * 4 + 0];
        buffer[3] = in[i * 4 + 2];
      }
    }
  } else if(mode->colortype == LCT_RGBA) {
    if(mode->bitdepth == 8) {
      lodepng_memcpy(buffer, in, numpixels * 4);
    } else {
      for(i = 0; i != numpixels; ++i, buffer += num_channels) {
        buffer[0] = in[i * 8 + 0];
        buffer[1] = in[i * 8 + 2];
        buffer[2] = in[i * 8 + 4];
        buffer[3] = in[i * 8 + 6];
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x4, -0x24(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x865b
movq -0x20(%rbp), %rax
cmpl $0x8, 0x4(%rax)
jne 0x84c7
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x8451
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x8(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movb $-0x1, 0x3(%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x8402
movq -0x20(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0x84c2
movq -0x10(%rbp), %rdx
movl -0x24(%rbp), %eax
imulq %rax, %rdx
movq -0x8(%rbp), %rax
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x84c0
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jne 0x84a0
movq -0x8(%rbp), %rax
movb $0x0, 0x3(%rax)
jmp 0x84a2
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x847e
jmp 0x84c2
jmp 0x8656
movq -0x20(%rbp), %rax
cmpl $0x10, 0x4(%rax)
jne 0x858c
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x8587
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x8(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x18(%rcx)
movb %al, -0x55(%rbp)
je 0x854d
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rdx
shlq %rdx
movzbl 0x1(%rcx,%rdx), %ecx
addl %ecx, %eax
movq -0x20(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
sete %al
movb %al, -0x55(%rbp)
movb -0x55(%rbp), %dl
movl $0xff, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x84dd
jmp 0x8654
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, -0x34(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x8652
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edx
leaq -0x40(%rbp), %rdi
callq 0x14280
movl %eax, -0x44(%rbp)
imull $0xff, -0x44(%rbp), %eax
xorl %edx, %edx
divl -0x34(%rbp)
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x8(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x18(%rcx)
movb %al, -0x56(%rbp)
je 0x8618
movl -0x44(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
sete %al
movb %al, -0x56(%rbp)
movb -0x56(%rbp), %dl
movl $0xff, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x85b0
jmp 0x8654
jmp 0x8656
jmp 0x8b41
movq -0x20(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x8893
movq -0x20(%rbp), %rax
cmpl $0x8, 0x4(%rax)
jne 0x8764
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x86c8
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
imulq $0x3, -0x30(%rbp), %rax
addq %rax, %rsi
movl $0x3, %edx
callq 0x6440
movq -0x8(%rbp), %rax
movb $-0x1, 0x3(%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x867e
movq -0x20(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0x875f
movq -0x10(%rbp), %rdx
movl -0x24(%rbp), %eax
imulq %rax, %rdx
movq -0x8(%rbp), %rax
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x875d
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jne 0x873d
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jne 0x873d
movq -0x8(%rbp), %rax
movzbl 0x2(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x24(%rcx), %eax
jne 0x873d
movq -0x8(%rbp), %rax
movb $0x0, 0x3(%rax)
jmp 0x873f
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x86f9
jmp 0x875f
jmp 0x888e
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x888c
movq -0x18(%rbp), %rax
imulq $0x6, -0x30(%rbp), %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
imulq $0x6, -0x30(%rbp), %rcx
movb 0x2(%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x18(%rbp), %rax
imulq $0x6, -0x30(%rbp), %rcx
movb 0x4(%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x18(%rcx)
movb %al, -0x57(%rbp)
je 0x8852
movq -0x18(%rbp), %rax
imulq $0x6, -0x30(%rbp), %rcx
movzbl (%rax,%rcx), %ecx
shll $0x8, %ecx
movq -0x18(%rbp), %rax
imulq $0x6, -0x30(%rbp), %rdx
movzbl 0x1(%rax,%rdx), %eax
addl %eax, %ecx
movq -0x20(%rbp), %rdx
xorl %eax, %eax
cmpl 0x1c(%rdx), %ecx
movb %al, -0x57(%rbp)
jne 0x8852
movq -0x18(%rbp), %rax
imulq $0x6, -0x30(%rbp), %rcx
movzbl 0x2(%rax,%rcx), %ecx
shll $0x8, %ecx
movq -0x18(%rbp), %rax
imulq $0x6, -0x30(%rbp), %rdx
movzbl 0x3(%rax,%rdx), %eax
addl %eax, %ecx
movq -0x20(%rbp), %rdx
xorl %eax, %eax
cmpl 0x20(%rdx), %ecx
movb %al, -0x57(%rbp)
jne 0x8852
movq -0x18(%rbp), %rax
imulq $0x6, -0x30(%rbp), %rcx
movzbl 0x4(%rax,%rcx), %eax
shll $0x8, %eax
movq -0x18(%rbp), %rcx
imulq $0x6, -0x30(%rbp), %rdx
movzbl 0x5(%rcx,%rdx), %ecx
addl %ecx, %eax
movq -0x20(%rbp), %rcx
cmpl 0x24(%rcx), %eax
sete %al
movb %al, -0x57(%rbp)
movb -0x57(%rbp), %dl
movl $0xff, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x876c
jmp 0x888e
jmp 0x8b3f
movq -0x20(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x8985
movq -0x20(%rbp), %rax
cmpl $0x8, 0x4(%rax)
jne 0x890c
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x890a
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movl -0x48(%rbp), %eax
shll $0x2, %eax
movl %eax, %eax
addq %rax, %rsi
movl $0x4, %edx
callq 0x6440
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x88b2
jmp 0x8980
movq $0x0, -0x50(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x897e
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edx
leaq -0x50(%rbp), %rdi
callq 0x14280
movl %eax, -0x54(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movl -0x54(%rbp), %eax
shll $0x2, %eax
movl %eax, %eax
addq %rax, %rsi
movl $0x4, %edx
callq 0x6440
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x891c
jmp 0x8980
jmp 0x8b3d
movq -0x20(%rbp), %rax
cmpl $0x4, (%rax)
jne 0x8a77
movq -0x20(%rbp), %rax
cmpl $0x8, 0x4(%rax)
jne 0x8a06
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x8a04
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x8(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq %rcx
movb 0x1(%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x89a4
jmp 0x8a72
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x8a70
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x2, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x8(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x2, %rcx
movb 0x2(%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x8a0e
jmp 0x8a72
jmp 0x8b3b
movq -0x20(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x8b39
movq -0x20(%rbp), %rax
cmpl $0x8, 0x4(%rax)
jne 0x8aa8
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
shlq $0x2, %rdx
callq 0x6440
jmp 0x8b37
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x8b35
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x3, %rcx
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x3, %rcx
movb 0x2(%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x3, %rcx
movb 0x4(%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x3, %rcx
movb 0x6(%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x8ab0
jmp 0x8b37
jmp 0x8b39
jmp 0x8b3b
jmp 0x8b3d
jmp 0x8b3f
jmp 0x8b41
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)