int EPD_Class_temperature_to_factor_10x(int temperature) {
  if (temperature <= -10) {
    return 170;
  } else if (temperature <= -5) {
    return 120;
  } else if (temperature <= 5) {
    return 80;
  } else if (temperature <= 10) {
    return 40;
  } else if (temperature <= 15) {
    return 30;
  } else if (temperature <= 20) {
    return 20;
  } else if (temperature <= 40) {
    return 10;
  }
  return 7;
}


x86 assembly (clang, -O0):
<EPD_Class_temperature_to_factor_10x>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xfffffff6,-0x8(%rbp)
jg     111d <EPD_Class_temperature_to_factor_10x+0x1d>
movl   $0xaa,-0x4(%rbp)
jmp    11c6 <EPD_Class_temperature_to_factor_10x+0xc6>
cmpl   $0xfffffffb,-0x8(%rbp)
jg     1133 <EPD_Class_temperature_to_factor_10x+0x33>
movl   $0x78,-0x4(%rbp)
jmp    11c6 <EPD_Class_temperature_to_factor_10x+0xc6>
cmpl   $0x5,-0x8(%rbp)
jg     1149 <EPD_Class_temperature_to_factor_10x+0x49>
movl   $0x50,-0x4(%rbp)
jmp    11c6 <EPD_Class_temperature_to_factor_10x+0xc6>
cmpl   $0xa,-0x8(%rbp)
jg     115f <EPD_Class_temperature_to_factor_10x+0x5f>
movl   $0x28,-0x4(%rbp)
jmp    11c6 <EPD_Class_temperature_to_factor_10x+0xc6>
cmpl   $0xf,-0x8(%rbp)
jg     1175 <EPD_Class_temperature_to_factor_10x+0x75>
movl   $0x1e,-0x4(%rbp)
jmp    11c6 <EPD_Class_temperature_to_factor_10x+0xc6>
cmpl   $0x14,-0x8(%rbp)
jg     118b <EPD_Class_temperature_to_factor_10x+0x8b>
movl   $0x14,-0x4(%rbp)
jmp    11c6 <EPD_Class_temperature_to_factor_10x+0xc6>
cmpl   $0x28,-0x8(%rbp)
jg     11a1 <EPD_Class_temperature_to_factor_10x+0xa1>
movl   $0xa,-0x4(%rbp)
jmp    11c6 <EPD_Class_temperature_to_factor_10x+0xc6>
jmp    11a6 <EPD_Class_temperature_to_factor_10x+0xa6>
jmp    11ab <EPD_Class_temperature_to_factor_10x+0xab>
jmp    11b0 <EPD_Class_temperature_to_factor_10x+0xb0>
jmp    11b5 <EPD_Class_temperature_to_factor_10x+0xb5>
jmp    11ba <EPD_Class_temperature_to_factor_10x+0xba>
jmp    11bf <EPD_Class_temperature_to_factor_10x+0xbf>
movl   $0x7,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EPD_Class_temperature_to_factor_10x>:
mov    $0xaa,%eax
cmp    $0xfffffff7,%edi
jl     114a <EPD_Class_temperature_to_factor_10x+0x4a>
mov    $0x78,%eax
cmp    $0xfffffffc,%edi
jl     114a <EPD_Class_temperature_to_factor_10x+0x4a>
mov    $0x50,%eax
cmp    $0x6,%edi
jl     114a <EPD_Class_temperature_to_factor_10x+0x4a>
mov    $0x28,%eax
cmp    $0xb,%edi
jb     114a <EPD_Class_temperature_to_factor_10x+0x4a>
mov    $0x1e,%eax
cmp    $0x10,%edi
jb     114a <EPD_Class_temperature_to_factor_10x+0x4a>
mov    $0x14,%eax
cmp    $0x15,%edi
jb     114a <EPD_Class_temperature_to_factor_10x+0x4a>
xor    %eax,%eax
cmp    $0x29,%edi
setb   %al
lea    (%rax,%rax,2),%eax
add    $0x7,%eax
ret

LLVM IR (-O0):
define i32 @EPD_Class_temperature_to_factor_10x(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, -10
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 170, i32* %2
br label %38
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, -5
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 120, i32* %2
br label %38
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp sle i32 %12, 5
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 80, i32* %2
br label %38
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp sle i32 %16, 10
br i1 %17, label %18, label %19
18: ; preds = %15
store i32 40, i32* %2
br label %38
19: ; preds = %15
%20 = load i32, i32* %3
%21 = icmp sle i32 %20, 15
br i1 %21, label %22, label %23
22: ; preds = %19
store i32 30, i32* %2
br label %38
23: ; preds = %19
%24 = load i32, i32* %3
%25 = icmp sle i32 %24, 20
br i1 %25, label %26, label %27
26: ; preds = %23
store i32 20, i32* %2
br label %38
27: ; preds = %23
%28 = load i32, i32* %3
%29 = icmp sle i32 %28, 40
br i1 %29, label %30, label %31
30: ; preds = %27
store i32 10, i32* %2
br label %38
31: ; preds = %27
br label %32
32: ; preds = %31
br label %33
33: ; preds = %32
br label %34
34: ; preds = %33
br label %35
35: ; preds = %34
br label %36
36: ; preds = %35
br label %37
37: ; preds = %36
store i32 7, i32* %2
br label %38
38: ; preds = %37, %30, %26, %22, %18, %14, %10, %6
%39 = load i32, i32* %2
ret i32 %39
}

LLVM IR (-O2):
define i32 @EPD_Class_temperature_to_factor_10x(i32 %0) {
%2 = icmp slt i32 %0, -9
br i1 %2, label %16, label %3
3: ; preds = %1
%4 = icmp slt i32 %0, -4
br i1 %4, label %16, label %5
5: ; preds = %3
%6 = icmp slt i32 %0, 6
br i1 %6, label %16, label %7
7: ; preds = %5
%8 = icmp ult i32 %0, 11
br i1 %8, label %16, label %9
9: ; preds = %7
%10 = icmp ult i32 %0, 16
br i1 %10, label %16, label %11
11: ; preds = %9
%12 = icmp ult i32 %0, 21
br i1 %12, label %16, label %13
13: ; preds = %11
%14 = icmp ult i32 %0, 41
%15 = select i1 %14, i32 10, i32 7
br label %16
16: ; preds = %13, %11, %9, %7, %5, %3, %1
%17 = phi i32 [ 170, %1 ], [ 120, %3 ], [ 80, %5 ], [ 40, %7 ], [ 30, %9 ], [ 20, %11 ], [ %15, %13 ]
ret i32 %17
}