// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng_unittest.cpp
// Function: doCodecTestCPP(Image&)
void doCodecTestCPP(Image& image) {
  std::vector<unsigned char> encoded;
  std::vector<unsigned char> decoded;
  unsigned decoded_w;
  unsigned decoded_h;

  unsigned error_enc = lodepng::encode(encoded, image.data, image.width, image.height,
                                       image.colorType, image.bitDepth);

  ASSERT_NO_PNG_ERROR_MSG(error_enc, "encoder error C++");

  //if the image is large enough, compressing it should result in smaller size
  if(image.data.size() > 512) assertTrue(encoded.size() < image.data.size(), "compressed size");

  unsigned error_dec = lodepng::decode(decoded, decoded_w, decoded_h, encoded, image.colorType, image.bitDepth);

  ASSERT_NO_PNG_ERROR_MSG(error_dec, "decoder error C++");

  ASSERT_EQUALS(image.width, decoded_w);
  ASSERT_EQUALS(image.height, decoded_h);
  ASSERT_EQUALS(image.data.size(), decoded.size());
  assertPixels(image, &decoded[0], "Pixels C++");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x140, %rsp            # imm = 0x140
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0xe0(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movaps %xmm0, 0xc0(%rsp)
andq $0x0, 0xd0(%rsp)
movl 0x18(%rbx), %edx
movl 0x1c(%rbx), %ecx
movl 0x20(%rbx), %r8d
movl 0x24(%rbx), %r9d
movq %rbx, %rsi
callq 0xbafa
movl %eax, %ebp
leaq 0x4b918(%rip), %rsi     # 0x601dd
leaq 0x80(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0x20c0
leaq 0x4b97d(%rip), %rdx     # 0x6025e
leaq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5a5df
leaq 0x4b968(%rip), %rsi     # 0x60262
leaq 0xa0(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20c0
movq 0xa8(%rsp), %r14
testq %r14, %r14
je 0x1494d
leaq 0x4b942(%rip), %rsi     # 0x60262
leaq 0x120(%rsp), %rdi
leaq 0x57(%rsp), %rdx
callq 0x20c0
leaq 0x4ee6c(%rip), %rsi     # 0x637a5
leaq 0x60(%rsp), %rdi
leaq 0x120(%rsp), %rdx
callq 0x5a8d9
jmp 0x14966
leaq 0x4cc72(%rip), %rsi     # 0x615c6
leaq 0x60(%rsp), %rdi
leaq 0x120(%rsp), %rdx
callq 0x20c0
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0x5a61f
leaq 0x10(%rsp), %rsi
movl %ebp, %edi
callq 0x13352
leaq 0x10(%rsp), %rdi
callq 0x2270
leaq 0x60(%rsp), %rdi
callq 0x2270
testq %r14, %r14
je 0x149ac
leaq 0x120(%rsp), %rdi
callq 0x2270
leaq 0xa0(%rsp), %rdi
callq 0x2270
leaq 0x30(%rsp), %rdi
callq 0x2270
leaq 0x80(%rsp), %rdi
callq 0x2270
movq 0x8(%rbx), %r14
subq (%rbx), %r14
cmpq $0x201, %r14            # imm = 0x201
jb 0x14a26
movq 0xe0(%rsp), %r12
movq 0xe8(%rsp), %r15
leaq 0x4b7fc(%rip), %rsi     # 0x601f3
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x20c0
subq %r12, %r15
xorl %edi, %edi
cmpq %r14, %r15
setb %dil
leaq 0x10(%rsp), %rsi
callq 0x1330f
leaq 0x10(%rsp), %rdi
callq 0x2270
movl 0x20(%rbx), %r8d
movl 0x24(%rbx), %r9d
leaq 0xc0(%rsp), %rdi
leaq 0x5c(%rsp), %rsi
leaq 0x58(%rsp), %rdx
leaq 0xe0(%rsp), %rcx
callq 0xb94d
movl %eax, %ebp
leaq 0x4b787(%rip), %rsi     # 0x601dd
leaq 0x80(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20c0
leaq 0x4e86e(%rip), %rdx     # 0x632dd
leaq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5a5df
leaq 0x4b7ec(%rip), %rsi     # 0x60274
leaq 0xa0(%rsp), %rdi
leaq 0x56(%rsp), %rdx
callq 0x20c0
movq 0xa8(%rsp), %r14
testq %r14, %r14
je 0x14adb
leaq 0x4b7c6(%rip), %rsi     # 0x60274
leaq 0x100(%rsp), %rdi
leaq 0x55(%rsp), %rdx
callq 0x20c0
leaq 0x4ecde(%rip), %rsi     # 0x637a5
leaq 0x60(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0x5a8d9
jmp 0x14af4
leaq 0x4cae4(%rip), %rsi     # 0x615c6
leaq 0x60(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0x20c0
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0x5a61f
leaq 0x10(%rsp), %rsi
movl %ebp, %edi
callq 0x13352
leaq 0x10(%rsp), %rdi
callq 0x2270
leaq 0x60(%rsp), %rdi
callq 0x2270
testq %r14, %r14
je 0x14b3a
leaq 0x100(%rsp), %rdi
callq 0x2270
leaq 0xa0(%rsp), %rdi
callq 0x2270
leaq 0x30(%rsp), %rdi
callq 0x2270
leaq 0x80(%rsp), %rdi
callq 0x2270
leaq 0x18(%rbx), %r14
movl (%r14), %eax
cmpl 0x5c(%rsp), %eax
jne 0x14bfd
leaq 0x1c(%rbx), %r14
movl (%r14), %eax
cmpl 0x58(%rsp), %eax
jne 0x14d4e
movq 0x8(%rbx), %rax
subq (%rbx), %rax
movq 0xc0(%rsp), %r14
movq 0xc8(%rsp), %rcx
subq %r14, %rcx
cmpq %rcx, %rax
jne 0x14e9f
leaq 0x4b6f3(%rip), %rsi     # 0x6029d
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x20c0
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x13e44
leaq 0x10(%rsp), %rdi
callq 0x2270
leaq 0xc0(%rsp), %rdi
callq 0xea7c
leaq 0xe0(%rsp), %rdi
callq 0xea7c
addq $0x140, %rsp            # imm = 0x140
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4b5d9(%rip), %rsi     # 0x601dd
leaq 0xa0(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20c0
leaq 0x4b669(%rip), %rdx     # 0x60286
leaq 0x60(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x5a5df
leaq 0x4eb6f(%rip), %rdx     # 0x637a5
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x5a5df
leaq 0x4b5cc(%rip), %rdx     # 0x6021b
leaq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5a5df
leaq 0x4b5bd(%rip), %rdx     # 0x60225
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x5a5df
movq 0x8e35a(%rip), %rdi     # 0xa2fd8
leaq 0x10(%rsp), %rsi
callq 0x21d0
leaq 0x10(%rsp), %rdi
callq 0x2270
leaq 0x30(%rsp), %rdi
callq 0x2270
leaq 0x80(%rsp), %rdi
callq 0x2270
leaq 0x60(%rsp), %rdi
callq 0x2270
leaq 0xa0(%rsp), %rdi
callq 0x2270
movq 0x8e311(%rip), %rdi     # 0xa2fd8
leaq 0x7423f(%rip), %rsi     # 0x88f0d
callq 0x21f0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x5a957
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d0
leaq 0x4b546(%rip), %rsi     # 0x6023d
movq %rax, %rdi
callq 0x21f0
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
leaq 0x5c(%rsp), %rsi
callq 0x5a957
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d0
leaq 0x4b3ff(%rip), %rsi     # 0x60124
movq %rax, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2100
leaq 0x30(%rsp), %rdi
callq 0x2270
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x1500d
leaq 0x4b488(%rip), %rsi     # 0x601dd
leaq 0xa0(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20c0
leaq 0x4b51c(%rip), %rdx     # 0x6028a
leaq 0x60(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x5a5df
leaq 0x4ea1e(%rip), %rdx     # 0x637a5
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x5a5df
leaq 0x4b4ab(%rip), %rdx     # 0x6024b
leaq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5a5df
leaq 0x4b46c(%rip), %rdx     # 0x60225
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x5a5df
movq 0x8e209(%rip), %rdi     # 0xa2fd8
leaq 0x10(%rsp), %rsi
callq 0x21d0
leaq 0x10(%rsp), %rdi
callq 0x2270
leaq 0x30(%rsp), %rdi
callq 0x2270
leaq 0x80(%rsp), %rdi
callq 0x2270
leaq 0x60(%rsp), %rdi
callq 0x2270
leaq 0xa0(%rsp), %rdi
callq 0x2270
movq 0x8e1c0(%rip), %rdi     # 0xa2fd8
leaq 0x740ee(%rip), %rsi     # 0x88f0d
callq 0x21f0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x5a957
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d0
leaq 0x4b3f5(%rip), %rsi     # 0x6023d
movq %rax, %rdi
callq 0x21f0
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x5a957
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d0
leaq 0x4b2ae(%rip), %rsi     # 0x60124
movq %rax, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2100
leaq 0x30(%rsp), %rdi
callq 0x2270
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x1500d
leaq 0x4b337(%rip), %rsi     # 0x601dd
leaq 0xa0(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20c0
leaq 0x74007(%rip), %rdx     # 0x88ec6
leaq 0x60(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x5a5df
leaq 0x4e8cd(%rip), %rdx     # 0x637a5
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x5a5df
leaq 0x4b39d(%rip), %rdx     # 0x6028e
leaq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5a5df
leaq 0x4b31b(%rip), %rdx     # 0x60225
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x5a5df
movq 0x8e0b8(%rip), %rdi     # 0xa2fd8
leaq 0x10(%rsp), %rsi
callq 0x21d0
leaq 0x10(%rsp), %rdi
callq 0x2270
leaq 0x30(%rsp), %rdi
callq 0x2270
leaq 0x80(%rsp), %rdi
callq 0x2270
leaq 0x60(%rsp), %rdi
callq 0x2270
leaq 0xa0(%rsp), %rdi
callq 0x2270
movq 0x8e06f(%rip), %rdi     # 0xa2fd8
leaq 0x73f9d(%rip), %rsi     # 0x88f0d
callq 0x21f0
movq %rax, %r14
movq 0x8(%rbx), %rax
subq (%rbx), %rax
leaq 0x80(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x5a86b
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x21d0
leaq 0x4b295(%rip), %rsi     # 0x6023d
movq %rax, %rdi
callq 0x21f0
movq %rax, %rbx
movq 0xc8(%rsp), %rax
subq 0xc0(%rsp), %rax
leaq 0x60(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x30(%rsp), %rdi
callq 0x5a86b
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d0
leaq 0x4b13b(%rip), %rsi     # 0x60124
movq %rax, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2100
leaq 0x30(%rsp), %rdi
callq 0x2270
leaq 0x10(%rsp), %rdi
callq 0x2270
callq 0x13280
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x15048
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x1505a
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x1506c
jmp 0x15045
jmp 0x15057
jmp 0x15069
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x152c4
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x152c4
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x152c4
jmp 0x152c1
jmp 0x152c1
jmp 0x152c1
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x150ba
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x150c9
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x150d8
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x150e7
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x150f9
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x1510b
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x2270
jmp 0x1511d
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x2270
jmp 0x1512c
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x2270
jmp 0x1513b
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2270
jmp 0x1514a
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2270
jmp 0x1515f
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2270
jmp 0x15174
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x2270
jmp 0x152c4
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x2270
jmp 0x152c4
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x2270
jmp 0x152c4
jmp 0x15212
jmp 0x15217
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x152c4
jmp 0x152c1
jmp 0x152c1
jmp 0x152c1
movq %rax, %rbx
jmp 0x15233
movq %rax, %rbx
jmp 0x1528e
movq %rax, %rbx
jmp 0x152d1
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x152c4
movq %rax, %rbx
jmp 0x1522e
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x15224
jmp 0x152c1
movq %rax, %rbx
jmp 0x15289
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x1527f
jmp 0x152c1
jmp 0x152c1
movq %rax, %rbx
jmp 0x15240
movq %rax, %rbx
jmp 0x1529b
jmp 0x152c1
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2270
testq %r14, %r14
je 0x15240
leaq 0x100(%rsp), %rdi
callq 0x2270
leaq 0xa0(%rsp), %rdi
callq 0x2270
jmp 0x15259
jmp 0x152c1
movq %rax, %rbx
jmp 0x15263
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
leaq 0x80(%rsp), %rdi
callq 0x2270
jmp 0x152c4
movq %rax, %rbx
jmp 0x152b2
movq %rax, %rbx
jmp 0x152a8
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2270
testq %r14, %r14
je 0x1529b
leaq 0x120(%rsp), %rdi
callq 0x2270
leaq 0xa0(%rsp), %rdi
callq 0x2270
leaq 0x30(%rsp), %rdi
callq 0x2270
leaq 0x80(%rsp), %rdi
callq 0x2270
jmp 0x152c4
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0xea7c
leaq 0xe0(%rsp), %rdi
callq 0xea7c
movq %rbx, %rdi
callq 0x2380
movq %rax, %rdi
callq 0xe6cc