#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 */
typedef int /*<<< orphan*/ uint64_t;

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


x86 assembly (clang, -O0):
<mvvm_sampler_safe_gibbs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11c2 <mvvm_sampler_safe_gibbs+0x72>
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  0xe51(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1193 <mvvm_sampler_safe_gibbs+0x43>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     1255 <mvvm_sampler_safe_gibbs+0x105>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1242 <mvvm_sampler_safe_gibbs+0xf2>
mov    -0xc(%rbp),%edi
mov    -0x50(%rbp),%esi
mov    -0x38(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
lea    -0x40(%rbp),%r10
lea    -0x48(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1040 <condKappaMu@plt>
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
mov    0x18(%rbp),%rdi
call   1070 <rvm_s_r@plt>
mov    -0x38(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    11dc <mvvm_sampler_safe_gibbs+0x8c>
jmp    1247 <mvvm_sampler_safe_gibbs+0xf7>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    11c9 <mvvm_sampler_safe_gibbs+0x79>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    0x10(%rbp),%ecx
imul   -0x8(%rbp),%ecx
cmp    %ecx,%eax
jg     1336 <mvvm_sampler_safe_gibbs+0x1e6>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12db <mvvm_sampler_safe_gibbs+0x18b>
mov    -0xc(%rbp),%edi
mov    -0x50(%rbp),%esi
mov    -0x38(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
lea    -0x40(%rbp),%r10
lea    -0x48(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1040 <condKappaMu@plt>
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
mov    0x18(%rbp),%rdi
call   1070 <rvm_s_r@plt>
mov    -0x38(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1275 <mvvm_sampler_safe_gibbs+0x125>
cmpl   $0x0,-0x4c(%rbp)
je     1323 <mvvm_sampler_safe_gibbs+0x1d3>
mov    -0x4c(%rbp),%eax
cltd
idivl  0x10(%rbp)
cmp    $0x0,%edx
jne    1323 <mvvm_sampler_safe_gibbs+0x1d3>
mov    0x20(%rbp),%rdi
mov    -0x4c(%rbp),%eax
cltd
idivl  0x10(%rbp)
sub    $0x1,%eax
imul   -0xc(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x38(%rbp),%rsi
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
call   1050 <memcpy@plt>
jmp    1328 <mvvm_sampler_safe_gibbs+0x1d8>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    125c <mvvm_sampler_safe_gibbs+0x10c>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mvvm_sampler_safe_gibbs>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r9d,0x24(%rsp)
mov    %r8,%r12
mov    %rcx,%r15
mov    %rdx,0x60(%rsp)
mov    %esi,%ebx
mov    %edi,0xc(%rsp)
lea    0x0(,%rbx,8),%edi
mov    %edi,0x3c(%rsp)
call   1060 <malloc@plt>
mov    %ebx,%edi
mov    %rbx,0x28(%rsp)
test   %ebx,%ebx
jle    12ad <mvvm_sampler_safe_gibbs+0x15d>
cmpl   $0x4,0x28(%rsp)
jae    11a1 <mvvm_sampler_safe_gibbs+0x51>
xor    %ebp,%ebp
jmp    1287 <mvvm_sampler_safe_gibbs+0x137>
mov    %edi,%ebp
and    $0xfffffffc,%ebp
lea    -0x4(%rbp),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x7,%ecx
cmp    $0x1c,%rsi
jae    11c7 <mvvm_sampler_safe_gibbs+0x77>
xor    %esi,%esi
jmp    1251 <mvvm_sampler_safe_gibbs+0x101>
and    $0xfffffffffffffff8,%rdx
xor    %esi,%esi
movaps 0xe2c(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movups %xmm0,(%rax,%rsi,8)
movups %xmm0,0x10(%rax,%rsi,8)
movups %xmm0,0x20(%rax,%rsi,8)
movups %xmm0,0x30(%rax,%rsi,8)
movups %xmm0,0x40(%rax,%rsi,8)
movups %xmm0,0x50(%rax,%rsi,8)
movups %xmm0,0x60(%rax,%rsi,8)
movups %xmm0,0x70(%rax,%rsi,8)
movups %xmm0,0x80(%rax,%rsi,8)
movups %xmm0,0x90(%rax,%rsi,8)
movups %xmm0,0xa0(%rax,%rsi,8)
movups %xmm0,0xb0(%rax,%rsi,8)
movups %xmm0,0xc0(%rax,%rsi,8)
movups %xmm0,0xd0(%rax,%rsi,8)
movups %xmm0,0xe0(%rax,%rsi,8)
movups %xmm0,0xf0(%rax,%rsi,8)
add    $0x20,%rsi
add    $0xfffffffffffffff8,%rdx
jne    11e0 <mvvm_sampler_safe_gibbs+0x90>
test   %rcx,%rcx
je     1282 <mvvm_sampler_safe_gibbs+0x132>
lea    (%rax,%rsi,8),%rdx
add    $0x10,%rdx
shl    $0x5,%rcx
xor    %esi,%esi
movaps 0xd95(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movups %xmm0,-0x10(%rdx,%rsi,1)
movups %xmm0,(%rdx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%rcx
jne    1270 <mvvm_sampler_safe_gibbs+0x120>
cmp    %rdi,%rbp
je     12ad <mvvm_sampler_safe_gibbs+0x15d>
movabs $0x3ff0000000000000,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rcx,(%rax,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%rdi
jne    12a0 <mvvm_sampler_safe_gibbs+0x150>
mov    %rax,0x40(%rsp)
mov    %rdi,0x48(%rsp)
mov    %r15,0x50(%rsp)
mov    %r12,0x58(%rsp)
cmpl   $0x0,0x24(%rsp)
js     135e <mvvm_sampler_safe_gibbs+0x20e>
xor    %edx,%edx
lea    0x10(%rsp),%rax
lea    0x18(%rsp),%rbx
mov    0x58(%rsp),%r14
mov    0x50(%rsp),%rbp
mov    0x48(%rsp),%r13
mov    0x40(%rsp),%r15
jmp    12fe <mvvm_sampler_safe_gibbs+0x1ae>
xchg   %ax,%ax
mov    0x30(%rsp),%rsi
lea    0x1(%rsi),%edx
cmp    0x24(%rsp),%esi
je     135e <mvvm_sampler_safe_gibbs+0x20e>
mov    %rdx,0x30(%rsp)
cmpl   $0x0,0x28(%rsp)
jle    12f0 <mvvm_sampler_safe_gibbs+0x1a0>
xor    %r12d,%r12d
nopl   (%rax)
mov    %r13d,%edi
mov    %r12d,%esi
mov    %r15,%rdx
mov    0x60(%rsp),%rcx
mov    %rbp,%r8
mov    %r14,%r9
push   %rax
push   %rbx
call   1040 <condKappaMu@plt>
add    $0x10,%rsp
movsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    0xa8(%rsp),%rdi
call   1070 <rvm_s_r@plt>
lea    0x10(%rsp),%rax
movsd  %xmm0,(%r15,%r12,8)
add    $0x1,%r12
cmp    %r12,%r13
jne    1310 <mvvm_sampler_safe_gibbs+0x1c0>
jmp    12f0 <mvvm_sampler_safe_gibbs+0x1a0>
mov    0xc(%rsp),%eax
imul   0xa0(%rsp),%eax
mov    %eax,0xc(%rsp)
test   %eax,%eax
mov    0x40(%rsp),%r15
js     1461 <mvvm_sampler_safe_gibbs+0x311>
xor    %eax,%eax
lea    0x10(%rsp),%r11
lea    0x18(%rsp),%r10
mov    0x58(%rsp),%r14
mov    0x50(%rsp),%r12
mov    0x60(%rsp),%r13
jmp    13ad <mvvm_sampler_safe_gibbs+0x25d>
nopl   0x0(%rax,%rax,1)
lea    0x1(%rbx),%eax
cmp    0xc(%rsp),%ebx
je     1461 <mvvm_sampler_safe_gibbs+0x311>
mov    %rax,0x30(%rsp)
cmpl   $0x0,0x28(%rsp)
mov    0x48(%rsp),%rax
jle    1415 <mvvm_sampler_safe_gibbs+0x2c5>
xor    %ebx,%ebx
mov    %rax,%rbp
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r15,%rdx
mov    %r13,%rcx
mov    %r12,%r8
mov    %r14,%r9
push   %r11
push   %r10
call   1040 <condKappaMu@plt>
add    $0x10,%rsp
movsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    0xa8(%rsp),%rdi
call   1070 <rvm_s_r@plt>
mov    %rbp,%rax
lea    0x18(%rsp),%r10
lea    0x10(%rsp),%r11
movsd  %xmm0,(%r15,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    13c0 <mvvm_sampler_safe_gibbs+0x270>
mov    0x30(%rsp),%rbx
test   %ebx,%ebx
je     13a0 <mvvm_sampler_safe_gibbs+0x250>
mov    %ebx,%eax
cltd
idivl  0xa0(%rsp)
test   %edx,%edx
jne    13a0 <mvvm_sampler_safe_gibbs+0x250>
add    $0xffffffff,%eax
imul   0x28(%rsp),%eax
cltq
mov    0xb0(%rsp),%rcx
lea    (%rcx,%rax,8),%rdi
mov    %r15,%rsi
mov    0x3c(%rsp),%edx
call   1050 <memcpy@plt>
lea    0x18(%rsp),%r10
lea    0x10(%rsp),%r11
jmp    13a0 <mvvm_sampler_safe_gibbs+0x250>
mov    %r15,%rdi
call   1030 <free@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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