#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 dBbp3b(double x) {
  return (exp(-x) * (1.0 - x) - exp(-2.0 * x)) /
         ((1.0 - exp(-x)) * (1.0 - exp(-x)));
}


x86 assembly (clang, -O0):
<dBbp3b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  0xeb5(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xeab(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movsd  -0x28(%rbp),%xmm2
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xe3c(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movsd  -0x18(%rbp),%xmm1
movaps %xmm0,%xmm3
movsd  -0x10(%rbp),%xmm0
movsd  0xdfd(%rip),%xmm2
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dBbp3b>:
sub    $0x38,%rsp
movaps %xmm0,%xmm1
movaps %xmm0,0x20(%rsp)
movaps 0xedd(%rip),%xmm0
xorps  %xmm1,%xmm0
movaps %xmm0,0x10(%rsp)
call   1030 <exp@plt>
movsd  %xmm0,(%rsp)
movsd  0xed3(%rip),%xmm1
movapd 0x20(%rsp),%xmm0
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
mulsd  0xec3(%rip),%xmm0
call   1030 <exp@plt>
movsd  0x8(%rsp),%xmm1
mulsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movapd 0x10(%rsp),%xmm0
call   1030 <exp@plt>
movsd  0xe8e(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movapd 0x10(%rsp),%xmm0
call   1030 <exp@plt>
movsd  0xe72(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  (%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
divsd  %xmm1,%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @dBbp3b(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fneg double %3
%5 = call double @exp(double %4)
%6 = load double, double* %2
%7 = fsub double 1.000000e+00, %6
%8 = load double, double* %2
%9 = fmul double -2.000000e+00, %8
%10 = call double @exp(double %9)
%11 = fneg double %10
%12 = call double @llvm.fmuladd.f64(double %5, double %7, double %11)
%13 = load double, double* %2
%14 = fneg double %13
%15 = call double @exp(double %14)
%16 = fsub double 1.000000e+00, %15
%17 = load double, double* %2
%18 = fneg double %17
%19 = call double @exp(double %18)
%20 = fsub double 1.000000e+00, %19
%21 = fmul double %16, %20
%22 = fdiv double %12, %21
ret double %22
}

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