#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 *, float *);
int main(void) {
  float fBoilPt;
  printf("\nEnter Boiling point of the substance\n");
  scanf("%f", &fBoilPt);
  if (0.95 * 100 <= fBoilPt && fBoilPt <= 1.05 * 100)
    printf("\nThe substance is Water\n");
  else if (0.95 * 357 <= fBoilPt && fBoilPt <= 1.05 * 357)
    printf("\nThe substance is Mercury\n");
  else if (0.95 * 1187 <= fBoilPt && fBoilPt <= 1.05 * 1187)
    printf("\nThe substance is Copper\n");
  else if (0.95 * 2193 <= fBoilPt && fBoilPt <= 1.05 * 2193)
    printf("\nThe substance is Silver\n");
  else if (0.95 * 2660 <= fBoilPt && fBoilPt <= 1.05 * 2660)
    printf("\nThe substance is Gold\n");
  else
    printf("\nInvalid Substance\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf1a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf35(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1192 <main+0x72>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe91(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1192 <main+0x72>
lea    0xef2(%rip),%rdi
call   1030 <printf@plt>
jmp    12ce <main+0x1ae>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe6d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     11d9 <main+0xb9>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe5a(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     11d9 <main+0xb9>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
jmp    12c9 <main+0x1a9>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe36(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1220 <main+0x100>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe23(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1220 <main+0x100>
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
jmp    12c4 <main+0x1a4>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdff(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1267 <main+0x147>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdec(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1267 <main+0x147>
lea    0xe6b(%rip),%rdi
call   1030 <printf@plt>
jmp    12bf <main+0x19f>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdc8(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     12ae <main+0x18e>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdb5(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     12ae <main+0x18e>
lea    0xe3e(%rip),%rdi
call   1030 <printf@plt>
jmp    12ba <main+0x19a>
lea    0xe45(%rip),%rdi
call   1030 <printf@plt>
jmp    12bf <main+0x19f>
jmp    12c4 <main+0x1a4>
jmp    12c9 <main+0x1a9>
jmp    12ce <main+0x1ae>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf1b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0c(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
ucomiss 0xeb5(%rip),%xmm0
jb     1166 <main+0x46>
movss  0xeaf(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     1166 <main+0x46>
lea    0xf7e(%rip),%rdi
jmp    11f8 <main+0xd8>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
ucomisd 0xe9b(%rip),%xmm1
jb     118e <main+0x6e>
movsd  0xe99(%rip),%xmm2
ucomisd %xmm1,%xmm2
jb     118e <main+0x6e>
lea    0xf39(%rip),%rdi
jmp    11f8 <main+0xd8>
ucomisd 0xe8a(%rip),%xmm1
jb     11af <main+0x8f>
movsd  0xe88(%rip),%xmm2
ucomisd %xmm1,%xmm2
jb     11af <main+0x8f>
lea    0xeff(%rip),%rdi
jmp    11f8 <main+0xd8>
ucomisd 0xe79(%rip),%xmm1
jb     11d0 <main+0xb0>
movsd  0xe77(%rip),%xmm2
ucomisd %xmm1,%xmm2
jb     11d0 <main+0xb0>
lea    0xec5(%rip),%rdi
jmp    11f8 <main+0xd8>
movss  0xe30(%rip),%xmm1
ucomiss %xmm0,%xmm1
lea    0xe87(%rip),%rax
lea    0xe93(%rip),%rdi
cmovb  %rax,%rdi
ucomiss 0xe18(%rip),%xmm0
cmovb  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"\0AEnter Boiling point of the substance\0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [25 x i8] c"\0AThe substance is Water\0A\00"
@.str.3 = [27 x i8] c"\0AThe substance is Mercury\0A\00"
@.str.4 = [26 x i8] c"\0AThe substance is Copper\0A\00"
@.str.5 = [26 x i8] c"\0AThe substance is Silver\0A\00"
@.str.6 = [24 x i8] c"\0AThe substance is Gold\0A\00"
@.str.7 = [20 x i8] c"\0AInvalid Substance\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 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), float* %2)
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = fcmp ole double 9.500000e+01, %6
br i1 %7, label %8, label %14
8: ; preds = %0
%9 = load float, float* %2
%10 = fpext float %9 to double
%11 = fcmp ole double %10, 1.050000e+02
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
br label %60
14: ; preds = %8, %0
%15 = load float, float* %2
%16 = fpext float %15 to double
%17 = fcmp ole double 3.391500e+02, %16
br i1 %17, label %18, label %24
18: ; preds = %14
%19 = load float, float* %2
%20 = fpext float %19 to double
%21 = fcmp ole double %20, 3.748500e+02
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
br label %59
24: ; preds = %18, %14
%25 = load float, float* %2
%26 = fpext float %25 to double
%27 = fcmp ole double 0x40919E9999999999, %26
br i1 %27, label %28, label %34
28: ; preds = %24
%29 = load float, float* %2
%30 = fpext float %29 to double
%31 = fcmp ole double %30, 0x4093796666666667
br i1 %31, label %32, label %34
32: ; preds = %28
%33 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0))
br label %58
34: ; preds = %28, %24
%35 = load float, float* %2
%36 = fpext float %35 to double
%37 = fcmp ole double 2.083350e+03, %36
br i1 %37, label %38, label %44
38: ; preds = %34
%39 = load float, float* %2
%40 = fpext float %39 to double
%41 = fcmp ole double %40, 2.302650e+03
br i1 %41, label %42, label %44
42: ; preds = %38
%43 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
br label %57
44: ; preds = %38, %34
%45 = load float, float* %2
%46 = fpext float %45 to double
%47 = fcmp ole double 2.527000e+03, %46
br i1 %47, label %48, label %54
48: ; preds = %44
%49 = load float, float* %2
%50 = fpext float %49 to double
%51 = fcmp ole double %50, 2.793000e+03
br i1 %51, label %52, label %54
52: ; preds = %48
%53 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
br label %56
54: ; preds = %48, %44
%55 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
br label %56
56: ; preds = %54, %52
br label %57
57: ; preds = %56, %42
br label %58
58: ; preds = %57, %32
br label %59
59: ; preds = %58, %22
br label %60
60: ; preds = %59, %12
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@str = [38 x i8] c"\0AEnter Boiling point of the substance\00"
@str.8 = [19 x i8] c"\0AInvalid Substance\00"
@str.9 = [23 x i8] c"\0AThe substance is Gold\00"
@str.10 = [25 x i8] c"\0AThe substance is Silver\00"
@str.11 = [25 x i8] c"\0AThe substance is Copper\00"
@str.12 = [26 x i8] c"\0AThe substance is Mercury\00"
@str.13 = [24 x i8] c"\0AThe substance is Water\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 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), float* %1)
%5 = load float, float* %1
%6 = fcmp ult float %5, 9.500000e+01
%7 = fcmp ugt float %5, 1.050000e+02
%8 = or i1 %6, %7
br i1 %8, label %9, label %27
9: ; preds = %0
%10 = fpext float %5 to double
%11 = fcmp ult double %10, 3.391500e+02
%12 = fcmp ugt double %10, 3.748500e+02
%13 = or i1 %11, %12
br i1 %13, label %14, label %27
14: ; preds = %9
%15 = fcmp ult double %10, 0x40919E9999999999
%16 = fcmp ugt double %10, 0x4093796666666667
%17 = or i1 %15, %16
br i1 %17, label %18, label %27
18: ; preds = %14
%19 = fcmp ult double %10, 2.083350e+03
%20 = fcmp ugt double %10, 2.302650e+03
%21 = or i1 %19, %20
br i1 %21, label %22, label %27
22: ; preds = %18
%23 = fcmp ult float %5, 2.527000e+03
%24 = fcmp ugt float %5, 2.793000e+03
%25 = or i1 %23, %24
%26 = select i1 %25, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str.8, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str.9, i64 0, i64 0)
br label %27
27: ; preds = %22, %18, %14, %9, %0
%28 = phi i8* [ getelementptr inbounds ([24 x i8], [24 x i8]* @str.13, i64 0, i64 0), %0 ], [ getelementptr inbounds ([26 x i8], [26 x i8]* @str.12, i64 0, i64 0), %9 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @str.11, i64 0, i64 0), %14 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @str.10, i64 0, i64 0), %18 ], [ %26, %22 ]
%29 = call i32 @puts(i8* dereferenceable(1) %28)
ret i32 0
}