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

  lodepng::State state;
  state.info_png.interlace_method = 1;
  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 interlaced");

  //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");

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

  ASSERT_NO_PNG_ERROR_MSG(error_dec, "decoder error interlaced");

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x3c0, %rsp            # imm = 0x3C0
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0xe0(%rsp)
andq $0x0, 0xf0(%rsp)
movaps %xmm0, 0xc0(%rsp)
andq $0x0, 0xd0(%rsp)
leaq 0x140(%rsp), %rdi
callq 0xb84c
leaq 0x140(%rsp), %r8
movl $0x1, 0xd8(%r8)
movq 0x20(%rbx), %rax
movq %rax, 0xa8(%r8)
movl 0x18(%rbx), %edx
movl 0x1c(%rbx), %ecx
leaq 0xe0(%rsp), %rdi
movq %rbx, %rsi
callq 0xbbcf
movl %eax, %ebp
leaq 0x49365(%rip), %rsi     # 0x601dd
leaq 0x80(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0x20c0
leaq 0x4955a(%rip), %rdx     # 0x603ee
leaq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5a5df
leaq 0x49545(%rip), %rsi     # 0x603f2
leaq 0xa0(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20c0
movq 0xa8(%rsp), %r14
testq %r14, %r14
je 0x16f00
leaq 0x4951f(%rip), %rsi     # 0x603f2
leaq 0x120(%rsp), %rdi
leaq 0x57(%rsp), %rdx
callq 0x20c0
leaq 0x4c8b9(%rip), %rsi     # 0x637a5
leaq 0x60(%rsp), %rdi
leaq 0x120(%rsp), %rdx
callq 0x5a8d9
jmp 0x16f19
leaq 0x4a6bf(%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 0x16f5f
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 0x16fd9
movq 0xe0(%rsp), %r12
movq 0xe8(%rsp), %r15
leaq 0x49249(%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
movq 0x20(%rbx), %rax
leaq 0x140(%rsp), %rcx
movq %rax, 0xa8(%rcx)
leaq 0xc0(%rsp), %rdi
leaq 0x5c(%rsp), %rsi
leaq 0x58(%rsp), %rdx
leaq 0xe0(%rsp), %r8
callq 0xb9ef
movl %eax, %ebp
leaq 0x491c9(%rip), %rsi     # 0x601dd
leaq 0x80(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20c0
leaq 0x493de(%rip), %rdx     # 0x6040b
leaq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5a5df
leaq 0x493c9(%rip), %rsi     # 0x6040f
leaq 0xa0(%rsp), %rdi
leaq 0x56(%rsp), %rdx
callq 0x20c0
movq 0xa8(%rsp), %r14
testq %r14, %r14
je 0x17099
leaq 0x493a3(%rip), %rsi     # 0x6040f
leaq 0x100(%rsp), %rdi
leaq 0x55(%rsp), %rdx
callq 0x20c0
leaq 0x4c720(%rip), %rsi     # 0x637a5
leaq 0x60(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0x5a8d9
jmp 0x170b2
leaq 0x4a526(%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 0x170f8
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 0x171c8
leaq 0x1c(%rbx), %r14
movl (%r14), %eax
cmpl 0x58(%rsp), %eax
jne 0x17319
movq 0x8(%rbx), %rax
subq (%rbx), %rax
movq 0xc0(%rsp), %r14
movq 0xc8(%rsp), %rcx
subq %r14, %rcx
cmpq %rcx, %rax
jne 0x1746a
leaq 0x492cc(%rip), %rsi     # 0x60434
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 0x140(%rsp), %rdi
callq 0xb874
leaq 0xc0(%rsp), %rdi
callq 0xea7c
leaq 0xe0(%rsp), %rdi
callq 0xea7c
addq $0x3c0, %rsp            # imm = 0x3C0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4900e(%rip), %rsi     # 0x601dd
leaq 0xa0(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20c0
leaq 0x49240(%rip), %rdx     # 0x60428
leaq 0x60(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x5a5df
leaq 0x4c5a4(%rip), %rdx     # 0x637a5
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x5a5df
leaq 0x49001(%rip), %rdx     # 0x6021b
leaq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5a5df
leaq 0x48ff2(%rip), %rdx     # 0x60225
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x5a5df
movq 0x8bd8f(%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 0x8bd46(%rip), %rdi     # 0xa2fd8
leaq 0x71c74(%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 0x48f7b(%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 0x48e34(%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 0x175d8
leaq 0x48ebd(%rip), %rsi     # 0x601dd
leaq 0xa0(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20c0
leaq 0x490f3(%rip), %rdx     # 0x6042c
leaq 0x60(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x5a5df
leaq 0x4c453(%rip), %rdx     # 0x637a5
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x5a5df
leaq 0x48ee0(%rip), %rdx     # 0x6024b
leaq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5a5df
leaq 0x48ea1(%rip), %rdx     # 0x60225
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x5a5df
movq 0x8bc3e(%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 0x8bbf5(%rip), %rdi     # 0xa2fd8
leaq 0x71b23(%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 0x48e2a(%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 0x48ce3(%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 0x175d8
leaq 0x48d6c(%rip), %rsi     # 0x601dd
leaq 0xa0(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20c0
leaq 0x48fa6(%rip), %rdx     # 0x60430
leaq 0x60(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x5a5df
leaq 0x4c302(%rip), %rdx     # 0x637a5
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x5a5df
leaq 0x48dd2(%rip), %rdx     # 0x6028e
leaq 0x30(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x5a5df
leaq 0x48d50(%rip), %rdx     # 0x60225
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x5a5df
movq 0x8baed(%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 0x8baa4(%rip), %rdi     # 0xa2fd8
leaq 0x719d2(%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 0x48cca(%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 0x48b70(%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 0x17613
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x17625
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x17637
jmp 0x17610
jmp 0x17622
jmp 0x17634
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x17885
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x17885
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x17885
jmp 0x17882
jmp 0x17882
jmp 0x17882
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x17685
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x17694
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x176a3
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x176b2
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x176c4
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x176d6
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x2270
jmp 0x176e8
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x2270
jmp 0x176f7
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x2270
jmp 0x17706
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2270
jmp 0x17715
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2270
jmp 0x1772a
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2270
jmp 0x1773f
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x2270
jmp 0x17885
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x2270
jmp 0x17885
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x2270
jmp 0x17885
jmp 0x177e0
jmp 0x177e5
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x17885
jmp 0x17882
jmp 0x17882
jmp 0x17882
movq %rax, %rbx
jmp 0x1780b
movq %rax, %rbx
jmp 0x1785c
movq %rax, %rbx
jmp 0x1789f
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x17885
movq %rax, %rbx
jmp 0x17806
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x177fc
jmp 0x17882
movq %rax, %rbx
jmp 0x17857
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x1784d
jmp 0x17882
jmp 0x17882
movq %rax, %rbx
jmp 0x17818
movq %rax, %rbx
jmp 0x17869
jmp 0x17882
movq %rax, %rbx
jmp 0x1782f
movq %rax, %rbx
jmp 0x17825
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2270
testq %r14, %r14
je 0x17818
leaq 0x100(%rsp), %rdi
callq 0x2270
leaq 0xa0(%rsp), %rdi
callq 0x2270
leaq 0x30(%rsp), %rdi
callq 0x2270
leaq 0x80(%rsp), %rdi
callq 0x2270
jmp 0x17885
jmp 0x17882
movq %rax, %rbx
jmp 0x17892
movq %rax, %rbx
jmp 0x17876
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2270
testq %r14, %r14
je 0x17869
leaq 0x120(%rsp), %rdi
callq 0x2270
leaq 0xa0(%rsp), %rdi
callq 0x2270
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x178b7
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0xb874
leaq 0xc0(%rsp), %rdi
callq 0xea7c
leaq 0xe0(%rsp), %rdi
callq 0xea7c
movq %rbx, %rdi
callq 0x2380
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x2270
jmp 0x17885
movq %rax, %rdi
callq 0xe6cc