// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng_unittest.cpp
// Function: testChunkUtil()
void testChunkUtil() {
  std::cout << "testChunkUtil" << std::endl;
  std::vector<unsigned char> png;
  createComplexPNG(png);

  std::vector<std::string> names[3];
  std::vector<std::vector<unsigned char> > chunks[3];

  assertNoError(lodepng::getChunks(names, chunks, png));

  std::vector<std::vector<unsigned char> > chunks2[3];
  chunks2[0].push_back(chunks[2][2]); //zTXt
  chunks2[1].push_back(chunks[2][3]); //tEXt
  chunks2[2].push_back(chunks[2][4]); //iTXt

  assertNoError(lodepng::insertChunks(png, chunks2));

  std::string chunknames = extractChunkNames(png);
  //                                        chunks2[0]                    chunks2[1]                                   chunks2[2]
  //                                             v                             v                                            v
  std::string expectednames = " IHDR uNKa uNKa zTXt PLTE tRNS bKGD pHYs uNKb tEXt IDAT tIME zTXt zTXt tEXt iTXt iTXt uNKc iTXt IEND";
  ASSERT_EQUALS(expectednames, chunknames);

  std::vector<unsigned char> image;
  unsigned w, h;
  ASSERT_NO_PNG_ERROR(lodepng::decode(image, w, h, png));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq 0x79172(%rip), %rdi     # 0xa2fd8
leaq 0x37834(%rip), %rsi     # 0x616a1
callq 0x21f0
movq %rax, %rdi
callq 0x2100
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
callq 0x1bf63
leaq 0x1f0(%rsp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
andq $0x0, 0x40(%rdi)
leaq 0x1a0(%rsp), %rsi
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
andq $0x0, 0x40(%rsi)
leaq 0x50(%rsp), %rdx
callq 0xec14
movl %eax, %edi
callq 0x13456
xorps %xmm0, %xmm0
leaq 0x150(%rsp), %rdi
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
andq $0x0, 0x40(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
movq 0x1d0(%rsp), %rsi
addq $0x30, %rsi
callq 0x121be
leaq 0x168(%rsp), %rdi
movq 0x1d0(%rsp), %rsi
addq $0x48, %rsi
callq 0x121be
leaq 0x180(%rsp), %rdi
movq 0x1d0(%rsp), %rsi
addq $0x60, %rsi
callq 0x121be
leaq 0x50(%rsp), %rdi
leaq 0x150(%rsp), %rsi
callq 0xedb0
movl %eax, %edi
callq 0x13456
leaq 0x110(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x1c377
leaq 0x37740(%rip), %rsi     # 0x616af
leaq 0xf0(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x20c0
leaq 0xf0(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x5ad6f
testb %al, %al
jne 0x2a17a
xorps %xmm0, %xmm0
leaq 0x130(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0xcc(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
leaq 0x50(%rsp), %rcx
pushq $0x6
popq %r8
pushq $0x8
popq %r9
callq 0xb94d
movl %eax, %ebx
leaq 0x36201(%rip), %rsi     # 0x601dd
leaq 0xa8(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20c0
leaq 0x37724(%rip), %rdx     # 0x61719
leaq 0x30(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x5a5df
leaq 0x375b8(%rip), %rsi     # 0x615c6
leaq 0x88(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x20c0
movq 0x90(%rsp), %r14
testq %r14, %r14
je 0x2a061
leaq 0x37592(%rip), %rsi     # 0x615c6
leaq 0xd0(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x20c0
leaq 0x39758(%rip), %rsi     # 0x637a5
leaq 0x68(%rsp), %rdi
leaq 0xd0(%rsp), %rdx
callq 0x5a8d9
jmp 0x2a07a
leaq 0x3755e(%rip), %rsi     # 0x615c6
leaq 0x68(%rsp), %rdi
leaq 0xd0(%rsp), %rdx
callq 0x20c0
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x5a61f
leaq 0x10(%rsp), %rsi
movl %ebx, %edi
callq 0x13352
leaq 0x10(%rsp), %rdi
callq 0x2270
leaq 0x68(%rsp), %rdi
callq 0x2270
testq %r14, %r14
je 0x2a0c0
leaq 0xd0(%rsp), %rdi
callq 0x2270
leaq 0x88(%rsp), %rdi
callq 0x2270
leaq 0x30(%rsp), %rdi
callq 0x2270
leaq 0xa8(%rsp), %rdi
callq 0x2270
leaq 0x130(%rsp), %rdi
callq 0xea7c
leaq 0xf0(%rsp), %rdi
callq 0x2270
leaq 0x110(%rsp), %rdi
callq 0x2270
pushq $0x30
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x150, %rdi            # imm = 0x150
callq 0x12338
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x2a10f
pushq $0x30
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x1a0, %rdi            # imm = 0x1A0
callq 0x12338
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x2a12d
pushq $0x30
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x5af72
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x2a14b
leaq 0x50(%rsp), %rdi
callq 0xea7c
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r14
retq
leaq 0x3605c(%rip), %rsi     # 0x601dd
leaq 0x88(%rsp), %rdi
leaq 0xd0(%rsp), %rdx
callq 0x20c0
leaq 0x37577(%rip), %rdx     # 0x61714
leaq 0x68(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x5a5df
leaq 0x395ef(%rip), %rdx     # 0x637a5
leaq 0xa8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x5a5df
leaq 0x36e37(%rip), %rdx     # 0x61006
leaq 0x30(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x5a5df
leaq 0x3603d(%rip), %rdx     # 0x60225
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x5a5df
movq 0x78dda(%rip), %rdi     # 0xa2fd8
leaq 0x10(%rsp), %rsi
callq 0x21d0
leaq 0x10(%rsp), %rdi
callq 0x2270
leaq 0x30(%rsp), %rdi
callq 0x2270
leaq 0xa8(%rsp), %rdi
callq 0x2270
leaq 0x68(%rsp), %rdi
callq 0x2270
leaq 0x88(%rsp), %rdi
callq 0x2270
movq 0x78d91(%rip), %rdi     # 0xa2fd8
leaq 0x5ecbf(%rip), %rsi     # 0x88f0d
callq 0x21f0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x5ad79
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d0
leaq 0x35fc1(%rip), %rsi     # 0x6023d
movq %rax, %rdi
callq 0x21f0
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x5ad79
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d0
leaq 0x35e77(%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 0x2a2ea
jmp 0x2a2e7
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x2a3eb
jmp 0x2a382
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x2a310
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2270
jmp 0x2a31f
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x2270
jmp 0x2a331
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x2270
jmp 0x2a340
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x2270
jmp 0x2a3eb
jmp 0x2a387
jmp 0x2a382
movq %rax, %rbx
jmp 0x2a3ad
jmp 0x2a375
jmp 0x2a382
movq %rax, %rbx
jmp 0x2a3a8
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2270
jmp 0x2a39e
jmp 0x2a38c
movq %rax, %rbx
jmp 0x2a3f8
movq %rax, %rbx
jmp 0x2a4fc
movq %rax, %rbx
jmp 0x2a3eb
movq %rax, %rbx
jmp 0x2a3ba
movq %rax, %rbx
jmp 0x2a3de
movq %rax, %rbx
jmp 0x2a3d1
movq %rax, %rbx
jmp 0x2a3c7
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x2270
testq %r14, %r14
je 0x2a3ba
leaq 0xd0(%rsp), %rdi
callq 0x2270
leaq 0x88(%rsp), %rdi
callq 0x2270
leaq 0x30(%rsp), %rdi
callq 0x2270
leaq 0xa8(%rsp), %rdi
callq 0x2270
leaq 0x130(%rsp), %rdi
callq 0xea7c
leaq 0xf0(%rsp), %rdi
callq 0x2270
leaq 0x110(%rsp), %rdi
callq 0x2270
jmp 0x2a414
jmp 0x2a411
movq %rax, %rbx
jmp 0x2a4c0
movq %rax, %rbx
pushq $0x30
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x150, %rdi            # imm = 0x150
callq 0x12338
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x2a418
jmp 0x2a4c0
jmp 0x2a514
movq %rax, %rbx
testq %r14, %r14
je 0x2a4fc
addq $-0x18, %r14
leaq (%rsp,%r14), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x5af72
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x2a44c
jmp 0x2a4fc
jmp 0x2a514
movq %rax, %rbx
testq %r14, %r14
je 0x2a4de
addq $-0x18, %r14
leaq (%rsp,%r14), %rdi
addq $0x1a0, %rdi            # imm = 0x1A0
callq 0x12338
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x2a47c
jmp 0x2a4de
jmp 0x2a514
movq %rax, %rbx
testq %r14, %r14
je 0x2a4c0
addq $-0x18, %r14
leaq (%rsp,%r14), %rdi
addq $0x150, %rdi            # imm = 0x150
callq 0x12338
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x2a4a6
pushq $0x30
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x1a0, %rdi            # imm = 0x1A0
callq 0x12338
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x2a4c4
pushq $0x30
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x1f0, %rdi            # imm = 0x1F0
callq 0x5af72
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x2a4e2
leaq 0x50(%rsp), %rdi
callq 0xea7c
movq %rbx, %rdi
callq 0x2380
jmp 0x2a514
jmp 0x2a514
jmp 0x2a514
movq %rax, %rdi
callq 0xe6cc