// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng_benchmark.cpp
// Function: testFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void testFile(const std::string& filename) {
  if(verbose) std::cout << "file " << filename << std::endl;

  std::vector<unsigned char> png;
  if(lodepng::load_file(png, filename)) {
    std::cout << "\nfailed to load file " << filename << std::endl << std::endl;
    return;
  }

  // input image stats
  {
    lodepng::State inspect;
    unsigned w, h;
    lodepng_inspect(&w, &h, &inspect, png.data(), png.size());
    total_pixels += (w * h);
    total_png_orig_size += png.size();
    size_t raw_size = lodepng_get_raw_size(w, h, &inspect.info_png.color);
    total_raw_orig_size += raw_size;
    if(verbose) std::cout << "orig compressed size: " << png.size() << ", pixels: " << (w * h) << ", raw size: " << raw_size << std::endl;
  }

  if(do_encode) {
    Image image;
    image.name = getFilePart(filename);
    image.colorType = LCT_RGBA;
    image.bitDepth = 8;
    assertEquals(0, lodepng::decode(image.data, image.width, image.height, filename, image.colorType, image.bitDepth));

    std::vector<unsigned char> temp = testEncode(image);
    if(decode_encoded) png = temp;
  }

  if(do_decode) {
    testDecode(png);
  }

  if(verbose) std::cout << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x2d0, %rsp            # imm = 0x2D0
movq %rdi, %rbx
cmpb $0x1, 0xbaca(%rip)      # 0x1d220
jne 0x117ac
movq 0xb879(%rip), %r14      # 0x1cfd8
leaq 0x65bc(%rip), %rsi      # 0x17d22
movl $0x5, %edx
movq %r14, %rdi
callq 0x21f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x21f0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %rbx, %rsi
callq 0xcd9c
testl %eax, %eax
je 0x1183c
movq 0xb806(%rip), %rdi      # 0x1cfd8
leaq 0x6539(%rip), %rsi      # 0x17d12
movl $0x15, %edx
callq 0x21f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0xb7e7(%rip), %rdi      # 0x1cfd8
callq 0x21f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
jmp 0x11abc
leaq 0x50(%rsp), %rdi
callq 0xd030
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
subq %rcx, %r8
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x7af9
movl 0x10(%rsp), %edi
movl 0x8(%rsp), %esi
movl %esi, %eax
imull %edi, %eax
addq %rax, 0xb94d(%rip)      # 0x1d1c8
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
addq %rax, 0xb944(%rip)      # 0x1d1d0
leaq 0x130(%rsp), %rdx
callq 0x53a7
movq %rax, %r14
addq %rax, 0xb935(%rip)      # 0x1d1d8
cmpb $0x1, 0xb976(%rip)      # 0x1d220
jne 0x11952
movq 0xb721(%rip), %rdi      # 0x1cfd8
leaq 0x646a(%rip), %rsi      # 0x17d28
movl $0x16, %edx
callq 0x21f0
movq 0x38(%rsp), %rsi
subq 0x30(%rsp), %rsi
movq 0xb6ff(%rip), %rdi      # 0x1cfd8
callq 0x2100
movq %rax, %r15
leaq 0x6457(%rip), %rsi      # 0x17d3f
movl $0xa, %edx
movq %rax, %rdi
callq 0x21f0
movl 0x8(%rsp), %esi
imull 0x10(%rsp), %esi
movq %r15, %rdi
callq 0x2100
movq %rax, %r15
leaq 0x643a(%rip), %rsi      # 0x17d4a
movl $0xc, %edx
movq %rax, %rdi
callq 0x21f0
movq %r15, %rdi
movq %r14, %rsi
callq 0x2100
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
leaq 0x50(%rsp), %rdi
callq 0xd058
cmpb $0x1, 0xb8bf(%rip)      # 0x1d222
jne 0x11a85
xorps %xmm0, %xmm0
leaq 0x88(%rsp), %r14
movaps %xmm0, -0x38(%r14)
xorl %eax, %eax
movq %rax, -0x28(%r14)
movq %r14, -0x10(%r14)
movq %rax, -0x8(%r14)
movb $0x0, (%r14)
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x116c9
leaq 0x78(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x20e0
leaq 0x20(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x119ba
callq 0x2170
movabsq $0x800000006, %rax      # imm = 0x800000006
leaq 0x68(%rsp), %rsi
movq %rax, 0x8(%rsi)
movl $0x0, 0x8(%rsp)
leaq 0x6c(%rsp), %rdx
leaq 0x50(%rsp), %rdi
movq %rbx, %rcx
movl $0x6, %r8d
movl $0x8, %r9d
callq 0xd3c8
movl %eax, 0xc(%rsp)
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x6660(%rip), %rdx      # 0x18066
movq %rdx, %rsi
callq 0x130da
leaq 0x8(%rsp), %rdi
leaq 0xc(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x12d7e
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x11a31
callq 0x2170
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x10e15
cmpb $0x1, 0xb7dc(%rip)      # 0x1d223
jne 0x11a58
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x12f84
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x11a67
callq 0x2170
movq 0x78(%rsp), %rdi
cmpq %r14, %rdi
je 0x11a76
callq 0x2170
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x11a85
callq 0x2170
cmpb $0x1, 0xb795(%rip)      # 0x1d221
jne 0x11a98
leaq 0x30(%rsp), %rdi
callq 0x113c2
cmpb $0x1, 0xb781(%rip)      # 0x1d220
jne 0x11acf
movq 0xb530(%rip), %rbx      # 0x1cfd8
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x11ade
callq 0x2170
addq $0x2d0, %rsp            # imm = 0x2D0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
jne 0x11b20
jmp 0x11b2a
jmp 0x11b27
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
jne 0x11b20
jmp 0x11b2a
jmp 0x11b27
jmp 0x11b27
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11b2a
callq 0x2170
jmp 0x11b2a
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x13032
jmp 0x11b54
jmp 0x11b3a
jmp 0x11b51
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xd058
jmp 0x11b54
movq %rax, %rdi
callq 0x12e15
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x11b63
callq 0x2170
movq %rbx, %rdi
callq 0x22f0