#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
float checkPDFFileByPath(char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
void _path(const char *path) {
  printf(" -- API Test (path-based) --\n");
  float score = checkPDFFileByPath(path);
  if (score < 0) {
    fprintf(stderr, "An error occured in _path()!\n");
    return;
  }
  printf("API call (path): %.2f of %.2f points\n", score, 7.5f);
}


x86 assembly (clang, -O0):
<_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1050 <checkPDFFileByPath@plt>
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    117f <_path+0x4f>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
lea    0xeb1(%rip),%rsi
call   1040 <fprintf@plt>
jmp    119e <_path+0x6e>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb5(%rip),%rdi
movsd  0xe69(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_path>:
push   %rbx
mov    %rdi,%rbx
lea    0xf01(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1060 <checkPDFFileByPath@plt>
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jbe    1176 <_path+0x36>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
lea    0xe98(%rip),%rsi
pop    %rbx
jmp    1050 <fprintf@plt>
cvtss2sd %xmm0,%xmm0
lea    0xea5(%rip),%rdi
movsd  0xe77(%rip),%xmm1
mov    $0x2,%al
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [30 x i8] c" -- API Test (path-based) --\0A\00"
@stderr = global i32 0
@.str.1 = [30 x i8] c"An error occured in _path()!\0A\00"
@.str.2 = [38 x i8] c"API call (path): %.2f of %.2f points\0A\00"
define void @_path(i8* %0) {
%2 = alloca i8*
%3 = alloca float
store i8* %0, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call float @checkPDFFileByPath(i8* %5)
store float %6, float* %3
%7 = load float, float* %3
%8 = fcmp olt float %7, 0.000000e+00
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
br label %16
12: ; preds = %1
%13 = load float, float* %3
%14 = fpext float %13 to double
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), double %14, double 7.500000e+00)
br label %16
16: ; preds = %12, %9
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str.1 = [30 x i8] c"An error occured in _path()!\0A\00"
@.str.2 = [38 x i8] c"API call (path): %.2f of %.2f points\0A\00"
@str = [29 x i8] c" -- API Test (path-based) --\00"
define void @_path(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%3 = tail call float @checkPDFFileByPath(i8* %0)
%4 = fcmp olt float %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
br label %11
8: ; preds = %1
%9 = fpext float %3 to double
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), double %9, double 7.500000e+00)
br label %11
11: ; preds = %8, %5
ret void
}