// File: /workspace/github_cpp_makefile_star2_O1/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 $0x568, %rsp            # imm = 0x568
movq %rdi, %rbx
leaq 0x2e8(%rsp), %rdi
callq 0xd030
movq $0x0, 0x18(%rsp)
cmpb $0x1, 0xbdce(%rip)      # 0x1d1c1
jne 0x11400
movl $0x0, 0x31c(%rsp)
callq 0x21c0
movl %eax, %eax
cvtsi2sd %rax, %xmm0
divsd 0x67ec(%rip), %xmm0     # 0x17c00
movsd %xmm0, (%rsp)
movl $0x5, %ebp
leaq 0x68db(%rip), %r14      # 0x17d00
leaq 0x68(%rsp), %r15
leaq 0x20(%rsp), %r12
leaq 0x40(%rsp), %r13
movq (%rbx), %r8
movq 0x8(%rbx), %r9
subq %r8, %r9
leaq 0x18(%rsp), %rdi
leaq 0x14(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x2e8(%rsp), %rcx
callq 0x8f3c
movl %eax, 0x40(%rsp)
movl $0x0, 0x20(%rsp)
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
movq %r15, %rdi
leaq 0x6879(%rip), %rsi      # 0x17cf3
movq %r14, %rdx
callq 0x130da
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x12d7e
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x114a4
callq 0x2170
decl %ebp
jne 0x11434
callq 0x21c0
movl %eax, %eax
cvtsi2sd %rax, %xmm1
divsd 0x6744(%rip), %xmm1     # 0x17c00
subsd (%rsp), %xmm1
movsd 0xbd17(%rip), %xmm0     # 0x1d1e0
movsd %xmm1, (%rsp)
addsd %xmm1, %xmm0
movsd %xmm0, 0xbd06(%rip)     # 0x1d1e0
movl 0x14(%rsp), %edi
movl 0x10(%rsp), %esi
leaq 0x390(%rsp), %rdx
callq 0x53a7
addq %rax, 0xbd02(%rip)      # 0x1d1f8
cmpb $0x1, 0xbd23(%rip)      # 0x1d220
jne 0x115c8
leaq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
movq %rax, (%rdi)
leaq 0x67ea(%rip), %rsi      # 0x17d01
leaq 0x67f0(%rip), %rdx      # 0x17d0e
callq 0x130da
movsd (%rsp), %xmm0
movsd %xmm0, 0x60(%rsp)
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x6771(%rip), %rsi      # 0x17caf
leaq 0x676b(%rip), %rdx      # 0x17cb0
leaq 0x40(%rsp), %rdi
callq 0x130da
movl $0x5, 0xc(%rsp)
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x67a8(%rip), %rsi      # 0x17d0f
leaq 0x67a3(%rip), %rdx      # 0x17d11
leaq 0x20(%rsp), %rdi
callq 0x130da
leaq 0x68(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x40(%rsp), %rdx
leaq 0xc(%rsp), %rcx
leaq 0x20(%rsp), %r8
callq 0x12eda
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x115a5
callq 0x2170
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x115b4
callq 0x2170
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x115c8
callq 0x2170
movq 0x18(%rsp), %rdi
callq 0x2210
leaq 0x68(%rsp), %rdi
callq 0xd030
movq (%rbx), %rcx
movq 0x8(%rbx), %r8
subq %rcx, %r8
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x7af9
movl 0x40(%rsp), %edi
movl 0x20(%rsp), %esi
leaq 0x148(%rsp), %rdx
callq 0x53a7
addq %rax, 0xbbda(%rip)      # 0x1d1f0
movq 0x8(%rbx), %rax
subq (%rbx), %rax
addq %rax, 0xbbc4(%rip)      # 0x1d1e8
leaq 0x68(%rsp), %rdi
callq 0xd058
leaq 0x2e8(%rsp), %rdi
callq 0xd058
addq $0x568, %rsp            # imm = 0x568
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x11664
callq 0x2170
jmp 0x11664
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x116ab
callq 0x2170
jmp 0x116ab
jmp 0x116a8
jmp 0x11690
jmp 0x11690
jmp 0x11690
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0xd058
jmp 0x11693
jmp 0x11690
jmp 0x11690
movq %rax, %rbx
leaq 0x2e8(%rsp), %rdi
callq 0xd058
movq %rbx, %rdi
callq 0x22f0
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x11693
callq 0x2170
jmp 0x11693
movq %rax, %rdi
callq 0x12e15