#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 */
double pow(double, double);
double get_tau(double velocity) {
  double tau = 1.0;
  if (velocity <= 9.3)
    tau = pow(10.0, -12.75);
  else if (velocity <= 12.5)
    tau = pow(10.0, -15.60) * pow(velocity, 2.92);
  else if (velocity <= 17.0)
    tau = pow(10.0, -13.24) * pow(velocity, 0.77);
  else if (velocity <= 27.0)
    tau = pow(10.0, -12.50) * pow(velocity, 0.17);
  else if (velocity <= 72.0)
    tau = pow(10.0, -13.69) * velocity;
  return tau;
}


x86 assembly (clang, -O0):
<get_tau>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xee3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xece(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     115c <get_tau+0x4c>
movsd  0xeeb(%rip),%xmm0
movsd  0xf23(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
jmp    12a1 <get_tau+0x191>
movsd  0xeac(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     11b1 <get_tau+0xa1>
movsd  0xeb9(%rip),%xmm0
movsd  0xee9(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeca(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    129c <get_tau+0x18c>
movsd  0xe5f(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     1206 <get_tau+0xf6>
movsd  0xe64(%rip),%xmm0
movsd  0xe84(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xe65(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1297 <get_tau+0x187>
movsd  0xe12(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     125b <get_tau+0x14b>
movsd  0xe0f(%rip),%xmm0
movsd  0xe1f(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xe00(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1292 <get_tau+0x182>
movsd  0xdc5(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     128d <get_tau+0x17d>
movsd  0xdba(%rip),%xmm0
movsd  0xdba(%rip),%xmm1
call   1030 <pow@plt>
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1292 <get_tau+0x182>
jmp    1297 <get_tau+0x187>
jmp    129c <get_tau+0x18c>
jmp    12a1 <get_tau+0x191>
movsd  -0x10(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tau>:
push   %rax
movsd  0xeef(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1161 <get_tau+0x51>
movsd  0xee9(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    116b <get_tau+0x5b>
movsd  0xef3(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1182 <get_tau+0x72>
movsd  0xefd(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1199 <get_tau+0x89>
movsd  0xf0f(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    11b0 <get_tau+0xa0>
movsd  0xef9(%rip),%xmm0
pop    %rax
ret
movsd  0xe97(%rip),%xmm0
pop    %rax
ret
movsd  0xea5(%rip),%xmm1
call   1030 <pow@plt>
mulsd  0xea0(%rip),%xmm0
pop    %rax
ret
movsd  0xea6(%rip),%xmm1
call   1030 <pow@plt>
mulsd  0xea1(%rip),%xmm0
pop    %rax
ret
movsd  0xea7(%rip),%xmm1
call   1030 <pow@plt>
mulsd  0xea2(%rip),%xmm0
pop    %rax
ret
mulsd  0xeb0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @get_tau(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
store double 1.000000e+00, double* %3
%4 = load double, double* %2
%5 = fcmp ole double %4, 9.300000e+00
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call double @pow(double 1.000000e+01, double -1.275000e+01)
store double %7, double* %3
br label %43
8: ; preds = %1
%9 = load double, double* %2
%10 = fcmp ole double %9, 1.250000e+01
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = call double @pow(double 1.000000e+01, double -1.560000e+01)
%13 = load double, double* %2
%14 = call double @pow(double %13, double 2.920000e+00)
%15 = fmul double %12, %14
store double %15, double* %3
br label %42
16: ; preds = %8
%17 = load double, double* %2
%18 = fcmp ole double %17, 1.700000e+01
br i1 %18, label %19, label %24
19: ; preds = %16
%20 = call double @pow(double 1.000000e+01, double -1.324000e+01)
%21 = load double, double* %2
%22 = call double @pow(double %21, double 7.700000e-01)
%23 = fmul double %20, %22
store double %23, double* %3
br label %41
24: ; preds = %16
%25 = load double, double* %2
%26 = fcmp ole double %25, 2.700000e+01
br i1 %26, label %27, label %32
27: ; preds = %24
%28 = call double @pow(double 1.000000e+01, double -1.250000e+01)
%29 = load double, double* %2
%30 = call double @pow(double %29, double 1.700000e-01)
%31 = fmul double %28, %30
store double %31, double* %3
br label %40
32: ; preds = %24
%33 = load double, double* %2
%34 = fcmp ole double %33, 7.200000e+01
br i1 %34, label %35, label %39
35: ; preds = %32
%36 = call double @pow(double 1.000000e+01, double -1.369000e+01)
%37 = load double, double* %2
%38 = fmul double %36, %37
store double %38, double* %3
br label %39
39: ; preds = %35, %32
br label %40
40: ; preds = %39, %27
br label %41
41: ; preds = %40, %19
br label %42
42: ; preds = %41, %11
br label %43
43: ; preds = %42, %6
%44 = load double, double* %3
ret double %44
}

LLVM IR (-O2):
define double @get_tau(double %0) {
%2 = fcmp ugt double %0, 9.300000e+00
br i1 %2, label %3, label %22
3: ; preds = %1
%4 = fcmp ugt double %0, 1.250000e+01
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = tail call double @pow(double %0, double 2.920000e+00)
%7 = fmul double %6, 0x3CB2199CD44C95AB
br label %22
8: ; preds = %3
%9 = fcmp ugt double %0, 1.700000e+01
br i1 %9, label %13, label %10
10: ; preds = %8
%11 = tail call double @pow(double %0, double 7.700000e-01)
%12 = fmul double %11, 0x3D30327B534C6E69
br label %22
13: ; preds = %8
%14 = fcmp ugt double %0, 2.700000e+01
br i1 %14, label %18, label %15
15: ; preds = %13
%16 = tail call double @pow(double %0, double 1.700000e-01)
%17 = fmul double %16, 0x3D5640A72ACC33C6
br label %22
18: ; preds = %13
%19 = fcmp ugt double %0, 7.200000e+01
br i1 %19, label %22, label %20
20: ; preds = %18
%21 = fmul double %0, 0x3D16FCE8B177EA84
br label %22
22: ; preds = %1, %5, %15, %20, %18, %10
%23 = phi double [ %7, %5 ], [ %12, %10 ], [ %17, %15 ], [ %21, %20 ], [ 1.000000e+00, %18 ], [ 0x3D4906ED42284196, %1 ]
ret double %23
}