#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 *);
void studentMarkPrint(double studentMark) {
  if (studentMark >= 0 && studentMark < 45) {
    printf("Poor.\n");
  } else if (studentMark >= 45 && studentMark < 60) {
    printf("Average.\n");
  } else if (studentMark >= 60 && studentMark < 75) {
    printf("Good.\n");
  } else if (studentMark >= 75 && studentMark < 80) {
    printf("Very Good.\n");
  } else if (studentMark >= 80 && studentMark < 101) {
    printf("Excellent.\n");
  } else {
    printf("Invalid data!\n");
  }
}


x86 assembly (clang, -O0):
<studentMarkPrint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1153 <studentMarkPrint+0x43>
movsd  0xec9(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1153 <studentMarkPrint+0x43>
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
jmp    125f <studentMarkPrint+0x14f>
movsd  -0x8(%rbp),%xmm0
movsd  0xea0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     118e <studentMarkPrint+0x7e>
movsd  0xe96(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    118e <studentMarkPrint+0x7e>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
jmp    125a <studentMarkPrint+0x14a>
movsd  -0x8(%rbp),%xmm0
movsd  0xe6d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     11c9 <studentMarkPrint+0xb9>
movsd  0xe63(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    11c9 <studentMarkPrint+0xb9>
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
jmp    1255 <studentMarkPrint+0x145>
movsd  -0x8(%rbp),%xmm0
movsd  0xe3a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1204 <studentMarkPrint+0xf4>
movsd  0xe30(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1204 <studentMarkPrint+0xf4>
lea    0xe3f(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <studentMarkPrint+0x140>
movsd  -0x8(%rbp),%xmm0
movsd  0xe07(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     123f <studentMarkPrint+0x12f>
movsd  0xdfd(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    123f <studentMarkPrint+0x12f>
lea    0xe10(%rip),%rdi
call   1030 <printf@plt>
jmp    124b <studentMarkPrint+0x13b>
lea    0xe0b(%rip),%rdi
call   1030 <printf@plt>
jmp    1250 <studentMarkPrint+0x140>
jmp    1255 <studentMarkPrint+0x145>
jmp    125a <studentMarkPrint+0x14a>
jmp    125f <studentMarkPrint+0x14f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<studentMarkPrint>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1134 <studentMarkPrint+0x24>
movsd  0xede(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1134 <studentMarkPrint+0x24>
lea    0xf26(%rip),%rdi
jmp    1030 <puts@plt>
ucomisd 0xec4(%rip),%xmm0
jb     1158 <studentMarkPrint+0x48>
movsd  0xec2(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1158 <studentMarkPrint+0x48>
lea    0xef9(%rip),%rdi
jmp    1030 <puts@plt>
ucomisd 0xea8(%rip),%xmm0
jb     117c <studentMarkPrint+0x6c>
movsd  0xea6(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    117c <studentMarkPrint+0x6c>
lea    0xecf(%rip),%rdi
jmp    1030 <puts@plt>
ucomisd 0xe8c(%rip),%xmm0
jb     11a0 <studentMarkPrint+0x90>
movsd  0xe8a(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    11a0 <studentMarkPrint+0x90>
lea    0xea6(%rip),%rdi
jmp    1030 <puts@plt>
movsd  0xe78(%rip),%xmm1
ucomisd %xmm0,%xmm1
lea    0xe83(%rip),%rdi
lea    0xe6e(%rip),%rax
cmovbe %rax,%rdi
ucomisd 0xe52(%rip),%xmm0
cmovb  %rax,%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"Poor.\0A\00"
@.str.1 = [10 x i8] c"Average.\0A\00"
@.str.2 = [7 x i8] c"Good.\0A\00"
@.str.3 = [12 x i8] c"Very Good.\0A\00"
@.str.4 = [12 x i8] c"Excellent.\0A\00"
@.str.5 = [15 x i8] c"Invalid data!\0A\00"
define void @studentMarkPrint(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load double, double* %2
%7 = fcmp olt double %6, 4.500000e+01
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %48
10: ; preds = %5, %1
%11 = load double, double* %2
%12 = fcmp oge double %11, 4.500000e+01
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = load double, double* %2
%15 = fcmp olt double %14, 6.000000e+01
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %47
18: ; preds = %13, %10
%19 = load double, double* %2
%20 = fcmp oge double %19, 6.000000e+01
br i1 %20, label %21, label %26
21: ; preds = %18
%22 = load double, double* %2
%23 = fcmp olt double %22, 7.500000e+01
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %46
26: ; preds = %21, %18
%27 = load double, double* %2
%28 = fcmp oge double %27, 7.500000e+01
br i1 %28, label %29, label %34
29: ; preds = %26
%30 = load double, double* %2
%31 = fcmp olt double %30, 8.000000e+01
br i1 %31, label %32, label %34
32: ; preds = %29
%33 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
br label %45
34: ; preds = %29, %26
%35 = load double, double* %2
%36 = fcmp oge double %35, 8.000000e+01
br i1 %36, label %37, label %42
37: ; preds = %34
%38 = load double, double* %2
%39 = fcmp olt double %38, 1.010000e+02
br i1 %39, label %40, label %42
40: ; preds = %37
%41 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
br label %44
42: ; preds = %37, %34
%43 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
br label %44
44: ; preds = %42, %40
br label %45
45: ; preds = %44, %32
br label %46
46: ; preds = %45, %24
br label %47
47: ; preds = %46, %16
br label %48
48: ; preds = %47, %8
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"Invalid data!\00"
@str.6 = [11 x i8] c"Excellent.\00"
@str.7 = [11 x i8] c"Very Good.\00"
@str.8 = [6 x i8] c"Good.\00"
@str.9 = [9 x i8] c"Average.\00"
@str.10 = [6 x i8] c"Poor.\00"
define void @studentMarkPrint(double %0) {
%2 = fcmp oge double %0, 0.000000e+00
%3 = fcmp olt double %0, 4.500000e+01
%4 = and i1 %2, %3
br i1 %4, label %22, label %5
5: ; preds = %1
%6 = fcmp oge double %0, 4.500000e+01
%7 = fcmp olt double %0, 6.000000e+01
%8 = and i1 %6, %7
br i1 %8, label %22, label %9
9: ; preds = %5
%10 = fcmp oge double %0, 6.000000e+01
%11 = fcmp olt double %0, 7.500000e+01
%12 = and i1 %10, %11
br i1 %12, label %22, label %13
13: ; preds = %9
%14 = fcmp oge double %0, 7.500000e+01
%15 = fcmp olt double %0, 8.000000e+01
%16 = and i1 %14, %15
br i1 %16, label %22, label %17
17: ; preds = %13
%18 = fcmp oge double %0, 8.000000e+01
%19 = fcmp olt double %0, 1.010000e+02
%20 = and i1 %18, %19
%21 = select i1 %20, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @str.6, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0)
br label %22
22: ; preds = %17, %13, %9, %5, %1
%23 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.10, i64 0, i64 0), %1 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @str.9, i64 0, i64 0), %5 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @str.7, i64 0, i64 0), %13 ], [ %21, %17 ]
%24 = tail call i32 @puts(i8* dereferenceable(1) %23)
ret void
}