// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng_unittest.cpp
// Function: testFewColors()
void testFewColors() {
  std::cout << "codec test few colors " << std::endl;
  Image image;
  image.width = 4;
  image.height = 4;
  image.colorType = LCT_RGBA;
  image.bitDepth = 8;
  image.data.resize(image.width * image.height * 4);
  std::vector<unsigned char> colors;
  colors.push_back(0); colors.push_back(0); colors.push_back(0); colors.push_back(255); // black
  colors.push_back(255); colors.push_back(255); colors.push_back(255); colors.push_back(255); // white
  colors.push_back(128); colors.push_back(128); colors.push_back(128); colors.push_back(255); // gray
  colors.push_back(0); colors.push_back(0); colors.push_back(255); colors.push_back(255); // blue
  colors.push_back(255); colors.push_back(255); colors.push_back(255); colors.push_back(0); // transparent white
  colors.push_back(255); colors.push_back(255); colors.push_back(255); colors.push_back(1); // translucent white
  for(size_t i = 0; i < colors.size(); i += 4)
  for(size_t j = 0; j < colors.size(); j += 4)
  for(size_t k = 0; k < colors.size(); k += 4)
  for(size_t l = 0; l < colors.size(); l += 4) {
    for(unsigned y = 0; y < image.height; y++)
    for(unsigned x = 0; x < image.width; x++) {
      size_t a = (y * image.width + x) & 3;
      size_t b = (a == 0) ? i : ((a == 1) ? j : ((a == 2) ? k : l));
      for(size_t c = 0; c < 4; c++) {
        image.data[y * image.width * 4 + x * 4 + c] = colors[b + c];
      }
    }
    doCodecTest(image);
  }
  image.width = 20;
  image.height = 20;
  image.data.resize(image.width * image.height * 4);
  for(size_t i = 0; i < colors.size(); i += 4)
  for(size_t j = 0; j < colors.size(); j += 4)
  for(size_t k = 0; k < colors.size(); k += 4) {
    for(unsigned y = 0; y < image.height; y++)
    for(unsigned x = 0; x < image.width; x++) {
      size_t a = (y * image.width + x) % 3;
      size_t b = (a == 0) ? i : ((a == 1) ? j : k);
      for(size_t c = 0; c < 4; c++) {
        image.data[y * image.width * 4 + x * 4 + c] = colors[b + c];
      }
    }
    doCodecTest(image);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq 0x8ab65(%rip), %rdi     # 0xa2fd8
leaq 0x48056(%rip), %rsi     # 0x604d0
callq 0x21f0
movq %rax, %rdi
callq 0x2100
leaq 0x30(%rsp), %rdi
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movaps 0x47ba2(%rip), %xmm0    # 0x60040
movups %xmm0, 0x18(%rdi)
pushq $0x40
popq %rsi
xorl %edx, %edx
callq 0xe6d8
leaq 0x10(%rsp), %rdi
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
leaq 0xf(%rsp), %rsi
movb $0x0, (%rsi)
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $0x0, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $0x0, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $-0x1, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $-0x1, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $-0x1, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $-0x1, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $-0x1, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $-0x80, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $-0x80, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $-0x80, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $-0x1, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $0x0, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $0x0, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $-0x1, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $-0x1, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $-0x1, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $-0x1, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $-0x1, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $0x0, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $-0x1, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $-0x1, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $-0x1, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
leaq 0xf(%rsp), %rsi
movb $0x1, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x1231e
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
xorl %r14d, %r14d
leaq 0x30(%rsp), %rbx
movq %rcx, %rdx
subq %rax, %rdx
cmpq %rdx, %r14
jae 0x1875f
xorl %r15d, %r15d
movq %rcx, %rdx
subq %rax, %rdx
cmpq %rdx, %r15
jae 0x18756
xorl %r12d, %r12d
movq %rcx, %rdx
subq %rax, %rdx
cmpq %rdx, %r12
jae 0x1874d
xorl %r13d, %r13d
movq %rcx, %rdx
subq %rax, %rdx
cmpq %rdx, %r13
jae 0x18744
xorl %eax, %eax
cmpl 0x4c(%rsp), %eax
jae 0x18729
xorl %ecx, %ecx
movl 0x48(%rsp), %esi
cmpl %esi, %ecx
jae 0x18725
imull %eax, %esi
addl %ecx, %esi
movq %r14, %rdx
andl $0x3, %esi
je 0x186ef
movq %r15, %rdx
cmpl $0x1, %esi
je 0x186ef
cmpl $0x2, %esi
movq %r13, %rdx
cmoveq %r12, %rdx
xorl %esi, %esi
cmpq $0x4, %rsi
je 0x18721
movq 0x10(%rsp), %rdi
addq %rdx, %rdi
movb (%rsi,%rdi), %dil
movl 0x48(%rsp), %r8d
imull %eax, %r8d
addl %ecx, %r8d
shll $0x2, %r8d
addq 0x30(%rsp), %r8
movb %dil, (%rsi,%r8)
incq %rsi
jmp 0x186f1
incl %ecx
jmp 0x186c8
incl %eax
jmp 0x186c0
movq %rbx, %rdi
callq 0x178ce
addq $0x4, %r13
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
jmp 0x186af
addq $0x4, %r12
jmp 0x1869d
addq $0x4, %r15
jmp 0x1868b
addq $0x4, %r14
jmp 0x18679
movabsq $0x1400000014, %rax     # imm = 0x1400000014
leaq 0x30(%rsp), %rdi
movq %rax, 0x18(%rdi)
movl $0x640, %esi            # imm = 0x640
xorl %edx, %edx
callq 0xe6d8
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
xorl %r14d, %r14d
pushq $0x3
popq %rbp
leaq 0x30(%rsp), %rbx
movq %rcx, %rdx
subq %rax, %rdx
cmpq %rdx, %r14
jae 0x18858
xorl %r15d, %r15d
movq %rcx, %rdx
subq %rax, %rdx
cmpq %rdx, %r15
jae 0x1884f
xorl %r12d, %r12d
movq %rcx, %rdx
subq %rax, %rdx
cmpq %rdx, %r12
jae 0x18846
xorl %ecx, %ecx
cmpl 0x4c(%rsp), %ecx
jae 0x1882b
xorl %esi, %esi
movl 0x48(%rsp), %eax
cmpl %eax, %esi
jae 0x18827
imull %ecx, %eax
addl %esi, %eax
xorl %edx, %edx
divl %ebp
cmpl $0x1, %edx
movq %r12, %rax
cmoveq %r15, %rax
testl %edx, %edx
cmoveq %r14, %rax
xorl %edx, %edx
cmpq $0x4, %rdx
je 0x18823
movq 0x10(%rsp), %rdi
addq %rax, %rdi
movb (%rdx,%rdi), %dil
movl 0x48(%rsp), %r8d
imull %ecx, %r8d
addl %esi, %r8d
shll $0x2, %r8d
addq 0x30(%rsp), %r8
movb %dil, (%rdx,%r8)
incq %rdx
jmp 0x187f3
incl %esi
jmp 0x187d0
incl %ecx
jmp 0x187c8
movq %rbx, %rdi
callq 0x178ce
addq $0x4, %r12
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
jmp 0x187b7
addq $0x4, %r15
jmp 0x187a5
addq $0x4, %r14
jmp 0x18793
leaq 0x10(%rsp), %rdi
callq 0xea7c
leaq 0x30(%rsp), %rdi
callq 0xea7c
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x188af
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
jmp 0x188b6
movq %rax, %rbx
jmp 0x188c3
jmp 0x188b6
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xea7c
leaq 0x30(%rsp), %rdi
callq 0xea7c
movq %rbx, %rdi
callq 0x2380
movq %rax, %rdi
callq 0xe6cc