// File: /workspace/github_cpp_makefile_star2_O3/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, 0x88(%rsp)
movq 0x7e71f(%rip), %rbx     # 0xb3fd8
leaq 0x42381(%rip), %rsi     # 0x77c41
movl $0x15, %edx
movq %rbx, %rdi
callq 0x2280
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2170
xorps %xmm0, %xmm0
leaq 0x100(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x20, %esi
movl $0x20, %edx
movl $0x6, %ecx
movl $0x8, %r8d
callq 0x1692e
leaq 0x128(%rsp), %rdx
movb $0x3, (%rdx)
leaq 0xe8(%rsp), %rdi
leaq 0x8(%rsp), %rcx
movl $0x20, %esi
callq 0x7076e
leaq 0x128(%rsp), %rdi
callq 0xd3c8
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 0x88(%rsp), %ecx
movl $0x20, %edx
callq 0xd902
movl %eax, %edi
callq 0x16481
xorps %xmm0, %xmm0
leaq 0xb0(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0xd0(%rsp), %rsi
callq 0x11771
movl %eax, %edi
callq 0x16481
movq 0xb0(%rsp), %rdi
movq 0xb8(%rsp), %rcx
movq %rcx, %rax
subq %rdi, %rax
cmpq 0x88(%rsp), %rax
jne 0x35cc9
cmpq %rdi, %rcx
je 0x35a16
xorl %ebx, %ebx
cmpb $0x3, (%rdi,%rbx)
jne 0x35a75
incq %rbx
cmpq %rbx, %rax
jne 0x35a06
jmp 0x35a1b
testq %rdi, %rdi
je 0x35a20
callq 0x2210
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x35a32
callq 0x2210
leaq 0x128(%rsp), %rdi
callq 0xd3f0
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x35a51
callq 0x2210
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x35a63
callq 0x2210
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 0x408f5(%rip), %rsi     # 0x7637d
leaq 0x408f3(%rip), %rdx     # 0x76382
leaq 0x90(%rsp), %rdi
callq 0x14f6e
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %rdi
callq 0x1518a
leaq 0x42192(%rip), %rsi     # 0x77c5c
leaq 0x68(%rsp), %rdi
callq 0x23e0
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x1518a
leaq 0x43e4a(%rip), %rsi     # 0x79945
leaq 0x48(%rsp), %rdi
callq 0x23e0
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x1518a
leaq 0x42135(%rip), %rsi     # 0x77c61
leaq 0x28(%rsp), %rdi
callq 0x23e0
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x1518a
leaq 0x40868(%rip), %rsi     # 0x763c5
leaq 0x8(%rsp), %rdi
callq 0x23e0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x7e460(%rip), %rdi     # 0xb3fd8
callq 0x2280
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x35b8c
callq 0x2210
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x35b9b
callq 0x2210
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x35baa
callq 0x2210
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x35bb9
callq 0x2210
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x35bcb
callq 0x2210
movq 0x7e406(%rip), %rdi     # 0xb3fd8
leaq 0x694d4(%rip), %rsi     # 0x9f0ad
movl $0x9, %edx
callq 0x2280
leaq 0x48(%rsp), %rsi
movl $0x3, (%rsi)
leaq 0x8(%rsp), %rdi
callq 0x706ff
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x7e3cf(%rip), %rdi     # 0xb3fd8
callq 0x2280
movq %rax, %r14
leaq 0x407c5(%rip), %rsi     # 0x763dd
movl $0x9, %edx
movq %rax, %rdi
callq 0x2280
addq 0xb0(%rsp), %rbx
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x16232
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r14, %rdi
callq 0x2280
movq %rax, %rbx
leaq 0x4066e(%rip), %rsi     # 0x762c4
movl $0x2, %edx
movq %rax, %rdi
callq 0x2280
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2170
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x35c99
callq 0x2210
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x35ca8
callq 0x2210
movl $0x4, %edi
callq 0x2120
movl $0x1, (%rax)
movq 0x7e2f9(%rip), %rsi     # 0xb3fb8
movq %rax, %rdi
xorl %edx, %edx
callq 0x2390
leaq 0xa0(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x406a1(%rip), %rsi     # 0x7637d
leaq 0x4069f(%rip), %rdx     # 0x76382
leaq 0x90(%rsp), %rdi
callq 0x14f6e
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %rdi
callq 0x1518a
leaq 0x41f39(%rip), %rsi     # 0x77c57
leaq 0x68(%rsp), %rdi
callq 0x23e0
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x1518a
leaq 0x43bf6(%rip), %rsi     # 0x79945
leaq 0x48(%rsp), %rdi
callq 0x23e0
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x1518a
leaq 0x40673(%rip), %rsi     # 0x763f3
leaq 0x28(%rsp), %rdi
callq 0x23e0
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x1518a
leaq 0x40614(%rip), %rsi     # 0x763c5
leaq 0x8(%rsp), %rdi
callq 0x23e0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x7e20c(%rip), %rdi     # 0xb3fd8
callq 0x2280
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x35de0
callq 0x2210
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x35def
callq 0x2210
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x35dfe
callq 0x2210
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x35e0d
callq 0x2210
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x35e1f
callq 0x2210
movq 0x7e1b2(%rip), %rdi     # 0xb3fd8
leaq 0x69280(%rip), %rsi     # 0x9f0ad
movl $0x9, %edx
callq 0x2280
movq 0xb8(%rsp), %rax
subq 0xb0(%rsp), %rax
leaq 0x48(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x8(%rsp), %rdi
callq 0x703b5
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x7e16e(%rip), %rdi     # 0xb3fd8
callq 0x2280
movq %rax, %rbx
leaq 0x40564(%rip), %rsi     # 0x763dd
movl $0x9, %edx
movq %rax, %rdi
callq 0x2280
leaq 0x28(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x703b5
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x2280
movq %rax, %rbx
leaq 0x40410(%rip), %rsi     # 0x762c4
movl $0x2, %edx
movq %rax, %rdi
callq 0x2280
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2170
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x35ef7
callq 0x2210
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x35f06
callq 0x2210
movl $0x4, %edi
callq 0x2120
movl $0x1, (%rax)
movq 0x7e09b(%rip), %rsi     # 0xb3fb8
movq %rax, %rdi
xorl %edx, %edx
callq 0x2390
jmp 0x35f32
jmp 0x35f4c
jmp 0x35f4c
jmp 0x35ffe
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x35f4f
callq 0x2210
jmp 0x35f4f
jmp 0x35f4c
jmp 0x35f76
jmp 0x35f76
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
jne 0x35ff7
jmp 0x36001
jmp 0x35f90
jmp 0x35ffe
jmp 0x35f90
jmp 0x35ffe
jmp 0x35faa
jmp 0x35f76
jmp 0x35faa
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x35f93
callq 0x2210
jmp 0x35f93
jmp 0x35fd3
jmp 0x35f90
jmp 0x35fd3
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x35fad
callq 0x2210
jmp 0x35fad
jmp 0x35fe7
jmp 0x35faa
jmp 0x35ffe
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x35fd6
callq 0x2210
jmp 0x35fd6
jmp 0x35fc0
movq %rax, %rbx
jmp 0x36044
jmp 0x35fd3
movq %rax, %rbx
jmp 0x36032
movq %rax, %rbx
jmp 0x36013
jmp 0x35ffe
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x35fea
callq 0x2210
jmp 0x35fea
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x36001
callq 0x2210
jmp 0x36001
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x36013
callq 0x2210
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x36025
callq 0x2210
leaq 0x128(%rsp), %rdi
callq 0xd3f0
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x36044
callq 0x2210
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x36056
callq 0x2210
movq %rbx, %rdi
callq 0x23c0
movq %rax, %rdi
callq 0x14d36