// File: /workspace/github_cpp_makefile_star2_O3/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, 0xbe65(%rip)      # 0x1d228
jne 0x11419
movq 0xbc0c(%rip), %r14      # 0x1cfd8
leaq 0x6a6f(%rip), %rsi      # 0x17e42
movl $0x5, %edx
movq %r14, %rdi
callq 0x2200
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x2200
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %rbx, %rsi
callq 0xcfce
testl %eax, %eax
je 0x114a9
movq 0xbb99(%rip), %rdi      # 0x1cfd8
leaq 0x69ec(%rip), %rsi      # 0x17e32
movl $0x15, %edx
callq 0x2200
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0xbb7a(%rip), %rdi      # 0x1cfd8
callq 0x2200
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
jmp 0x11729
leaq 0x50(%rsp), %rdi
callq 0xd258
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
subq %rcx, %r8
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x80a5
movl 0x10(%rsp), %edi
movl 0x8(%rsp), %esi
movl %esi, %eax
imull %edi, %eax
addq %rax, 0xbce8(%rip)      # 0x1d1d0
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
addq %rax, 0xbcdf(%rip)      # 0x1d1d8
leaq 0x130(%rsp), %rdx
callq 0x597f
movq %rax, %r14
addq %rax, 0xbcd0(%rip)      # 0x1d1e0
cmpb $0x1, 0xbd11(%rip)      # 0x1d228
jne 0x115bf
movq 0xbab4(%rip), %rdi      # 0x1cfd8
leaq 0x691d(%rip), %rsi      # 0x17e48
movl $0x16, %edx
callq 0x2200
movq 0x38(%rsp), %rsi
subq 0x30(%rsp), %rsi
movq 0xba92(%rip), %rdi      # 0x1cfd8
callq 0x2110
movq %rax, %r15
leaq 0x690a(%rip), %rsi      # 0x17e5f
movl $0xa, %edx
movq %rax, %rdi
callq 0x2200
movl 0x8(%rsp), %esi
imull 0x10(%rsp), %esi
movq %r15, %rdi
callq 0x2110
movq %rax, %r15
leaq 0x68ed(%rip), %rsi      # 0x17e6a
movl $0xc, %edx
movq %rax, %rdi
callq 0x2200
movq %r15, %rdi
movq %r14, %rsi
callq 0x2110
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
leaq 0x50(%rsp), %rdi
callq 0xd280
cmpb $0x1, 0xbc5a(%rip)      # 0x1d22a
jne 0x116f2
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 0x11336
leaq 0x78(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x20e0
leaq 0x20(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x11627
callq 0x2180
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 0xd5e1
movl %eax, 0xc(%rsp)
leaq 0x10(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x6b13(%rip), %rdx      # 0x18186
movq %rdx, %rsi
callq 0x12d56
leaq 0x8(%rsp), %rdi
leaq 0xc(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x129e4
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x1169e
callq 0x2180
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x10a8d
cmpb $0x1, 0xbb77(%rip)      # 0x1d22b
jne 0x116c5
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x12bea
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x116d4
callq 0x2180
movq 0x78(%rsp), %rdi
cmpq %r14, %rdi
je 0x116e3
callq 0x2180
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x116f2
callq 0x2180
cmpb $0x1, 0xbb30(%rip)      # 0x1d229
jne 0x11705
leaq 0x30(%rsp), %rdi
callq 0x1102f
cmpb $0x1, 0xbb1c(%rip)      # 0x1d228
jne 0x1173c
movq 0xb8c3(%rip), %rbx      # 0x1cfd8
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1174b
callq 0x2180
addq $0x2d0, %rsp            # imm = 0x2D0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
jne 0x1178d
jmp 0x11797
jmp 0x11794
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
jne 0x1178d
jmp 0x11797
jmp 0x11794
jmp 0x11794
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11797
callq 0x2180
jmp 0x11797
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x12ca8
jmp 0x117c1
jmp 0x117a7
jmp 0x117be
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xd280
jmp 0x117c1
movq %rax, %rdi
callq 0x12a7b
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x117d0
callq 0x2180
movq %rbx, %rdi
callq 0x2300