#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 */
int /*<<< orphan*/ condKappaMu(int, int, double *, double *, double *, double *,
                               double *, double *);
int /*<<< orphan*/ free(double *);
double *malloc(int);
int /*<<< orphan*/ memcpy(double *, double *, int);
double rvm_s(double, double);
double *mvvm_sampler_gibbs(int n, int p, double *mu, double *kappa,
                           double *lambda, int initk, int k) {
  double *theta;
  double *ret;
  double mu_c, kappa_c;
  int i, j;
  theta = malloc(sizeof(double) * p);
  for (i = 0; i < p; i++)
    theta[i] = 1;
  ret = malloc(sizeof(double) * n * p);
  for (i = 0; i <= initk; i++) {
    for (j = 0; j < p; j++) {
      condKappaMu(p, j, theta, mu, kappa, lambda, &mu_c, &kappa_c);
      theta[j] = rvm_s(mu_c, kappa_c);
    }
  }
  for (i = 0; i <= (k * n); i++) {
    for (j = 0; j < p; j++) {
      condKappaMu(p, j, theta, mu, kappa, lambda, &mu_c, &kappa_c);
      theta[j] = rvm_s(mu_c, kappa_c);
    }
    if (i != 0 && i % k == 0)
      memcpy(ret + ((i / k) - 1) * p, theta, sizeof(double) * p);
  }
  free(theta);
  return ret;
}


x86 assembly (clang, -O0):
<mvvm_sampler_gibbs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
movslq -0x8(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11ba <mvvm_sampler_gibbs+0x6a>
mov    -0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  0xe59(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    118b <mvvm_sampler_gibbs+0x3b>
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
movslq -0x8(%rbp),%rcx
imul   %rcx,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     1264 <mvvm_sampler_gibbs+0x114>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1251 <mvvm_sampler_gibbs+0x101>
mov    -0x8(%rbp),%edi
mov    -0x50(%rbp),%esi
mov    -0x30(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
lea    -0x40(%rbp),%r10
lea    -0x48(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1050 <condKappaMu@plt>
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
call   1040 <rvm_s@plt>
mov    -0x30(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    11ef <mvvm_sampler_gibbs+0x9f>
jmp    1256 <mvvm_sampler_gibbs+0x106>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    11dc <mvvm_sampler_gibbs+0x8c>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    0x10(%rbp),%ecx
imul   -0x4(%rbp),%ecx
cmp    %ecx,%eax
jg     1341 <mvvm_sampler_gibbs+0x1f1>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12e6 <mvvm_sampler_gibbs+0x196>
mov    -0x8(%rbp),%edi
mov    -0x50(%rbp),%esi
mov    -0x30(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
lea    -0x40(%rbp),%r10
lea    -0x48(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1050 <condKappaMu@plt>
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
call   1040 <rvm_s@plt>
mov    -0x30(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1284 <mvvm_sampler_gibbs+0x134>
cmpl   $0x0,-0x4c(%rbp)
je     132e <mvvm_sampler_gibbs+0x1de>
mov    -0x4c(%rbp),%eax
cltd
idivl  0x10(%rbp)
cmp    $0x0,%edx
jne    132e <mvvm_sampler_gibbs+0x1de>
mov    -0x38(%rbp),%rdi
mov    -0x4c(%rbp),%eax
cltd
idivl  0x10(%rbp)
sub    $0x1,%eax
imul   -0x8(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x30(%rbp),%rsi
movslq -0x8(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1060 <memcpy@plt>
jmp    1333 <mvvm_sampler_gibbs+0x1e3>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    126b <mvvm_sampler_gibbs+0x11b>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mvvm_sampler_gibbs>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r9d,0x24(%rsp)
mov    %r8,%r14
mov    %rcx,%rbp
mov    %rdx,%r12
mov    %esi,%ebx
mov    %edi,0x4(%rsp)
lea    0x0(,%rbx,8),%edi
mov    %edi,0x34(%rsp)
call   1070 <malloc@plt>
mov    %rax,%r15
mov    %ebx,%r13d
mov    %rbx,0x8(%rsp)
test   %ebx,%ebx
jle    12bd <mvvm_sampler_gibbs+0x16d>
cmpl   $0x4,0x8(%rsp)
jae    11a3 <mvvm_sampler_gibbs+0x53>
xor    %eax,%eax
jmp    1297 <mvvm_sampler_gibbs+0x147>
mov    %r13d,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x7,%ecx
cmp    $0x1c,%rsi
jae    11ca <mvvm_sampler_gibbs+0x7a>
xor    %esi,%esi
jmp    1265 <mvvm_sampler_gibbs+0x115>
and    $0xfffffffffffffff8,%rdx
xor    %esi,%esi
movaps 0xe29(%rip),%xmm0
nopw   0x0(%rax,%rax,1)
movups %xmm0,(%r15,%rsi,8)
movups %xmm0,0x10(%r15,%rsi,8)
movups %xmm0,0x20(%r15,%rsi,8)
movups %xmm0,0x30(%r15,%rsi,8)
movups %xmm0,0x40(%r15,%rsi,8)
movups %xmm0,0x50(%r15,%rsi,8)
movups %xmm0,0x60(%r15,%rsi,8)
movups %xmm0,0x70(%r15,%rsi,8)
movups %xmm0,0x80(%r15,%rsi,8)
movups %xmm0,0x90(%r15,%rsi,8)
movups %xmm0,0xa0(%r15,%rsi,8)
movups %xmm0,0xb0(%r15,%rsi,8)
movups %xmm0,0xc0(%r15,%rsi,8)
movups %xmm0,0xd0(%r15,%rsi,8)
movups %xmm0,0xe0(%r15,%rsi,8)
movups %xmm0,0xf0(%r15,%rsi,8)
add    $0x20,%rsi
add    $0xfffffffffffffff8,%rdx
jne    11e0 <mvvm_sampler_gibbs+0x90>
test   %rcx,%rcx
je     1292 <mvvm_sampler_gibbs+0x142>
lea    (%r15,%rsi,8),%rdx
add    $0x10,%rdx
shl    $0x5,%rcx
xor    %esi,%esi
movaps 0xd81(%rip),%xmm0
nop
movups %xmm0,-0x10(%rdx,%rsi,1)
movups %xmm0,(%rdx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%rcx
jne    1280 <mvvm_sampler_gibbs+0x130>
cmp    %r13,%rax
je     12bd <mvvm_sampler_gibbs+0x16d>
movabs $0x3ff0000000000000,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rcx,(%r15,%rax,8)
add    $0x1,%rax
cmp    %rax,%r13
jne    12b0 <mvvm_sampler_gibbs+0x160>
mov    %r12,0x40(%rsp)
mov    %rbp,0x48(%rsp)
mov    %r14,0x58(%rsp)
mov    0x4(%rsp),%edi
imul   0x8(%rsp),%edi
shl    $0x3,%edi
call   1070 <malloc@plt>
mov    %rax,0x38(%rsp)
cmpl   $0x0,0x24(%rsp)
mov    %r13,0x50(%rsp)
js     1394 <mvvm_sampler_gibbs+0x244>
xor    %ecx,%ecx
lea    0x10(%rsp),%rax
lea    0x18(%rsp),%rbp
mov    %r15,0x60(%rsp)
mov    0x58(%rsp),%r14
mov    0x48(%rsp),%r12
jmp    131e <mvvm_sampler_gibbs+0x1ce>
nop
mov    0x28(%rsp),%rdx
lea    0x1(%rdx),%ecx
cmp    0x24(%rsp),%edx
je     1394 <mvvm_sampler_gibbs+0x244>
mov    %rcx,0x28(%rsp)
cmpl   $0x0,0x8(%rsp)
mov    0x40(%rsp),%rcx
jle    1310 <mvvm_sampler_gibbs+0x1c0>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r13d,%edi
mov    %ebx,%esi
mov    %r15,%rdx
mov    %rcx,%r15
mov    %r12,%r8
mov    %r14,%r9
push   %rax
push   %rbp
mov    %rax,%r13
call   1050 <condKappaMu@plt>
add    $0x10,%rsp
movsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1040 <rvm_s@plt>
mov    %r15,%rcx
mov    %r13,%rax
mov    0x50(%rsp),%r13
mov    0x60(%rsp),%r15
movsd  %xmm0,(%r15,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1340 <mvvm_sampler_gibbs+0x1f0>
jmp    1310 <mvvm_sampler_gibbs+0x1c0>
mov    0x4(%rsp),%eax
imul   0xa0(%rsp),%eax
mov    %eax,0x4(%rsp)
test   %eax,%eax
mov    0x48(%rsp),%r12
mov    0x40(%rsp),%r13
js     147e <mvvm_sampler_gibbs+0x32e>
xor    %eax,%eax
lea    0x10(%rsp),%rbp
lea    0x18(%rsp),%r10
mov    0x50(%rsp),%r14
jmp    13dd <mvvm_sampler_gibbs+0x28d>
nopl   0x0(%rax)
lea    0x1(%rbx),%eax
cmp    0x4(%rsp),%ebx
je     147e <mvvm_sampler_gibbs+0x32e>
mov    %rax,0x28(%rsp)
cmpl   $0x0,0x8(%rsp)
jle    1439 <mvvm_sampler_gibbs+0x2e9>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %r14d,%edi
mov    %ebx,%esi
mov    %r15,%rdx
mov    %r13,%rcx
mov    %r12,%r8
mov    0x58(%rsp),%r9
push   %rbp
push   %r10
call   1050 <condKappaMu@plt>
add    $0x10,%rsp
movsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1040 <rvm_s@plt>
lea    0x18(%rsp),%r10
lea    0x10(%rsp),%rbp
movsd  %xmm0,(%r15,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    13f0 <mvvm_sampler_gibbs+0x2a0>
mov    0x28(%rsp),%rbx
test   %ebx,%ebx
je     13d0 <mvvm_sampler_gibbs+0x280>
mov    %ebx,%eax
cltd
idivl  0xa0(%rsp)
test   %edx,%edx
jne    13d0 <mvvm_sampler_gibbs+0x280>
add    $0xffffffff,%eax
imul   0x8(%rsp),%eax
cltq
mov    0x38(%rsp),%rcx
lea    (%rcx,%rax,8),%rdi
mov    %r15,%rsi
mov    0x34(%rsp),%edx
call   1060 <memcpy@plt>
lea    0x18(%rsp),%r10
lea    0x10(%rsp),%rbp
jmp    13d0 <mvvm_sampler_gibbs+0x280>
mov    %r15,%rdi
call   1030 <free@plt>
mov    0x38(%rsp),%rax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define double* @mvvm_sampler_gibbs(i32 %0, i32 %1, double* %2, double* %3, double* %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca i32
%14 = alloca i32
%15 = alloca double*
%16 = alloca double*
%17 = alloca double
%18 = alloca double
%19 = alloca i32
%20 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store double* %2, double** %10
store double* %3, double** %11
store double* %4, double** %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%21 = load i32, i32* %9
%22 = sext i32 %21 to i64
%23 = mul i64 8, %22
%24 = trunc i64 %23 to i32
%25 = call double* @malloc(i32 %24)
store double* %25, double** %15
store i32 0, i32* %19
br label %26
26: ; preds = %35, %7
%27 = load i32, i32* %19
%28 = load i32, i32* %9
%29 = icmp slt i32 %27, %28
br i1 %29, label %30, label %38
30: ; preds = %26
%31 = load double*, double** %15
%32 = load i32, i32* %19
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds double, double* %31, i64 %33
store double 1.000000e+00, double* %34
br label %35
35: ; preds = %30
%36 = load i32, i32* %19
%37 = add nsw i32 %36, 1
store i32 %37, i32* %19
br label %26
38: ; preds = %26
%39 = load i32, i32* %8
%40 = sext i32 %39 to i64
%41 = mul i64 8, %40
%42 = load i32, i32* %9
%43 = sext i32 %42 to i64
%44 = mul i64 %41, %43
%45 = trunc i64 %44 to i32
%46 = call double* @malloc(i32 %45)
store double* %46, double** %16
store i32 0, i32* %19
br label %47
47: ; preds = %75, %38
%48 = load i32, i32* %19
%49 = load i32, i32* %13
%50 = icmp sle i32 %48, %49
br i1 %50, label %51, label %78
51: ; preds = %47
store i32 0, i32* %20
br label %52
52: ; preds = %71, %51
%53 = load i32, i32* %20
%54 = load i32, i32* %9
%55 = icmp slt i32 %53, %54
br i1 %55, label %56, label %74
56: ; preds = %52
%57 = load i32, i32* %9
%58 = load i32, i32* %20
%59 = load double*, double** %15
%60 = load double*, double** %10
%61 = load double*, double** %11
%62 = load double*, double** %12
%63 = call i32 @condKappaMu(i32 %57, i32 %58, double* %59, double* %60, double* %61, double* %62, double* %17, double* %18)
%64 = load double, double* %17
%65 = load double, double* %18
%66 = call double @rvm_s(double %64, double %65)
%67 = load double*, double** %15
%68 = load i32, i32* %20
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds double, double* %67, i64 %69
store double %66, double* %70
br label %71
71: ; preds = %56
%72 = load i32, i32* %20
%73 = add nsw i32 %72, 1
store i32 %73, i32* %20
br label %52
74: ; preds = %52
br label %75
75: ; preds = %74
%76 = load i32, i32* %19
%77 = add nsw i32 %76, 1
store i32 %77, i32* %19
br label %47
78: ; preds = %47
store i32 0, i32* %19
br label %79
79: ; preds = %133, %78
%80 = load i32, i32* %19
%81 = load i32, i32* %14
%82 = load i32, i32* %8
%83 = mul nsw i32 %81, %82
%84 = icmp sle i32 %80, %83
br i1 %84, label %85, label %136
85: ; preds = %79
store i32 0, i32* %20
br label %86
86: ; preds = %105, %85
%87 = load i32, i32* %20
%88 = load i32, i32* %9
%89 = icmp slt i32 %87, %88
br i1 %89, label %90, label %108
90: ; preds = %86
%91 = load i32, i32* %9
%92 = load i32, i32* %20
%93 = load double*, double** %15
%94 = load double*, double** %10
%95 = load double*, double** %11
%96 = load double*, double** %12
%97 = call i32 @condKappaMu(i32 %91, i32 %92, double* %93, double* %94, double* %95, double* %96, double* %17, double* %18)
%98 = load double, double* %17
%99 = load double, double* %18
%100 = call double @rvm_s(double %98, double %99)
%101 = load double*, double** %15
%102 = load i32, i32* %20
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds double, double* %101, i64 %103
store double %100, double* %104
br label %105
105: ; preds = %90
%106 = load i32, i32* %20
%107 = add nsw i32 %106, 1
store i32 %107, i32* %20
br label %86
108: ; preds = %86
%109 = load i32, i32* %19
%110 = icmp ne i32 %109, 0
br i1 %110, label %111, label %132
111: ; preds = %108
%112 = load i32, i32* %19
%113 = load i32, i32* %14
%114 = srem i32 %112, %113
%115 = icmp eq i32 %114, 0
br i1 %115, label %116, label %132
116: ; preds = %111
%117 = load double*, double** %16
%118 = load i32, i32* %19
%119 = load i32, i32* %14
%120 = sdiv i32 %118, %119
%121 = sub nsw i32 %120, 1
%122 = load i32, i32* %9
%123 = mul nsw i32 %121, %122
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds double, double* %117, i64 %124
%126 = load double*, double** %15
%127 = load i32, i32* %9
%128 = sext i32 %127 to i64
%129 = mul i64 8, %128
%130 = trunc i64 %129 to i32
%131 = call i32 @memcpy(double* %125, double* %126, i32 %130)
br label %132
132: ; preds = %116, %111, %108
br label %133
133: ; preds = %132
%134 = load i32, i32* %19
%135 = add nsw i32 %134, 1
store i32 %135, i32* %19
br label %79
136: ; preds = %79
%137 = load double*, double** %15
%138 = call i32 @free(double* %137)
%139 = load double*, double** %16
ret double* %139
}

LLVM IR (-O2):
define double* @mvvm_sampler_gibbs(i32 %0, i32 %1, double* %2, double* %3, double* %4, i32 %5, i32 %6) {
%8 = alloca double
%9 = alloca double
%10 = bitcast double* %8 to i8*
%11 = bitcast double* %9 to i8*
%12 = shl i32 %1, 3
%13 = tail call double* @malloc(i32 %12)
%14 = icmp sgt i32 %1, 0
br i1 %14, label %15, label %94
15: ; preds = %7
%16 = zext i32 %1 to i64
%17 = icmp ult i32 %1, 4
br i1 %17, label %87, label %18
18: ; preds = %15
%19 = and i64 %16, 4294967292
%20 = add nsw i64 %19, -4
%21 = lshr exact i64 %20, 2
%22 = add nuw nsw i64 %21, 1
%23 = and i64 %22, 7
%24 = icmp ult i64 %20, 28
br i1 %24, label %72, label %25
25: ; preds = %18
%26 = and i64 %22, 9223372036854775800
br label %27
27: ; preds = %27, %25
%28 = phi i64 [ 0, %25 ], [ %69, %27 ]
%29 = phi i64 [ 0, %25 ], [ %70, %27 ]
%30 = getelementptr inbounds double, double* %13, i64 %28
%31 = bitcast double* %30 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %31
%32 = getelementptr inbounds double, double* %30, i64 2
%33 = bitcast double* %32 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %33
%34 = or i64 %28, 4
%35 = getelementptr inbounds double, double* %13, i64 %34
%36 = bitcast double* %35 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %36
%37 = getelementptr inbounds double, double* %35, i64 2
%38 = bitcast double* %37 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %38
%39 = or i64 %28, 8
%40 = getelementptr inbounds double, double* %13, i64 %39
%41 = bitcast double* %40 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %41
%42 = getelementptr inbounds double, double* %40, i64 2
%43 = bitcast double* %42 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %43
%44 = or i64 %28, 12
%45 = getelementptr inbounds double, double* %13, i64 %44
%46 = bitcast double* %45 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %46
%47 = getelementptr inbounds double, double* %45, i64 2
%48 = bitcast double* %47 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %48
%49 = or i64 %28, 16
%50 = getelementptr inbounds double, double* %13, i64 %49
%51 = bitcast double* %50 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %51
%52 = getelementptr inbounds double, double* %50, i64 2
%53 = bitcast double* %52 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %53
%54 = or i64 %28, 20
%55 = getelementptr inbounds double, double* %13, i64 %54
%56 = bitcast double* %55 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %56
%57 = getelementptr inbounds double, double* %55, i64 2
%58 = bitcast double* %57 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %58
%59 = or i64 %28, 24
%60 = getelementptr inbounds double, double* %13, i64 %59
%61 = bitcast double* %60 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %61
%62 = getelementptr inbounds double, double* %60, i64 2
%63 = bitcast double* %62 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %63
%64 = or i64 %28, 28
%65 = getelementptr inbounds double, double* %13, i64 %64
%66 = bitcast double* %65 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %66
%67 = getelementptr inbounds double, double* %65, i64 2
%68 = bitcast double* %67 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %68
%69 = add nuw i64 %28, 32
%70 = add i64 %29, 8
%71 = icmp eq i64 %70, %26
br i1 %71, label %72, label %27
72: ; preds = %27, %18
%73 = phi i64 [ 0, %18 ], [ %69, %27 ]
%74 = icmp eq i64 %23, 0
br i1 %74, label %85, label %75
75: ; preds = %72, %75
%76 = phi i64 [ %82, %75 ], [ %73, %72 ]
%77 = phi i64 [ %83, %75 ], [ 0, %72 ]
%78 = getelementptr inbounds double, double* %13, i64 %76
%79 = bitcast double* %78 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %79
%80 = getelementptr inbounds double, double* %78, i64 2
%81 = bitcast double* %80 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %81
%82 = add nuw i64 %76, 4
%83 = add i64 %77, 1
%84 = icmp eq i64 %83, %23
br i1 %84, label %85, label %75
85: ; preds = %75, %72
%86 = icmp eq i64 %19, %16
br i1 %86, label %94, label %87
87: ; preds = %15, %85
%88 = phi i64 [ 0, %15 ], [ %19, %85 ]
br label %89
89: ; preds = %87, %89
%90 = phi i64 [ %92, %89 ], [ %88, %87 ]
%91 = getelementptr inbounds double, double* %13, i64 %90
store double 1.000000e+00, double* %91
%92 = add nuw nsw i64 %90, 1
%93 = icmp eq i64 %92, %16
br i1 %93, label %94, label %89
94: ; preds = %89, %85, %7
%95 = shl i32 %0, 3
%96 = mul i32 %95, %1
%97 = tail call double* @malloc(i32 %96)
%98 = icmp slt i32 %5, 0
br i1 %98, label %103, label %99
99: ; preds = %94
%100 = zext i32 %1 to i64
br label %101
101: ; preds = %99, %118
%102 = phi i32 [ 0, %99 ], [ %119, %118 ]
br i1 %14, label %108, label %118
103: ; preds = %118, %94
%104 = mul i32 %6, %0
%105 = icmp slt i32 %104, 0
br i1 %105, label %148, label %106
106: ; preds = %103
%107 = zext i32 %1 to i64
br label %121
108: ; preds = %101, %108
%109 = phi i64 [ %116, %108 ], [ 0, %101 ]
%110 = trunc i64 %109 to i32
%111 = call i32 @condKappaMu(i32 %1, i32 %110, double* %13, double* %2, double* %3, double* %4, double* %8, double* %9)
%112 = load double, double* %8
%113 = load double, double* %9
%114 = call double @rvm_s(double %112, double %113)
%115 = getelementptr inbounds double, double* %13, i64 %109
store double %114, double* %115
%116 = add nuw nsw i64 %109, 1
%117 = icmp eq i64 %116, %100
br i1 %117, label %118, label %108
118: ; preds = %108, %101
%119 = add nuw i32 %102, 1
%120 = icmp eq i32 %102, %5
br i1 %120, label %103, label %101
121: ; preds = %106, %145
%122 = phi i32 [ 0, %106 ], [ %146, %145 ]
br i1 %14, label %123, label %133
123: ; preds = %121, %123
%124 = phi i64 [ %131, %123 ], [ 0, %121 ]
%125 = trunc i64 %124 to i32
%126 = call i32 @condKappaMu(i32 %1, i32 %125, double* %13, double* %2, double* %3, double* %4, double* %8, double* %9)
%127 = load double, double* %8
%128 = load double, double* %9
%129 = call double @rvm_s(double %127, double %128)
%130 = getelementptr inbounds double, double* %13, i64 %124
store double %129, double* %130
%131 = add nuw nsw i64 %124, 1
%132 = icmp eq i64 %131, %107
br i1 %132, label %133, label %123
133: ; preds = %123, %121
%134 = icmp eq i32 %122, 0
br i1 %134, label %145, label %135
135: ; preds = %133
%136 = srem i32 %122, %6
%137 = sdiv i32 %122, %6
%138 = icmp eq i32 %136, 0
br i1 %138, label %139, label %145
139: ; preds = %135
%140 = add nsw i32 %137, -1
%141 = mul nsw i32 %140, %1
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds double, double* %97, i64 %142
%144 = call i32 @memcpy(double* %143, double* %13, i32 %12)
br label %145
145: ; preds = %133, %135, %139
%146 = add nuw i32 %122, 1
%147 = icmp eq i32 %122, %104
br i1 %147, label %148, label %121
148: ; preds = %145, %103
%149 = call i32 @free(double* %13)
ret double* %97
}