#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 sqrt(double);
void transcpy(double rhostar, double rhosoil, double alpha, double K,
              double FOmega, double taubt) {
  double subtrm, numer, denom;
  subtrm = sqrt(alpha) * K * FOmega;
  numer = (rhostar * rhostar - 1.0) * exp(-subtrm);
  denom = (rhostar * rhosoil - 1.0) +
          rhostar * (rhostar - rhosoil) * exp(-2.0 * subtrm);
  taubt = numer / denom;
}


x86 assembly (clang, -O0):
<transcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
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  -0x18(%rbp),%xmm0
call   1040 <sqrt@plt>
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe93(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe42(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe11(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
call   1030 <exp@plt>
movsd  -0x58(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
divsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<transcpy>:
sub    $0x18,%rsp
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jb     1134 <transcpy+0x14>
sqrtsd %xmm2,%xmm1
jmp    1157 <transcpy+0x37>
movapd %xmm2,%xmm0
movsd  %xmm4,(%rsp)
movsd  %xmm3,0x10(%rsp)
call   1040 <sqrt@plt>
movsd  0x10(%rsp),%xmm3
movsd  (%rsp),%xmm4
movapd %xmm0,%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm4,%xmm1
movsd  0xe99(%rip),%xmm0
ucomisd %xmm1,%xmm0
ja     119c <transcpy+0x7c>
ucomisd 0xe93(%rip),%xmm1
ja     119c <transcpy+0x7c>
mulsd  0xe91(%rip),%xmm1
ucomisd 0xe91(%rip),%xmm1
ja     11b9 <transcpy+0x99>
movsd  0xe8f(%rip),%xmm0
ucomisd %xmm1,%xmm0
ja     11b9 <transcpy+0x99>
add    $0x18,%rsp
ret
movapd 0xe8c(%rip),%xmm0
xorpd  %xmm1,%xmm0
movapd %xmm1,(%rsp)
call   1030 <exp@plt>
movapd (%rsp),%xmm1
jmp    1177 <transcpy+0x57>
movapd %xmm1,%xmm0
add    $0x18,%rsp
jmp    1030 <exp@plt>

LLVM IR (-O0):
define void @transcpy(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%16 = load double, double* %9
%17 = call double @sqrt(double %16)
%18 = load double, double* %10
%19 = fmul double %17, %18
%20 = load double, double* %11
%21 = fmul double %19, %20
store double %21, double* %13
%22 = load double, double* %7
%23 = load double, double* %7
%24 = call double @llvm.fmuladd.f64(double %22, double %23, double -1.000000e+00)
%25 = load double, double* %13
%26 = fneg double %25
%27 = call double @exp(double %26)
%28 = fmul double %24, %27
store double %28, double* %14
%29 = load double, double* %7
%30 = load double, double* %8
%31 = call double @llvm.fmuladd.f64(double %29, double %30, double -1.000000e+00)
%32 = load double, double* %7
%33 = load double, double* %7
%34 = load double, double* %8
%35 = fsub double %33, %34
%36 = fmul double %32, %35
%37 = load double, double* %13
%38 = fmul double -2.000000e+00, %37
%39 = call double @exp(double %38)
%40 = call double @llvm.fmuladd.f64(double %36, double %39, double %31)
store double %40, double* %15
%41 = load double, double* %14
%42 = load double, double* %15
%43 = fdiv double %41, %42
store double %43, double* %12
ret void
}

LLVM IR (-O2):
define void @transcpy(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = tail call double @sqrt(double %2)
%8 = fmul double %7, %3
%9 = fmul double %8, %4
%10 = fcmp ogt double %9, 7.450000e+02
%11 = fcmp olt double %9, -7.090000e+02
%12 = or i1 %11, %10
br i1 %12, label %13, label %16
13: ; preds = %6
%14 = fneg double %9
%15 = tail call double @exp(double %14)
br label %16
16: ; preds = %6, %13
%17 = fmul double %9, -2.000000e+00
%18 = fcmp olt double %17, -7.450000e+02
%19 = fcmp ogt double %17, 7.090000e+02
%20 = or i1 %19, %18
br i1 %20, label %21, label %23
21: ; preds = %16
%22 = tail call double @exp(double %17)
br label %23
23: ; preds = %16, %21
ret void
}