#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 EucDist(double, double);
double min3(double, double, double);
double dtw1dBandConst_old(double *x, double *y, int x_len, int y_len,
                          double *cost, int dist_type, int bandwidth,
                          double bsf, double *accLB) {
  int i, j, ind, overflow;
  double min_vals, leftLB, temp;
  cost[0] = EucDist(x[0], y[0]);
  for (i = 1; i <= bandwidth; i++) {
    cost[i * y_len] = EucDist(x[i], y[0]) + cost[(i - 1) * y_len];
  }
  for (j = 1; j <= bandwidth; j++) {
    cost[j] = EucDist(x[0], y[j]) + cost[(j - 1)];
  }
  for (i = 1; i < x_len; i++) {
    ind = i * y_len;
    for (j = (((1) > (i - bandwidth)) ? (1) : (i - bandwidth));
         j < (((y_len) < (i + bandwidth)) ? (y_len) : (i + bandwidth)); j++) {
      min_vals = min3(cost[ind - y_len + j], cost[ind - y_len + (j - 1)],
                      cost[ind + (j - 1)]);
      cost[ind + j] = EucDist(x[i], y[j]) + min_vals;
    }
  }
  return cost[(x_len * y_len) - 1];
}


x86 assembly (clang, -O0):
<dtw1dBandConst_old>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
call   1030 <EucDist@plt>
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    0x10(%rbp),%eax
jg     11cb <dtw1dBandConst_old+0xab>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
call   1030 <EucDist@plt>
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
imul   -0x18(%rbp),%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x18(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    116e <dtw1dBandConst_old+0x4e>
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    0x10(%rbp),%eax
jg     1225 <dtw1dBandConst_old+0x105>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
call   1030 <EucDist@plt>
mov    -0x20(%rbp),%rax
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11d2 <dtw1dBandConst_old+0xb2>
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1351 <dtw1dBandConst_old+0x231>
mov    -0x34(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x34(%rbp),%ecx
sub    0x10(%rbp),%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
jle    1262 <dtw1dBandConst_old+0x142>
mov    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    126b <dtw1dBandConst_old+0x14b>
mov    -0x34(%rbp),%eax
sub    0x10(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x34(%rbp),%ecx
add    0x10(%rbp),%ecx
cmp    %ecx,%eax
jge    1293 <dtw1dBandConst_old+0x173>
mov    -0x18(%rbp),%eax
mov    %eax,-0x64(%rbp)
jmp    129c <dtw1dBandConst_old+0x17c>
mov    -0x34(%rbp),%eax
add    0x10(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x60(%rbp),%eax
mov    -0x64(%rbp),%ecx
cmp    %ecx,%eax
jge    133e <dtw1dBandConst_old+0x21e>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
sub    -0x18(%rbp),%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
sub    -0x18(%rbp),%ecx
mov    -0x38(%rbp),%edx
sub    $0x1,%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
mov    -0x38(%rbp),%edx
sub    $0x1,%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
call   1040 <min3@plt>
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
call   1030 <EucDist@plt>
addsd  -0x48(%rbp),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1271 <dtw1dBandConst_old+0x151>
jmp    1343 <dtw1dBandConst_old+0x223>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    122c <dtw1dBandConst_old+0x10c>
mov    -0x20(%rbp),%rax
mov    -0x14(%rbp),%ecx
imul   -0x18(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtw1dBandConst_old>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r8,%rbp
mov    %ecx,%ebx
mov    %edx,0x4(%rsp)
mov    %rsi,%r15
mov    %rdi,%r13
mov    0xa0(%rsp),%r12d
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
call   1030 <EucDist@plt>
movsd  %xmm0,0x0(%rbp)
mov    %ebx,0x10(%rsp)
movslq %ebx,%rax
mov    %rax,0x20(%rsp)
test   %r12d,%r12d
mov    %rbp,0x18(%rsp)
jle    11f6 <dtw1dBandConst_old+0xd6>
lea    0x1(%r12),%r14d
mov    %rbp,%rbx
mov    0x20(%rsp),%rax
lea    0x0(,%rax,8),%r12
mov    $0x1,%ebp
nopl   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rbp,8),%xmm0
movsd  (%r15),%xmm1
call   1030 <EucDist@plt>
addsd  (%rbx),%xmm0
movsd  %xmm0,(%rbx,%r12,1)
add    %r12,%rbx
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1190 <dtw1dBandConst_old+0x70>
mov    0xa0(%rsp),%r12d
test   %r12d,%r12d
mov    0x18(%rsp),%rbp
jle    11f6 <dtw1dBandConst_old+0xd6>
mov    $0x1,%ebx
xchg   %ax,%ax
movsd  0x0(%r13),%xmm0
movsd  (%r15,%rbx,8),%xmm1
call   1030 <EucDist@plt>
addsd  -0x8(%rbp,%rbx,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    11d0 <dtw1dBandConst_old+0xb0>
mov    %r13,0x40(%rsp)
mov    %r15,0x48(%rsp)
cmpl   $0x2,0x4(%rsp)
jl     1385 <dtw1dBandConst_old+0x265>
mov    $0x1,%esi
sub    %r12d,%esi
movslq %r12d,%rax
mov    %rax,0x38(%rsp)
mov    0x4(%rsp),%eax
mov    %rax,0x30(%rsp)
mov    0x18(%rsp),%rax
mov    0x20(%rsp),%rcx
lea    (%rax,%rcx,8),%r12
lea    0x0(,%rcx,8),%rax
mov    %rax,0x28(%rsp)
mov    $0x1,%eax
mov    %rax,0x8(%rsp)
movabs $0xffffffff00000000,%rbx
ff ff ff
movabs $0x100000000,%r13
mov    0x18(%rsp),%r15
jmp    1298 <dtw1dBandConst_old+0x178>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x8(%rsp),%rcx
add    $0x1,%rcx
mov    0x14(%rsp),%esi
add    $0x1,%esi
add    0x28(%rsp),%r12
mov    %rcx,%rax
mov    %rcx,0x8(%rsp)
cmp    0x30(%rsp),%rcx
je     1385 <dtw1dBandConst_old+0x265>
cmp    $0x2,%esi
mov    $0x1,%r14d
mov    %esi,0x14(%rsp)
cmovge %esi,%r14d
mov    0x8(%rsp),%rsi
mov    %rsi,%rcx
mov    0x38(%rsp),%rbp
sub    %rbp,%rcx
cmp    $0x2,%rcx
mov    $0x1,%eax
cmovl  %eax,%ecx
lea    (%rsi,%rbp,1),%rax
cmp    0x20(%rsp),%rax
cmovg  0x10(%rsp),%eax
cmp    %ecx,%eax
jle    1270 <dtw1dBandConst_old+0x150>
shl    $0x20,%r14
mov    0x8(%rsp),%r9
mov    0x20(%rsp),%r8
imul   %r8,%r9
mov    0x14(%rsp),%ecx
cmp    $0x2,%ecx
mov    $0x1,%ebp
cmovge %ecx,%ebp
sub    %r8,%r9
mov    %r9,0x58(%rsp)
cltq
mov    %rax,0x50(%rsp)
nopw   0x0(%rax,%rax,1)
mov    %r14,%rax
sar    $0x20,%rax
mov    0x58(%rsp),%rcx
add    %rcx,%rax
movsd  (%r15,%rax,8),%xmm0
lea    (%r14,%rbx,1),%rax
sar    $0x20,%rax
add    %rcx,%rax
movsd  (%r15,%rax,8),%xmm1
movsd  -0x8(%r12,%rbp,8),%xmm2
call   1040 <min3@plt>
movsd  %xmm0,0x60(%rsp)
mov    0x8(%rsp),%rax
mov    0x40(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm0
mov    0x48(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm1
call   1030 <EucDist@plt>
addsd  0x60(%rsp),%xmm0
movsd  %xmm0,(%r12,%rbp,8)
add    $0x1,%rbp
add    %r13,%r14
cmp    0x50(%rsp),%rbp
jl     1310 <dtw1dBandConst_old+0x1f0>
jmp    1270 <dtw1dBandConst_old+0x150>
mov    0x10(%rsp),%eax
imul   0x4(%rsp),%eax
cltq
mov    0x18(%rsp),%rcx
movsd  -0x8(%rcx,%rax,8),%xmm0
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define double @dtw1dBandConst_old(double* nocapture %0, double* nocapture %1, i32 %2, i32 %3, double* nocapture %4, i32 %5, i32 %6, double %7, double* nocapture readnone %8) {
%10 = load double, double* %0
%11 = load double, double* %1
%12 = tail call double @EucDist(double %10, double %11)
store double %12, double* %4
%13 = icmp slt i32 %6, 1
br i1 %13, label %37, label %14
14: ; preds = %9
%15 = sext i32 %3 to i64
%16 = add nuw i32 %6, 1
%17 = zext i32 %16 to i64
br label %22
18: ; preds = %22
br i1 %13, label %37, label %19
19: ; preds = %18
%20 = add nuw i32 %6, 1
%21 = zext i32 %20 to i64
br label %44
22: ; preds = %14, %22
%23 = phi i64 [ 1, %14 ], [ %35, %22 ]
%24 = getelementptr inbounds double, double* %0, i64 %23
%25 = load double, double* %24
%26 = load double, double* %1
%27 = tail call double @EucDist(double %25, double %26)
%28 = add nsw i64 %23, -1
%29 = mul nsw i64 %28, %15
%30 = getelementptr inbounds double, double* %4, i64 %29
%31 = load double, double* %30
%32 = fadd double %27, %31
%33 = mul nsw i64 %23, %15
%34 = getelementptr inbounds double, double* %4, i64 %33
store double %32, double* %34
%35 = add nuw nsw i64 %23, 1
%36 = icmp eq i64 %35, %17
br i1 %36, label %18, label %22
37: ; preds = %44, %9, %18
%38 = icmp sgt i32 %2, 1
br i1 %38, label %39, label %107
39: ; preds = %37
%40 = sub i32 1, %6
%41 = sext i32 %3 to i64
%42 = sext i32 %6 to i64
%43 = zext i32 %2 to i64
br label %57
44: ; preds = %19, %44
%45 = phi i64 [ 1, %19 ], [ %55, %44 ]
%46 = load double, double* %0
%47 = getelementptr inbounds double, double* %1, i64 %45
%48 = load double, double* %47
%49 = tail call double @EucDist(double %46, double %48)
%50 = add nsw i64 %45, -1
%51 = getelementptr inbounds double, double* %4, i64 %50
%52 = load double, double* %51
%53 = fadd double %49, %52
%54 = getelementptr inbounds double, double* %4, i64 %45
store double %53, double* %54
%55 = add nuw nsw i64 %45, 1
%56 = icmp eq i64 %55, %21
br i1 %56, label %37, label %44
57: ; preds = %39, %103
%58 = phi i64 [ 1, %39 ], [ %104, %103 ]
%59 = phi i32 [ %40, %39 ], [ %105, %103 ]
%60 = mul nsw i64 %58, %41
%61 = sub nsw i64 %58, %42
%62 = icmp sgt i64 %61, 1
%63 = select i1 %62, i64 %61, i64 1
%64 = trunc i64 %63 to i32
%65 = add nsw i64 %58, %42
%66 = icmp sgt i64 %65, %41
%67 = trunc i64 %65 to i32
%68 = select i1 %66, i32 %3, i32 %67
%69 = icmp sgt i32 %68, %64
br i1 %69, label %70, label %103
70: ; preds = %57
%71 = call i32 @llvm.smax.i32(i32 %59, i32 1)
%72 = zext i32 %71 to i64
%73 = sub nsw i64 %60, %41
%74 = getelementptr inbounds double, double* %0, i64 %58
%75 = sext i32 %68 to i64
br label %76
76: ; preds = %70, %76
%77 = phi i64 [ %72, %70 ], [ %101, %76 ]
%78 = shl i64 %77, 32
%79 = ashr exact i64 %78, 32
%80 = add nsw i64 %79, %73
%81 = getelementptr inbounds double, double* %4, i64 %80
%82 = load double, double* %81
%83 = add nsw i64 %77, -1
%84 = shl i64 %77, 32
%85 = add i64 %84, -4294967296
%86 = ashr exact i64 %85, 32
%87 = add nsw i64 %86, %73
%88 = getelementptr inbounds double, double* %4, i64 %87
%89 = load double, double* %88
%90 = add nsw i64 %83, %60
%91 = getelementptr inbounds double, double* %4, i64 %90
%92 = load double, double* %91
%93 = tail call double @min3(double %82, double %89, double %92)
%94 = load double, double* %74
%95 = getelementptr inbounds double, double* %1, i64 %77
%96 = load double, double* %95
%97 = tail call double @EucDist(double %94, double %96)
%98 = fadd double %93, %97
%99 = add nsw i64 %77, %60
%100 = getelementptr inbounds double, double* %4, i64 %99
store double %98, double* %100
%101 = add nuw nsw i64 %77, 1
%102 = icmp slt i64 %101, %75
br i1 %102, label %76, label %103
103: ; preds = %76, %57
%104 = add nuw nsw i64 %58, 1
%105 = add i32 %59, 1
%106 = icmp eq i64 %104, %43
br i1 %106, label %107, label %57
107: ; preds = %103, %37
%108 = mul nsw i32 %3, %2
%109 = add nsw i32 %108, -1
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds double, double* %4, i64 %110
%112 = load double, double* %111
ret double %112
}