#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*/ exit(int);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(double *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, int);
double sqrt(double);
int color_feature_standard_deviation(int **obj_id, int width, int height,
                                     int n_object, int *area,
                                     unsigned char *image, double *mean,
                                     double *color_std_dev) {
  unsigned int i = 0, j = 0;
  double *sum = NULL;
  sum = (double *)malloc(n_object * sizeof(double));
  if (sum == NULL) {
    printf("color_feature_standard_deviation:Cannot allocate %d bytes for "
           "memory.\n",
           (n_object * sizeof(double)));
    exit(-1);
  }
  memset(sum, 0, sizeof(n_object * sizeof(double)));
  for (i = 0; i < height; i++) {
    for (j = 0; j < width; j++) {
      if (!obj_id[i][j])
        continue;
      register unsigned int idx = (j + i * width) * 3;
      unsigned char val = ((unsigned char)(0.2126 * (double)(image[idx])) +
                           (unsigned char)(0.7152 * (double)(image[idx + 1])) +
                           (unsigned char)(0.0722 * (double)(image[idx + 2])));
      double tmp = ((double)val - mean[obj_id[i][j] - 1]);
      sum[obj_id[i][j] - 1] += (tmp * tmp);
    }
  }
  for (i = 0; i < n_object; i++) {
    color_std_dev[i] = sqrt(sum[i] / area[i]);
  }
  free(sum);
  return 1;
}


x86 assembly (clang, -O0):
<color_feature_standard_deviation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    11d9 <color_feature_standard_deviation+0x79>
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%esi
lea    0xe4e(%rip),%rdi
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>
mov    -0x38(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1050 <memset@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jae    1327 <color_feature_standard_deviation+0x1c7>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1314 <color_feature_standard_deviation+0x1b4>
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    -0x30(%rbp),%ecx
cmpl   $0x0,(%rax,%rcx,4)
jne    122c <color_feature_standard_deviation+0xcc>
jmp    1306 <color_feature_standard_deviation+0x1a6>
mov    -0x30(%rbp),%ecx
mov    -0x2c(%rbp),%eax
mov    -0xc(%rbp),%edx
imul   %edx,%eax
add    %eax,%ecx
mov    %ecx,%eax
lea    (%rax,%rax,2),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x28(%rbp),%rcx
mov    -0x3c(%rbp),%eax
mov    %eax,%edx
movzbl (%rcx,%rax,1),%eax
cvtsi2sd %eax,%xmm0
movsd  0xda5(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %edx,%esi
add    $0x1,%esi
movzbl (%rcx,%rsi,1),%esi
cvtsi2sd %esi,%xmm0
movsd  0xd90(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
add    %esi,%eax
add    $0x2,%edx
movzbl (%rcx,%rdx,1),%ecx
cvtsi2sd %ecx,%xmm0
movsd  0xd7b(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ecx
add    %ecx,%eax
mov    %al,-0x3d(%rbp)
movzbl -0x3d(%rbp),%eax
cvtsi2sd %eax,%xmm0
mov    0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    -0x2c(%rbp),%edx
mov    (%rcx,%rdx,8),%rcx
mov    -0x30(%rbp),%edx
mov    (%rcx,%rdx,4),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
mov    -0x38(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    -0x2c(%rbp),%edx
mov    (%rcx,%rdx,8),%rcx
mov    -0x30(%rbp),%edx
mov    (%rcx,%rdx,4),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1203 <color_feature_standard_deviation+0xa3>
jmp    1319 <color_feature_standard_deviation+0x1b9>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11f0 <color_feature_standard_deviation+0x90>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    1375 <color_feature_standard_deviation+0x215>
mov    -0x38(%rbp),%rax
mov    -0x2c(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x2c(%rbp),%ecx
cvtsi2sdl (%rax,%rcx,4),%xmm1
divsd  %xmm1,%xmm0
call   1070 <sqrt@plt>
mov    0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    132e <color_feature_standard_deviation+0x1ce>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    $0x1,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<color_feature_standard_deviation>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9,%rbx
mov    %r8,0x18(%rsp)
mov    %edx,%r15d
mov    %rsi,0x8(%rsp)
mov    %rdi,0x20(%rsp)
mov    %rcx,0x10(%rsp)
lea    0x0(,%rcx,8),%ebp
mov    %ebp,%edi
call   1060 <malloc@plt>
test   %rax,%rax
je     13a6 <color_feature_standard_deviation+0x246>
mov    %rax,%r12
xor    %r14d,%r14d
mov    %rax,%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1050 <memset@plt>
test   %r15d,%r15d
je     12a7 <color_feature_standard_deviation+0x147>
mov    0x60(%rsp),%r10
mov    %r15d,%r8d
mov    0x8(%rsp),%rax
mov    %eax,%r13d
lea    (%rax,%rax,2),%r9d
movsd  0xe27(%rip),%xmm0
movsd  0xe27(%rip),%xmm1
movsd  0xe27(%rip),%xmm2
xor    %r11d,%r11d
jmp    1200 <color_feature_standard_deviation+0xa0>
xchg   %ax,%ax
add    $0x1,%r11
add    %r9d,%r14d
cmp    %r8,%r11
je     12a7 <color_feature_standard_deviation+0x147>
cmpl   $0x0,0x8(%rsp)
je     11f0 <color_feature_standard_deviation+0x90>
mov    0x20(%rsp),%rax
mov    (%rax,%r11,8),%rcx
mov    %r14d,%ebp
xor    %esi,%esi
jmp    122c <color_feature_standard_deviation+0xcc>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rsi
add    $0x3,%ebp
cmp    %rsi,%r13
je     11f0 <color_feature_standard_deviation+0x90>
movslq (%rcx,%rsi,4),%rax
test   %rax,%rax
je     1220 <color_feature_standard_deviation+0xc0>
mov    %ebp,%edi
movzbl (%rbx,%rdi,1),%edi
xorps  %xmm3,%xmm3
cvtsi2sd %edi,%xmm3
mulsd  %xmm0,%xmm3
cvttsd2si %xmm3,%edi
lea    0x1(%rbp),%r15d
movzbl (%rbx,%r15,1),%edx
xorps  %xmm3,%xmm3
cvtsi2sd %edx,%xmm3
mulsd  %xmm1,%xmm3
cvttsd2si %xmm3,%edx
add    %dil,%dl
lea    0x2(%rbp),%edi
movzbl (%rbx,%rdi,1),%edi
xorps  %xmm3,%xmm3
cvtsi2sd %edi,%xmm3
mulsd  %xmm2,%xmm3
cvttsd2si %xmm3,%edi
add    %dl,%dil
movzbl %dil,%edx
xorps  %xmm3,%xmm3
cvtsi2sd %edx,%xmm3
subsd  -0x8(%r10,%rax,8),%xmm3
mulsd  %xmm3,%xmm3
addsd  -0x8(%r12,%rax,8),%xmm3
movsd  %xmm3,-0x8(%r12,%rax,8)
jmp    1220 <color_feature_standard_deviation+0xc0>
mov    0x10(%rsp),%rax
test   %eax,%eax
mov    0x18(%rsp),%rbx
je     138a <color_feature_standard_deviation+0x22a>
mov    0x68(%rsp),%r14
mov    %eax,%r15d
cmp    $0x1,%eax
jne    12fb <color_feature_standard_deviation+0x19b>
xor    %ebp,%ebp
test   $0x1,%r15b
je     138a <color_feature_standard_deviation+0x22a>
movsd  (%r12,%rbp,8),%xmm0
xorps  %xmm1,%xmm1
cvtsi2sdl (%rbx,%rbp,4),%xmm1
divsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     137f <color_feature_standard_deviation+0x21f>
sqrtsd %xmm0,%xmm0
jmp    1384 <color_feature_standard_deviation+0x224>
mov    %r15d,%r13d
and    $0xfffffffe,%r13d
xor    %ebp,%ebp
xorpd  %xmm2,%xmm2
jmp    1329 <color_feature_standard_deviation+0x1c9>
nopw   0x0(%rax,%rax,1)
call   1070 <sqrt@plt>
xorpd  %xmm2,%xmm2
movsd  %xmm0,0x8(%r14,%rbp,8)
add    $0x2,%rbp
cmp    %rbp,%r13
je     12c8 <color_feature_standard_deviation+0x168>
xorps  %xmm1,%xmm1
cvtsi2sdl (%rbx,%rbp,4),%xmm1
movsd  (%r12,%rbp,8),%xmm0
divsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jb     1350 <color_feature_standard_deviation+0x1f0>
sqrtsd %xmm0,%xmm0
jmp    1359 <color_feature_standard_deviation+0x1f9>
nopw   0x0(%rax,%rax,1)
call   1070 <sqrt@plt>
xorpd  %xmm2,%xmm2
movsd  %xmm0,(%r14,%rbp,8)
xorps  %xmm1,%xmm1
cvtsi2sdl 0x4(%rbx,%rbp,4),%xmm1
movsd  0x8(%r12,%rbp,8),%xmm0
divsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jb     1310 <color_feature_standard_deviation+0x1b0>
sqrtsd %xmm0,%xmm0
jmp    1319 <color_feature_standard_deviation+0x1b9>
call   1070 <sqrt@plt>
movsd  %xmm0,(%r14,%rbp,8)
mov    %r12,%rdi
call   1030 <free@plt>
mov    $0x1,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xc6b(%rip),%rdi
mov    %ebp,%esi
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [71 x i8] c"color_feature_standard_deviation:Cannot allocate %d bytes for memory.\0A\00"
define i32 @color_feature_standard_deviation(i32** %0, i32 %1, i32 %2, i32 %3, i32* %4, i8* %5, double* %6, double* %7) {
%9 = alloca i32**
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i8*
%15 = alloca double*
%16 = alloca double*
%17 = alloca i32
%18 = alloca i32
%19 = alloca double*
%20 = alloca i32
%21 = alloca i8
%22 = alloca double
store i32** %0, i32*** %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32* %4, i32** %13
store i8* %5, i8** %14
store double* %6, double** %15
store double* %7, double** %16
store i32 0, i32* %17
store i32 0, i32* %18
store double* null, double** %19
%23 = load i32, i32* %12
%24 = sext i32 %23 to i64
%25 = mul i64 %24, 8
%26 = trunc i64 %25 to i32
%27 = call i64 @malloc(i32 %26)
%28 = inttoptr i64 %27 to double*
store double* %28, double** %19
%29 = load double*, double** %19
%30 = icmp eq double* %29, null
br i1 %30, label %31, label %38
31: ; preds = %8
%32 = load i32, i32* %12
%33 = sext i32 %32 to i64
%34 = mul i64 %33, 8
%35 = trunc i64 %34 to i32
%36 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i32 %35)
%37 = call i32 @exit(i32 -1)
unreachable
38: ; preds = %8
%39 = load double*, double** %19
%40 = call i32 @memset(double* %39, i32 0, i32 8)
store i32 0, i32* %17
br label %41
41: ; preds = %139, %38
%42 = load i32, i32* %17
%43 = load i32, i32* %11
%44 = icmp ult i32 %42, %43
br i1 %44, label %45, label %142
45: ; preds = %41
store i32 0, i32* %18
br label %46
46: ; preds = %135, %45
%47 = load i32, i32* %18
%48 = load i32, i32* %10
%49 = icmp ult i32 %47, %48
br i1 %49, label %50, label %138
50: ; preds = %46
%51 = load i32**, i32*** %9
%52 = load i32, i32* %17
%53 = zext i32 %52 to i64
%54 = getelementptr inbounds i32*, i32** %51, i64 %53
%55 = load i32*, i32** %54
%56 = load i32, i32* %18
%57 = zext i32 %56 to i64
%58 = getelementptr inbounds i32, i32* %55, i64 %57
%59 = load i32, i32* %58
%60 = icmp ne i32 %59, 0
br i1 %60, label %62, label %61
61: ; preds = %50
br label %135
62: ; preds = %50
%63 = load i32, i32* %18
%64 = load i32, i32* %17
%65 = load i32, i32* %10
%66 = mul i32 %64, %65
%67 = add i32 %63, %66
%68 = mul i32 %67, 3
store i32 %68, i32* %20
%69 = load i8*, i8** %14
%70 = load i32, i32* %20
%71 = zext i32 %70 to i64
%72 = getelementptr inbounds i8, i8* %69, i64 %71
%73 = load i8, i8* %72
%74 = uitofp i8 %73 to double
%75 = fmul double 2.126000e-01, %74
%76 = fptoui double %75 to i8
%77 = zext i8 %76 to i32
%78 = load i8*, i8** %14
%79 = load i32, i32* %20
%80 = add i32 %79, 1
%81 = zext i32 %80 to i64
%82 = getelementptr inbounds i8, i8* %78, i64 %81
%83 = load i8, i8* %82
%84 = uitofp i8 %83 to double
%85 = fmul double 7.152000e-01, %84
%86 = fptoui double %85 to i8
%87 = zext i8 %86 to i32
%88 = add nsw i32 %77, %87
%89 = load i8*, i8** %14
%90 = load i32, i32* %20
%91 = add i32 %90, 2
%92 = zext i32 %91 to i64
%93 = getelementptr inbounds i8, i8* %89, i64 %92
%94 = load i8, i8* %93
%95 = uitofp i8 %94 to double
%96 = fmul double 7.220000e-02, %95
%97 = fptoui double %96 to i8
%98 = zext i8 %97 to i32
%99 = add nsw i32 %88, %98
%100 = trunc i32 %99 to i8
store i8 %100, i8* %21
%101 = load i8, i8* %21
%102 = uitofp i8 %101 to double
%103 = load double*, double** %15
%104 = load i32**, i32*** %9
%105 = load i32, i32* %17
%106 = zext i32 %105 to i64
%107 = getelementptr inbounds i32*, i32** %104, i64 %106
%108 = load i32*, i32** %107
%109 = load i32, i32* %18
%110 = zext i32 %109 to i64
%111 = getelementptr inbounds i32, i32* %108, i64 %110
%112 = load i32, i32* %111
%113 = sub nsw i32 %112, 1
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds double, double* %103, i64 %114
%116 = load double, double* %115
%117 = fsub double %102, %116
store double %117, double* %22
%118 = load double, double* %22
%119 = load double, double* %22
%120 = load double*, double** %19
%121 = load i32**, i32*** %9
%122 = load i32, i32* %17
%123 = zext i32 %122 to i64
%124 = getelementptr inbounds i32*, i32** %121, i64 %123
%125 = load i32*, i32** %124
%126 = load i32, i32* %18
%127 = zext i32 %126 to i64
%128 = getelementptr inbounds i32, i32* %125, i64 %127
%129 = load i32, i32* %128
%130 = sub nsw i32 %129, 1
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds double, double* %120, i64 %131
%133 = load double, double* %132
%134 = call double @llvm.fmuladd.f64(double %118, double %119, double %133)
store double %134, double* %132
br label %135
135: ; preds = %62, %61
%136 = load i32, i32* %18
%137 = add i32 %136, 1
store i32 %137, i32* %18
br label %46
138: ; preds = %46
br label %139
139: ; preds = %138
%140 = load i32, i32* %17
%141 = add i32 %140, 1
store i32 %141, i32* %17
br label %41
142: ; preds = %41
store i32 0, i32* %17
br label %143
143: ; preds = %165, %142
%144 = load i32, i32* %17
%145 = load i32, i32* %12
%146 = icmp ult i32 %144, %145
br i1 %146, label %147, label %168
147: ; preds = %143
%148 = load double*, double** %19
%149 = load i32, i32* %17
%150 = zext i32 %149 to i64
%151 = getelementptr inbounds double, double* %148, i64 %150
%152 = load double, double* %151
%153 = load i32*, i32** %13
%154 = load i32, i32* %17
%155 = zext i32 %154 to i64
%156 = getelementptr inbounds i32, i32* %153, i64 %155
%157 = load i32, i32* %156
%158 = sitofp i32 %157 to double
%159 = fdiv double %152, %158
%160 = call double @sqrt(double %159)
%161 = load double*, double** %16
%162 = load i32, i32* %17
%163 = zext i32 %162 to i64
%164 = getelementptr inbounds double, double* %161, i64 %163
store double %160, double* %164
br label %165
165: ; preds = %147
%166 = load i32, i32* %17
%167 = add i32 %166, 1
store i32 %167, i32* %17
br label %143
168: ; preds = %143
%169 = load double*, double** %19
%170 = call i32 @free(double* %169)
ret i32 1
}

LLVM IR (-O2):
@.str = [71 x i8] c"color_feature_standard_deviation:Cannot allocate %d bytes for memory.\0A\00"
define i32 @color_feature_standard_deviation(i32** nocapture %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i8* nocapture %5, double* nocapture %6, double* nocapture writeonly %7) {
%9 = shl i32 %3, 3
%10 = tail call i64 @malloc(i32 %9)
%11 = inttoptr i64 %10 to double*
%12 = icmp eq i64 %10, 0
br i1 %12, label %13, label %16
13: ; preds = %8
%14 = tail call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i32 %9)
%15 = tail call i32 @exit(i32 -1)
unreachable
16: ; preds = %8
%17 = tail call i32 @memset(double* %11, i32 0, i32 8)
%18 = icmp eq i32 %2, 0
br i1 %18, label %30, label %19
19: ; preds = %16
%20 = icmp eq i32 %1, 0
%21 = zext i32 %2 to i64
%22 = zext i32 %1 to i64
br label %23
23: ; preds = %19, %81
%24 = phi i64 [ 0, %19 ], [ %82, %81 ]
br i1 %20, label %81, label %25
25: ; preds = %23
%26 = getelementptr inbounds i32*, i32** %0, i64 %24
%27 = load i32*, i32** %26
%28 = trunc i64 %24 to i32
%29 = mul i32 %28, %1
br label %38
30: ; preds = %81, %16
%31 = icmp eq i32 %3, 0
br i1 %31, label %119, label %32
32: ; preds = %30
%33 = zext i32 %3 to i64
%34 = and i64 %33, 1
%35 = icmp eq i32 %3, 1
br i1 %35, label %107, label %36
36: ; preds = %32
%37 = and i64 %33, 4294967294
br label %84
38: ; preds = %25, %78
%39 = phi i64 [ 0, %25 ], [ %79, %78 ]
%40 = getelementptr inbounds i32, i32* %27, i64 %39
%41 = load i32, i32* %40
%42 = icmp eq i32 %41, 0
br i1 %42, label %78, label %43
43: ; preds = %38
%44 = trunc i64 %39 to i32
%45 = add i32 %29, %44
%46 = mul i32 %45, 3
%47 = zext i32 %46 to i64
%48 = getelementptr inbounds i8, i8* %5, i64 %47
%49 = load i8, i8* %48
%50 = uitofp i8 %49 to double
%51 = fmul double %50, 2.126000e-01
%52 = fptoui double %51 to i8
%53 = add i32 %46, 1
%54 = zext i32 %53 to i64
%55 = getelementptr inbounds i8, i8* %5, i64 %54
%56 = load i8, i8* %55
%57 = uitofp i8 %56 to double
%58 = fmul double %57, 7.152000e-01
%59 = fptoui double %58 to i8
%60 = add i8 %59, %52
%61 = add i32 %46, 2
%62 = zext i32 %61 to i64
%63 = getelementptr inbounds i8, i8* %5, i64 %62
%64 = load i8, i8* %63
%65 = uitofp i8 %64 to double
%66 = fmul double %65, 7.220000e-02
%67 = fptoui double %66 to i8
%68 = add i8 %60, %67
%69 = uitofp i8 %68 to double
%70 = add nsw i32 %41, -1
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds double, double* %6, i64 %71
%73 = load double, double* %72
%74 = fsub double %69, %73
%75 = getelementptr inbounds double, double* %11, i64 %71
%76 = load double, double* %75
%77 = tail call double @llvm.fmuladd.f64(double %74, double %74, double %76)
store double %77, double* %75
br label %78
78: ; preds = %38, %43
%79 = add nuw nsw i64 %39, 1
%80 = icmp eq i64 %79, %22
br i1 %80, label %81, label %38
81: ; preds = %78, %23
%82 = add nuw nsw i64 %24, 1
%83 = icmp eq i64 %82, %21
br i1 %83, label %30, label %23
84: ; preds = %84, %36
%85 = phi i64 [ 0, %36 ], [ %104, %84 ]
%86 = phi i64 [ 0, %36 ], [ %105, %84 ]
%87 = getelementptr inbounds double, double* %11, i64 %85
%88 = load double, double* %87
%89 = getelementptr inbounds i32, i32* %4, i64 %85
%90 = load i32, i32* %89
%91 = sitofp i32 %90 to double
%92 = fdiv double %88, %91
%93 = tail call double @sqrt(double %92)
%94 = getelementptr inbounds double, double* %7, i64 %85
store double %93, double* %94
%95 = or i64 %85, 1
%96 = getelementptr inbounds double, double* %11, i64 %95
%97 = load double, double* %96
%98 = getelementptr inbounds i32, i32* %4, i64 %95
%99 = load i32, i32* %98
%100 = sitofp i32 %99 to double
%101 = fdiv double %97, %100
%102 = tail call double @sqrt(double %101)
%103 = getelementptr inbounds double, double* %7, i64 %95
store double %102, double* %103
%104 = add nuw nsw i64 %85, 2
%105 = add i64 %86, 2
%106 = icmp eq i64 %105, %37
br i1 %106, label %107, label %84
107: ; preds = %84, %32
%108 = phi i64 [ 0, %32 ], [ %104, %84 ]
%109 = icmp eq i64 %34, 0
br i1 %109, label %119, label %110
110: ; preds = %107
%111 = getelementptr inbounds double, double* %11, i64 %108
%112 = load double, double* %111
%113 = getelementptr inbounds i32, i32* %4, i64 %108
%114 = load i32, i32* %113
%115 = sitofp i32 %114 to double
%116 = fdiv double %112, %115
%117 = tail call double @sqrt(double %116)
%118 = getelementptr inbounds double, double* %7, i64 %108
store double %117, double* %118
br label %119
119: ; preds = %110, %107, %30
%120 = tail call i32 @free(double* %11)
ret i32 1
}