#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 */
unsigned int *alloc_uivector(unsigned int);
int /*<<< orphan*/ dealloc_uivector(unsigned int *, unsigned int);
scalar_t__ pow(double, double);
double getCustomSplitStatisticMultivariateClassification(
    unsigned int n, char *membership, double *time, double *event,
    unsigned int eventTypeSize, unsigned int eventTimeSize, double *eventTime,
    double *response, double mean, double variance, unsigned int maxLevel,
    double **feature, unsigned int featureCount) {
  unsigned int *leftClassProp, *rghtClassProp;
  double sumLeftSqr, sumRghtSqr;
  double delta;
  double sumLeft, sumRght;
  unsigned int leftSize, rghtSize;
  unsigned int i, p;
  sumLeft = sumRght = 0.0;
  leftSize = rghtSize = 0;
  delta = 0.0;
  leftClassProp = alloc_uivector(maxLevel);
  rghtClassProp = alloc_uivector(maxLevel);
  for (p = 1; p <= maxLevel; p++) {
    leftClassProp[p] = rghtClassProp[p] = 0;
  }
  for (i = 1; i <= n; i++) {
    if (membership[i] == 0x01) {
      leftClassProp[(unsigned int)response[i]]++;
      leftSize++;
    } else {
      rghtClassProp[(unsigned int)response[i]]++;
      rghtSize++;
    }
  }
  for (p = 1; p <= maxLevel; p++) {
    sumLeft += pow((double)leftClassProp[p], 2.0);
    sumRght += pow((double)rghtClassProp[p], 2.0);
  }
  dealloc_uivector(leftClassProp, maxLevel);
  dealloc_uivector(rghtClassProp, maxLevel);
  sumLeftSqr = sumLeft / leftSize;
  sumRghtSqr = sumRght / rghtSize;
  delta = sumLeftSqr + sumRghtSqr;
  return delta;
}


x86 assembly (clang, -O0):
<getCustomSplitStatisticMultivariateClassification>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
movsd  %xmm0,-0x30(%rbp)
movsd  %xmm1,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x78(%rbp)
movl   $0x0,-0x74(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    0x20(%rbp),%edi
call   1030 <alloc_uivector@plt>
mov    %rax,-0x40(%rbp)
mov    0x20(%rbp),%edi
call   1030 <alloc_uivector@plt>
mov    %rax,-0x48(%rbp)
movl   $0x1,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    0x20(%rbp),%eax
ja     11e9 <getCustomSplitStatisticMultivariateClassification+0xb9>
mov    -0x48(%rbp),%rax
mov    -0x80(%rbp),%ecx
movl   $0x0,(%rax,%rcx,4)
mov    -0x40(%rbp),%rax
mov    -0x80(%rbp),%ecx
movl   $0x0,(%rax,%rcx,4)
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    11b3 <getCustomSplitStatisticMultivariateClassification+0x83>
movl   $0x1,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x4(%rbp),%eax
ja     1272 <getCustomSplitStatisticMultivariateClassification+0x142>
mov    -0x10(%rbp),%rax
mov    -0x7c(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x1,%eax
jne    123a <getCustomSplitStatisticMultivariateClassification+0x10a>
mov    -0x40(%rbp),%rax
mov    0x18(%rbp),%rcx
mov    -0x7c(%rbp),%edx
cvttsd2si (%rcx,%rdx,8),%rcx
mov    %ecx,%ecx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    125f <getCustomSplitStatisticMultivariateClassification+0x12f>
mov    -0x48(%rbp),%rax
mov    0x18(%rbp),%rcx
mov    -0x7c(%rbp),%edx
cvttsd2si (%rcx,%rdx,8),%rcx
mov    %ecx,%ecx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1264 <getCustomSplitStatisticMultivariateClassification+0x134>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    11f0 <getCustomSplitStatisticMultivariateClassification+0xc0>
movl   $0x1,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    0x20(%rbp),%eax
ja     12ed <getCustomSplitStatisticMultivariateClassification+0x1bd>
mov    -0x40(%rbp),%rax
mov    -0x80(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
cvtsi2sd %rax,%xmm0
movsd  0xd64(%rip),%xmm1
call   1050 <pow@plt>
cvtsi2sd %rax,%xmm1
movsd  -0x68(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x80(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
cvtsi2sd %rax,%xmm0
movsd  0xd35(%rip),%xmm1
call   1050 <pow@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    1279 <getCustomSplitStatisticMultivariateClassification+0x149>
mov    -0x40(%rbp),%rdi
mov    0x20(%rbp),%esi
call   1040 <dealloc_uivector@plt>
mov    -0x48(%rbp),%rdi
mov    0x20(%rbp),%esi
call   1040 <dealloc_uivector@plt>
movsd  -0x68(%rbp),%xmm0
mov    -0x74(%rbp),%eax
cvtsi2sd %rax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x70(%rbp),%xmm0
mov    -0x78(%rbp),%eax
cvtsi2sd %rax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCustomSplitStatisticMultivariateClassification>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x60(%rsp),%r13d
mov    %r13d,%edi
call   1030 <alloc_uivector@plt>
mov    %rax,%r15
mov    %r13d,%edi
call   1030 <alloc_uivector@plt>
mov    %rax,%r12
test   %r13d,%r13d
je     132f <getCustomSplitStatisticMultivariateClassification+0x1ff>
mov    %r13d,%r8d
lea    0x1(%r8),%r9
mov    $0x1,%ecx
cmp    $0x8,%r13d
jb     129d <getCustomSplitStatisticMultivariateClassification+0x16d>
lea    0x4(%r12),%rdx
lea    (%r15,%r9,4),%rax
cmp    %rax,%rdx
jae    119f <getCustomSplitStatisticMultivariateClassification+0x6f>
lea    (%r12,%r9,4),%rdx
mov    %r15,%rax
add    $0x4,%rax
cmp    %rdx,%rax
jb     129d <getCustomSplitStatisticMultivariateClassification+0x16d>
mov    %r8d,%ecx
and    $0xfffffff8,%ecx
lea    -0x8(%rcx),%rdi
mov    %rdi,%rdx
shr    $0x3,%rdx
add    $0x1,%rdx
mov    %edx,%eax
and    $0x3,%eax
cmp    $0x18,%rdi
jae    11c6 <getCustomSplitStatisticMultivariateClassification+0x96>
xor    %edi,%edi
jmp    124a <getCustomSplitStatisticMultivariateClassification+0x11a>
and    $0xfffffffffffffffc,%rdx
xor    %edi,%edi
xorpd  %xmm0,%xmm0
movupd %xmm0,0x4(%r12,%rdi,4)
movupd %xmm0,0x14(%r12,%rdi,4)
movupd %xmm0,0x4(%r15,%rdi,4)
movupd %xmm0,0x14(%r15,%rdi,4)
movupd %xmm0,0x24(%r12,%rdi,4)
movupd %xmm0,0x34(%r12,%rdi,4)
movupd %xmm0,0x24(%r15,%rdi,4)
movupd %xmm0,0x34(%r15,%rdi,4)
movupd %xmm0,0x44(%r12,%rdi,4)
movupd %xmm0,0x54(%r12,%rdi,4)
movupd %xmm0,0x44(%r15,%rdi,4)
movupd %xmm0,0x54(%r15,%rdi,4)
movupd %xmm0,0x64(%r12,%rdi,4)
movupd %xmm0,0x74(%r12,%rdi,4)
movupd %xmm0,0x64(%r15,%rdi,4)
movupd %xmm0,0x74(%r15,%rdi,4)
add    $0x20,%rdi
add    $0xfffffffffffffffc,%rdx
jne    11d0 <getCustomSplitStatisticMultivariateClassification+0xa0>
test   %rax,%rax
je     1290 <getCustomSplitStatisticMultivariateClassification+0x160>
xorpd  %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x0(,%rdi,4),%rdx
or     $0x4,%rdx
movupd %xmm0,(%r12,%rdx,1)
movupd %xmm0,0x10(%r12,%rdx,1)
movupd %xmm0,(%r15,%rdx,1)
movupd %xmm0,0x10(%r15,%rdx,1)
add    $0x8,%rdi
add    $0xffffffffffffffff,%rax
jne    1260 <getCustomSplitStatisticMultivariateClassification+0x130>
cmp    %rcx,%r8
je     132f <getCustomSplitStatisticMultivariateClassification+0x1ff>
or     $0x1,%rcx
mov    %r9d,%eax
sub    %ecx,%eax
mov    %rcx,%rdx
not    %rdx
add    %r9,%rdx
and    $0x3,%rax
je     12da <getCustomSplitStatisticMultivariateClassification+0x1aa>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movl   $0x0,(%r12,%rcx,4)
movl   $0x0,(%r15,%rcx,4)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rax
jne    12c0 <getCustomSplitStatisticMultivariateClassification+0x190>
cmp    $0x3,%rdx
jb     132f <getCustomSplitStatisticMultivariateClassification+0x1ff>
movl   $0x0,(%r12,%rcx,4)
movl   $0x0,(%r15,%rcx,4)
movl   $0x0,0x4(%r12,%rcx,4)
movl   $0x0,0x4(%r15,%rcx,4)
movl   $0x0,0x8(%r12,%rcx,4)
movl   $0x0,0x8(%r15,%rcx,4)
movl   $0x0,0xc(%r12,%rcx,4)
movl   $0x0,0xc(%r15,%rcx,4)
add    $0x4,%rcx
cmp    %rcx,%r9
jne    12e0 <getCustomSplitStatisticMultivariateClassification+0x1b0>
test   %ebp,%ebp
je     137a <getCustomSplitStatisticMultivariateClassification+0x24a>
mov    0x58(%rsp),%rax
add    $0x1,%ebp
xor    %edi,%edi
mov    $0x1,%ecx
xor    %r14d,%r14d
jmp    1361 <getCustomSplitStatisticMultivariateClassification+0x231>
nopw   0x0(%rax,%rax,1)
addl   $0x1,(%r12,%rdx,4)
add    $0x1,%edi
add    $0x1,%rcx
cmp    %rcx,%rbp
je     137f <getCustomSplitStatisticMultivariateClassification+0x24f>
cmpb   $0x1,(%rbx,%rcx,1)
cvttsd2si (%rax,%rcx,8),%rdx
mov    %edx,%edx
jne    1350 <getCustomSplitStatisticMultivariateClassification+0x220>
addl   $0x1,(%r15,%rdx,4)
add    $0x1,%r14d
jmp    1358 <getCustomSplitStatisticMultivariateClassification+0x228>
xor    %r14d,%r14d
xor    %edi,%edi
test   %r13d,%r13d
mov    %edi,0x14(%rsp)
xorpd  %xmm0,%xmm0
je     141c <getCustomSplitStatisticMultivariateClassification+0x2ec>
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%ebx
xorpd  %xmm0,%xmm0
movsd  %xmm0,(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebx,%ebp
mov    (%r15,%rbp,4),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  0xc3a(%rip),%xmm1
call   1050 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  (%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
mov    (%r12,%rbp,4),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  0xc0b(%rip),%xmm1
call   1050 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
add    $0x1,%ebx
cmp    %r13d,%ebx
jbe    13b0 <getCustomSplitStatisticMultivariateClassification+0x280>
jmp    142b <getCustomSplitStatisticMultivariateClassification+0x2fb>
movsd  %xmm0,(%rsp)
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %r15,%rdi
mov    %r13d,%esi
call   1040 <dealloc_uivector@plt>
mov    %r12,%rdi
mov    %r13d,%esi
call   1040 <dealloc_uivector@plt>
mov    %r14d,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  (%rsp),%xmm2
divsd  %xmm0,%xmm2
mov    0x14(%rsp),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
movsd  0x8(%rsp),%xmm0
divsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define double @getCustomSplitStatisticMultivariateClassification(i32 %0, i8* nocapture %1, double* nocapture readnone %2, double* nocapture readnone %3, i32 %4, i32 %5, double* nocapture readnone %6, double* nocapture %7, double %8, double %9, i32 %10, double** nocapture readnone %11, i32 %12) {
%14 = tail call i32* @alloc_uivector(i32 %10)
%15 = tail call i32* @alloc_uivector(i32 %10)
%16 = icmp eq i32 %10, 0
br i1 %16, label %120, label %17
17: ; preds = %13
%18 = add nuw i32 %10, 1
%19 = zext i32 %18 to i64
%20 = add nsw i64 %19, -1
%21 = icmp ult i64 %20, 8
br i1 %21, label %102, label %22
22: ; preds = %17
%23 = getelementptr i32, i32* %15, i64 1
%24 = getelementptr i32, i32* %15, i64 %19
%25 = getelementptr i32, i32* %14, i64 1
%26 = getelementptr i32, i32* %14, i64 %19
%27 = icmp ult i32* %23, %26
%28 = icmp ult i32* %25, %24
%29 = and i1 %27, %28
br i1 %29, label %102, label %30
30: ; preds = %22
%31 = and i64 %20, -8
%32 = or i64 %31, 1
%33 = add nsw i64 %31, -8
%34 = lshr exact i64 %33, 3
%35 = add nuw nsw i64 %34, 1
%36 = and i64 %35, 3
%37 = icmp ult i64 %33, 24
br i1 %37, label %82, label %38
38: ; preds = %30
%39 = and i64 %35, 4611686018427387900
br label %40
40: ; preds = %40, %38
%41 = phi i64 [ 0, %38 ], [ %79, %40 ]
%42 = phi i64 [ 0, %38 ], [ %80, %40 ]
%43 = or i64 %41, 1
%44 = getelementptr inbounds i32, i32* %15, i64 %43
%45 = bitcast i32* %44 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %45
%46 = getelementptr inbounds i32, i32* %44, i64 4
%47 = bitcast i32* %46 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %47
%48 = getelementptr inbounds i32, i32* %14, i64 %43
%49 = bitcast i32* %48 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %49
%50 = getelementptr inbounds i32, i32* %48, i64 4
%51 = bitcast i32* %50 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %51
%52 = or i64 %41, 9
%53 = getelementptr inbounds i32, i32* %15, i64 %52
%54 = bitcast i32* %53 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %54
%55 = getelementptr inbounds i32, i32* %53, i64 4
%56 = bitcast i32* %55 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %56
%57 = getelementptr inbounds i32, i32* %14, i64 %52
%58 = bitcast i32* %57 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %58
%59 = getelementptr inbounds i32, i32* %57, i64 4
%60 = bitcast i32* %59 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %60
%61 = or i64 %41, 17
%62 = getelementptr inbounds i32, i32* %15, i64 %61
%63 = bitcast i32* %62 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %63
%64 = getelementptr inbounds i32, i32* %62, i64 4
%65 = bitcast i32* %64 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %65
%66 = getelementptr inbounds i32, i32* %14, i64 %61
%67 = bitcast i32* %66 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %67
%68 = getelementptr inbounds i32, i32* %66, i64 4
%69 = bitcast i32* %68 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %69
%70 = or i64 %41, 25
%71 = getelementptr inbounds i32, i32* %15, i64 %70
%72 = bitcast i32* %71 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %72
%73 = getelementptr inbounds i32, i32* %71, i64 4
%74 = bitcast i32* %73 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %74
%75 = getelementptr inbounds i32, i32* %14, i64 %70
%76 = bitcast i32* %75 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %76
%77 = getelementptr inbounds i32, i32* %75, i64 4
%78 = bitcast i32* %77 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %78
%79 = add nuw i64 %41, 32
%80 = add i64 %42, 4
%81 = icmp eq i64 %80, %39
br i1 %81, label %82, label %40
82: ; preds = %40, %30
%83 = phi i64 [ 0, %30 ], [ %79, %40 ]
%84 = icmp eq i64 %36, 0
br i1 %84, label %100, label %85
85: ; preds = %82, %85
%86 = phi i64 [ %97, %85 ], [ %83, %82 ]
%87 = phi i64 [ %98, %85 ], [ 0, %82 ]
%88 = or i64 %86, 1
%89 = getelementptr inbounds i32, i32* %15, i64 %88
%90 = bitcast i32* %89 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %90
%91 = getelementptr inbounds i32, i32* %89, i64 4
%92 = bitcast i32* %91 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %92
%93 = getelementptr inbounds i32, i32* %14, i64 %88
%94 = bitcast i32* %93 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %94
%95 = getelementptr inbounds i32, i32* %93, i64 4
%96 = bitcast i32* %95 to <4 x i32>*
store <4 x i32> zeroinitializer, <4 x i32>* %96
%97 = add nuw i64 %86, 8
%98 = add i64 %87, 1
%99 = icmp eq i64 %98, %36
br i1 %99, label %100, label %85
100: ; preds = %85, %82
%101 = icmp eq i64 %20, %31
br i1 %101, label %120, label %102
102: ; preds = %22, %17, %100
%103 = phi i64 [ 1, %22 ], [ 1, %17 ], [ %32, %100 ]
%104 = sub nsw i64 %19, %103
%105 = xor i64 %103, -1
%106 = add nsw i64 %105, %19
%107 = and i64 %104, 3
%108 = icmp eq i64 %107, 0
br i1 %108, label %117, label %109
109: ; preds = %102, %109
%110 = phi i64 [ %114, %109 ], [ %103, %102 ]
%111 = phi i64 [ %115, %109 ], [ 0, %102 ]
%112 = getelementptr inbounds i32, i32* %15, i64 %110
store i32 0, i32* %112
%113 = getelementptr inbounds i32, i32* %14, i64 %110
store i32 0, i32* %113
%114 = add nuw nsw i64 %110, 1
%115 = add i64 %111, 1
%116 = icmp eq i64 %115, %107
br i1 %116, label %117, label %109
117: ; preds = %109, %102
%118 = phi i64 [ %103, %102 ], [ %114, %109 ]
%119 = icmp ult i64 %106, 3
br i1 %119, label %120, label %125
120: ; preds = %117, %125, %100, %13
%121 = icmp eq i32 %0, 0
br i1 %121, label %140, label %122
122: ; preds = %120
%123 = add nuw i32 %0, 1
%124 = zext i32 %123 to i64
br label %143
125: ; preds = %117, %125
%126 = phi i64 [ %138, %125 ], [ %118, %117 ]
%127 = getelementptr inbounds i32, i32* %15, i64 %126
store i32 0, i32* %127
%128 = getelementptr inbounds i32, i32* %14, i64 %126
store i32 0, i32* %128
%129 = add nuw nsw i64 %126, 1
%130 = getelementptr inbounds i32, i32* %15, i64 %129
store i32 0, i32* %130
%131 = getelementptr inbounds i32, i32* %14, i64 %129
store i32 0, i32* %131
%132 = add nuw nsw i64 %126, 2
%133 = getelementptr inbounds i32, i32* %15, i64 %132
store i32 0, i32* %133
%134 = getelementptr inbounds i32, i32* %14, i64 %132
store i32 0, i32* %134
%135 = add nuw nsw i64 %126, 3
%136 = getelementptr inbounds i32, i32* %15, i64 %135
store i32 0, i32* %136
%137 = getelementptr inbounds i32, i32* %14, i64 %135
store i32 0, i32* %137
%138 = add nuw nsw i64 %126, 4
%139 = icmp eq i64 %138, %19
br i1 %139, label %120, label %125
140: ; preds = %164, %120
%141 = phi i32 [ 0, %120 ], [ %165, %164 ]
%142 = phi i32 [ 0, %120 ], [ %166, %164 ]
br i1 %16, label %188, label %169
143: ; preds = %122, %164
%144 = phi i64 [ 1, %122 ], [ %167, %164 ]
%145 = phi i32 [ 0, %122 ], [ %166, %164 ]
%146 = phi i32 [ 0, %122 ], [ %165, %164 ]
%147 = getelementptr inbounds i8, i8* %1, i64 %144
%148 = load i8, i8* %147
%149 = icmp eq i8 %148, 1
%150 = getelementptr inbounds double, double* %7, i64 %144
%151 = load double, double* %150
%152 = fptoui double %151 to i32
%153 = zext i32 %152 to i64
br i1 %149, label %154, label %159
154: ; preds = %143
%155 = getelementptr inbounds i32, i32* %14, i64 %153
%156 = load i32, i32* %155
%157 = add i32 %156, 1
store i32 %157, i32* %155
%158 = add i32 %146, 1
br label %164
159: ; preds = %143
%160 = getelementptr inbounds i32, i32* %15, i64 %153
%161 = load i32, i32* %160
%162 = add i32 %161, 1
store i32 %162, i32* %160
%163 = add i32 %145, 1
br label %164
164: ; preds = %154, %159
%165 = phi i32 [ %158, %154 ], [ %146, %159 ]
%166 = phi i32 [ %145, %154 ], [ %163, %159 ]
%167 = add nuw nsw i64 %144, 1
%168 = icmp eq i64 %167, %124
br i1 %168, label %140, label %143
169: ; preds = %140, %169
%170 = phi i32 [ %186, %169 ], [ 1, %140 ]
%171 = phi double [ %185, %169 ], [ 0.000000e+00, %140 ]
%172 = phi double [ %179, %169 ], [ 0.000000e+00, %140 ]
%173 = zext i32 %170 to i64
%174 = getelementptr inbounds i32, i32* %14, i64 %173
%175 = load i32, i32* %174
%176 = uitofp i32 %175 to double
%177 = tail call i64 @pow(double %176, double 2.000000e+00)
%178 = sitofp i64 %177 to double
%179 = fadd double %172, %178
%180 = getelementptr inbounds i32, i32* %15, i64 %173
%181 = load i32, i32* %180
%182 = uitofp i32 %181 to double
%183 = tail call i64 @pow(double %182, double 2.000000e+00)
%184 = sitofp i64 %183 to double
%185 = fadd double %171, %184
%186 = add i32 %170, 1
%187 = icmp ugt i32 %186, %10
br i1 %187, label %188, label %169
188: ; preds = %169, %140
%189 = phi double [ 0.000000e+00, %140 ], [ %179, %169 ]
%190 = phi double [ 0.000000e+00, %140 ], [ %185, %169 ]
%191 = tail call i32 @dealloc_uivector(i32* %14, i32 %10)
%192 = tail call i32 @dealloc_uivector(i32* %15, i32 %10)
%193 = uitofp i32 %141 to double
%194 = fdiv double %189, %193
%195 = uitofp i32 %142 to double
%196 = fdiv double %190, %195
%197 = fadd double %194, %196
ret double %197
}