#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 sqrt(double);
double calculate_Fu_and_Li_D_star(double totalTheta, double Eta, double Eta_E,
                                  double n, double a1, double a2) {
  double numerator;
  double denominator;
  double ud_star;
  double vd_star;
  vd_star =
      (a2 / (a1 * a1) - 2 / n * (1 + 1 / a1 - a1 + a1 / n) - 1 / (n * n)) /
      (a1 * a1 + a2);
  ud_star = (((n - 1) / n - 1 / a1) / a1) - vd_star;
  numerator = totalTheta - Eta_E * ((n - 1) / n);
  denominator = sqrt(ud_star * Eta + vd_star * Eta * Eta);
  return (numerator / denominator);
}


x86 assembly (clang, -O0):
<calculate_Fu_and_Li_D_star>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%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  -0x30(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
divsd  %xmm0,%xmm1
movsd  0xeb7(%rip),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  0xea2(%rip),%xmm3
divsd  -0x28(%rbp),%xmm3
movsd  0xe95(%rip),%xmm2
addsd  %xmm3,%xmm2
subsd  -0x28(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
divsd  -0x20(%rbp),%xmm3
addsd  %xmm3,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  -0x20(%rbp),%xmm2
movsd  0xe4d(%rip),%xmm1
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe18(%rip),%xmm1
subsd  %xmm1,%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  0xe07(%rip),%xmm1
divsd  -0x28(%rbp),%xmm1
subsd  %xmm1,%xmm0
divsd  -0x28(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  0xdd8(%rip),%xmm3
subsd  %xmm3,%xmm2
divsd  -0x20(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_Fu_and_Li_D_star>:
push   %rax
movapd %xmm0,%xmm10
movapd %xmm4,%xmm8
mulsd  %xmm4,%xmm8
movapd %xmm4,%xmm9
divsd  %xmm3,%xmm9
movsd  0xee6(%rip),%xmm6
divsd  %xmm3,%xmm6
movsd  0xee2(%rip),%xmm0
addsd  %xmm3,%xmm0
divsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm3
movapd %xmm4,%xmm7
unpcklpd %xmm3,%xmm7
movapd 0xea6(%rip),%xmm3
divpd  %xmm7,%xmm3
movsd  0xeaa(%rip),%xmm7
addsd  %xmm3,%xmm7
subsd  %xmm4,%xmm7
addsd  %xmm7,%xmm9
movapd %xmm5,%xmm7
divsd  %xmm8,%xmm7
mulsd  %xmm9,%xmm6
addsd  %xmm7,%xmm6
addsd  %xmm5,%xmm8
mulsd  %xmm0,%xmm2
unpcklpd %xmm6,%xmm0
subpd  %xmm3,%xmm0
unpcklpd %xmm8,%xmm4
divpd  %xmm4,%xmm0
movapd %xmm0,%xmm3
unpckhpd %xmm0,%xmm3
subsd  %xmm3,%xmm0
subsd  %xmm2,%xmm10
mulsd  %xmm1,%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm1,%xmm0
addsd  %xmm3,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11d0 <calculate_Fu_and_Li_D_star+0xc0>
sqrtsd %xmm0,%xmm0
jmp    11e1 <calculate_Fu_and_Li_D_star+0xd1>
movsd  %xmm10,(%rsp)
call   1030 <sqrt@plt>
movsd  (%rsp),%xmm10
divsd  %xmm0,%xmm10
movapd %xmm10,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @calculate_Fu_and_Li_D_star(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
%16 = 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
%17 = load double, double* %12
%18 = load double, double* %11
%19 = load double, double* %11
%20 = fmul double %18, %19
%21 = fdiv double %17, %20
%22 = load double, double* %10
%23 = fdiv double 2.000000e+00, %22
%24 = load double, double* %11
%25 = fdiv double 1.000000e+00, %24
%26 = fadd double 1.000000e+00, %25
%27 = load double, double* %11
%28 = fsub double %26, %27
%29 = load double, double* %11
%30 = load double, double* %10
%31 = fdiv double %29, %30
%32 = fadd double %28, %31
%33 = fneg double %23
%34 = call double @llvm.fmuladd.f64(double %33, double %32, double %21)
%35 = load double, double* %10
%36 = load double, double* %10
%37 = fmul double %35, %36
%38 = fdiv double 1.000000e+00, %37
%39 = fsub double %34, %38
%40 = load double, double* %11
%41 = load double, double* %11
%42 = load double, double* %12
%43 = call double @llvm.fmuladd.f64(double %40, double %41, double %42)
%44 = fdiv double %39, %43
store double %44, double* %16
%45 = load double, double* %10
%46 = fsub double %45, 1.000000e+00
%47 = load double, double* %10
%48 = fdiv double %46, %47
%49 = load double, double* %11
%50 = fdiv double 1.000000e+00, %49
%51 = fsub double %48, %50
%52 = load double, double* %11
%53 = fdiv double %51, %52
%54 = load double, double* %16
%55 = fsub double %53, %54
store double %55, double* %15
%56 = load double, double* %7
%57 = load double, double* %9
%58 = load double, double* %10
%59 = fsub double %58, 1.000000e+00
%60 = load double, double* %10
%61 = fdiv double %59, %60
%62 = fneg double %57
%63 = call double @llvm.fmuladd.f64(double %62, double %61, double %56)
store double %63, double* %13
%64 = load double, double* %15
%65 = load double, double* %8
%66 = load double, double* %16
%67 = load double, double* %8
%68 = fmul double %66, %67
%69 = load double, double* %8
%70 = fmul double %68, %69
%71 = call double @llvm.fmuladd.f64(double %64, double %65, double %70)
%72 = call double @sqrt(double %71)
store double %72, double* %14
%73 = load double, double* %13
%74 = load double, double* %14
%75 = fdiv double %73, %74
ret double %75
}

LLVM IR (-O2):
define double @calculate_Fu_and_Li_D_star(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = fmul double %4, %4
%8 = fdiv double %5, %7
%9 = fmul double %3, %3
%10 = insertelement <2 x double> poison, double %4, i64 0
%11 = insertelement <2 x double> %10, double %9, i64 1
%12 = fdiv <2 x double> <double 1.000000e+00, double 1.000000e+00>, %11
%13 = extractelement <2 x double> %12, i64 0
%14 = fadd double %13, 1.000000e+00
%15 = fsub double %14, %4
%16 = fdiv double %4, %3
%17 = fadd double %16, %15
%18 = fdiv double -2.000000e+00, %3
%19 = tail call double @llvm.fmuladd.f64(double %18, double %17, double %8)
%20 = tail call double @llvm.fmuladd.f64(double %4, double %4, double %5)
%21 = fadd double %3, -1.000000e+00
%22 = fdiv double %21, %3
%23 = insertelement <2 x double> poison, double %22, i64 0
%24 = insertelement <2 x double> %23, double %19, i64 1
%25 = fsub <2 x double> %24, %12
%26 = insertelement <2 x double> %10, double %20, i64 1
%27 = fdiv <2 x double> %25, %26
%28 = extractelement <2 x double> %27, i64 0
%29 = extractelement <2 x double> %27, i64 1
%30 = fsub double %28, %29
%31 = fneg double %2
%32 = tail call double @llvm.fmuladd.f64(double %31, double %22, double %0)
%33 = fmul double %29, %1
%34 = fmul double %33, %1
%35 = tail call double @llvm.fmuladd.f64(double %30, double %1, double %34)
%36 = tail call double @sqrt(double %35)
%37 = fdiv double %32, %36
ret double %37
}