// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng_unittest.cpp
// Function: doCodecTestWithEncState(Image&, lodepng::State&)
void doCodecTestWithEncState(Image& image, lodepng::State& state) {
  std::vector<unsigned char> encoded;
  std::vector<unsigned char> decoded;
  unsigned decoded_w;
  unsigned decoded_h;
  state.info_raw.colortype = image.colorType;
  state.info_raw.bitdepth = image.bitDepth;


  unsigned error_enc = lodepng::encode(encoded, image.data, image.width, image.height, state);
  ASSERT_NO_PNG_ERROR_MSG(error_enc, "encoder error uncompressed");

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

  ASSERT_NO_PNG_ERROR_MSG(error_dec, "decoder error uncompressed");

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

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x140, %rsp            # imm = 0x140
movq %rsi, %r8
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x100(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movaps %xmm0, 0xc0(%rsp)
andq $0x0, 0xd0(%rsp)
movq 0x20(%rbx), %rax
movq %rax, 0xa8(%rsi)
movl 0x18(%rbx), %edx
movl 0x1c(%rbx), %ecx
movq %rbx, %rsi
callq 0xbbcf
movl %eax, %ebp
leaq 0x4ae98(%rip), %rsi     # 0x601dd
leaq 0x80(%rsp), %rdi
leaq 0xe0(%rsp), %rdx
callq 0x20c0
leaq 0x4af47(%rip), %rdx     # 0x602a8
leaq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5a5df
leaq 0x4af32(%rip), %rsi     # 0x602ac
leaq 0xa0(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20c0
movq 0xa8(%rsp), %r14
testq %r14, %r14
je 0x153cd
leaq 0x4af0c(%rip), %rsi     # 0x602ac
leaq 0x120(%rsp), %rdi
leaq 0x57(%rsp), %rdx
callq 0x20c0
leaq 0x4e3ec(%rip), %rsi     # 0x637a5
leaq 0x60(%rsp), %rdi
leaq 0x120(%rsp), %rdx
callq 0x5a8d9
jmp 0x153e6
leaq 0x4c1f2(%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 0x1542c
leaq 0x120(%rsp), %rdi
callq 0x2270
leaq 0xa0(%rsp), %rdi
callq 0x2270
leaq 0x30(%rsp), %rdi
callq 0x2270
leaq 0x80(%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 0x100(%rsp), %rcx
callq 0xb94d
movl %eax, %ebp
leaq 0x4ad5d(%rip), %rsi     # 0x601dd
leaq 0x80(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20c0
leaq 0x4dec9(%rip), %rdx     # 0x63362
leaq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5a5df
leaq 0x4ae15(%rip), %rsi     # 0x602c7
leaq 0xa0(%rsp), %rdi
leaq 0x56(%rsp), %rdx
callq 0x20c0
movq 0xa8(%rsp), %r14
testq %r14, %r14
je 0x15505
leaq 0x4adef(%rip), %rsi     # 0x602c7
leaq 0xe0(%rsp), %rdi
leaq 0x55(%rsp), %rdx
callq 0x20c0
leaq 0x4e2b4(%rip), %rsi     # 0x637a5
leaq 0x60(%rsp), %rdi
leaq 0xe0(%rsp), %rdx
callq 0x5a8d9
jmp 0x1551e
leaq 0x4c0ba(%rip), %rsi     # 0x615c6
leaq 0x60(%rsp), %rdi
leaq 0xe0(%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 0x15564
leaq 0xe0(%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 0x15623
leaq 0x1c(%rbx), %r14
movl (%r14), %eax
cmpl 0x58(%rsp), %eax
jne 0x15774
movq 0x8(%rbx), %rax
subq (%rbx), %rax
movq 0xc0(%rsp), %r14
movq 0xc8(%rsp), %rcx
subq %r14, %rcx
cmpq %rcx, %rax
jne 0x158c5
leaq 0x4ad16(%rip), %rsi     # 0x602ea
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 0x100(%rsp), %rdi
callq 0xea7c
addq $0x140, %rsp            # imm = 0x140
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x4abb3(%rip), %rsi     # 0x601dd
leaq 0xa0(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20c0
leaq 0x4dd32(%rip), %rdx     # 0x63375
leaq 0x60(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x5a5df
leaq 0x4e149(%rip), %rdx     # 0x637a5
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x5a5df
leaq 0x4aba6(%rip), %rdx     # 0x6021b
leaq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5a5df
leaq 0x4ab97(%rip), %rdx     # 0x60225
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x5a5df
movq 0x8d934(%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 0x8d8eb(%rip), %rdi     # 0xa2fd8
leaq 0x73819(%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 0x4ab20(%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 0x4a9d9(%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 0x15a33
leaq 0x4aa62(%rip), %rsi     # 0x601dd
leaq 0xa0(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20c0
leaq 0x4ab4e(%rip), %rdx     # 0x602e2
leaq 0x60(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x5a5df
leaq 0x4dff8(%rip), %rdx     # 0x637a5
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x5a5df
leaq 0x4aa85(%rip), %rdx     # 0x6024b
leaq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5a5df
leaq 0x4aa46(%rip), %rdx     # 0x60225
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x5a5df
movq 0x8d7e3(%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 0x8d79a(%rip), %rdi     # 0xa2fd8
leaq 0x736c8(%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 0x4a9cf(%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 0x4a888(%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 0x15a33
leaq 0x4a911(%rip), %rsi     # 0x601dd
leaq 0xa0(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20c0
leaq 0x4aa01(%rip), %rdx     # 0x602e6
leaq 0x60(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x5a5df
leaq 0x4dea7(%rip), %rdx     # 0x637a5
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x5a5df
leaq 0x4a977(%rip), %rdx     # 0x6028e
leaq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5a5df
leaq 0x4a8f5(%rip), %rdx     # 0x60225
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x5a5df
movq 0x8d692(%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 0x8d649(%rip), %rdi     # 0xa2fd8
leaq 0x73577(%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 0x4a86f(%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 0x4a715(%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 0x15a6e
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x15a80
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x15a92
jmp 0x15a6b
jmp 0x15a7d
jmp 0x15a8f
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x15ccd
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x15ccd
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x15ccd
jmp 0x15cca
jmp 0x15cca
jmp 0x15cca
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x15ae0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x15aef
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x15afe
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x15b0d
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x15b1f
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x15b31
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x2270
jmp 0x15b43
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x2270
jmp 0x15b52
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x2270
jmp 0x15b61
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2270
jmp 0x15b70
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2270
jmp 0x15b85
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2270
jmp 0x15b9a
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x2270
jmp 0x15ccd
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x2270
jmp 0x15ccd
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x2270
jmp 0x15ccd
jmp 0x15c1b
jmp 0x15c20
jmp 0x15cca
jmp 0x15cca
jmp 0x15cca
movq %rax, %rbx
jmp 0x15c3c
movq %rax, %rbx
jmp 0x15c97
movq %rax, %rbx
jmp 0x15cda
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x15ccd
movq %rax, %rbx
jmp 0x15c37
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x15c2d
movq %rax, %rbx
jmp 0x15c92
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x15c88
jmp 0x15cca
jmp 0x15cca
movq %rax, %rbx
jmp 0x15c49
movq %rax, %rbx
jmp 0x15ca4
jmp 0x15cca
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2270
testq %r14, %r14
je 0x15c49
leaq 0xe0(%rsp), %rdi
callq 0x2270
leaq 0xa0(%rsp), %rdi
callq 0x2270
jmp 0x15c62
jmp 0x15cca
movq %rax, %rbx
jmp 0x15c6c
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
leaq 0x80(%rsp), %rdi
callq 0x2270
jmp 0x15ccd
movq %rax, %rbx
jmp 0x15cbb
movq %rax, %rbx
jmp 0x15cb1
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2270
testq %r14, %r14
je 0x15ca4
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 0x15ccd
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0xea7c
leaq 0x100(%rsp), %rdi
callq 0xea7c
movq %rbx, %rdi
callq 0x2380
movq %rax, %rdi
callq 0xe6cc