// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng_unittest.cpp
// Function: assertPixels(Image&, unsigned char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void assertPixels(Image& image, const unsigned char* decoded, const std::string& message) {
  for(size_t i = 0; i < image.data.size(); i++) {
    int byte_expected = image.data[i];
    int byte_actual = decoded[i];

    //last byte is special due to possible random padding bits which need not to be equal
    if(i == image.data.size() - 1) {
      size_t numbits = getNumColorChannels(image.colorType) * image.bitDepth * image.width * image.height;
      size_t padding = 8u - (numbits - 8u * (numbits / 8u));
      if(padding != 8u) {
        //set all padding bits of both to 0
        for(size_t j = 0; j < padding; j++) {
          byte_expected = (byte_expected & (~(1 << j))) % 256;
          byte_actual = (byte_actual & (~(1 << j))) % 256;
        }
      }
    }

    assertEquals(byte_expected, byte_actual, message + " " + valtostr(i));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, 0x30(%rsp)
movq $0x0, 0x8(%rsp)
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
subq %rcx, %rax
je 0x17294
movq %rdx, %rbx
movq %rdi, %r15
xorl %edx, %edx
movl $0xff, %r14d
movl $0xffffff00, %ebp       # imm = 0xFFFFFF00
movzbl (%rcx,%rdx), %ecx
movl %ecx, 0x4(%rsp)
movq 0x30(%rsp), %rcx
movzbl (%rcx,%rdx), %ecx
movl %ecx, (%rsp)
decq %rax
cmpq %rax, %rdx
jne 0x171d1
movl 0x20(%r15), %eax
xorl %ecx, %ecx
cmpq $0x6, %rax
ja 0x1717e
leaq 0x87ffd(%rip), %rcx     # 0x9f178
movl (%rcx,%rax,4), %ecx
imull 0x24(%r15), %ecx
imull 0x18(%r15), %ecx
imull 0x1c(%r15), %ecx
andl $0x7, %ecx
je 0x171d1
movl $0x8, %eax
subl %ecx, %eax
movl 0x4(%rsp), %ecx
movl (%rsp), %edx
xorl %esi, %esi
btrl %esi, %ecx
leal (%rcx,%r14), %edi
testl %ecx, %ecx
cmovnsl %ecx, %edi
andl %ebp, %edi
subl %edi, %ecx
btrl %esi, %edx
leal (%rdx,%r14), %edi
testl %edx, %edx
cmovnsl %edx, %edi
andl %ebp, %edi
subl %edi, %edx
incq %rsi
cmpq %rsi, %rax
jne 0x171a2
movl %ecx, 0x4(%rsp)
movl %edx, (%rsp)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x15390
movq %r12, %rdi
leaq 0x60349(%rip), %rsi     # 0x77545
callq 0x23d0
leaq 0x38(%rsp), %r13
movq %r13, %rdi
leaq 0x8(%rsp), %rsi
callq 0x7024a
leaq 0x58(%rsp), %r12
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
movq %r13, %rdx
callq 0x6feec
leaq 0x4(%rsp), %rdi
movq %rsp, %rsi
movq %r12, %rdx
callq 0x700c5
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x1724c
callq 0x2200
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x17260
callq 0x2200
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x17274
callq 0x2200
movq 0x8(%rsp), %rdx
incq %rdx
movq %rdx, 0x8(%rsp)
movq (%r15), %rcx
movq 0x8(%r15), %rax
subq %rcx, %rax
cmpq %rax, %rdx
jb 0x1714c
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x172a5
movq %rax, %rbx
jmp 0x172da
movq %rax, %rbx
jmp 0x172c6
movq %rax, %rbx
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x172c6
callq 0x2200
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x172da
callq 0x2200
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x172ee
callq 0x2200
movq %rbx, %rdi
callq 0x23b0