// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng_unittest.cpp
// Function: testPNGCodec()
void testPNGCodec() {
  codecTest(1, 1);
  codecTest(2, 2);
  codecTest(1, 1, LCT_GREY, 1);
  codecTest(7, 7, LCT_GREY, 1);
#ifndef DISABLE_SLOW
  codecTest(127, 127);
  codecTest(127, 127, LCT_GREY, 1);
  codecTest(320, 320);
  codecTest(1, 10000);
  codecTest(10000, 1);

  testOtherPattern1();
  testOtherPattern2();
#endif // DISABLE_SLOW

  testColor(255, 255, 255, 255);
  testColor(0, 0, 0, 255);
  testColor(1, 2, 3, 255);
  testColor(255, 0, 0, 255);
  testColor(0, 255, 0, 255);
  testColor(0, 0, 255, 255);
  testColor(0, 0, 0, 255);
  testColor(1, 1, 1, 255);
  testColor(1, 1, 1, 1);
  testColor(0, 0, 0, 128);
  testColor(255, 0, 0, 128);
  testColor(127, 127, 127, 255);
  testColor(128, 128, 128, 255);
  testColor(127, 127, 127, 128);
  testColor(128, 128, 128, 128);
  //transparent single pixels
  testColor(0, 0, 0, 0);
  testColor(255, 0, 0, 0);
  testColor(1, 2, 3, 0);
  testColor(255, 255, 255, 0);
  testColor(254, 254, 254, 0);

  // This is mainly to test the Adam7 interlacing
  for(unsigned h = 1; h < 12; h++)
  for(unsigned w = 1; w < 12; w++) {
    testSize(w, h);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq $0x1
popq %rbx
pushq $0x6
popq %r15
pushq $0x8
popq %r12
movl %ebx, %edi
movl %ebx, %esi
movl %r15d, %edx
movl %r12d, %ecx
callq 0x178f8
pushq $0x2
popq %rbp
movl %ebp, %edi
movl %ebp, %esi
movl %r15d, %edx
movl %r12d, %ecx
callq 0x178f8
movl %ebx, %edi
movl %ebx, %esi
xorl %edx, %edx
movl %ebx, %ecx
callq 0x178f8
pushq $0x7
popq %rdi
movl %edi, %esi
xorl %edx, %edx
movl %ebx, %ecx
callq 0x178f8
pushq $0x7f
popq %r14
movl %r14d, %edi
movl %r14d, %esi
movl %r15d, %edx
movl %r12d, %ecx
callq 0x178f8
movl %r14d, %edi
movl %r14d, %esi
xorl %edx, %edx
movl %ebx, %ecx
callq 0x178f8
movl $0x140, %edi            # imm = 0x140
movl $0x140, %esi            # imm = 0x140
movl %r15d, %edx
movl %r12d, %ecx
callq 0x178f8
movl %ebx, %edi
movl $0x2710, %esi           # imm = 0x2710
movl %r15d, %edx
movl %r12d, %ecx
callq 0x178f8
movl $0x2710, %edi           # imm = 0x2710
movl %ebx, %esi
movl %r15d, %edx
movl %r12d, %ecx
callq 0x178f8
callq 0x17e8e
callq 0x18086
movl $0xff, %edi
movl $0xff, %esi
movl $0xff, %edx
movl $0xff, %ecx
callq 0x18261
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
movl $0xff, %ecx
callq 0x18261
pushq $0x3
popq %r15
movl %ebx, %edi
movl %ebp, %esi
movl %r15d, %edx
movl $0xff, %ecx
callq 0x18261
movl $0xff, %edi
xorl %esi, %esi
xorl %edx, %edx
movl $0xff, %ecx
callq 0x18261
xorl %edi, %edi
movl $0xff, %esi
xorl %edx, %edx
movl $0xff, %ecx
callq 0x18261
xorl %edi, %edi
xorl %esi, %esi
movl $0xff, %edx
movl $0xff, %ecx
callq 0x18261
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
movl $0xff, %ecx
callq 0x18261
movl %ebx, %edi
movl %ebx, %esi
movl %ebx, %edx
movl $0xff, %ecx
callq 0x18261
movl %ebx, %edi
movl %ebx, %esi
movl %ebx, %edx
movl %ebx, %ecx
callq 0x18261
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
movl $0x80, %ecx
callq 0x18261
movl $0xff, %edi
xorl %esi, %esi
xorl %edx, %edx
movl $0x80, %ecx
callq 0x18261
movl %r14d, %edi
movl %r14d, %esi
movl %r14d, %edx
movl $0xff, %ecx
callq 0x18261
movl $0x80, %edi
movl $0x80, %esi
movl $0x80, %edx
movl $0xff, %ecx
callq 0x18261
movl %r14d, %edi
movl %r14d, %esi
movl %r14d, %edx
movl $0x80, %ecx
callq 0x18261
movl $0x80, %edi
movl $0x80, %esi
movl $0x80, %edx
movl $0x80, %ecx
callq 0x18261
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x18261
movl $0xff, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x18261
movl %ebx, %edi
movl %ebp, %esi
movl %r15d, %edx
xorl %ecx, %ecx
callq 0x18261
movl $0xff, %edi
movl $0xff, %esi
movl $0xff, %edx
xorl %ecx, %ecx
callq 0x18261
movl $0xfe, %edi
movl $0xfe, %esi
movl $0xfe, %edx
xorl %ecx, %ecx
callq 0x18261
movl %ebx, %ebp
cmpl $0xc, %ebp
je 0x18c39
movl %ebx, %r14d
cmpl $0xc, %r14d
je 0x18c35
movl %r14d, %edi
movl %ebp, %esi
callq 0x188dd
incl %r14d
jmp 0x18c20
incl %ebp
jmp 0x18c18
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq