// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng_unittest.cpp
// Function: testPredefinedFilters()
void testPredefinedFilters() {
  size_t w = 32, h = 32;
  std::cout << "testPredefinedFilters" << std::endl;
  Image image;
  generateTestImage(image, w, h, LCT_RGBA, 8);

  // everything to filter type '3'
  std::vector<unsigned char> predefined(h, 3);
  lodepng::State state;
  state.encoder.filter_strategy = LFS_PREDEFINED;
  state.encoder.filter_palette_zero = 0;
  state.encoder.predefined_filters = &predefined[0];

  std::vector<unsigned char> png;
  unsigned error = lodepng::encode(png, &image.data[0], w, h, state);
  assertNoError(error);

  std::vector<unsigned char> outfilters;
  error = lodepng::getFilterTypes(outfilters, png);
  assertNoError(error);

  ASSERT_EQUALS(outfilters.size(), h);
  for(size_t i = 0; i < h; i++) ASSERT_EQUALS(3, outfilters[i]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3a8, %rsp            # imm = 0x3A8
movq $0x20, 0x48(%rsp)
movq 0x7e5ec(%rip), %rbx     # 0xb3fd8
leaq 0x4202e(%rip), %rsi     # 0x77a21
movl $0x15, %edx
movq %rbx, %rdi
callq 0x2270
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
xorps %xmm0, %xmm0
leaq 0x100(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl 0x48(%rsp), %edx
movl $0x20, %esi
movl $0x6, %ecx
movl $0x8, %r8d
callq 0x16b63
movq 0x48(%rsp), %rsi
leaq 0x128(%rsp), %rdx
movb $0x3, (%rdx)
leaq 0xe8(%rsp), %rdi
leaq 0x8(%rsp), %rcx
callq 0x70602
leaq 0x128(%rsp), %rdi
callq 0xd1a0
movabsq $0x800000000, %rax      # imm = 0x800000000
leaq 0x128(%rsp), %r8
movq %rax, 0x84(%r8)
movq 0xe8(%rsp), %rax
movq %rax, 0x90(%r8)
xorps %xmm0, %xmm0
leaq 0xd0(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x100(%rsp), %rsi
movl 0x48(%rsp), %ecx
movl $0x20, %edx
callq 0xd6e9
movl %eax, %edi
callq 0x166b7
xorps %xmm0, %xmm0
leaq 0xb0(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0xd0(%rsp), %rsi
callq 0x11add
movl %eax, %edi
callq 0x166b7
movq 0xb0(%rsp), %rdi
movq 0xb8(%rsp), %rcx
subq %rdi, %rcx
movq 0x48(%rsp), %rax
cmpq %rax, %rcx
jne 0x35df6
testq %rax, %rax
je 0x35b40
xorl %ebx, %ebx
cmpb $0x3, (%rdi,%rbx)
jne 0x35b9f
incq %rbx
cmpq %rbx, %rax
jne 0x35b32
testq %rdi, %rdi
je 0x35b4a
callq 0x2200
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x35b5c
callq 0x2200
leaq 0x128(%rsp), %rdi
callq 0xd1c8
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x35b7b
callq 0x2200
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x35b8d
callq 0x2200
addq $0x3a8, %rsp            # imm = 0x3A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa0(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x405ab(%rip), %rsi     # 0x7615d
leaq 0x405a9(%rip), %rdx     # 0x76162
leaq 0x90(%rsp), %rdi
callq 0x1517a
leaq 0x80(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0x15390
leaq 0x41e45(%rip), %rsi     # 0x77a3c
leaq 0x70(%rsp), %rdi
callq 0x23d0
leaq 0x60(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0x15390
leaq 0x43afd(%rip), %rsi     # 0x79725
leaq 0x50(%rsp), %rdi
callq 0x23d0
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x15390
leaq 0x41de8(%rip), %rsi     # 0x77a41
leaq 0x28(%rsp), %rdi
callq 0x23d0
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x15390
leaq 0x4051b(%rip), %rsi     # 0x761a5
leaq 0x8(%rsp), %rdi
callq 0x23d0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x7e333(%rip), %rdi     # 0xb3fd8
callq 0x2270
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x35cb9
callq 0x2200
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x35cc8
callq 0x2200
movq 0x50(%rsp), %rdi
cmpq %rbp, %rdi
je 0x35cd7
callq 0x2200
movq 0x70(%rsp), %rdi
cmpq %r12, %rdi
je 0x35ce6
callq 0x2200
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x35cf8
callq 0x2200
movq 0x7e2d9(%rip), %rdi     # 0xb3fd8
leaq 0x69187(%rip), %rsi     # 0x9ee8d
movl $0x9, %edx
callq 0x2270
leaq 0x50(%rsp), %rsi
movl $0x3, (%rsi)
leaq 0x8(%rsp), %rdi
callq 0x70594
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x7e2a2(%rip), %rdi     # 0xb3fd8
callq 0x2270
movq %rax, %r14
leaq 0x40478(%rip), %rsi     # 0x761bd
movl $0x9, %edx
movq %rax, %rdi
callq 0x2270
addq 0xb0(%rsp), %rbx
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x16452
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r14, %rdi
callq 0x2270
movq %rax, %rbx
leaq 0x40321(%rip), %rsi     # 0x760a4
movl $0x2, %edx
movq %rax, %rdi
callq 0x2270
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x35dc6
callq 0x2200
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x35dd5
callq 0x2200
movl $0x4, %edi
callq 0x2120
movl $0x1, (%rax)
movq 0x7e1cc(%rip), %rsi     # 0xb3fb8
movq %rax, %rdi
xorl %edx, %edx
callq 0x2380
leaq 0xa0(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x40354(%rip), %rsi     # 0x7615d
leaq 0x40352(%rip), %rdx     # 0x76162
leaq 0x90(%rsp), %rdi
callq 0x1517a
leaq 0x80(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0x15390
leaq 0x41be9(%rip), %rsi     # 0x77a37
leaq 0x70(%rsp), %rdi
callq 0x23d0
leaq 0x60(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0x15390
leaq 0x438a6(%rip), %rsi     # 0x79725
leaq 0x50(%rsp), %rdi
callq 0x23d0
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x15390
leaq 0x40323(%rip), %rsi     # 0x761d3
leaq 0x28(%rsp), %rdi
callq 0x23d0
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x15390
leaq 0x402c4(%rip), %rsi     # 0x761a5
leaq 0x8(%rsp), %rdi
callq 0x23d0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x7e0dc(%rip), %rdi     # 0xb3fd8
callq 0x2270
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x35f10
callq 0x2200
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x35f1f
callq 0x2200
movq 0x50(%rsp), %rdi
cmpq %rbp, %rdi
je 0x35f2e
callq 0x2200
movq 0x70(%rsp), %rdi
cmpq %r12, %rdi
je 0x35f3d
callq 0x2200
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x35f4f
callq 0x2200
movq 0x7e082(%rip), %rdi     # 0xb3fd8
leaq 0x68f30(%rip), %rsi     # 0x9ee8d
movl $0x9, %edx
callq 0x2270
movq 0xb8(%rsp), %rax
subq 0xb0(%rsp), %rax
leaq 0x50(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x8(%rsp), %rdi
callq 0x7024a
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x7e03e(%rip), %rdi     # 0xb3fd8
callq 0x2270
movq %rax, %rbx
leaq 0x40214(%rip), %rsi     # 0x761bd
movl $0x9, %edx
movq %rax, %rdi
callq 0x2270
leaq 0x28(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x7024a
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x2270
movq %rax, %rbx
leaq 0x400c3(%rip), %rsi     # 0x760a4
movl $0x2, %edx
movq %rax, %rdi
callq 0x2270
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x36024
callq 0x2200
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x36033
callq 0x2200
movl $0x4, %edi
callq 0x2120
movl $0x1, (%rax)
movq 0x7df6e(%rip), %rsi     # 0xb3fb8
movq %rax, %rdi
xorl %edx, %edx
callq 0x2380
jmp 0x3605f
jmp 0x36079
jmp 0x36079
jmp 0x3612b
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x3607c
callq 0x2200
jmp 0x3607c
jmp 0x36079
jmp 0x360a3
jmp 0x360a3
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
jne 0x36124
jmp 0x3612e
jmp 0x360bd
jmp 0x3612b
jmp 0x360bd
jmp 0x3612b
jmp 0x360d7
jmp 0x360a3
jmp 0x360d7
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x360c0
callq 0x2200
jmp 0x360c0
jmp 0x36100
jmp 0x360bd
jmp 0x36100
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x360da
callq 0x2200
jmp 0x360da
jmp 0x36114
jmp 0x360d7
jmp 0x3612b
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %rbp, %rdi
je 0x36103
callq 0x2200
jmp 0x36103
jmp 0x360ed
movq %rax, %rbx
jmp 0x36171
jmp 0x36100
movq %rax, %rbx
jmp 0x3615f
movq %rax, %rbx
jmp 0x36140
jmp 0x3612b
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r12, %rdi
je 0x36117
callq 0x2200
jmp 0x36117
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x3612e
callq 0x2200
jmp 0x3612e
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x36140
callq 0x2200
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x36152
callq 0x2200
leaq 0x128(%rsp), %rdi
callq 0xd1c8
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x36171
callq 0x2200
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x36183
callq 0x2200
movq %rbx, %rdi
callq 0x23b0
movq %rax, %rdi
callq 0x14f59