float LongJuanQiangFa_get_attackup(int level) {
  if (level <= 8)
    return (float)(1.06);
  else if (level <= 11)
    return (float)(1.07);
  else if (level == 12)
    return (float)(1.08);
  else if (level == 13)
    return (float)(1.09);
  else if (level == 14)
    return (float)(1.10);
  else if (level == 15)
    return (float)(1.13);
  else if (level >= 16)
    return (float)(1.23);
  return 1.00;
}


x86 assembly (clang, -O0):
<LongJuanQiangFa_get_attackup>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jg     1123 <LongJuanQiangFa_get_attackup+0x23>
movss  0xf03(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11f6 <LongJuanQiangFa_get_attackup+0xf6>
cmpl   $0xb,-0x8(%rbp)
jg     113f <LongJuanQiangFa_get_attackup+0x3f>
movss  0xee3(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11f6 <LongJuanQiangFa_get_attackup+0xf6>
cmpl   $0xc,-0x8(%rbp)
jne    115b <LongJuanQiangFa_get_attackup+0x5b>
movss  0xec3(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11f6 <LongJuanQiangFa_get_attackup+0xf6>
cmpl   $0xd,-0x8(%rbp)
jne    1177 <LongJuanQiangFa_get_attackup+0x77>
movss  0xea3(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11f6 <LongJuanQiangFa_get_attackup+0xf6>
cmpl   $0xe,-0x8(%rbp)
jne    1193 <LongJuanQiangFa_get_attackup+0x93>
movss  0xe83(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11f6 <LongJuanQiangFa_get_attackup+0xf6>
cmpl   $0xf,-0x8(%rbp)
jne    11af <LongJuanQiangFa_get_attackup+0xaf>
movss  0xe63(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11f6 <LongJuanQiangFa_get_attackup+0xf6>
cmpl   $0x10,-0x8(%rbp)
jl     11cb <LongJuanQiangFa_get_attackup+0xcb>
movss  0xe43(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11f6 <LongJuanQiangFa_get_attackup+0xf6>
jmp    11d0 <LongJuanQiangFa_get_attackup+0xd0>
jmp    11d5 <LongJuanQiangFa_get_attackup+0xd5>
jmp    11da <LongJuanQiangFa_get_attackup+0xda>
jmp    11df <LongJuanQiangFa_get_attackup+0xdf>
jmp    11e4 <LongJuanQiangFa_get_attackup+0xe4>
jmp    11e9 <LongJuanQiangFa_get_attackup+0xe9>
movss  0xe0f(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<LongJuanQiangFa_get_attackup>:
cmp    $0x9,%edi
jge    110e <LongJuanQiangFa_get_attackup+0xe>
movss  0xef3(%rip),%xmm0
ret
cmp    $0xc,%edi
jae    111c <LongJuanQiangFa_get_attackup+0x1c>
movss  0xee9(%rip),%xmm0
ret
add    $0xfffffff4,%edi
cmp    $0x3,%edi
ja     1134 <LongJuanQiangFa_get_attackup+0x34>
movslq %edi,%rax
lea    0xede(%rip),%rcx
movss  (%rcx,%rax,4),%xmm0
ret
movss  0xecc(%rip),%xmm0
ret

LLVM IR (-O0):
define float @LongJuanQiangFa_get_attackup(i32 %0) {
%2 = alloca float
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 8
br i1 %5, label %6, label %7
6: ; preds = %1
store float 0x3FF0F5C280000000, float* %2
br label %38
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, 11
br i1 %9, label %10, label %11
10: ; preds = %7
store float 0x3FF11EB860000000, float* %2
br label %38
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 12
br i1 %13, label %14, label %15
14: ; preds = %11
store float 0x3FF147AE20000000, float* %2
br label %38
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp eq i32 %16, 13
br i1 %17, label %18, label %19
18: ; preds = %15
store float 0x3FF170A3E0000000, float* %2
br label %38
19: ; preds = %15
%20 = load i32, i32* %3
%21 = icmp eq i32 %20, 14
br i1 %21, label %22, label %23
22: ; preds = %19
store float 0x3FF19999A0000000, float* %2
br label %38
23: ; preds = %19
%24 = load i32, i32* %3
%25 = icmp eq i32 %24, 15
br i1 %25, label %26, label %27
26: ; preds = %23
store float 0x3FF2147AE0000000, float* %2
br label %38
27: ; preds = %23
%28 = load i32, i32* %3
%29 = icmp sge i32 %28, 16
br i1 %29, label %30, label %31
30: ; preds = %27
store float 0x3FF3AE1480000000, float* %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 float 1.000000e+00, float* %2
br label %38
38: ; preds = %37, %30, %26, %22, %18, %14, %10, %6
%39 = load float, float* %2
ret float %39
}

LLVM IR (-O2):
@switch.table.LongJuanQiangFa_get_attackup = [4 x float] [float 0x3FF147AE20000000, float 0x3FF170A3E0000000, float 0x3FF19999A0000000, float 0x3FF2147AE0000000]
define float @LongJuanQiangFa_get_attackup(i32 %0) {
%2 = icmp slt i32 %0, 9
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 12
br i1 %4, label %12, label %5
5: ; preds = %3
%6 = add i32 %0, -12
%7 = icmp ult i32 %6, 4
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = sext i32 %6 to i64
%10 = getelementptr inbounds [4 x float], [4 x float]* @switch.table.LongJuanQiangFa_get_attackup, i64 0, i64 %9
%11 = load float, float* %10
br label %12
12: ; preds = %5, %8, %3, %1
%13 = phi float [ 0x3FF0F5C280000000, %1 ], [ 0x3FF11EB860000000, %3 ], [ %11, %8 ], [ 0x3FF3AE1480000000, %5 ]
ret float %13
}