// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/lodepng_benchmark.cpp
// Function: testDecode(std::vector<unsigned char, std::allocator<unsigned char>> const&)
void testDecode(const std::vector<unsigned char>& png) {
  lodepng::State state;
  unsigned char* decoded = 0;
  unsigned w, h;

  // Try custom decompression settings
  if(apply_mods) {
    state.decoder.color_convert = 0;
    //state.decoder.ignore_crc = 1;
  }

  double t_dec0 = getTime();
  for(int i = 0; i < NUM_DECODE; i++) {
    unsigned error_dec = lodepng_decode(&decoded, &w, &h, &state, png.data(), png.size());
    assertEquals(0, error_dec, "decoder error");
  }
  double t_dec1 = getTime();

  total_dec_time += (t_dec1 - t_dec0);

  total_raw_dec_size += lodepng_get_raw_size(w, h, &state.info_raw);

  if(verbose) {
    printValue("decoding time", t_dec1 - t_dec0, "/", NUM_DECODE, " s");
  }
  free(decoded);

  // input image stats
  {
    lodepng::State inspect;
    unsigned w, h;
    lodepng_inspect(&w, &h, &inspect, png.data(), png.size());
    total_raw_in_size += lodepng_get_raw_size(w, h, &inspect.info_png.color);
    total_png_in_size += png.size();
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x578, %rsp            # imm = 0x578
movq %rdi, %rbx
leaq 0x2f8(%rsp), %rdi
callq 0xb74c
andq $0x0, 0x30(%rsp)
cmpb $0x1, 0xb2af(%rip)      # 0x1a191
jne 0xeeec
andl $0x0, 0x32c(%rsp)
callq 0xe98c
movsd %xmm0, 0x10(%rsp)
pushq $0x5
popq %rbp
leaq 0x78(%rsp), %r14
leaq 0x28(%rsp), %r15
leaq 0x38(%rsp), %r12
leaq 0x58(%rsp), %r13
subl $0x1, %ebp
jb 0xef6c
movq (%rbx), %r8
movq 0x8(%rbx), %r9
subq %r8, %r9
leaq 0x30(%rsp), %rdi
leaq 0x24(%rsp), %rsi
leaq 0x20(%rsp), %rdx
leaq 0x2f8(%rsp), %rcx
callq 0x8071
movl %eax, 0x58(%rsp)
andl $0x0, 0x38(%rsp)
movq %r14, %rdi
leaq 0x5dc7(%rip), %rsi      # 0x14d13
movq %r15, %rdx
callq 0x2070
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x101bc
movq %r14, %rdi
callq 0x21c0
jmp 0xef0e
callq 0xe98c
subsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0xb22b(%rip), %xmm1     # 0x1a1b0
addsd %xmm0, %xmm1
movsd %xmm1, 0xb21f(%rip)     # 0x1a1b0
movl 0x24(%rsp), %edi
movl 0x20(%rsp), %esi
leaq 0x3a0(%rsp), %rdx
callq 0x4a9a
addq %rax, 0xb21b(%rip)      # 0x1a1c8
cmpb $0x1, 0xb23c(%rip)      # 0x1a1f0
jne 0xf04c
leaq 0x5d60(%rip), %rsi      # 0x14d21
leaq 0x78(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x2070
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
leaq 0x5cec(%rip), %rsi      # 0x14ccf
leaq 0x58(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x2070
movl $0x5, 0x1c(%rsp)
leaq 0x5d2e(%rip), %rsi      # 0x14d2f
leaq 0x38(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x2070
leaq 0x78(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x58(%rsp), %rdx
leaq 0x1c(%rsp), %rcx
leaq 0x38(%rsp), %r8
callq 0x102da
leaq 0x38(%rsp), %rdi
callq 0x21c0
leaq 0x58(%rsp), %rdi
callq 0x21c0
leaq 0x78(%rsp), %rdi
callq 0x21c0
movq 0x30(%rsp), %rdi
callq 0x21a0
leaq 0x78(%rsp), %rdi
callq 0xb74c
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
subq %rcx, %r8
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0x6e45
movl 0x58(%rsp), %edi
movl 0x38(%rsp), %esi
leaq 0x158(%rsp), %rdx
callq 0x4a9a
addq %rax, 0xb126(%rip)      # 0x1a1c0
movq 0x8(%rbx), %rax
subq (%rbx), %rax
addq %rax, 0xb110(%rip)      # 0x1a1b8
leaq 0x78(%rsp), %rdi
callq 0xb774
leaq 0x2f8(%rsp), %rdi
callq 0xb774
addq $0x578, %rsp            # imm = 0x578
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x21c0
jmp 0xf0ea
jmp 0xf126
movq %rax, %rbx
jmp 0xf0f4
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x21c0
leaq 0x78(%rsp), %rdi
callq 0x21c0
jmp 0xf129
jmp 0xf126
jmp 0xf126
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0xb774
jmp 0xf129
jmp 0xf126
jmp 0xf126
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x21c0
jmp 0xf129
movq %rax, %rbx
leaq 0x2f8(%rsp), %rdi
callq 0xb774
movq %rbx, %rdi
callq 0x2280
movq %rax, %rdi
callq 0xe5cc