#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 *, char *);
int main(void) {
  int success = 1;
  if (difficultyRating() < 1.0 || difficultyRating() > 5.0)
    success = 0;
  if (hoursSpent() <= 0.0)
    success = 0;
  printf("%s\n", success
                     ? "Everything seems to be unfolding according to plan..."
                     : "fail whale :(");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <difficultyRating@plt>
movaps %xmm0,%xmm1
movsd  0xea8(%rip),%xmm0
ucomisd %xmm1,%xmm0
ja     117b <main+0x4b>
mov    $0x0,%al
call   1030 <difficultyRating@plt>
movsd  0xe97(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1182 <main+0x52>
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1050 <hoursSpent@plt>
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jb     11a0 <main+0x70>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
lea    0xea0(%rip),%rsi
lea    0xe63(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xe51(%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>
movsd  0xec0(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     1159 <main+0x29>
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <difficultyRating@plt>
ucomisd 0xeb1(%rip),%xmm0
jbe    115b <main+0x2b>
mov    $0x1,%bl
xor    %eax,%eax
call   1050 <hoursSpent@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
lea    0xed9(%rip),%rax
lea    0xe9c(%rip),%rsi
cmovae %rax,%rsi
test   %bl,%bl
cmovne %rax,%rsi
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [54 x i8] c"Everything seems to be unfolding according to plan...\00"
@.str.2 = [14 x i8] c"fail whale :(\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = call double (...) @difficultyRating()
%4 = fcmp olt double %3, 1.000000e+00
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = call double (...) @difficultyRating()
%7 = fcmp ogt double %6, 5.000000e+00
br i1 %7, label %8, label %9
8: ; preds = %5, %0
store i32 0, i32* %2
br label %9
9: ; preds = %8, %5
%10 = call double (...) @hoursSpent()
%11 = fcmp ole double %10, 0.000000e+00
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 0, i32* %2
br label %13
13: ; preds = %12, %9
%14 = load i32, i32* %2
%15 = icmp ne i32 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0)
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [54 x i8] c"Everything seems to be unfolding according to plan...\00"
@.str.2 = [14 x i8] c"fail whale :(\00"
define i32 @main() {
%1 = tail call double (...) @difficultyRating()
%2 = fcmp olt double %1, 1.000000e+00
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call double (...) @difficultyRating()
%5 = fcmp ogt double %4, 5.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %3, %0
br label %7
7: ; preds = %6, %3
%8 = phi i1 [ true, %6 ], [ false, %3 ]
%9 = tail call double (...) @hoursSpent()
%10 = fcmp ole double %9, 0.000000e+00
%11 = or i1 %8, %10
%12 = select i1 %11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %12)
ret i32 0
}