// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x3a8, %rsp            # imm = 0x3A8
movq $0x20, 0xc8(%rsp)
movq 0x76a32(%rip), %rdi     # 0xa2fd8
leaq 0x354f4(%rip), %rsi     # 0x61aa1
callq 0x21f0
movq %rax, %rdi
callq 0x2100
xorps %xmm0, %xmm0
leaq 0x100(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
pushq $0x20
popq %rdx
pushq $0x6
popq %rcx
pushq $0x8
popq %r8
movl %edx, %esi
callq 0x138c7
leaq 0x128(%rsp), %rdx
movb $0x3, (%rdx)
leaq 0xe8(%rsp), %rdi
pushq $0x20
popq %rsi
leaq 0x10(%rsp), %rcx
callq 0x5ab3a
leaq 0x128(%rsp), %rdi
callq 0xb84c
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)
andq $0x0, 0x10(%rdi)
movq 0x100(%rsp), %rsi
pushq $0x20
popq %rcx
movl %ecx, %edx
callq 0xbb76
movl %eax, %edi
callq 0x13456
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0xd0(%rsp), %rsi
callq 0xf498
movl %eax, %edi
callq 0x13456
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rax, %rcx
cmpq $0x20, %rcx
jne 0x2c852
xorl %ebx, %ebx
cmpq $0x20, %rbx
je 0x2c6ad
cmpb $0x3, (%rax,%rbx)
jne 0x2c6f6
incq %rbx
jmp 0x2c69c
leaq 0x50(%rsp), %rdi
callq 0xea7c
leaq 0xd0(%rsp), %rdi
callq 0xea7c
leaq 0x128(%rsp), %rdi
callq 0xb874
leaq 0xe8(%rsp), %rdi
callq 0xea7c
leaq 0x100(%rsp), %rdi
callq 0xea7c
addq $0x3a8, %rsp            # imm = 0x3A8
popq %rbx
popq %r14
retq
leaq 0x33ae0(%rip), %rsi     # 0x601dd
leaq 0x88(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20c0
leaq 0x353a6(%rip), %rdx     # 0x61abc
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x5a5df
leaq 0x37073(%rip), %rdx     # 0x637a5
leaq 0x68(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x5a5df
leaq 0x35376(%rip), %rdx     # 0x61ac1
leaq 0x30(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x5a5df
leaq 0x33ac4(%rip), %rdx     # 0x60225
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x5a5df
movq 0x76861(%rip), %rdi     # 0xa2fd8
leaq 0x10(%rsp), %rsi
callq 0x21d0
leaq 0x10(%rsp), %rdi
callq 0x2270
leaq 0x30(%rsp), %rdi
callq 0x2270
leaq 0x68(%rsp), %rdi
callq 0x2270
leaq 0xa8(%rsp), %rdi
callq 0x2270
leaq 0x88(%rsp), %rdi
callq 0x2270
movq 0x76818(%rip), %rdi     # 0xa2fd8
leaq 0x5c746(%rip), %rsi     # 0x88f0d
callq 0x21f0
movq %rax, %r14
leaq 0x68(%rsp), %rsi
movl $0x3, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x5aaac
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x21d0
leaq 0x33a45(%rip), %rsi     # 0x6023d
movq %rax, %rdi
callq 0x21f0
movq %rax, %r14
addq 0x50(%rsp), %rbx
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0x132a0
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
callq 0x21d0
leaq 0x338fb(%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
leaq 0x33984(%rip), %rsi     # 0x601dd
leaq 0x88(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20c0
leaq 0x35245(%rip), %rdx     # 0x61ab7
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x5a5df
leaq 0x36f17(%rip), %rdx     # 0x637a5
leaq 0x68(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x5a5df
leaq 0x339ac(%rip), %rdx     # 0x60253
leaq 0x30(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x5a5df
leaq 0x33968(%rip), %rdx     # 0x60225
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x5a5df
movq 0x76705(%rip), %rdi     # 0xa2fd8
leaq 0x10(%rsp), %rsi
callq 0x21d0
leaq 0x10(%rsp), %rdi
callq 0x2270
leaq 0x30(%rsp), %rdi
callq 0x2270
leaq 0x68(%rsp), %rdi
callq 0x2270
leaq 0xa8(%rsp), %rdi
callq 0x2270
leaq 0x88(%rsp), %rdi
callq 0x2270
movq 0x766bc(%rip), %rdi     # 0xa2fd8
leaq 0x5c5ea(%rip), %rsi     # 0x88f0d
callq 0x21f0
movq %rax, %rbx
movq 0x58(%rsp), %rax
subq 0x50(%rsp), %rax
leaq 0x68(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x5a86b
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d0
leaq 0x338e2(%rip), %rsi     # 0x6023d
movq %rax, %rdi
callq 0x21f0
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x5a86b
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d0
leaq 0x33798(%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 0x2c9c9
jmp 0x2c9c6
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x2cad0
jmp 0x2cacd
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x2c9f1
jmp 0x2c9ee
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x2cad0
jmp 0x2cacd
jmp 0x2cacd
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x2ca1c
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x2ca2b
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x2270
jmp 0x2ca3a
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x2270
jmp 0x2ca4c
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x2270
jmp 0x2cad0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x2ca82
jmp 0x2cacd
jmp 0x2ca77
movq %rax, %rbx
jmp 0x2cae7
jmp 0x2ca93
jmp 0x2ca77
movq %rax, %rbx
jmp 0x2cb01
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x2ca9d
movq %rax, %rbx
jmp 0x2caf4
movq %rax, %rbx
jmp 0x2cada
jmp 0x2cacd
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x2270
jmp 0x2caac
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x2270
jmp 0x2cabe
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x2270
jmp 0x2cad0
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xea7c
leaq 0xd0(%rsp), %rdi
callq 0xea7c
leaq 0x128(%rsp), %rdi
callq 0xb874
leaq 0xe8(%rsp), %rdi
callq 0xea7c
leaq 0x100(%rsp), %rdi
callq 0xea7c
movq %rbx, %rdi
callq 0x2380
movq %rax, %rdi
callq 0xe6cc