#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 */
int exp(double);
double D(double V, double J0, double Eg, double T, double n, double Jph) {
  return J0 * (T * T * T / (300 * 300 * 300)) *
             exp(-(300 - T) * Eg / (n * 8.6173323478e-5 * T * 300)) *
             (exp(V / (8.6173323478e-5 * T * n)) - 1) -
         Jph;
}


x86 assembly (clang, -O0):
<D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%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  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
movsd  0xebe(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xea1(%rip),%xmm0
subsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xe70(%rip),%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
movsd  0xe66(%rip),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  -0x40(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xe32(%rip),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  -0x38(%rbp),%xmm0
sub    $0x1,%eax
cvtsi2sd %eax,%xmm2
movsd  -0x30(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<D>:
sub    $0x28,%rsp
movapd %xmm3,%xmm6
mulsd  %xmm3,%xmm6
mulsd  %xmm3,%xmm6
divsd  0xed8(%rip),%xmm6
movsd  %xmm5,0x20(%rsp)
movsd  %xmm4,0x10(%rsp)
movsd  %xmm0,0x18(%rsp)
mulsd  %xmm1,%xmm6
movsd  %xmm6,(%rsp)
movsd  0xebd(%rip),%xmm0
movapd %xmm4,%xmm1
mulsd  0xeb9(%rip),%xmm1
movsd  %xmm3,0x8(%rsp)
mulsd  %xmm3,%xmm1
mulsd  %xmm0,%xmm1
subsd  %xmm3,%xmm0
xorpd  0xeaf(%rip),%xmm0
mulsd  %xmm2,%xmm0
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  0xe73(%rip),%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <exp@plt>
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  (%rsp),%xmm0
subsd  0x20(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @D(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
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
%13 = load double, double* %8
%14 = load double, double* %10
%15 = load double, double* %10
%16 = fmul double %14, %15
%17 = load double, double* %10
%18 = fmul double %16, %17
%19 = fdiv double %18, 2.700000e+07
%20 = fmul double %13, %19
%21 = load double, double* %10
%22 = fsub double 3.000000e+02, %21
%23 = fneg double %22
%24 = load double, double* %9
%25 = fmul double %23, %24
%26 = load double, double* %11
%27 = fmul double %26, 0x3F1696FE6CAC3313
%28 = load double, double* %10
%29 = fmul double %27, %28
%30 = fmul double %29, 3.000000e+02
%31 = fdiv double %25, %30
%32 = call i32 @exp(double %31)
%33 = sitofp i32 %32 to double
%34 = fmul double %20, %33
%35 = load double, double* %7
%36 = load double, double* %10
%37 = fmul double 0x3F1696FE6CAC3313, %36
%38 = load double, double* %11
%39 = fmul double %37, %38
%40 = fdiv double %35, %39
%41 = call i32 @exp(double %40)
%42 = sub nsw i32 %41, 1
%43 = sitofp i32 %42 to double
%44 = load double, double* %12
%45 = fneg double %44
%46 = call double @llvm.fmuladd.f64(double %34, double %43, double %45)
ret double %46
}

LLVM IR (-O2):
define double @D(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = fmul double %3, %3
%8 = fmul double %7, %3
%9 = fdiv double %8, 2.700000e+07
%10 = fmul double %9, %1
%11 = fsub double 3.000000e+02, %3
%12 = fneg double %11
%13 = fmul double %12, %2
%14 = fmul double %4, 0x3F1696FE6CAC3313
%15 = fmul double %14, %3
%16 = fmul double %15, 3.000000e+02
%17 = fdiv double %13, %16
%18 = tail call i32 @exp(double %17)
%19 = sitofp i32 %18 to double
%20 = fmul double %10, %19
%21 = fmul double %3, 0x3F1696FE6CAC3313
%22 = fmul double %21, %4
%23 = fdiv double %0, %22
%24 = tail call i32 @exp(double %23)
%25 = add nsw i32 %24, -1
%26 = sitofp i32 %25 to double
%27 = fneg double %5
%28 = tail call double @llvm.fmuladd.f64(double %20, double %26, double %27)
ret double %28
}