#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 pow(double, int);
void dPMat_K80(double l, double ***dPij, double rr, double k) {
  double aux, e1, e2;
  double dTsl, dTsk;
  double dTvl, dTvk;
  aux = -2. * l * rr / (k + 2.);
  e1 = exp(aux * 2);
  if (1.0 != k)
    e2 = exp(aux * (k + 1));
  else
    e2 = e1;
  dTsl = -rr / (k + 2) * e1 + rr * (k + 1) / (k + 2) * e2;
  dTvl = rr / (k + 2) * e1;
  dTsk = l / pow(k + 2, 2) * (e1 + e2);
  dTvk = l / pow(k + 2, 2) * e1;
  (*dPij)[0][0] = (*dPij)[1][1] = (*dPij)[2][2] = (*dPij)[3][3] =
      -dTsl - 2 * dTvl;
  (*dPij)[0][1] = (*dPij)[1][0] = dTvl;
  (*dPij)[0][2] = (*dPij)[2][0] = dTsl;
  (*dPij)[0][3] = (*dPij)[3][0] = dTvl;
  (*dPij)[1][2] = (*dPij)[2][1] = dTvl;
  (*dPij)[1][3] = (*dPij)[3][1] = dTsl;
  (*dPij)[2][3] = (*dPij)[3][2] = dTvl;
}


x86 assembly (clang, -O0):
<dPMat_K80>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  0xecd(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xeb3(%rip),%xmm1
addsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe9d(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  0xe7e(%rip),%xmm0
ucomisd -0x20(%rbp),%xmm0
jne    1198 <dPMat_K80+0x78>
jp     1198 <dPMat_K80+0x78>
jmp    11bd <dPMat_K80+0x9d>
movsd  -0x28(%rbp),%xmm0
movsd  0xe5b(%rip),%xmm1
addsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x38(%rbp)
jmp    11c7 <dPMat_K80+0xa7>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe1d(%rip),%xmm1
addsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
movsd  0xdfa(%rip),%xmm3
addsd  -0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm1
movsd  0xdf1(%rip),%xmm3
addsd  -0x20(%rbp),%xmm3
divsd  %xmm3,%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xdc9(%rip),%xmm1
addsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xda4(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm1
addsd  -0x38(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xd64(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
divsd  %xmm1,%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x50(%rbp),%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x18(%rax),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x10(%rax),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x8(%rax),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
movsd  %xmm0,(%rax)
movsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x8(%rax),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x40(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x10(%rax),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x18(%rax),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x10(%rax),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x8(%rax),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x40(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x18(%rax),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x8(%rax),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x18(%rax),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    0x10(%rax),%rax
movsd  %xmm0,0x18(%rax)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dPMat_K80>:
push   %rbx
sub    $0x20,%rsp
movsd  %xmm2,(%rsp)
mov    %rdi,%rbx
mulsd  0xecb(%rip),%xmm0
movsd  %xmm1,0x10(%rsp)
mulsd  %xmm1,%xmm0
movsd  0xec1(%rip),%xmm1
addsd  %xmm2,%xmm1
movsd  %xmm1,0x18(%rsp)
divsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
addsd  %xmm0,%xmm0
call   1030 <exp@plt>
movapd %xmm0,%xmm3
movsd  0xea0(%rip),%xmm0
movsd  (%rsp),%xmm1
ucomisd %xmm0,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
jne    1186 <dPMat_K80+0x66>
jnp    11a3 <dPMat_K80+0x83>
movsd  0x8(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm3,0x8(%rsp)
call   1030 <exp@plt>
movsd  0x8(%rsp),%xmm3
jmp    11a7 <dPMat_K80+0x87>
movapd %xmm3,%xmm0
movsd  0x10(%rsp),%xmm2
movsd  (%rsp),%xmm1
mulsd  %xmm2,%xmm1
movsd  0x18(%rsp),%xmm4
divsd  %xmm4,%xmm1
mulsd  %xmm0,%xmm1
divsd  %xmm4,%xmm2
mulsd  %xmm3,%xmm2
movsd  %xmm2,0x10(%rsp)
subsd  %xmm2,%xmm1
movsd  %xmm1,(%rsp)
movapd %xmm4,%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movsd  0x18(%rsp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movsd  0xdff(%rip),%xmm0
movsd  0x10(%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  (%rsp),%xmm1
subsd  %xmm1,%xmm0
mov    (%rbx),%rax
mov    0x18(%rax),%rcx
movsd  %xmm0,0x18(%rcx)
mov    0x10(%rax),%rdx
movsd  %xmm0,0x10(%rdx)
mov    0x8(%rax),%rsi
movsd  %xmm0,0x8(%rsi)
mov    (%rax),%rax
movsd  %xmm0,(%rax)
movsd  %xmm2,(%rsi)
movsd  %xmm2,0x8(%rax)
movsd  %xmm1,(%rdx)
movsd  %xmm1,0x10(%rax)
movsd  %xmm2,(%rcx)
movsd  %xmm2,0x18(%rax)
movsd  %xmm2,0x8(%rdx)
movsd  %xmm2,0x10(%rsi)
movsd  %xmm1,0x8(%rcx)
movsd  %xmm1,0x18(%rsi)
movsd  %xmm2,0x10(%rcx)
movsd  %xmm2,0x18(%rdx)
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @dPMat_K80(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
%14 = alloca double
%15 = alloca double
store double %0, double* %5
store double*** %1, double**** %6
store double %2, double* %7
store double %3, double* %8
%16 = load double, double* %5
%17 = fmul double -2.000000e+00, %16
%18 = load double, double* %7
%19 = fmul double %17, %18
%20 = load double, double* %8
%21 = fadd double %20, 2.000000e+00
%22 = fdiv double %19, %21
store double %22, double* %9
%23 = load double, double* %9
%24 = fmul double %23, 2.000000e+00
%25 = call double @exp(double %24)
store double %25, double* %10
%26 = load double, double* %8
%27 = fcmp une double 1.000000e+00, %26
br i1 %27, label %28, label %34
28: ; preds = %4
%29 = load double, double* %9
%30 = load double, double* %8
%31 = fadd double %30, 1.000000e+00
%32 = fmul double %29, %31
%33 = call double @exp(double %32)
store double %33, double* %11
br label %36
34: ; preds = %4
%35 = load double, double* %10
store double %35, double* %11
br label %36
36: ; preds = %34, %28
%37 = load double, double* %7
%38 = fneg double %37
%39 = load double, double* %8
%40 = fadd double %39, 2.000000e+00
%41 = fdiv double %38, %40
%42 = load double, double* %10
%43 = load double, double* %7
%44 = load double, double* %8
%45 = fadd double %44, 1.000000e+00
%46 = fmul double %43, %45
%47 = load double, double* %8
%48 = fadd double %47, 2.000000e+00
%49 = fdiv double %46, %48
%50 = load double, double* %11
%51 = fmul double %49, %50
%52 = call double @llvm.fmuladd.f64(double %41, double %42, double %51)
store double %52, double* %12
%53 = load double, double* %7
%54 = load double, double* %8
%55 = fadd double %54, 2.000000e+00
%56 = fdiv double %53, %55
%57 = load double, double* %10
%58 = fmul double %56, %57
store double %58, double* %14
%59 = load double, double* %5
%60 = load double, double* %8
%61 = fadd double %60, 2.000000e+00
%62 = call double @pow(double %61, i32 2)
%63 = fdiv double %59, %62
%64 = load double, double* %10
%65 = load double, double* %11
%66 = fadd double %64, %65
%67 = fmul double %63, %66
store double %67, double* %13
%68 = load double, double* %5
%69 = load double, double* %8
%70 = fadd double %69, 2.000000e+00
%71 = call double @pow(double %70, i32 2)
%72 = fdiv double %68, %71
%73 = load double, double* %10
%74 = fmul double %72, %73
store double %74, double* %15
%75 = load double, double* %12
%76 = fneg double %75
%77 = load double, double* %14
%78 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %77, double %76)
%79 = load double***, double**** %6
%80 = load double**, double*** %79
%81 = getelementptr inbounds double*, double** %80, i64 3
%82 = load double*, double** %81
%83 = getelementptr inbounds double, double* %82, i64 3
store double %78, double* %83
%84 = load double***, double**** %6
%85 = load double**, double*** %84
%86 = getelementptr inbounds double*, double** %85, i64 2
%87 = load double*, double** %86
%88 = getelementptr inbounds double, double* %87, i64 2
store double %78, double* %88
%89 = load double***, double**** %6
%90 = load double**, double*** %89
%91 = getelementptr inbounds double*, double** %90, i64 1
%92 = load double*, double** %91
%93 = getelementptr inbounds double, double* %92, i64 1
store double %78, double* %93
%94 = load double***, double**** %6
%95 = load double**, double*** %94
%96 = getelementptr inbounds double*, double** %95, i64 0
%97 = load double*, double** %96
%98 = getelementptr inbounds double, double* %97, i64 0
store double %78, double* %98
%99 = load double, double* %14
%100 = load double***, double**** %6
%101 = load double**, double*** %100
%102 = getelementptr inbounds double*, double** %101, i64 1
%103 = load double*, double** %102
%104 = getelementptr inbounds double, double* %103, i64 0
store double %99, double* %104
%105 = load double***, double**** %6
%106 = load double**, double*** %105
%107 = getelementptr inbounds double*, double** %106, i64 0
%108 = load double*, double** %107
%109 = getelementptr inbounds double, double* %108, i64 1
store double %99, double* %109
%110 = load double, double* %12
%111 = load double***, double**** %6
%112 = load double**, double*** %111
%113 = getelementptr inbounds double*, double** %112, i64 2
%114 = load double*, double** %113
%115 = getelementptr inbounds double, double* %114, i64 0
store double %110, double* %115
%116 = load double***, double**** %6
%117 = load double**, double*** %116
%118 = getelementptr inbounds double*, double** %117, i64 0
%119 = load double*, double** %118
%120 = getelementptr inbounds double, double* %119, i64 2
store double %110, double* %120
%121 = load double, double* %14
%122 = load double***, double**** %6
%123 = load double**, double*** %122
%124 = getelementptr inbounds double*, double** %123, i64 3
%125 = load double*, double** %124
%126 = getelementptr inbounds double, double* %125, i64 0
store double %121, double* %126
%127 = load double***, double**** %6
%128 = load double**, double*** %127
%129 = getelementptr inbounds double*, double** %128, i64 0
%130 = load double*, double** %129
%131 = getelementptr inbounds double, double* %130, i64 3
store double %121, double* %131
%132 = load double, double* %14
%133 = load double***, double**** %6
%134 = load double**, double*** %133
%135 = getelementptr inbounds double*, double** %134, i64 2
%136 = load double*, double** %135
%137 = getelementptr inbounds double, double* %136, i64 1
store double %132, double* %137
%138 = load double***, double**** %6
%139 = load double**, double*** %138
%140 = getelementptr inbounds double*, double** %139, i64 1
%141 = load double*, double** %140
%142 = getelementptr inbounds double, double* %141, i64 2
store double %132, double* %142
%143 = load double, double* %12
%144 = load double***, double**** %6
%145 = load double**, double*** %144
%146 = getelementptr inbounds double*, double** %145, i64 3
%147 = load double*, double** %146
%148 = getelementptr inbounds double, double* %147, i64 1
store double %143, double* %148
%149 = load double***, double**** %6
%150 = load double**, double*** %149
%151 = getelementptr inbounds double*, double** %150, i64 1
%152 = load double*, double** %151
%153 = getelementptr inbounds double, double* %152, i64 3
store double %143, double* %153
%154 = load double, double* %14
%155 = load double***, double**** %6
%156 = load double**, double*** %155
%157 = getelementptr inbounds double*, double** %156, i64 3
%158 = load double*, double** %157
%159 = getelementptr inbounds double, double* %158, i64 2
store double %154, double* %159
%160 = load double***, double**** %6
%161 = load double**, double*** %160
%162 = getelementptr inbounds double*, double** %161, i64 2
%163 = load double*, double** %162
%164 = getelementptr inbounds double, double* %163, i64 3
store double %154, double* %164
ret void
}

LLVM IR (-O2):
define void @dPMat_K80(double %0, double*** nocapture %1, double %2, double %3) {
%5 = fmul double %0, -2.000000e+00
%6 = fmul double %5, %2
%7 = fadd double %3, 2.000000e+00
%8 = fdiv double %6, %7
%9 = fmul double %8, 2.000000e+00
%10 = tail call double @exp(double %9)
%11 = fcmp une double %3, 1.000000e+00
%12 = fadd double %3, 1.000000e+00
br i1 %11, label %13, label %16
13: ; preds = %4
%14 = fmul double %12, %8
%15 = tail call double @exp(double %14)
br label %16
16: ; preds = %4, %13
%17 = phi double [ %15, %13 ], [ %10, %4 ]
%18 = fneg double %2
%19 = fdiv double %18, %7
%20 = fmul double %12, %2
%21 = fdiv double %20, %7
%22 = fmul double %21, %17
%23 = tail call double @llvm.fmuladd.f64(double %19, double %10, double %22)
%24 = fdiv double %2, %7
%25 = fmul double %24, %10
%26 = tail call double @pow(double %7, i32 2)
%27 = tail call double @pow(double %7, i32 2)
%28 = fneg double %23
%29 = tail call double @llvm.fmuladd.f64(double %25, double -2.000000e+00, double %28)
%30 = load double**, double*** %1
%31 = getelementptr inbounds double*, double** %30, i64 3
%32 = load double*, double** %31
%33 = getelementptr inbounds double, double* %32, i64 3
store double %29, double* %33
%34 = getelementptr inbounds double*, double** %30, i64 2
%35 = load double*, double** %34
%36 = getelementptr inbounds double, double* %35, i64 2
store double %29, double* %36
%37 = getelementptr inbounds double*, double** %30, i64 1
%38 = load double*, double** %37
%39 = getelementptr inbounds double, double* %38, i64 1
store double %29, double* %39
%40 = load double*, double** %30
store double %29, double* %40
store double %25, double* %38
%41 = getelementptr inbounds double, double* %40, i64 1
store double %25, double* %41
store double %23, double* %35
%42 = getelementptr inbounds double, double* %40, i64 2
store double %23, double* %42
store double %25, double* %32
%43 = getelementptr inbounds double, double* %40, i64 3
store double %25, double* %43
%44 = getelementptr inbounds double, double* %35, i64 1
store double %25, double* %44
%45 = getelementptr inbounds double, double* %38, i64 2
store double %25, double* %45
%46 = getelementptr inbounds double, double* %32, i64 1
store double %23, double* %46
%47 = getelementptr inbounds double, double* %38, i64 3
store double %23, double* %47
%48 = getelementptr inbounds double, double* %32, i64 2
store double %25, double* %48
%49 = getelementptr inbounds double, double* %35, i64 3
store double %25, double* %49
ret void
}