#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 */
typedef double Ts;

/* Variables and functions */
int exp(double);
double estimate_T1(double Ts, double T1_old, double T2, double D1, double D2,
                   double kappa1, double kappa2, double Cs1, double Cs2,
                   double dp, double delta_t) {
  double C1;
  double C2;
  double C3;
  double T1;
  C1 = Cs2 * dp / D2 * (1. - exp(-D2 / dp));
  C2 = -(1. - exp(D1 / dp)) * exp(-D2 / dp);
  C3 = kappa1 / D1 - kappa2 / D1 + kappa2 / D1 * exp(-D1 / dp);
  T1 = (kappa1 / 2. / D1 / D2 * (Ts) + C1 / delta_t * T1_old +
        (2. * C2 - 1. + exp(-D1 / dp)) * kappa2 / 2. / D1 / D2 * T2) /
       (C1 / delta_t + kappa2 / D1 / D2 * C2 + C3 / 2. / D2);
  return (T1);
}


x86 assembly (clang, -O0):
<estimate_T1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  0x20(%rbp),%xmm8
movsd  0x18(%rbp),%xmm8
movsd  0x10(%rbp),%xmm8
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  %xmm7,-0x40(%rbp)
movsd  0x10(%rbp),%xmm0
mulsd  0x18(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  0x18(%rbp),%xmm0
call   1030 <exp@plt>
movsd  -0x90(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm2
movsd  0xe6a(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  0x18(%rbp),%xmm0
call   1030 <exp@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe42(%rip),%xmm0
subsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  0x18(%rbp),%xmm0
call   1030 <exp@plt>
movsd  -0x88(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
divsd  -0x20(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x38(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  0x18(%rbp),%xmm0
call   1030 <exp@plt>
movsd  -0x80(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
cvtsi2sd %eax,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xd5a(%rip),%xmm1
divsd  %xmm1,%xmm0
divsd  -0x20(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
divsd  0x20(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xd22(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  0x18(%rbp),%xmm0
call   1030 <exp@plt>
movsd  -0x70(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
cvtsi2sd %eax,%xmm2
addsd  %xmm2,%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  0xccc(%rip),%xmm2
divsd  %xmm2,%xmm0
divsd  -0x20(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x48(%rbp),%xmm2
divsd  0x20(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
divsd  -0x20(%rbp),%xmm1
divsd  -0x28(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x58(%rbp),%xmm2
movsd  0xc7e(%rip),%xmm3
divsd  %xmm3,%xmm2
divsd  -0x28(%rbp),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<estimate_T1>:
sub    $0xa8,%rsp
movaps %xmm6,0x80(%rsp)
movaps %xmm5,0x40(%rsp)
movaps %xmm3,0x30(%rsp)
movsd  %xmm2,0x68(%rsp)
movsd  %xmm1,0x60(%rsp)
movsd  %xmm0,0x8(%rsp)
movsd  0xb8(%rsp),%xmm0
movsd  0xb0(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm4,0x70(%rsp)
divsd  %xmm4,%xmm1
movsd  %xmm1,(%rsp)
xorpd  0xe98(%rip),%xmm4
divsd  %xmm0,%xmm4
movapd %xmm4,0x20(%rsp)
movapd %xmm4,%xmm0
call   1030 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0xe86(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  (%rsp),%xmm1
movsd  %xmm1,(%rsp)
movapd 0x30(%rsp),%xmm0
divsd  0xb8(%rsp),%xmm0
call   1030 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0xe55(%rip),%xmm1
subsd  %xmm0,%xmm1
xorpd  0xe39(%rip),%xmm1
movapd %xmm1,0x10(%rsp)
movaps 0x20(%rsp),%xmm0
call   1030 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movapd 0x40(%rsp),%xmm2
unpcklpd 0x80(%rsp),%xmm2
movapd 0x30(%rsp),%xmm1
movapd %xmm1,%xmm0
unpcklpd %xmm1,%xmm0
divpd  %xmm0,%xmm2
movapd %xmm2,%xmm0
unpckhpd %xmm2,%xmm0
movapd %xmm0,0x10(%rsp)
subsd  %xmm0,%xmm2
movapd %xmm2,0x50(%rsp)
movapd 0xdd5(%rip),%xmm0
xorpd  %xmm1,%xmm0
divsd  0xb8(%rsp),%xmm0
movapd %xmm0,0x90(%rsp)
call   1030 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
addsd  0x50(%rsp),%xmm0
movsd  %xmm0,0x50(%rsp)
movapd 0x40(%rsp),%xmm0
mulsd  0xdab(%rip),%xmm0
divsd  0x30(%rsp),%xmm0
divsd  0x70(%rsp),%xmm0
movsd  (%rsp),%xmm1
divsd  0xc0(%rsp),%xmm1
movsd  %xmm1,(%rsp)
movsd  0x60(%rsp),%xmm2
mulsd  %xmm1,%xmm2
mulsd  0x8(%rsp),%xmm0
addsd  %xmm2,%xmm0
movapd %xmm0,0x40(%rsp)
movsd  0x20(%rsp),%xmm0
addsd  %xmm0,%xmm0
addsd  0xd68(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movaps 0x90(%rsp),%xmm0
call   1030 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x8(%rsp),%xmm0
mulsd  0x80(%rsp),%xmm0
movsd  0xd2f(%rip),%xmm4
mulsd  %xmm4,%xmm0
divsd  0x30(%rsp),%xmm0
movapd 0x70(%rsp),%xmm1
divsd  %xmm1,%xmm0
mulsd  0x68(%rsp),%xmm0
addsd  0x40(%rsp),%xmm0
movapd 0x10(%rsp),%xmm2
divsd  %xmm1,%xmm2
mulsd  0x20(%rsp),%xmm2
addsd  (%rsp),%xmm2
movsd  0x50(%rsp),%xmm3
mulsd  %xmm4,%xmm3
divsd  %xmm1,%xmm3
addsd  %xmm2,%xmm3
divsd  %xmm3,%xmm0
add    $0xa8,%rsp
ret

LLVM IR (-O0):
define double @estimate_T1(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10) {
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
store double %0, double* %12
store double %1, double* %13
store double %2, double* %14
store double %3, double* %15
store double %4, double* %16
store double %5, double* %17
store double %6, double* %18
store double %7, double* %19
store double %8, double* %20
store double %9, double* %21
store double %10, double* %22
%27 = load double, double* %20
%28 = load double, double* %21
%29 = fmul double %27, %28
%30 = load double, double* %16
%31 = fdiv double %29, %30
%32 = load double, double* %16
%33 = fneg double %32
%34 = load double, double* %21
%35 = fdiv double %33, %34
%36 = call i32 @exp(double %35)
%37 = sitofp i32 %36 to double
%38 = fsub double 1.000000e+00, %37
%39 = fmul double %31, %38
store double %39, double* %23
%40 = load double, double* %15
%41 = load double, double* %21
%42 = fdiv double %40, %41
%43 = call i32 @exp(double %42)
%44 = sitofp i32 %43 to double
%45 = fsub double 1.000000e+00, %44
%46 = fneg double %45
%47 = load double, double* %16
%48 = fneg double %47
%49 = load double, double* %21
%50 = fdiv double %48, %49
%51 = call i32 @exp(double %50)
%52 = sitofp i32 %51 to double
%53 = fmul double %46, %52
store double %53, double* %24
%54 = load double, double* %17
%55 = load double, double* %15
%56 = fdiv double %54, %55
%57 = load double, double* %18
%58 = load double, double* %15
%59 = fdiv double %57, %58
%60 = fsub double %56, %59
%61 = load double, double* %18
%62 = load double, double* %15
%63 = fdiv double %61, %62
%64 = load double, double* %15
%65 = fneg double %64
%66 = load double, double* %21
%67 = fdiv double %65, %66
%68 = call i32 @exp(double %67)
%69 = sitofp i32 %68 to double
%70 = call double @llvm.fmuladd.f64(double %63, double %69, double %60)
store double %70, double* %25
%71 = load double, double* %17
%72 = fdiv double %71, 2.000000e+00
%73 = load double, double* %15
%74 = fdiv double %72, %73
%75 = load double, double* %16
%76 = fdiv double %74, %75
%77 = load double, double* %12
%78 = load double, double* %23
%79 = load double, double* %22
%80 = fdiv double %78, %79
%81 = load double, double* %13
%82 = fmul double %80, %81
%83 = call double @llvm.fmuladd.f64(double %76, double %77, double %82)
%84 = load double, double* %24
%85 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %84, double -1.000000e+00)
%86 = load double, double* %15
%87 = fneg double %86
%88 = load double, double* %21
%89 = fdiv double %87, %88
%90 = call i32 @exp(double %89)
%91 = sitofp i32 %90 to double
%92 = fadd double %85, %91
%93 = load double, double* %18
%94 = fmul double %92, %93
%95 = fdiv double %94, 2.000000e+00
%96 = load double, double* %15
%97 = fdiv double %95, %96
%98 = load double, double* %16
%99 = fdiv double %97, %98
%100 = load double, double* %14
%101 = call double @llvm.fmuladd.f64(double %99, double %100, double %83)
%102 = load double, double* %23
%103 = load double, double* %22
%104 = fdiv double %102, %103
%105 = load double, double* %18
%106 = load double, double* %15
%107 = fdiv double %105, %106
%108 = load double, double* %16
%109 = fdiv double %107, %108
%110 = load double, double* %24
%111 = call double @llvm.fmuladd.f64(double %109, double %110, double %104)
%112 = load double, double* %25
%113 = fdiv double %112, 2.000000e+00
%114 = load double, double* %16
%115 = fdiv double %113, %114
%116 = fadd double %111, %115
%117 = fdiv double %101, %116
store double %117, double* %26
%118 = load double, double* %26
ret double %118
}

LLVM IR (-O2):
define double @estimate_T1(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10) {
%12 = fmul double %8, %9
%13 = fdiv double %12, %4
%14 = fneg double %4
%15 = fdiv double %14, %9
%16 = tail call i32 @exp(double %15)
%17 = sitofp i32 %16 to double
%18 = fsub double 1.000000e+00, %17
%19 = fmul double %13, %18
%20 = fdiv double %3, %9
%21 = tail call i32 @exp(double %20)
%22 = sitofp i32 %21 to double
%23 = fsub double 1.000000e+00, %22
%24 = fneg double %23
%25 = tail call i32 @exp(double %15)
%26 = sitofp i32 %25 to double
%27 = fmul double %24, %26
%28 = insertelement <2 x double> poison, double %5, i64 0
%29 = insertelement <2 x double> %28, double %6, i64 1
%30 = insertelement <2 x double> poison, double %3, i64 0
%31 = shufflevector <2 x double> %30, <2 x double> poison, <2 x i32> zeroinitializer
%32 = fdiv <2 x double> %29, %31
%33 = extractelement <2 x double> %32, i64 0
%34 = extractelement <2 x double> %32, i64 1
%35 = fsub double %33, %34
%36 = fneg double %3
%37 = fdiv double %36, %9
%38 = tail call i32 @exp(double %37)
%39 = sitofp i32 %38 to double
%40 = tail call double @llvm.fmuladd.f64(double %34, double %39, double %35)
%41 = fmul double %5, 5.000000e-01
%42 = fdiv double %41, %3
%43 = fdiv double %42, %4
%44 = fdiv double %19, %10
%45 = fmul double %44, %1
%46 = tail call double @llvm.fmuladd.f64(double %43, double %0, double %45)
%47 = tail call double @llvm.fmuladd.f64(double %27, double 2.000000e+00, double -1.000000e+00)
%48 = tail call i32 @exp(double %37)
%49 = sitofp i32 %48 to double
%50 = fadd double %47, %49
%51 = fmul double %50, %6
%52 = fmul double %51, 5.000000e-01
%53 = fdiv double %52, %3
%54 = fdiv double %53, %4
%55 = tail call double @llvm.fmuladd.f64(double %54, double %2, double %46)
%56 = fdiv double %34, %4
%57 = tail call double @llvm.fmuladd.f64(double %56, double %27, double %44)
%58 = fmul double %40, 5.000000e-01
%59 = fdiv double %58, %4
%60 = fadd double %57, %59
%61 = fdiv double %55, %60
ret double %61
}