// File: /workspace/github_cpp_makefile_star2_O3/lvandeve[P]lodepng/examples/example_sdl.cpp
// Function: showfile(char const*)
int showfile(const char* filename) {
  std::cout << "showing " << filename << std::endl;

  std::vector<unsigned char> buffer, image;
  lodepng::load_file(buffer, filename); //load the image file with given filename
  unsigned w, h;
  unsigned error = lodepng::decode(image, w, h, buffer); //decode the png

  //stop if there is an error
  if(error) {
    std::cout << "decoder error " << error << ": " << lodepng_error_text(error) << std::endl;
    return 0;
  }

  return show(filename, &image[0], w, h);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
movq 0x9313(%rip), %r14      # 0x19fd8
leaq 0x5069(%rip), %rsi      # 0x15d35
movl $0x8, %edx
movq %r14, %rdi
callq 0x21d0
testq %rbx, %rbx
je 0x10cfa
movq %rbx, %rdi
callq 0x20a0
movq 0x92eb(%rip), %rdi      # 0x19fd8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x21d0
jmp 0x10d12
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x2250
movq (%r14), %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 0x2100
xorl %eax, %eax
movq %rax, 0x40(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq %rax, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %rbx, %rsi
callq 0x2090
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xcefe
leaq 0x60(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x10d86
callq 0x2170
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0xc(%rsp), %rdx
leaq 0x30(%rsp), %rcx
movl $0x6, %r8d
movl $0x8, %r9d
callq 0xd42d
movl %eax, %ebp
testl %eax, %eax
je 0x10e15
movq 0x9220(%rip), %rdi      # 0x19fd8
leaq 0x4f7f(%rip), %rsi      # 0x15d3e
movl $0xe, %edx
callq 0x21d0
movl %ebp, %esi
movq 0x9206(%rip), %rdi      # 0x19fd8
callq 0x20f0
movq %rax, %rbx
leaq 0x4f6c(%rip), %rsi      # 0x15d4d
movl $0x2, %edx
movq %rax, %rdi
callq 0x21d0
movl %ebp, %edi
callq 0xcee0
movq %rax, %r14
testq %rax, %rax
je 0x10e51
movq %r14, %rdi
callq 0x20a0
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x21d0
jmp 0x10e6a
leaq 0x50(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %rbx, %rsi
callq 0x2090
movq 0x10(%rsp), %rsi
movl 0x8(%rsp), %edx
movl 0xc(%rsp), %ecx
leaq 0x50(%rsp), %rdi
callq 0x10950
movl %eax, %ebx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x10e93
callq 0x2170
jmp 0x10e93
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq %rbx, %rdi
addq %rax, %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x2250
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2180
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
xorl %ebx, %ebx
movq %rax, %rdi
callq 0x2100
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x10ea2
callq 0x2170
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x10eb1
callq 0x2170
movl %ebx, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
jne 0x10ede
jmp 0x10eea
jmp 0x10ee7
movq %rax, %rbx
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10eea
callq 0x2170
jmp 0x10eea
jmp 0x10ee7
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x10ef9
callq 0x2170
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x10f08
callq 0x2170
movq %rbx, %rdi
callq 0x2270