#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 exp(double);
double get_damp_tt(double r) {
  static const double a = 1.5;
  double ra = r * a;
  double ra2 = ra * ra;
  double ra3 = ra2 * ra;
  double ra4 = ra3 * ra;
  double ra5 = ra4 * ra;
  double ra6 = ra5 * ra;
  return 1.0 - exp(-ra) * (1.0 + ra + ra2 / 2.0 + ra3 / 6.0 + ra4 / 24.0 +
                           ra5 / 120.0 + ra6 / 720.0);
}


x86 assembly (clang, -O0):
<get_damp_tt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xf0b(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movsd  0xe5d(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  0xe73(%rip),%xmm3
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  0xe56(%rip),%xmm3
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  0xe39(%rip),%xmm3
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  0xe1c(%rip),%xmm3
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm1
movsd  -0x38(%rbp),%xmm2
movsd  0xdff(%rip),%xmm3
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xdcc(%rip),%xmm1
addsd  %xmm1,%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_damp_tt>:
sub    $0x68,%rsp
movapd %xmm0,%xmm1
mulsd  0xee0(%rip),%xmm1
movapd %xmm1,(%rsp)
movapd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm2,0x10(%rsp)
movapd %xmm1,%xmm0
mulsd  %xmm2,%xmm0
movapd %xmm0,0x30(%rsp)
movapd %xmm1,%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm2,0x20(%rsp)
movapd %xmm1,%xmm0
mulsd  %xmm2,%xmm0
movapd %xmm0,0x40(%rsp)
movapd %xmm1,%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm2,0x50(%rsp)
movapd 0xead(%rip),%xmm0
xorpd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  0xe84(%rip),%xmm1
movapd 0x10(%rsp),%xmm3
mulsd  0xe7e(%rip),%xmm3
movapd (%rsp),%xmm4
addsd  %xmm1,%xmm4
movapd 0x30(%rsp),%xmm2
unpcklpd 0x20(%rsp),%xmm2
divpd  0xe81(%rip),%xmm2
addsd  %xmm4,%xmm3
addsd  %xmm2,%xmm3
unpckhpd %xmm2,%xmm2
addsd  %xmm3,%xmm2
movapd 0x40(%rsp),%xmm3
unpcklpd 0x50(%rsp),%xmm3
divpd  0xe6d(%rip),%xmm3
addsd  %xmm3,%xmm2
unpckhpd %xmm3,%xmm3
addsd  %xmm2,%xmm3
mulsd  %xmm0,%xmm3
subsd  %xmm3,%xmm1
movapd %xmm1,%xmm0
add    $0x68,%rsp
ret

LLVM IR (-O0):
@get_damp_tt.a = internal constant double 1.500000e+00
define double @get_damp_tt(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %2
%9 = load double, double* %2
%10 = fmul double %9, 1.500000e+00
store double %10, double* %3
%11 = load double, double* %3
%12 = load double, double* %3
%13 = fmul double %11, %12
store double %13, double* %4
%14 = load double, double* %4
%15 = load double, double* %3
%16 = fmul double %14, %15
store double %16, double* %5
%17 = load double, double* %5
%18 = load double, double* %3
%19 = fmul double %17, %18
store double %19, double* %6
%20 = load double, double* %6
%21 = load double, double* %3
%22 = fmul double %20, %21
store double %22, double* %7
%23 = load double, double* %7
%24 = load double, double* %3
%25 = fmul double %23, %24
store double %25, double* %8
%26 = load double, double* %3
%27 = fneg double %26
%28 = call double @exp(double %27)
%29 = load double, double* %3
%30 = fadd double 1.000000e+00, %29
%31 = load double, double* %4
%32 = fdiv double %31, 2.000000e+00
%33 = fadd double %30, %32
%34 = load double, double* %5
%35 = fdiv double %34, 6.000000e+00
%36 = fadd double %33, %35
%37 = load double, double* %6
%38 = fdiv double %37, 2.400000e+01
%39 = fadd double %36, %38
%40 = load double, double* %7
%41 = fdiv double %40, 1.200000e+02
%42 = fadd double %39, %41
%43 = load double, double* %8
%44 = fdiv double %43, 7.200000e+02
%45 = fadd double %42, %44
%46 = fneg double %28
%47 = call double @llvm.fmuladd.f64(double %46, double %45, double 1.000000e+00)
ret double %47
}

LLVM IR (-O2):
define double @get_damp_tt(double %0) {
%2 = fmul double %0, 1.500000e+00
%3 = fmul double %2, %2
%4 = fmul double %2, %3
%5 = fmul double %2, %4
%6 = fmul double %2, %5
%7 = fmul double %2, %6
%8 = fneg double %2
%9 = tail call double @exp(double %8)
%10 = fadd double %2, 1.000000e+00
%11 = fmul double %3, 5.000000e-01
%12 = fadd double %10, %11
%13 = insertelement <2 x double> poison, double %4, i64 0
%14 = insertelement <2 x double> %13, double %5, i64 1
%15 = fdiv <2 x double> %14, <double 6.000000e+00, double 2.400000e+01>
%16 = extractelement <2 x double> %15, i64 0
%17 = fadd double %12, %16
%18 = extractelement <2 x double> %15, i64 1
%19 = fadd double %17, %18
%20 = insertelement <2 x double> poison, double %6, i64 0
%21 = insertelement <2 x double> %20, double %7, i64 1
%22 = fdiv <2 x double> %21, <double 1.200000e+02, double 7.200000e+02>
%23 = extractelement <2 x double> %22, i64 0
%24 = fadd double %19, %23
%25 = extractelement <2 x double> %22, i64 1
%26 = fadd double %24, %25
%27 = fneg double %9
%28 = tail call double @llvm.fmuladd.f64(double %27, double %26, double 1.000000e+00)
ret double %28
}