int points(double x) {
  if (x >= 91)
    return 10;
  if (x >= 81)
    return 9;
  if (x >= 71)
    return 8;
  if (x >= 61)
    return 7;
  if (x > 50)
    return 6;
  if (x == 50)
    return 5;
  else
    return 0;
}


x86 assembly (clang, -O0):
<points>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     112c <points+0x2c>
movl   $0xa,-0x4(%rbp)
jmp    11e8 <points+0xe8>
movsd  -0x10(%rbp),%xmm0
movsd  0xecf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     114f <points+0x4f>
movl   $0x9,-0x4(%rbp)
jmp    11e8 <points+0xe8>
movsd  -0x10(%rbp),%xmm0
movsd  0xeb4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1172 <points+0x72>
movl   $0x8,-0x4(%rbp)
jmp    11e8 <points+0xe8>
movsd  -0x10(%rbp),%xmm0
movsd  0xe99(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1195 <points+0x95>
movl   $0x7,-0x4(%rbp)
jmp    11e8 <points+0xe8>
movsd  -0x10(%rbp),%xmm0
movsd  0xe7e(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11b8 <points+0xb8>
movl   $0x6,-0x4(%rbp)
jmp    11e8 <points+0xe8>
movsd  -0x10(%rbp),%xmm0
movsd  0xe5b(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    11e1 <points+0xe1>
jp     11e1 <points+0xe1>
movl   $0x5,-0x4(%rbp)
jmp    11e8 <points+0xe8>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<points>:
mov    $0xa,%eax
ucomisd 0xef3(%rip),%xmm0
jae    115f <points+0x5f>
mov    $0x9,%eax
ucomisd 0xeec(%rip),%xmm0
jae    115f <points+0x5f>
mov    $0x8,%eax
ucomisd 0xee5(%rip),%xmm0
jae    115f <points+0x5f>
mov    $0x7,%eax
ucomisd 0xede(%rip),%xmm0
jae    115f <points+0x5f>
mov    $0x6,%eax
ucomisd 0xed7(%rip),%xmm0
ja     115f <points+0x5f>
cmpeqsd 0xecc(%rip),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
lea    (%rax,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @points(double %0) {
%2 = alloca i32
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp oge double %4, 9.100000e+01
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 10, i32* %2
br label %28
7: ; preds = %1
%8 = load double, double* %3
%9 = fcmp oge double %8, 8.100000e+01
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 9, i32* %2
br label %28
11: ; preds = %7
%12 = load double, double* %3
%13 = fcmp oge double %12, 7.100000e+01
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 8, i32* %2
br label %28
15: ; preds = %11
%16 = load double, double* %3
%17 = fcmp oge double %16, 6.100000e+01
br i1 %17, label %18, label %19
18: ; preds = %15
store i32 7, i32* %2
br label %28
19: ; preds = %15
%20 = load double, double* %3
%21 = fcmp ogt double %20, 5.000000e+01
br i1 %21, label %22, label %23
22: ; preds = %19
store i32 6, i32* %2
br label %28
23: ; preds = %19
%24 = load double, double* %3
%25 = fcmp oeq double %24, 5.000000e+01
br i1 %25, label %26, label %27
26: ; preds = %23
store i32 5, i32* %2
br label %28
27: ; preds = %23
store i32 0, i32* %2
br label %28
28: ; preds = %27, %26, %22, %18, %14, %10, %6
%29 = load i32, i32* %2
ret i32 %29
}

LLVM IR (-O2):
define i32 @points(double %0) {
%2 = fcmp ult double %0, 9.100000e+01
br i1 %2, label %3, label %14
3: ; preds = %1
%4 = fcmp ult double %0, 8.100000e+01
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = fcmp ult double %0, 7.100000e+01
br i1 %6, label %7, label %14
7: ; preds = %5
%8 = fcmp ult double %0, 6.100000e+01
br i1 %8, label %9, label %14
9: ; preds = %7
%10 = fcmp ogt double %0, 5.000000e+01
br i1 %10, label %14, label %11
11: ; preds = %9
%12 = fcmp oeq double %0, 5.000000e+01
%13 = select i1 %12, i32 5, i32 0
br label %14
14: ; preds = %11, %9, %7, %5, %3, %1
%15 = phi i32 [ 10, %1 ], [ 9, %3 ], [ 8, %5 ], [ 7, %7 ], [ 6, %9 ], [ %13, %11 ]
ret i32 %15
}