#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 */
double difficultyRating();
double hoursSpent();
int /*<<< orphan*/ printf(char *);
int main(void) {
  if (difficultyRating() < 1.0 || difficultyRating() > 5.0)
    printf("difficultyRating() test: **fail**\n");
  else
    printf("difficultyRating() test: PASS\n");
  if (hoursSpent() <= 0.0)
    printf("hoursSpent() test: **fail**\n");
  else
    printf("hoursSpent() test: PASS\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <difficultyRating@plt>
movaps %xmm0,%xmm1
movsd  0xeaf(%rip),%xmm0
ucomisd %xmm1,%xmm0
ja     1174 <main+0x44>
mov    $0x0,%al
call   1030 <difficultyRating@plt>
movsd  0xe9e(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1185 <main+0x55>
lea    0xe95(%rip),%rdi
call   1040 <printf@plt>
jmp    1191 <main+0x61>
lea    0xea7(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <hoursSpent@plt>
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jb     11b9 <main+0x89>
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
jmp    11c5 <main+0x95>
lea    0xeaf(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <difficultyRating@plt>
lea    0xf23(%rip),%rbx
movsd  0xeb9(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     1165 <main+0x35>
xor    %eax,%eax
call   1030 <difficultyRating@plt>
ucomisd 0xeac(%rip),%xmm0
ja     1165 <main+0x35>
lea    0xeab(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <hoursSpent@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
lea    0xeab(%rip),%rax
lea    0xebc(%rip),%rdi
cmovb  %rax,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"difficultyRating() test: **fail**\0A\00"
@.str.1 = [31 x i8] c"difficultyRating() test: PASS\0A\00"
@.str.2 = [29 x i8] c"hoursSpent() test: **fail**\0A\00"
@.str.3 = [25 x i8] c"hoursSpent() test: PASS\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call double (...) @difficultyRating()
%3 = fcmp olt double %2, 1.000000e+00
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = call double (...) @difficultyRating()
%6 = fcmp ogt double %5, 5.000000e+00
br i1 %6, label %7, label %9
7: ; preds = %4, %0
%8 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %11
9: ; preds = %4
%10 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
%12 = call double (...) @hoursSpent()
%13 = fcmp ole double %12, 0.000000e+00
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
br label %18
16: ; preds = %11
%17 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
br label %18
18: ; preds = %16, %14
ret i32 0
}

LLVM IR (-O2):
@str = [30 x i8] c"difficultyRating() test: PASS\00"
@str.4 = [24 x i8] c"hoursSpent() test: PASS\00"
@str.5 = [28 x i8] c"hoursSpent() test: **fail**\00"
@str.6 = [34 x i8] c"difficultyRating() test: **fail**\00"
define i32 @main() {
%1 = tail call double (...) @difficultyRating()
%2 = fcmp olt double %1, 1.000000e+00
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call double (...) @difficultyRating()
%5 = fcmp ogt double %4, 5.000000e+00
br i1 %5, label %7, label %6
6: ; preds = %3
br label %7
7: ; preds = %0, %3, %6
%8 = phi i8* [ getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0), %6 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @str.6, i64 0, i64 0), %3 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @str.6, i64 0, i64 0), %0 ]
%9 = tail call i32 @puts(i8* dereferenceable(1) %8)
%10 = tail call double (...) @hoursSpent()
%11 = fcmp ugt double %10, 0.000000e+00
%12 = select i1 %11, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str.5, i64 0, i64 0)
%13 = tail call i32 @puts(i8* dereferenceable(1) %12)
ret i32 0
}