// File: /workspace/github_c_makefile_star2_O0/tditlu[P]shadetabler/src/lodepng/lodepng.c
// Function: getPixelColorsRGB8
static void getPixelColorsRGB8(unsigned char* LODEPNG_RESTRICT buffer, size_t numpixels,
                               const unsigned char* LODEPNG_RESTRICT in,
                               const LodePNGColorMode* mode) {
  const unsigned num_channels = 3;
  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];
      }
    } else if(mode->bitdepth == 16) {
      for(i = 0; i != numpixels; ++i, buffer += num_channels) {
        buffer[0] = buffer[1] = buffer[2] = in[i * 2];
      }
    } 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;
      }
    }
  } else if(mode->colortype == LCT_RGB) {
    if(mode->bitdepth == 8) {
      lodepng_memcpy(buffer, in, numpixels * 3);
    } 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];
      }
    }
  } 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], 3);
      }
    } 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], 3);
      }
    }
  } 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];
      }
    } else {
      for(i = 0; i != numpixels; ++i, buffer += num_channels) {
        buffer[0] = buffer[1] = buffer[2] = in[i * 4 + 0];
      }
    }
  } else if(mode->colortype == LCT_RGBA) {
    if(mode->bitdepth == 8) {
      for(i = 0; i != numpixels; ++i, buffer += num_channels) {
        lodepng_memcpy(buffer, &in[i * 4], 3);
      }
    } 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];
      }
    }
  }
}

// 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 $0x3, -0x24(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x8cbf
movq -0x20(%rbp), %rax
cmpl $0x8, 0x4(%rax)
jne 0x8bd6
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x8bd1
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 -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x8(%rbp)
jmp 0x8b8e
jmp 0x8cba
movq -0x20(%rbp), %rax
cmpl $0x10, 0x4(%rax)
jne 0x8c33
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x8c2e
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 -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x8(%rbp)
jmp 0x8be8
jmp 0x8cb8
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 0x8cb6
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 -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x8(%rbp)
jmp 0x8c57
jmp 0x8cb8
jmp 0x8cba
jmp 0x8fdb
movq -0x20(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x8d57
movq -0x20(%rbp), %rax
cmpl $0x8, 0x4(%rax)
jne 0x8cea
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
imulq $0x3, -0x10(%rbp), %rdx
callq 0x6440
jmp 0x8d52
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x8d50
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 -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x8(%rbp)
jmp 0x8cf2
jmp 0x8d52
jmp 0x8fd9
movq -0x20(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x8e41
movq -0x20(%rbp), %rax
cmpl $0x8, 0x4(%rax)
jne 0x8dcc
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x8dca
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 $0x3, %edx
callq 0x6440
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x8(%rbp)
jmp 0x8d76
jmp 0x8e3c
movq $0x0, -0x50(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x8e3a
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 $0x3, %edx
callq 0x6440
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x8(%rbp)
jmp 0x8ddc
jmp 0x8e3c
jmp 0x8fd7
movq -0x20(%rbp), %rax
cmpl $0x4, (%rax)
jne 0x8efe
movq -0x20(%rbp), %rax
cmpl $0x8, 0x4(%rax)
jne 0x8ea8
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x8ea6
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 -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x8(%rbp)
jmp 0x8e60
jmp 0x8ef9
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x8ef7
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 -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x8(%rbp)
jmp 0x8eb0
jmp 0x8ef9
jmp 0x8fd5
movq -0x20(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x8fd3
movq -0x20(%rbp), %rax
cmpl $0x8, 0x4(%rax)
jne 0x8f60
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x8f5e
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rsi
movl $0x3, %edx
callq 0x6440
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x8(%rbp)
jmp 0x8f1d
jmp 0x8fd1
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x8fcf
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 -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x8(%rbp)
jmp 0x8f68
jmp 0x8fd1
jmp 0x8fd3
jmp 0x8fd5
jmp 0x8fd7
jmp 0x8fd9
jmp 0x8fdb
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)