// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
movq %rdi, %rbx
cmpb $0x1, 0xb022(%rip)      # 0x1a1f0
jne 0xf1f6
movq 0xae01(%rip), %rdi      # 0x19fd8
leaq 0x5b64(%rip), %rsi      # 0x14d42
callq 0x2130
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2110
movq %rax, %rdi
callq 0x2090
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq %rbx, %rsi
callq 0xb4e7
testl %eax, %eax
je 0xf240
movq 0xadbf(%rip), %rdi      # 0x19fd8
leaq 0x5b12(%rip), %rsi      # 0x14d32
callq 0x2130
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2110
movq %rax, %rdi
callq 0x2090
movq %rax, %rdi
jmp 0xf43c
leaq 0x50(%rsp), %rdi
callq 0xb74c
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
subq %rcx, %r8
leaq 0x10(%rsp), %rdi
leaq 0x4(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x6e45
movl 0x10(%rsp), %edi
movl 0x4(%rsp), %esi
movl %esi, %eax
imull %edi, %eax
addq %rax, 0xaf19(%rip)      # 0x1a198
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
addq %rax, 0xaf10(%rip)      # 0x1a1a0
leaq 0x130(%rsp), %rdx
callq 0x4a9a
movq %rax, %r14
addq %rax, 0xaf01(%rip)      # 0x1a1a8
cmpb $0x1, 0xaf42(%rip)      # 0x1a1f0
jne 0xf317
movq 0xad21(%rip), %rdi      # 0x19fd8
leaq 0x5a8a(%rip), %rsi      # 0x14d48
callq 0x2130
movq 0x38(%rsp), %rsi
subq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x20d0
leaq 0x5a83(%rip), %rsi      # 0x14d5f
movq %rax, %rdi
callq 0x2130
movl 0x4(%rsp), %esi
imull 0x10(%rsp), %esi
movq %rax, %rdi
callq 0x20d0
leaq 0x5a6e(%rip), %rsi      # 0x14d6a
movq %rax, %rdi
callq 0x2130
movq %rax, %rdi
movq %r14, %rsi
callq 0x20d0
movq %rax, %rdi
callq 0x2090
leaq 0x50(%rsp), %rdi
callq 0xb774
cmpb $0x1, 0xaeca(%rip)      # 0x1a1f2
jne 0xf419
xorps %xmm0, %xmm0
leaq 0x88(%rsp), %rax
movaps %xmm0, -0x38(%rax)
andq $0x0, -0x28(%rax)
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0xf146
leaq 0x78(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x20b0
leaq 0x10(%rsp), %rdi
callq 0x21c0
movabsq $0x800000006, %rax      # imm = 0x800000006
leaq 0x68(%rsp), %rsi
movq %rax, 0x8(%rsi)
andl $0x0, 0x4(%rsp)
leaq 0x6c(%rsp), %rdx
leaq 0x50(%rsp), %rdi
pushq $0x6
popq %r8
pushq $0x8
popq %r9
movq %rbx, %rcx
callq 0xb905
movl %eax, 0xc(%rsp)
leaq 0x5cd5(%rip), %rsi      # 0x15086
leaq 0x10(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x2070
leaq 0x4(%rsp), %rdi
leaq 0xc(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x101bc
leaq 0x10(%rsp), %rdi
callq 0x21c0
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xe9f7
cmpb $0x1, 0xadff(%rip)      # 0x1a1f3
jne 0xf405
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x1034e
leaq 0x10(%rsp), %rdi
callq 0xe97c
leaq 0x50(%rsp), %rdi
callq 0x1040c
cmpb $0x1, 0xadd1(%rip)      # 0x1a1f1
jne 0xf42c
leaq 0x30(%rsp), %rdi
callq 0xeeb4
cmpb $0x1, 0xadbd(%rip)      # 0x1a1f0
jne 0xf441
movq 0xab9c(%rip), %rdi      # 0x19fd8
callq 0x2090
leaq 0x30(%rsp), %rdi
callq 0xe97c
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xe97c
jmp 0xf48e
jmp 0xf4ad
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x21c0
jmp 0xf48e
jmp 0xf48b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x21c0
jmp 0xf48e
jmp 0xf48b
jmp 0xf48b
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x1040c
jmp 0xf4b0
jmp 0xf49e
jmp 0xf4ad
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xb774
jmp 0xf4b0
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xe97c
movq %rbx, %rdi
callq 0x2280
movq %rax, %rdi
callq 0xe5cc