#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);
int /*<<< orphan*/ identity(double *, int);
int /*<<< orphan*/ printf(char *, double);
int PMatT92(double P[], double t, double kappa, double pGC) {
  double e1, e2;
  t /= (pGC * (1 - pGC) * kappa + .5);
  if (t < -0.1)
    printf("\nt = %.5f in PMatT92", t);
  if (t < 1e-100) {
    identity(P, 4);
    return (0);
  }
  e1 = exp(-t);
  e2 = exp(-(kappa + 1) * t / 2);
  P[0 * 4 + 0] = P[2 * 4 + 2] = (1 - pGC) / 2 * (1 + e1) + pGC * e2;
  P[1 * 4 + 1] = P[3 * 4 + 3] = pGC / 2 * (1 + e1) + (1 - pGC) * e2;
  P[1 * 4 + 0] = P[3 * 4 + 2] = (1 - pGC) / 2 * (1 + e1) - (1 - pGC) * e2;
  P[0 * 4 + 1] = P[2 * 4 + 3] = pGC / 2 * (1 + e1) - pGC * e2;
  P[0 * 4 + 2] = P[2 * 4 + 0] = P[3 * 4 + 0] = P[1 * 4 + 2] =
      (1 - pGC) / 2 * (1 - e1);
  P[1 * 4 + 3] = P[3 * 4 + 1] = P[0 * 4 + 3] = P[2 * 4 + 1] =
      pGC / 2 * (1 - e1);
  return (0);
}


x86 assembly (clang, -O0):
<PMatT92>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm1
movsd  0xeb8(%rip),%xmm0
subsd  -0x28(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe96(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe74(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    11a8 <PMatT92+0x78>
movsd  -0x18(%rbp),%xmm0
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
movsd  0xe68(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    11d5 <PMatT92+0xa5>
mov    -0x10(%rbp),%rdi
mov    $0x4,%esi
call   1040 <identity@plt>
movl   $0x0,-0x4(%rbp)
jmp    142a <PMatT92+0x2fa>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1050 <exp@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  0xe0d(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xdf4(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <exp@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  0xdce(%rip),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  0xdd1(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xdb5(%rip),%xmm2
addsd  -0x30(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x50(%rax)
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x28(%rbp),%xmm0
movsd  0xd90(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xd74(%rip),%xmm2
addsd  -0x30(%rbp),%xmm2
movsd  0xd67(%rip),%xmm1
subsd  -0x28(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x78(%rax)
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  0xd3b(%rip),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  0xd3e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xd22(%rip),%xmm2
addsd  -0x30(%rbp),%xmm2
movsd  0xd15(%rip),%xmm1
subsd  -0x28(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x70(%rax)
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x28(%rbp),%xmm0
movsd  0xcdd(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xcc1(%rip),%xmm2
addsd  -0x30(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x58(%rax)
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  0xc79(%rip),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  0xc7c(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xc60(%rip),%xmm1
subsd  -0x30(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x30(%rax)
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x60(%rax)
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x40(%rax)
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x28(%rbp),%xmm0
movsd  0xc36(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xc1a(%rip),%xmm1
subsd  -0x30(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x48(%rax)
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x68(%rax)
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x38(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PMatT92>:
push   %rbx
sub    $0x50,%rsp
movapd %xmm0,%xmm3
mov    %rdi,%rbx
movsd  0xebc(%rip),%xmm0
subsd  %xmm2,%xmm0
movapd %xmm0,0x40(%rsp)
movapd %xmm2,0x30(%rsp)
mulsd  %xmm2,%xmm0
movapd %xmm1,0x20(%rsp)
mulsd  %xmm1,%xmm0
addsd  0xe9e(%rip),%xmm0
divsd  %xmm0,%xmm3
movsd  0xe9a(%rip),%xmm0
ucomisd %xmm3,%xmm0
movapd %xmm3,0x10(%rsp)
jbe    1198 <PMatT92+0x68>
lea    0xeb7(%rip),%rdi
movapd %xmm3,%xmm0
call   1030 <printf@plt>
movapd 0x10(%rsp),%xmm3
movsd  0xe78(%rip),%xmm0
ucomisd %xmm3,%xmm0
jbe    11b8 <PMatT92+0x88>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <identity@plt>
jmp    1299 <PMatT92+0x169>
movapd %xmm3,%xmm0
xorpd  0xe5c(%rip),%xmm0
call   1050 <exp@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0xe29(%rip),%xmm1
movapd 0x20(%rsp),%xmm0
addsd  %xmm1,%xmm0
xorpd  0xe37(%rip),%xmm0
mulsd  0x10(%rsp),%xmm0
mulsd  0xe11(%rip),%xmm0
call   1050 <exp@plt>
movsd  0x8(%rsp),%xmm6
movapd %xmm6,%xmm1
movsd  0xdf2(%rip),%xmm7
addsd  %xmm7,%xmm1
movapd 0x40(%rsp),%xmm4
movapd %xmm4,%xmm2
mulsd  %xmm0,%xmm4
movapd 0x30(%rsp),%xmm3
unpcklpd %xmm3,%xmm2
mulpd  0xdfe(%rip),%xmm2
mulsd  %xmm3,%xmm0
movapd %xmm0,%xmm3
movapd 0xdde(%rip),%xmm5
xorpd  %xmm5,%xmm3
unpcklpd %xmm1,%xmm1
unpcklpd %xmm3,%xmm0
mulpd  %xmm2,%xmm1
addpd  %xmm1,%xmm0
xorpd  %xmm4,%xmm5
unpcklpd %xmm4,%xmm5
addpd  %xmm1,%xmm5
movupd %xmm5,0x70(%rbx)
movupd %xmm5,0x20(%rbx)
movupd %xmm0,0x50(%rbx)
movupd %xmm0,(%rbx)
movapd %xmm7,%xmm0
subsd  %xmm6,%xmm0
unpcklpd %xmm0,%xmm0
mulpd  %xmm2,%xmm0
movupd %xmm0,0x40(%rbx)
movupd %xmm0,0x10(%rbx)
movupd %xmm0,0x60(%rbx)
movupd %xmm0,0x30(%rbx)
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"\0At = %.5f in PMatT92\00"
define i32 @PMatT92(double* %0, double %1, double %2, double %3) {
%5 = alloca i32
%6 = alloca double*
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
store double* %0, double** %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
%12 = load double, double* %9
%13 = load double, double* %9
%14 = fsub double 1.000000e+00, %13
%15 = fmul double %12, %14
%16 = load double, double* %8
%17 = call double @llvm.fmuladd.f64(double %15, double %16, double 5.000000e-01)
%18 = load double, double* %7
%19 = fdiv double %18, %17
store double %19, double* %7
%20 = load double, double* %7
%21 = fcmp olt double %20, -1.000000e-01
br i1 %21, label %22, label %25
22: ; preds = %4
%23 = load double, double* %7
%24 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), double %23)
br label %25
25: ; preds = %22, %4
%26 = load double, double* %7
%27 = fcmp olt double %26, 1.000000e-100
br i1 %27, label %28, label %31
28: ; preds = %25
%29 = load double*, double** %6
%30 = call i32 @identity(double* %29, i32 4)
store i32 0, i32* %5
br label %123
31: ; preds = %25
%32 = load double, double* %7
%33 = fneg double %32
%34 = call double @exp(double %33)
store double %34, double* %10
%35 = load double, double* %8
%36 = fadd double %35, 1.000000e+00
%37 = fneg double %36
%38 = load double, double* %7
%39 = fmul double %37, %38
%40 = fdiv double %39, 2.000000e+00
%41 = call double @exp(double %40)
store double %41, double* %11
%42 = load double, double* %9
%43 = fsub double 1.000000e+00, %42
%44 = fdiv double %43, 2.000000e+00
%45 = load double, double* %10
%46 = fadd double 1.000000e+00, %45
%47 = load double, double* %9
%48 = load double, double* %11
%49 = fmul double %47, %48
%50 = call double @llvm.fmuladd.f64(double %44, double %46, double %49)
%51 = load double*, double** %6
%52 = getelementptr inbounds double, double* %51, i64 10
store double %50, double* %52
%53 = load double*, double** %6
%54 = getelementptr inbounds double, double* %53, i64 0
store double %50, double* %54
%55 = load double, double* %9
%56 = fdiv double %55, 2.000000e+00
%57 = load double, double* %10
%58 = fadd double 1.000000e+00, %57
%59 = load double, double* %9
%60 = fsub double 1.000000e+00, %59
%61 = load double, double* %11
%62 = fmul double %60, %61
%63 = call double @llvm.fmuladd.f64(double %56, double %58, double %62)
%64 = load double*, double** %6
%65 = getelementptr inbounds double, double* %64, i64 15
store double %63, double* %65
%66 = load double*, double** %6
%67 = getelementptr inbounds double, double* %66, i64 5
store double %63, double* %67
%68 = load double, double* %9
%69 = fsub double 1.000000e+00, %68
%70 = fdiv double %69, 2.000000e+00
%71 = load double, double* %10
%72 = fadd double 1.000000e+00, %71
%73 = load double, double* %9
%74 = fsub double 1.000000e+00, %73
%75 = load double, double* %11
%76 = fmul double %74, %75
%77 = fneg double %76
%78 = call double @llvm.fmuladd.f64(double %70, double %72, double %77)
%79 = load double*, double** %6
%80 = getelementptr inbounds double, double* %79, i64 14
store double %78, double* %80
%81 = load double*, double** %6
%82 = getelementptr inbounds double, double* %81, i64 4
store double %78, double* %82
%83 = load double, double* %9
%84 = fdiv double %83, 2.000000e+00
%85 = load double, double* %10
%86 = fadd double 1.000000e+00, %85
%87 = load double, double* %9
%88 = load double, double* %11
%89 = fmul double %87, %88
%90 = fneg double %89
%91 = call double @llvm.fmuladd.f64(double %84, double %86, double %90)
%92 = load double*, double** %6
%93 = getelementptr inbounds double, double* %92, i64 11
store double %91, double* %93
%94 = load double*, double** %6
%95 = getelementptr inbounds double, double* %94, i64 1
store double %91, double* %95
%96 = load double, double* %9
%97 = fsub double 1.000000e+00, %96
%98 = fdiv double %97, 2.000000e+00
%99 = load double, double* %10
%100 = fsub double 1.000000e+00, %99
%101 = fmul double %98, %100
%102 = load double*, double** %6
%103 = getelementptr inbounds double, double* %102, i64 6
store double %101, double* %103
%104 = load double*, double** %6
%105 = getelementptr inbounds double, double* %104, i64 12
store double %101, double* %105
%106 = load double*, double** %6
%107 = getelementptr inbounds double, double* %106, i64 8
store double %101, double* %107
%108 = load double*, double** %6
%109 = getelementptr inbounds double, double* %108, i64 2
store double %101, double* %109
%110 = load double, double* %9
%111 = fdiv double %110, 2.000000e+00
%112 = load double, double* %10
%113 = fsub double 1.000000e+00, %112
%114 = fmul double %111, %113
%115 = load double*, double** %6
%116 = getelementptr inbounds double, double* %115, i64 9
store double %114, double* %116
%117 = load double*, double** %6
%118 = getelementptr inbounds double, double* %117, i64 3
store double %114, double* %118
%119 = load double*, double** %6
%120 = getelementptr inbounds double, double* %119, i64 13
store double %114, double* %120
%121 = load double*, double** %6
%122 = getelementptr inbounds double, double* %121, i64 7
store double %114, double* %122
store i32 0, i32* %5
br label %123
123: ; preds = %31, %28
%124 = load i32, i32* %5
ret i32 %124
}

LLVM IR (-O2):
@.str = [21 x i8] c"\0At = %.5f in PMatT92\00"
define i32 @PMatT92(double* %0, double %1, double %2, double %3) {
%5 = fsub double 1.000000e+00, %3
%6 = fmul double %5, %3
%7 = tail call double @llvm.fmuladd.f64(double %6, double %2, double 5.000000e-01)
%8 = fdiv double %1, %7
%9 = fcmp olt double %8, -1.000000e-01
br i1 %9, label %10, label %12
10: ; preds = %4
%11 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), double %8)
br label %12
12: ; preds = %10, %4
%13 = fcmp olt double %8, 1.000000e-100
br i1 %13, label %14, label %16
14: ; preds = %12
%15 = tail call i32 @identity(double* %0, i32 4)
br label %59
16: ; preds = %12
%17 = fneg double %8
%18 = tail call double @exp(double %17)
%19 = fadd double %2, 1.000000e+00
%20 = fneg double %19
%21 = fmul double %8, %20
%22 = fmul double %21, 5.000000e-01
%23 = tail call double @exp(double %22)
%24 = fadd double %18, 1.000000e+00
%25 = fmul double %23, %3
%26 = insertelement <2 x double> poison, double %5, i64 0
%27 = insertelement <2 x double> %26, double %3, i64 1
%28 = fmul <2 x double> %27, <double 5.000000e-01, double 5.000000e-01>
%29 = getelementptr inbounds double, double* %0, i64 10
%30 = fneg double %25
%31 = insertelement <2 x double> poison, double %24, i64 0
%32 = shufflevector <2 x double> %31, <2 x double> poison, <2 x i32> zeroinitializer
%33 = insertelement <2 x double> poison, double %25, i64 0
%34 = insertelement <2 x double> %33, double %30, i64 1
%35 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %28, <2 x double> %32, <2 x double> %34)
%36 = fmul double %5, %23
%37 = fneg double %36
%38 = insertelement <2 x double> poison, double %37, i64 0
%39 = insertelement <2 x double> %38, double %36, i64 1
%40 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %28, <2 x double> %32, <2 x double> %39)
%41 = getelementptr inbounds double, double* %0, i64 14
%42 = bitcast double* %41 to <2 x double>*
store <2 x double> %40, <2 x double>* %42
%43 = getelementptr inbounds double, double* %0, i64 4
%44 = bitcast double* %43 to <2 x double>*
store <2 x double> %40, <2 x double>* %44
%45 = bitcast double* %29 to <2 x double>*
store <2 x double> %35, <2 x double>* %45
%46 = bitcast double* %0 to <2 x double>*
store <2 x double> %35, <2 x double>* %46
%47 = fsub double 1.000000e+00, %18
%48 = getelementptr inbounds double, double* %0, i64 6
%49 = insertelement <2 x double> poison, double %47, i64 0
%50 = shufflevector <2 x double> %49, <2 x double> poison, <2 x i32> zeroinitializer
%51 = fmul <2 x double> %28, %50
%52 = getelementptr inbounds double, double* %0, i64 12
%53 = getelementptr inbounds double, double* %0, i64 8
%54 = getelementptr inbounds double, double* %0, i64 2
%55 = bitcast double* %53 to <2 x double>*
store <2 x double> %51, <2 x double>* %55
%56 = bitcast double* %54 to <2 x double>*
store <2 x double> %51, <2 x double>* %56
%57 = bitcast double* %52 to <2 x double>*
store <2 x double> %51, <2 x double>* %57
%58 = bitcast double* %48 to <2 x double>*
store <2 x double> %51, <2 x double>* %58
br label %59
59: ; preds = %16, %14
ret i32 0
}