#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 */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int temp;
  printf("Enter the value of temperature in Fahrenheit: ");
  scanf("%d", &temp);
  if (temp > 60 && temp < 80)
    printf("\nNice Day");
  else if (temp <= 60)
    printf("\nCold Day");
  else
    printf("\nHot Day");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x3c,-0x8(%rbp)
jle    1170 <main+0x50>
cmpl   $0x50,-0x8(%rbp)
jge    1170 <main+0x50>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
jmp    119c <main+0x7c>
cmpl   $0x3c,-0x8(%rbp)
jg     118b <main+0x6b>
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
jmp    1197 <main+0x77>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
jmp    119c <main+0x7c>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
lea    -0x3d(%rax),%ecx
cmp    $0x3d,%eax
lea    0xeed(%rip),%rax
lea    0xef0(%rip),%rdx
cmovl  %rax,%rdx
cmp    $0x13,%ecx
lea    0xece(%rip),%rdi
cmovae %rdx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"Enter the value of temperature in Fahrenheit: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [10 x i8] c"\0ANice Day\00"
@.str.3 = [10 x i8] c"\0ACold Day\00"
@.str.4 = [9 x i8] c"\0AHot Day\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 60
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 80
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %20
12: ; preds = %7, %0
%13 = load i32, i32* %2
%14 = icmp sle i32 %13, 60
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %19
17: ; preds = %12
%18 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
br label %19
19: ; preds = %17, %15
br label %20
20: ; preds = %19, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [47 x i8] c"Enter the value of temperature in Fahrenheit: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [10 x i8] c"\0ANice Day\00"
@.str.3 = [10 x i8] c"\0ACold Day\00"
@.str.4 = [9 x i8] c"\0AHot Day\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = add i32 %5, -61
%7 = icmp ult i32 %6, 19
%8 = icmp slt i32 %5, 61
%9 = select i1 %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0)
%10 = select i1 %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %9
%11 = call i32 @printf(i8* dereferenceable(1) %10)
ret i32 0
}