#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 g_eq43_l0(double r, double q, double a, double c0) {
  double ex = exp(-a * r);
  double r1 = 1.0 / r;
  double u = 1.0 - ex;
  double t1 = q * r1 * u;
  double t2 = a * ex * c0;
  return t1 + t2;
}


x86 assembly (clang, -O0):
<g_eq43_l0>:
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  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  0xea1(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe8f(%rip),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
addsd  -0x48(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_eq43_l0>:
sub    $0x38,%rsp
movsd  %xmm3,0x18(%rsp)
movapd %xmm2,0x20(%rsp)
movsd  %xmm1,0x10(%rsp)
movapd %xmm0,%xmm1
movsd  %xmm0,0x8(%rsp)
movapd 0xec8(%rip),%xmm0
xorpd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  0xec3(%rip),%xmm1
movapd %xmm1,%xmm2
divsd  0x8(%rsp),%xmm2
subsd  %xmm0,%xmm1
mulsd  0x10(%rsp),%xmm2
mulsd  %xmm1,%xmm2
mulsd  0x20(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
addsd  %xmm2,%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @g_eq43_l0(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%14 = load double, double* %7
%15 = fneg double %14
%16 = load double, double* %5
%17 = fmul double %15, %16
%18 = call double @exp(double %17)
store double %18, double* %9
%19 = load double, double* %5
%20 = fdiv double 1.000000e+00, %19
store double %20, double* %10
%21 = load double, double* %9
%22 = fsub double 1.000000e+00, %21
store double %22, double* %11
%23 = load double, double* %6
%24 = load double, double* %10
%25 = fmul double %23, %24
%26 = load double, double* %11
%27 = fmul double %25, %26
store double %27, double* %12
%28 = load double, double* %7
%29 = load double, double* %9
%30 = fmul double %28, %29
%31 = load double, double* %8
%32 = fmul double %30, %31
store double %32, double* %13
%33 = load double, double* %12
%34 = load double, double* %13
%35 = fadd double %33, %34
ret double %35
}

LLVM IR (-O2):
define double @g_eq43_l0(double %0, double %1, double %2, double %3) {
%5 = fneg double %2
%6 = fmul double %5, %0
%7 = tail call double @exp(double %6)
%8 = fdiv double 1.000000e+00, %0
%9 = fsub double 1.000000e+00, %7
%10 = fmul double %8, %1
%11 = fmul double %10, %9
%12 = fmul double %7, %2
%13 = fmul double %12, %3
%14 = fadd double %11, %13
ret double %14
}