double calcTransversionRate(double **P) {
  double b = 0.0;
  b += P[0][1];
  b += P[0][3];
  b += P[2][1];
  b += P[2][3];
  b += P[1][0];
  b += P[1][2];
  b += P[3][2];
  b += P[3][0];
  return (b);
}


x86 assembly (clang, -O0):
<calcTransversionRate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsd  0x8(%rax),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsd  0x18(%rax),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
movsd  0x8(%rax),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
movsd  0x18(%rax),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movsd  (%rax),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movsd  0x10(%rax),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
movsd  0x10(%rax),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
movsd  (%rax),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcTransversionRate>:
mov    (%rdi),%rax
xorpd  %xmm0,%xmm0
addsd  0x8(%rax),%xmm0
addsd  0x18(%rax),%xmm0
mov    0x8(%rdi),%rax
mov    0x10(%rdi),%rcx
addsd  0x8(%rcx),%xmm0
addsd  0x18(%rcx),%xmm0
addsd  (%rax),%xmm0
addsd  0x10(%rax),%xmm0
mov    0x18(%rdi),%rax
addsd  0x10(%rax),%xmm0
addsd  (%rax),%xmm0
ret

LLVM IR (-O0):
define double @calcTransversionRate(double** %0) {
%2 = alloca double**
%3 = alloca double
store double** %0, double*** %2
store double 0.000000e+00, double* %3
%4 = load double**, double*** %2
%5 = getelementptr inbounds double*, double** %4, i64 0
%6 = load double*, double** %5
%7 = getelementptr inbounds double, double* %6, i64 1
%8 = load double, double* %7
%9 = load double, double* %3
%10 = fadd double %9, %8
store double %10, double* %3
%11 = load double**, double*** %2
%12 = getelementptr inbounds double*, double** %11, i64 0
%13 = load double*, double** %12
%14 = getelementptr inbounds double, double* %13, i64 3
%15 = load double, double* %14
%16 = load double, double* %3
%17 = fadd double %16, %15
store double %17, double* %3
%18 = load double**, double*** %2
%19 = getelementptr inbounds double*, double** %18, i64 2
%20 = load double*, double** %19
%21 = getelementptr inbounds double, double* %20, i64 1
%22 = load double, double* %21
%23 = load double, double* %3
%24 = fadd double %23, %22
store double %24, double* %3
%25 = load double**, double*** %2
%26 = getelementptr inbounds double*, double** %25, i64 2
%27 = load double*, double** %26
%28 = getelementptr inbounds double, double* %27, i64 3
%29 = load double, double* %28
%30 = load double, double* %3
%31 = fadd double %30, %29
store double %31, double* %3
%32 = load double**, double*** %2
%33 = getelementptr inbounds double*, double** %32, i64 1
%34 = load double*, double** %33
%35 = getelementptr inbounds double, double* %34, i64 0
%36 = load double, double* %35
%37 = load double, double* %3
%38 = fadd double %37, %36
store double %38, double* %3
%39 = load double**, double*** %2
%40 = getelementptr inbounds double*, double** %39, i64 1
%41 = load double*, double** %40
%42 = getelementptr inbounds double, double* %41, i64 2
%43 = load double, double* %42
%44 = load double, double* %3
%45 = fadd double %44, %43
store double %45, double* %3
%46 = load double**, double*** %2
%47 = getelementptr inbounds double*, double** %46, i64 3
%48 = load double*, double** %47
%49 = getelementptr inbounds double, double* %48, i64 2
%50 = load double, double* %49
%51 = load double, double* %3
%52 = fadd double %51, %50
store double %52, double* %3
%53 = load double**, double*** %2
%54 = getelementptr inbounds double*, double** %53, i64 3
%55 = load double*, double** %54
%56 = getelementptr inbounds double, double* %55, i64 0
%57 = load double, double* %56
%58 = load double, double* %3
%59 = fadd double %58, %57
store double %59, double* %3
%60 = load double, double* %3
ret double %60
}

LLVM IR (-O2):
define double @calcTransversionRate(double** nocapture %0) {
%2 = load double*, double** %0
%3 = getelementptr inbounds double, double* %2, i64 1
%4 = load double, double* %3
%5 = fadd double %4, 0.000000e+00
%6 = getelementptr inbounds double, double* %2, i64 3
%7 = load double, double* %6
%8 = fadd double %5, %7
%9 = getelementptr inbounds double*, double** %0, i64 2
%10 = load double*, double** %9
%11 = getelementptr inbounds double, double* %10, i64 1
%12 = load double, double* %11
%13 = fadd double %8, %12
%14 = getelementptr inbounds double, double* %10, i64 3
%15 = load double, double* %14
%16 = fadd double %13, %15
%17 = getelementptr inbounds double*, double** %0, i64 1
%18 = load double*, double** %17
%19 = load double, double* %18
%20 = fadd double %16, %19
%21 = getelementptr inbounds double, double* %18, i64 2
%22 = load double, double* %21
%23 = fadd double %20, %22
%24 = getelementptr inbounds double*, double** %0, i64 3
%25 = load double*, double** %24
%26 = getelementptr inbounds double, double* %25, i64 2
%27 = load double, double* %26
%28 = fadd double %23, %27
%29 = load double, double* %25
%30 = fadd double %28, %29
ret double %30
}