// File: lvandeve[P]lodepng/lodepng_unittest.cpp
// Function: extractChunkNames[abi:cxx11](std::vector<unsigned char, std::allocator<unsigned char>> const&)
std::string extractChunkNames(const std::vector<unsigned char>& png) {
  const unsigned char* chunk = &png[8];
  const unsigned char* end = &png.back() + 1;
  char name[5];
  std::string result = "";
  for(;;) {
    lodepng_chunk_type(name, chunk);
    result += (std::string(" ") + name);
    if(std::string(name) == "IEND") break;
    chunk = lodepng_chunk_next_const(chunk, end);
    assertTrue(chunk < &png.back(), "jumped out of chunks");
  }
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0xe0(%rbp)
movq %rdi, %rax
movq %rax, -0xe8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x8, %esi
callq 0x1a3e0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x23160
incq %rax
movq %rax, -0x20(%rbp)
movb $0x0, -0x26(%rbp)
leaq -0x27(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x3440
movq -0xe0(%rbp), %rdi
movq -0xd8(%rbp), %rdx
leaq 0x79885(%rip), %rsi     # 0xb4504
callq 0x3340
jmp 0x3ac86
leaq -0x27(%rbp), %rdi
callq 0x3290
movq -0x18(%rbp), %rsi
leaq -0x25(%rbp), %rdi
callq 0x4de0
jmp 0x3ac9e
leaq -0x79(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x3440
movq -0xf0(%rbp), %rdx
leaq 0x79847(%rip), %rsi     # 0xb4503
leaq -0x78(%rbp), %rdi
callq 0x3340
jmp 0x3acc7
leaq -0x58(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0x25(%rbp), %rdx
callq 0xaa1b0
jmp 0x3acda
movq -0xe0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x32e0
jmp 0x3acec
leaq -0x58(%rbp), %rdi
callq 0x34a8
jmp 0x3acf7
leaq -0x78(%rbp), %rdi
callq 0x34a8
jmp 0x3ad02
leaq -0x79(%rbp), %rdi
callq 0x3290
leaq -0xa1(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x3440
movq -0xf8(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
leaq -0x25(%rbp), %rsi
callq 0x3340
jmp 0x3ad37
leaq 0x791fc(%rip), %rsi     # 0xb3f3a
leaq -0xa0(%rbp), %rdi
callq 0x232b0
movb %al, -0xf9(%rbp)
jmp 0x3ad52
leaq -0xa0(%rbp), %rdi
callq 0x34a8
jmp 0x3ad60
leaq -0xa1(%rbp), %rdi
callq 0x3290
movb -0xf9(%rbp), %al
testb $0x1, %al
jne 0x3ad7b
jmp 0x3ae36
jmp 0x3af2e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x27(%rbp), %rdi
callq 0x3290
jmp 0x3af64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x3af54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x3aded
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x3ade0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x34a8
jmp 0x3adde
jmp 0x3ade0
leaq -0x78(%rbp), %rdi
callq 0x34a8
jmp 0x3adeb
jmp 0x3aded
leaq -0x79(%rbp), %rdi
callq 0x3290
jmp 0x3af54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x3ae25
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x34a8
jmp 0x3ae23
jmp 0x3ae25
leaq -0xa1(%rbp), %rdi
callq 0x3290
jmp 0x3af54
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x51c0
movq %rax, -0x108(%rbp)
jmp 0x3ae4c
movq -0x108(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x10(%rbp), %rdi
callq 0x23160
movq %rax, -0x110(%rbp)
jmp 0x3ae74
movq -0x110(%rbp), %rcx
movq -0x118(%rbp), %rax
subq %rcx, %rax
setb %al
movb %al, -0x121(%rbp)
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x3440
movq -0x120(%rbp), %rdx
leaq 0x78ef3(%rip), %rsi     # 0xb3da2
leaq -0xc8(%rbp), %rdi
callq 0x3340
jmp 0x3aebd
movb -0x121(%rbp), %al
movzbl %al, %edi
andl $0x1, %edi
leaq -0xc8(%rbp), %rsi
callq 0x28cc0
jmp 0x3aed7
leaq -0xc8(%rbp), %rdi
callq 0x34a8
jmp 0x3aee5
leaq -0xc9(%rbp), %rdi
callq 0x3290
jmp 0x3ac8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x3af20
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x34a8
jmp 0x3af1e
jmp 0x3af20
leaq -0xc9(%rbp), %rdi
callq 0x3290
jmp 0x3af54
movb $0x1, -0x26(%rbp)
testb $0x1, -0x26(%rbp)
jne 0x3af44
movq -0xe0(%rbp), %rdi
callq 0x34a8
movq -0xe8(%rbp), %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0xe0(%rbp), %rdi
callq 0x34a8
jmp 0x3af62
jmp 0x3af64
movq -0x30(%rbp), %rdi
callq 0x3430
movq %rax, %rdi
callq 0x1a490
nopw %cs:(%rax,%rax)