; LLVM IR from sp-nitech/SPTK :: third_party/SWIPE/vector.ll (ZN4sptk5swipe7polyfitENS0_6vectorES1_i)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.sptk::swipe::vector" = type { i32, ptr }
%"struct.sptk::swipe::matrix" = type { i32, i32, ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i32, ptr } @_ZN4sptk5swipe5zerovEi(i32 noundef) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, ptr } @_ZN4sptk5swipe5makemEii(i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, ptr } @_ZN4sptk5swipe5zeromEii(i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4sptk5swipe5freemENS0_6matrixE(i64, ptr) #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

; Function Attrs: mustprogress uwtable
define dso_local { i32, ptr } @_ZN4sptk5swipe7polyfitENS0_6vectorES1_i(i32 %0, ptr %1, i32 %2, ptr %3, i32 noundef %4) #4 {
  %6 = alloca %"struct.sptk::swipe::vector", align 8
  %7 = alloca %"struct.sptk::swipe::vector", align 8
  %8 = alloca %"struct.sptk::swipe::vector", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"struct.sptk::swipe::matrix", align 8
  %14 = alloca %"struct.sptk::swipe::matrix", align 8
  %15 = alloca ptr, align 8
  %16 = alloca double, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"struct.sptk::swipe::matrix", align 8
  %19 = alloca %"struct.sptk::swipe::matrix", align 8
  %20 = getelementptr inbounds { i32, ptr }, ptr %7, i32 0, i32 0
  store i32 %0, ptr %20, align 8
  %21 = getelementptr inbounds { i32, ptr }, ptr %7, i32 0, i32 1
  store ptr %1, ptr %21, align 8
  %22 = getelementptr inbounds { i32, ptr }, ptr %8, i32 0, i32 0
  store i32 %2, ptr %22, align 8
  %23 = getelementptr inbounds { i32, ptr }, ptr %8, i32 0, i32 1
  store ptr %3, ptr %23, align 8
  store i32 %4, ptr %9, align 4, !tbaa !5
  %24 = load i32, ptr %9, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  %26 = load i32, ptr %9, align 4, !tbaa !5
  %27 = getelementptr inbounds %"struct.sptk::swipe::vector", ptr %7, i32 0, i32 0
  %28 = load i32, ptr %27, align 8, !tbaa !9
  %29 = call { i64, ptr } @_ZN4sptk5swipe5makemEii(i32 noundef %26, i32 noundef %28)
  %30 = getelementptr inbounds { i64, ptr }, ptr %13, i32 0, i32 0
  %31 = extractvalue { i64, ptr } %29, 0
  store i64 %31, ptr %30, align 8
  %32 = getelementptr inbounds { i64, ptr }, ptr %13, i32 0, i32 1
  %33 = extractvalue { i64, ptr } %29, 1
  store ptr %33, ptr %32, align 8
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %69, %5
  %35 = load i32, ptr %10, align 4, !tbaa !5
  %36 = load i32, ptr %9, align 4, !tbaa !5
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %38, label %72

38:                                               ; preds = %34
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %65, %38
  %40 = load i32, ptr %11, align 4, !tbaa !5
  %41 = getelementptr inbounds %"struct.sptk::swipe::vector", ptr %7, i32 0, i32 0
  %42 = load i32, ptr %41, align 8, !tbaa !9
  %43 = icmp slt i32 %40, %42
  br i1 %43, label %44, label %68

44:                                               ; preds = %39
  %45 = getelementptr inbounds %"struct.sptk::swipe::vector", ptr %7, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8, !tbaa !12
  %47 = load i32, ptr %11, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds double, ptr %46, i64 %48
  %50 = load double, ptr %49, align 8, !tbaa !13
  %51 = load i32, ptr %9, align 4, !tbaa !5
  %52 = load i32, ptr %10, align 4, !tbaa !5
  %53 = sub nsw i32 %51, %52
  %54 = sub nsw i32 %53, 1
  %55 = call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %50, i32 noundef %54)
  %56 = getelementptr inbounds %"struct.sptk::swipe::matrix", ptr %13, i32 0, i32 2
  %57 = load ptr, ptr %56, align 8, !tbaa !15
  %58 = load i32, ptr %10, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds ptr, ptr %57, i64 %59
  %61 = load ptr, ptr %60, align 8, !tbaa !17
  %62 = load i32, ptr %11, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds double, ptr %61, i64 %63
  store double %55, ptr %64, align 8, !tbaa !13
  br label %65

65:                                               ; preds = %44
  %66 = load i32, ptr %11, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %11, align 4, !tbaa !5
  br label %39, !llvm.loop !18

68:                                               ; preds = %39
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %10, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %10, align 4, !tbaa !5
  br label %34, !llvm.loop !20

72:                                               ; preds = %34
  %73 = load i32, ptr %9, align 4, !tbaa !5
  %74 = getelementptr inbounds %"struct.sptk::swipe::vector", ptr %8, i32 0, i32 0
  %75 = load i32, ptr %74, align 8, !tbaa !9
  %76 = icmp sge i32 %73, %75
  br i1 %76, label %77, label %79

77:                                               ; preds = %72
  %78 = load i32, ptr %9, align 4, !tbaa !5
  br label %82

79:                                               ; preds = %72
  %80 = getelementptr inbounds %"struct.sptk::swipe::vector", ptr %8, i32 0, i32 0
  %81 = load i32, ptr %80, align 8, !tbaa !9
  br label %82

82:                                               ; preds = %79, %77
  %83 = phi i32 [ %78, %77 ], [ %81, %79 ]
  %84 = call { i32, ptr } @_ZN4sptk5swipe5zerovEi(i32 noundef %83)
  %85 = getelementptr inbounds { i32, ptr }, ptr %6, i32 0, i32 0
  %86 = extractvalue { i32, ptr } %84, 0
  store i32 %86, ptr %85, align 8
  %87 = getelementptr inbounds { i32, ptr }, ptr %6, i32 0, i32 1
  %88 = extractvalue { i32, ptr } %84, 1
  store ptr %88, ptr %87, align 8
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %127, %82
  %90 = load i32, ptr %10, align 4, !tbaa !5
  %91 = load i32, ptr %9, align 4, !tbaa !5
  %92 = icmp slt i32 %90, %91
  br i1 %92, label %93, label %130

93:                                               ; preds = %89
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %123, %93
  %95 = load i32, ptr %11, align 4, !tbaa !5
  %96 = getelementptr inbounds %"struct.sptk::swipe::vector", ptr %8, i32 0, i32 0
  %97 = load i32, ptr %96, align 8, !tbaa !9
  %98 = icmp slt i32 %95, %97
  br i1 %98, label %99, label %126

99:                                               ; preds = %94
  %100 = getelementptr inbounds %"struct.sptk::swipe::matrix", ptr %13, i32 0, i32 2
  %101 = load ptr, ptr %100, align 8, !tbaa !15
  %102 = load i32, ptr %10, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds ptr, ptr %101, i64 %103
  %105 = load ptr, ptr %104, align 8, !tbaa !17
  %106 = load i32, ptr %11, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds double, ptr %105, i64 %107
  %109 = load double, ptr %108, align 8, !tbaa !13
  %110 = getelementptr inbounds %"struct.sptk::swipe::vector", ptr %8, i32 0, i32 1
  %111 = load ptr, ptr %110, align 8, !tbaa !12
  %112 = load i32, ptr %11, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds double, ptr %111, i64 %113
  %115 = load double, ptr %114, align 8, !tbaa !13
  %116 = getelementptr inbounds %"struct.sptk::swipe::vector", ptr %6, i32 0, i32 1
  %117 = load ptr, ptr %116, align 8, !tbaa !12
  %118 = load i32, ptr %10, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds double, ptr %117, i64 %119
  %121 = load double, ptr %120, align 8, !tbaa !13
  %122 = call double @llvm.fmuladd.f64(double %109, double %115, double %121)
  store double %122, ptr %120, align 8, !tbaa !13
  br label %123

123:                                              ; preds = %99
  %124 = load i32, ptr %11, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %11, align 4, !tbaa !5
  br label %94, !llvm.loop !21

126:                                              ; preds = %94
  br label %127

127:                                              ; preds = %126
  %128 = load i32, ptr %10, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %10, align 4, !tbaa !5
  br label %89, !llvm.loop !22

130:                                              ; preds = %89
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  %131 = load i32, ptr %9, align 4, !tbaa !5
  %132 = load i32, ptr %9, align 4, !tbaa !5
  %133 = call { i64, ptr } @_ZN4sptk5swipe5zeromEii(i32 noundef %131, i32 noundef %132)
  %134 = getelementptr inbounds { i64, ptr }, ptr %14, i32 0, i32 0
  %135 = extractvalue { i64, ptr } %133, 0
  store i64 %135, ptr %134, align 8
  %136 = getelementptr inbounds { i64, ptr }, ptr %14, i32 0, i32 1
  %137 = extractvalue { i64, ptr } %133, 1
  store ptr %137, ptr %136, align 8
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %138

138:                                              ; preds = %193, %130
  %139 = load i32, ptr %10, align 4, !tbaa !5
  %140 = load i32, ptr %9, align 4, !tbaa !5
  %141 = icmp slt i32 %139, %140
  br i1 %141, label %142, label %196

142:                                              ; preds = %138
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %143

143:                                              ; preds = %189, %142
  %144 = load i32, ptr %11, align 4, !tbaa !5
  %145 = load i32, ptr %10, align 4, !tbaa !5
  %146 = icmp sle i32 %144, %145
  br i1 %146, label %147, label %192

147:                                              ; preds = %143
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %148

148:                                              ; preds = %185, %147
  %149 = load i32, ptr %12, align 4, !tbaa !5
  %150 = getelementptr inbounds %"struct.sptk::swipe::vector", ptr %7, i32 0, i32 0
  %151 = load i32, ptr %150, align 8, !tbaa !9
  %152 = icmp slt i32 %149, %151
  br i1 %152, label %153, label %188

153:                                              ; preds = %148
  %154 = getelementptr inbounds %"struct.sptk::swipe::matrix", ptr %13, i32 0, i32 2
  %155 = load ptr, ptr %154, align 8, !tbaa !15
  %156 = load i32, ptr %10, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds ptr, ptr %155, i64 %157
  %159 = load ptr, ptr %158, align 8, !tbaa !17
  %160 = load i32, ptr %12, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds double, ptr %159, i64 %161
  %163 = load double, ptr %162, align 8, !tbaa !13
  %164 = getelementptr inbounds %"struct.sptk::swipe::matrix", ptr %13, i32 0, i32 2
  %165 = load ptr, ptr %164, align 8, !tbaa !15
  %166 = load i32, ptr %11, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds ptr, ptr %165, i64 %167
  %169 = load ptr, ptr %168, align 8, !tbaa !17
  %170 = load i32, ptr %12, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds double, ptr %169, i64 %171
  %173 = load double, ptr %172, align 8, !tbaa !13
  %174 = getelementptr inbounds %"struct.sptk::swipe::matrix", ptr %14, i32 0, i32 2
  %175 = load ptr, ptr %174, align 8, !tbaa !15
  %176 = load i32, ptr %10, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds ptr, ptr %175, i64 %177
  %179 = load ptr, ptr %178, align 8, !tbaa !17
  %180 = load i32, ptr %11, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds double, ptr %179, i64 %181
  %183 = load double, ptr %182, align 8, !tbaa !13
  %184 = call double @llvm.fmuladd.f64(double %163, double %173, double %183)
  store double %184, ptr %182, align 8, !tbaa !13
  br label %185

185:                                              ; preds = %153
  %186 = load i32, ptr %12, align 4, !tbaa !5
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %12, align 4, !tbaa !5
  br label %148, !llvm.loop !23

188:                                              ; preds = %148
  br label %189

189:                                              ; preds = %188
  %190 = load i32, ptr %11, align 4, !tbaa !5
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %11, align 4, !tbaa !5
  br label %143, !llvm.loop !24

192:                                              ; preds = %143
  br label %193

193:                                              ; preds = %192
  %194 = load i32, ptr %10, align 4, !tbaa !5
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %10, align 4, !tbaa !5
  br label %138, !llvm.loop !25

196:                                              ; preds = %138
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %197

197:                                              ; preds = %230, %196
  %198 = load i32, ptr %10, align 4, !tbaa !5
  %199 = load i32, ptr %9, align 4, !tbaa !5
  %200 = icmp slt i32 %198, %199
  br i1 %200, label %201, label %233

201:                                              ; preds = %197
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %202

202:                                              ; preds = %226, %201
  %203 = load i32, ptr %11, align 4, !tbaa !5
  %204 = load i32, ptr %10, align 4, !tbaa !5
  %205 = icmp slt i32 %203, %204
  br i1 %205, label %206, label %229

206:                                              ; preds = %202
  %207 = getelementptr inbounds %"struct.sptk::swipe::matrix", ptr %14, i32 0, i32 2
  %208 = load ptr, ptr %207, align 8, !tbaa !15
  %209 = load i32, ptr %10, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds ptr, ptr %208, i64 %210
  %212 = load ptr, ptr %211, align 8, !tbaa !17
  %213 = load i32, ptr %11, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds double, ptr %212, i64 %214
  %216 = load double, ptr %215, align 8, !tbaa !13
  %217 = getelementptr inbounds %"struct.sptk::swipe::matrix", ptr %14, i32 0, i32 2
  %218 = load ptr, ptr %217, align 8, !tbaa !15
  %219 = load i32, ptr %11, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds ptr, ptr %218, i64 %220
  %222 = load ptr, ptr %221, align 8, !tbaa !17
  %223 = load i32, ptr %10, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds double, ptr %222, i64 %224
  store double %216, ptr %225, align 8, !tbaa !13
  br label %226

226:                                              ; preds = %206
  %227 = load i32, ptr %11, align 4, !tbaa !5
  %228 = add nsw i32 %227, 1
  store i32 %228, ptr %11, align 4, !tbaa !5
  br label %202, !llvm.loop !26

229:                                              ; preds = %202
  br label %230

230:                                              ; preds = %229
  %231 = load i32, ptr %10, align 4, !tbaa !5
  %232 = add nsw i32 %231, 1
  store i32 %232, ptr %10, align 4, !tbaa !5
  br label %197, !llvm.loop !27

233:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %234 = getelementptr inbounds %"struct.sptk::swipe::matrix", ptr %14, i32 0, i32 2
  %235 = load ptr, ptr %234, align 8, !tbaa !15
  store ptr %235, ptr %15, align 8, !tbaa !17
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %236

236:                                              ; preds = %313, %233
  %237 = load i32, ptr %12, align 4, !tbaa !5
  %238 = load i32, ptr %9, align 4, !tbaa !5
  %239 = sub nsw i32 %238, 1
  %240 = icmp slt i32 %237, %239
  br i1 %240, label %241, label %316

241:                                              ; preds = %236
  %242 = load i32, ptr %12, align 4, !tbaa !5
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %10, align 4, !tbaa !5
  br label %244

244:                                              ; preds = %309, %241
  %245 = load i32, ptr %10, align 4, !tbaa !5
  %246 = load i32, ptr %9, align 4, !tbaa !5
  %247 = icmp slt i32 %245, %246
  br i1 %247, label %248, label %312

248:                                              ; preds = %244
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %249 = load ptr, ptr %15, align 8, !tbaa !17
  %250 = load i32, ptr %10, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds ptr, ptr %249, i64 %251
  %253 = load ptr, ptr %252, align 8, !tbaa !17
  %254 = load i32, ptr %12, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds double, ptr %253, i64 %255
  %257 = load double, ptr %256, align 8, !tbaa !13
  %258 = load ptr, ptr %15, align 8, !tbaa !17
  %259 = load i32, ptr %12, align 4, !tbaa !5
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds ptr, ptr %258, i64 %260
  %262 = load ptr, ptr %261, align 8, !tbaa !17
  %263 = load i32, ptr %12, align 4, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds double, ptr %262, i64 %264
  %266 = load double, ptr %265, align 8, !tbaa !13
  %267 = fdiv double %257, %266
  store double %267, ptr %16, align 8, !tbaa !13
  %268 = load i32, ptr %12, align 4, !tbaa !5
  %269 = add nsw i32 %268, 1
  store i32 %269, ptr %11, align 4, !tbaa !5
  br label %270

270:                                              ; preds = %296, %248
  %271 = load i32, ptr %11, align 4, !tbaa !5
  %272 = load i32, ptr %9, align 4, !tbaa !5
  %273 = icmp slt i32 %271, %272
  br i1 %273, label %274, label %299

274:                                              ; preds = %270
  %275 = load double, ptr %16, align 8, !tbaa !13
  %276 = load ptr, ptr %15, align 8, !tbaa !17
  %277 = load i32, ptr %12, align 4, !tbaa !5
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds ptr, ptr %276, i64 %278
  %280 = load ptr, ptr %279, align 8, !tbaa !17
  %281 = load i32, ptr %11, align 4, !tbaa !5
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds double, ptr %280, i64 %282
  %284 = load double, ptr %283, align 8, !tbaa !13
  %285 = load ptr, ptr %15, align 8, !tbaa !17
  %286 = load i32, ptr %10, align 4, !tbaa !5
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds ptr, ptr %285, i64 %287
  %289 = load ptr, ptr %288, align 8, !tbaa !17
  %290 = load i32, ptr %11, align 4, !tbaa !5
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds double, ptr %289, i64 %291
  %293 = load double, ptr %292, align 8, !tbaa !13
  %294 = fneg double %275
  %295 = call double @llvm.fmuladd.f64(double %294, double %284, double %293)
  store double %295, ptr %292, align 8, !tbaa !13
  br label %296

296:                                              ; preds = %274
  %297 = load i32, ptr %11, align 4, !tbaa !5
  %298 = add nsw i32 %297, 1
  store i32 %298, ptr %11, align 4, !tbaa !5
  br label %270, !llvm.loop !28

299:                                              ; preds = %270
  %300 = load double, ptr %16, align 8, !tbaa !13
  %301 = load ptr, ptr %15, align 8, !tbaa !17
  %302 = load i32, ptr %10, align 4, !tbaa !5
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds ptr, ptr %301, i64 %303
  %305 = load ptr, ptr %304, align 8, !tbaa !17
  %306 = load i32, ptr %12, align 4, !tbaa !5
  %307 = sext i32 %306 to i64
  %308 = getelementptr inbounds double, ptr %305, i64 %307
  store double %300, ptr %308, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %309

309:                                              ; preds = %299
  %310 = load i32, ptr %10, align 4, !tbaa !5
  %311 = add nsw i32 %310, 1
  store i32 %311, ptr %10, align 4, !tbaa !5
  br label %244, !llvm.loop !29

312:                                              ; preds = %244
  br label %313

313:                                              ; preds = %312
  %314 = load i32, ptr %12, align 4, !tbaa !5
  %315 = add nsw i32 %314, 1
  store i32 %315, ptr %12, align 4, !tbaa !5
  br label %236, !llvm.loop !30

316:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %317 = getelementptr inbounds %"struct.sptk::swipe::vector", ptr %6, i32 0, i32 1
  %318 = load ptr, ptr %317, align 8, !tbaa !12
  store ptr %318, ptr %17, align 8, !tbaa !17
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %319

319:                                              ; preds = %354, %316
  %320 = load i32, ptr %10, align 4, !tbaa !5
  %321 = load i32, ptr %9, align 4, !tbaa !5
  %322 = icmp slt i32 %320, %321
  br i1 %322, label %323, label %357

323:                                              ; preds = %319
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %324

324:                                              ; preds = %350, %323
  %325 = load i32, ptr %11, align 4, !tbaa !5
  %326 = load i32, ptr %10, align 4, !tbaa !5
  %327 = icmp slt i32 %325, %326
  br i1 %327, label %328, label %353

328:                                              ; preds = %324
  %329 = load ptr, ptr %15, align 8, !tbaa !17
  %330 = load i32, ptr %10, align 4, !tbaa !5
  %331 = sext i32 %330 to i64
  %332 = getelementptr inbounds ptr, ptr %329, i64 %331
  %333 = load ptr, ptr %332, align 8, !tbaa !17
  %334 = load i32, ptr %11, align 4, !tbaa !5
  %335 = sext i32 %334 to i64
  %336 = getelementptr inbounds double, ptr %333, i64 %335
  %337 = load double, ptr %336, align 8, !tbaa !13
  %338 = load ptr, ptr %17, align 8, !tbaa !17
  %339 = load i32, ptr %11, align 4, !tbaa !5
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds double, ptr %338, i64 %340
  %342 = load double, ptr %341, align 8, !tbaa !13
  %343 = load ptr, ptr %17, align 8, !tbaa !17
  %344 = load i32, ptr %10, align 4, !tbaa !5
  %345 = sext i32 %344 to i64
  %346 = getelementptr inbounds double, ptr %343, i64 %345
  %347 = load double, ptr %346, align 8, !tbaa !13
  %348 = fneg double %337
  %349 = call double @llvm.fmuladd.f64(double %348, double %342, double %347)
  store double %349, ptr %346, align 8, !tbaa !13
  br label %350

350:                                              ; preds = %328
  %351 = load i32, ptr %11, align 4, !tbaa !5
  %352 = add nsw i32 %351, 1
  store i32 %352, ptr %11, align 4, !tbaa !5
  br label %324, !llvm.loop !31

353:                                              ; preds = %324
  br label %354

354:                                              ; preds = %353
  %355 = load i32, ptr %10, align 4, !tbaa !5
  %356 = add nsw i32 %355, 1
  store i32 %356, ptr %10, align 4, !tbaa !5
  br label %319, !llvm.loop !32

357:                                              ; preds = %319
  %358 = load i32, ptr %9, align 4, !tbaa !5
  %359 = sub nsw i32 %358, 1
  store i32 %359, ptr %10, align 4, !tbaa !5
  br label %360

360:                                              ; preds = %411, %357
  %361 = load i32, ptr %10, align 4, !tbaa !5
  %362 = icmp sge i32 %361, 0
  br i1 %362, label %363, label %414

363:                                              ; preds = %360
  %364 = load i32, ptr %10, align 4, !tbaa !5
  %365 = add nsw i32 %364, 1
  store i32 %365, ptr %11, align 4, !tbaa !5
  br label %366

366:                                              ; preds = %392, %363
  %367 = load i32, ptr %11, align 4, !tbaa !5
  %368 = load i32, ptr %9, align 4, !tbaa !5
  %369 = icmp slt i32 %367, %368
  br i1 %369, label %370, label %395

370:                                              ; preds = %366
  %371 = load ptr, ptr %15, align 8, !tbaa !17
  %372 = load i32, ptr %10, align 4, !tbaa !5
  %373 = sext i32 %372 to i64
  %374 = getelementptr inbounds ptr, ptr %371, i64 %373
  %375 = load ptr, ptr %374, align 8, !tbaa !17
  %376 = load i32, ptr %11, align 4, !tbaa !5
  %377 = sext i32 %376 to i64
  %378 = getelementptr inbounds double, ptr %375, i64 %377
  %379 = load double, ptr %378, align 8, !tbaa !13
  %380 = load ptr, ptr %17, align 8, !tbaa !17
  %381 = load i32, ptr %11, align 4, !tbaa !5
  %382 = sext i32 %381 to i64
  %383 = getelementptr inbounds double, ptr %380, i64 %382
  %384 = load double, ptr %383, align 8, !tbaa !13
  %385 = load ptr, ptr %17, align 8, !tbaa !17
  %386 = load i32, ptr %10, align 4, !tbaa !5
  %387 = sext i32 %386 to i64
  %388 = getelementptr inbounds double, ptr %385, i64 %387
  %389 = load double, ptr %388, align 8, !tbaa !13
  %390 = fneg double %379
  %391 = call double @llvm.fmuladd.f64(double %390, double %384, double %389)
  store double %391, ptr %388, align 8, !tbaa !13
  br label %392

392:                                              ; preds = %370
  %393 = load i32, ptr %11, align 4, !tbaa !5
  %394 = add nsw i32 %393, 1
  store i32 %394, ptr %11, align 4, !tbaa !5
  br label %366, !llvm.loop !33

395:                                              ; preds = %366
  %396 = load ptr, ptr %15, align 8, !tbaa !17
  %397 = load i32, ptr %10, align 4, !tbaa !5
  %398 = sext i32 %397 to i64
  %399 = getelementptr inbounds ptr, ptr %396, i64 %398
  %400 = load ptr, ptr %399, align 8, !tbaa !17
  %401 = load i32, ptr %10, align 4, !tbaa !5
  %402 = sext i32 %401 to i64
  %403 = getelementptr inbounds double, ptr %400, i64 %402
  %404 = load double, ptr %403, align 8, !tbaa !13
  %405 = load ptr, ptr %17, align 8, !tbaa !17
  %406 = load i32, ptr %10, align 4, !tbaa !5
  %407 = sext i32 %406 to i64
  %408 = getelementptr inbounds double, ptr %405, i64 %407
  %409 = load double, ptr %408, align 8, !tbaa !13
  %410 = fdiv double %409, %404
  store double %410, ptr %408, align 8, !tbaa !13
  br label %411

411:                                              ; preds = %395
  %412 = load i32, ptr %10, align 4, !tbaa !5
  %413 = add nsw i32 %412, -1
  store i32 %413, ptr %10, align 4, !tbaa !5
  br label %360, !llvm.loop !34

414:                                              ; preds = %360
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %14, i64 16, i1 false), !tbaa.struct !35
  %415 = getelementptr inbounds { i64, ptr }, ptr %18, i32 0, i32 0
  %416 = load i64, ptr %415, align 8
  %417 = getelementptr inbounds { i64, ptr }, ptr %18, i32 0, i32 1
  %418 = load ptr, ptr %417, align 8
  call void @_ZN4sptk5swipe5freemENS0_6matrixE(i64 %416, ptr %418)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %13, i64 16, i1 false), !tbaa.struct !35
  %419 = getelementptr inbounds { i64, ptr }, ptr %19, i32 0, i32 0
  %420 = load i64, ptr %419, align 8
  %421 = getelementptr inbounds { i64, ptr }, ptr %19, i32 0, i32 1
  %422 = load ptr, ptr %421, align 8
  call void @_ZN4sptk5swipe5freemENS0_6matrixE(i64 %420, ptr %422)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  %423 = load { i32, ptr }, ptr %6, align 8
  ret { i32, ptr } %423
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef, i32 noundef) #5

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSN4sptk5swipe6vectorE", !6, i64 0, !11, i64 8}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!16, !11, i64 8}
!16 = !{!"_ZTSN4sptk5swipe6matrixE", !6, i64 0, !6, i64 4, !11, i64 8}
!17 = !{!11, !11, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}
!23 = distinct !{!23, !19}
!24 = distinct !{!24, !19}
!25 = distinct !{!25, !19}
!26 = distinct !{!26, !19}
!27 = distinct !{!27, !19}
!28 = distinct !{!28, !19}
!29 = distinct !{!29, !19}
!30 = distinct !{!30, !19}
!31 = distinct !{!31, !19}
!32 = distinct !{!32, !19}
!33 = distinct !{!33, !19}
!34 = distinct !{!34, !19}
!35 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 8, !17}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i32, ptr } @_ZN4sptk5swipe5zerovEi(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, ptr } @_ZN4sptk5swipe5makemEii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, ptr } @_ZN4sptk5swipe5zeromEii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4sptk5swipe5freemENS0_6matrixE(i64, ptr) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: mustprogress nounwind uwtable
define dso_local { i32, ptr } @_ZN4sptk5swipe7polyfitENS0_6vectorES1_i(i32 %0, ptr nocapture readonly %1, i32 %2, ptr nocapture readonly %3, i32 noundef %4) local_unnamed_addr #0 {
  %6 = add i32 %4, 1
  %7 = tail call { i64, ptr } @_ZN4sptk5swipe5makemEii(i32 noundef %6, i32 noundef %0)
  %8 = extractvalue { i64, ptr } %7, 1
  %.not161 = icmp slt i32 %4, 0
  br i1 %.not161, label %._crit_edge163.thread, label %.preheader159.lr.ph

._crit_edge163.thread:                            ; preds = %5
  %9 = tail call i32 @llvm.smax.i32(i32 %6, i32 %2)
  %10 = tail call { i32, ptr } @_ZN4sptk5swipe5zerovEi(i32 noundef %9)
  br label %._crit_edge167.thread

.preheader159.lr.ph:                              ; preds = %5
  %11 = icmp sgt i32 %0, 0
  br i1 %11, label %.preheader159.us.preheader, label %._crit_edge163.thread286

._crit_edge163.thread286:                         ; preds = %.preheader159.lr.ph
  %12 = tail call i32 @llvm.smax.i32(i32 %6, i32 %2)
  %13 = tail call { i32, ptr } @_ZN4sptk5swipe5zerovEi(i32 noundef %12)
  br label %.preheader158.lr.ph

.preheader159.us.preheader:                       ; preds = %.preheader159.lr.ph
  %wide.trip.count208 = zext i32 %6 to i64
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %.preheader159.us

.preheader159.us:                                 ; preds = %.preheader159.us.preheader, %._crit_edge.us
  %indvars.iv205 = phi i64 [ 0, %.preheader159.us.preheader ], [ %indvars.iv.next206, %._crit_edge.us ]
  %14 = getelementptr inbounds ptr, ptr %8, i64 %indvars.iv205
  %15 = trunc i64 %indvars.iv205 to i32
  %16 = sub i32 %4, %15
  br label %17

17:                                               ; preds = %.preheader159.us, %17
  %indvars.iv = phi i64 [ 0, %.preheader159.us ], [ %indvars.iv.next, %17 ]
  %18 = getelementptr inbounds double, ptr %1, i64 %indvars.iv
  %19 = load double, ptr %18, align 8, !tbaa !5
  %20 = tail call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %19, i32 noundef %16)
  %21 = load ptr, ptr %14, align 8, !tbaa !9
  %22 = getelementptr inbounds double, ptr %21, i64 %indvars.iv
  store double %20, ptr %22, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.us, label %17, !llvm.loop !11

._crit_edge.us:                                   ; preds = %17
  %indvars.iv.next206 = add nuw nsw i64 %indvars.iv205, 1
  %exitcond209.not = icmp eq i64 %indvars.iv.next206, %wide.trip.count208
  br i1 %exitcond209.not, label %._crit_edge163, label %.preheader159.us, !llvm.loop !13

._crit_edge163:                                   ; preds = %._crit_edge.us
  %23 = tail call i32 @llvm.smax.i32(i32 %6, i32 %2)
  %24 = tail call { i32, ptr } @_ZN4sptk5swipe5zerovEi(i32 noundef %23)
  br i1 %.not161, label %._crit_edge167.thread, label %.preheader158.lr.ph

.preheader158.lr.ph:                              ; preds = %._crit_edge163.thread286, %._crit_edge163
  %25 = phi { i32, ptr } [ %13, %._crit_edge163.thread286 ], [ %24, %._crit_edge163 ]
  %26 = extractvalue { i32, ptr } %25, 1
  %27 = icmp sgt i32 %2, 0
  br i1 %27, label %.preheader158.us.preheader, label %._crit_edge167.thread288

._crit_edge167.thread288:                         ; preds = %.preheader158.lr.ph
  %28 = tail call { i64, ptr } @_ZN4sptk5swipe5zeromEii(i32 noundef %6, i32 noundef %6)
  %29 = extractvalue { i64, ptr } %28, 1
  br label %.preheader157.lr.ph

.preheader158.us.preheader:                       ; preds = %.preheader158.lr.ph
  %wide.trip.count218 = zext i32 %6 to i64
  %wide.trip.count213 = zext nneg i32 %2 to i64
  %xtraiter = and i64 %wide.trip.count213, 1
  %30 = icmp eq i32 %2, 1
  %unroll_iter = and i64 %wide.trip.count213, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader158.us

.preheader158.us:                                 ; preds = %.preheader158.us.preheader, %._crit_edge.us168
  %indvars.iv215 = phi i64 [ 0, %.preheader158.us.preheader ], [ %indvars.iv.next216, %._crit_edge.us168 ]
  %31 = getelementptr inbounds ptr, ptr %8, i64 %indvars.iv215
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = getelementptr inbounds double, ptr %26, i64 %indvars.iv215
  %.promoted.us = load double, ptr %33, align 8, !tbaa !5
  br i1 %30, label %._crit_edge.us168.unr-lcssa, label %.preheader158.us.new

.preheader158.us.new:                             ; preds = %.preheader158.us, %.preheader158.us.new
  %indvars.iv210 = phi i64 [ %indvars.iv.next211.1, %.preheader158.us.new ], [ 0, %.preheader158.us ]
  %34 = phi double [ %44, %.preheader158.us.new ], [ %.promoted.us, %.preheader158.us ]
  %niter = phi i64 [ %niter.next.1, %.preheader158.us.new ], [ 0, %.preheader158.us ]
  %35 = getelementptr inbounds double, ptr %32, i64 %indvars.iv210
  %36 = load double, ptr %35, align 8, !tbaa !5
  %37 = getelementptr inbounds double, ptr %3, i64 %indvars.iv210
  %38 = load double, ptr %37, align 8, !tbaa !5
  %39 = tail call double @llvm.fmuladd.f64(double %36, double %38, double %34)
  store double %39, ptr %33, align 8, !tbaa !5
  %indvars.iv.next211 = or disjoint i64 %indvars.iv210, 1
  %40 = getelementptr inbounds double, ptr %32, i64 %indvars.iv.next211
  %41 = load double, ptr %40, align 8, !tbaa !5
  %42 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next211
  %43 = load double, ptr %42, align 8, !tbaa !5
  %44 = tail call double @llvm.fmuladd.f64(double %41, double %43, double %39)
  store double %44, ptr %33, align 8, !tbaa !5
  %indvars.iv.next211.1 = add nuw nsw i64 %indvars.iv210, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.us168.unr-lcssa, label %.preheader158.us.new, !llvm.loop !14

._crit_edge.us168.unr-lcssa:                      ; preds = %.preheader158.us.new, %.preheader158.us
  %indvars.iv210.unr = phi i64 [ 0, %.preheader158.us ], [ %indvars.iv.next211.1, %.preheader158.us.new ]
  %.unr = phi double [ %.promoted.us, %.preheader158.us ], [ %44, %.preheader158.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us168, label %._crit_edge.us168.epilog-lcssa

._crit_edge.us168.epilog-lcssa:                   ; preds = %._crit_edge.us168.unr-lcssa
  %45 = getelementptr inbounds double, ptr %32, i64 %indvars.iv210.unr
  %46 = load double, ptr %45, align 8, !tbaa !5
  %47 = getelementptr inbounds double, ptr %3, i64 %indvars.iv210.unr
  %48 = load double, ptr %47, align 8, !tbaa !5
  %49 = tail call double @llvm.fmuladd.f64(double %46, double %48, double %.unr)
  store double %49, ptr %33, align 8, !tbaa !5
  br label %._crit_edge.us168

._crit_edge.us168:                                ; preds = %._crit_edge.us168.unr-lcssa, %._crit_edge.us168.epilog-lcssa
  %indvars.iv.next216 = add nuw nsw i64 %indvars.iv215, 1
  %exitcond219.not = icmp eq i64 %indvars.iv.next216, %wide.trip.count218
  br i1 %exitcond219.not, label %._crit_edge167, label %.preheader158.us, !llvm.loop !15

._crit_edge167.thread:                            ; preds = %._crit_edge163.thread, %._crit_edge163
  %.ph287 = phi { i32, ptr } [ %24, %._crit_edge163 ], [ %10, %._crit_edge163.thread ]
  %50 = tail call { i64, ptr } @_ZN4sptk5swipe5zeromEii(i32 noundef %6, i32 noundef %6)
  %51 = extractvalue { i64, ptr } %50, 1
  br label %._crit_edge199

._crit_edge167:                                   ; preds = %._crit_edge.us168
  %52 = tail call { i64, ptr } @_ZN4sptk5swipe5zeromEii(i32 noundef %6, i32 noundef %6)
  %53 = extractvalue { i64, ptr } %52, 1
  br i1 %.not161, label %._crit_edge199, label %.preheader157.lr.ph

.preheader157.lr.ph:                              ; preds = %._crit_edge167.thread288, %._crit_edge167
  %54 = phi ptr [ %29, %._crit_edge167.thread288 ], [ %53, %._crit_edge167 ]
  %55 = phi { i64, ptr } [ %28, %._crit_edge167.thread288 ], [ %52, %._crit_edge167 ]
  %56 = icmp sgt i32 %0, 0
  br i1 %56, label %.preheader157.us.preheader, label %.preheader154.preheader

.preheader157.us.preheader:                       ; preds = %.preheader157.lr.ph
  %wide.trip.count239 = zext i32 %6 to i64
  %wide.trip.count223 = zext nneg i32 %0 to i64
  %xtraiter310 = and i64 %wide.trip.count223, 1
  %57 = icmp eq i32 %0, 1
  %unroll_iter313 = and i64 %wide.trip.count223, 2147483646
  %lcmp.mod312.not = icmp eq i64 %xtraiter310, 0
  br label %.preheader157.us

.preheader157.us:                                 ; preds = %.preheader157.us.preheader, %.split.us.us
  %indvars.iv234 = phi i64 [ 0, %.preheader157.us.preheader ], [ %indvars.iv.next235, %.split.us.us ]
  %indvars.iv232 = phi i64 [ 1, %.preheader157.us.preheader ], [ %indvars.iv.next233, %.split.us.us ]
  %58 = getelementptr inbounds ptr, ptr %8, i64 %indvars.iv234
  %59 = getelementptr inbounds ptr, ptr %54, i64 %indvars.iv234
  %60 = load ptr, ptr %58, align 8, !tbaa !9
  %61 = load ptr, ptr %59, align 8, !tbaa !9
  br label %.preheader156.us.us

.preheader156.us.us:                              ; preds = %._crit_edge.us172.us, %.preheader157.us
  %indvars.iv225 = phi i64 [ %indvars.iv.next226, %._crit_edge.us172.us ], [ 0, %.preheader157.us ]
  %62 = getelementptr inbounds ptr, ptr %8, i64 %indvars.iv225
  %63 = load ptr, ptr %62, align 8, !tbaa !9
  %64 = getelementptr inbounds double, ptr %61, i64 %indvars.iv225
  %.promoted.us171.us = load double, ptr %64, align 8, !tbaa !5
  br i1 %57, label %._crit_edge.us172.us.unr-lcssa, label %.preheader156.us.us.new

.preheader156.us.us.new:                          ; preds = %.preheader156.us.us, %.preheader156.us.us.new
  %indvars.iv220 = phi i64 [ %indvars.iv.next221.1, %.preheader156.us.us.new ], [ 0, %.preheader156.us.us ]
  %65 = phi double [ %75, %.preheader156.us.us.new ], [ %.promoted.us171.us, %.preheader156.us.us ]
  %niter314 = phi i64 [ %niter314.next.1, %.preheader156.us.us.new ], [ 0, %.preheader156.us.us ]
  %66 = getelementptr inbounds double, ptr %60, i64 %indvars.iv220
  %67 = load double, ptr %66, align 8, !tbaa !5
  %68 = getelementptr inbounds double, ptr %63, i64 %indvars.iv220
  %69 = load double, ptr %68, align 8, !tbaa !5
  %70 = tail call double @llvm.fmuladd.f64(double %67, double %69, double %65)
  store double %70, ptr %64, align 8, !tbaa !5
  %indvars.iv.next221 = or disjoint i64 %indvars.iv220, 1
  %71 = getelementptr inbounds double, ptr %60, i64 %indvars.iv.next221
  %72 = load double, ptr %71, align 8, !tbaa !5
  %73 = getelementptr inbounds double, ptr %63, i64 %indvars.iv.next221
  %74 = load double, ptr %73, align 8, !tbaa !5
  %75 = tail call double @llvm.fmuladd.f64(double %72, double %74, double %70)
  store double %75, ptr %64, align 8, !tbaa !5
  %indvars.iv.next221.1 = add nuw nsw i64 %indvars.iv220, 2
  %niter314.next.1 = add i64 %niter314, 2
  %niter314.ncmp.1 = icmp eq i64 %niter314.next.1, %unroll_iter313
  br i1 %niter314.ncmp.1, label %._crit_edge.us172.us.unr-lcssa, label %.preheader156.us.us.new, !llvm.loop !16

._crit_edge.us172.us.unr-lcssa:                   ; preds = %.preheader156.us.us.new, %.preheader156.us.us
  %indvars.iv220.unr = phi i64 [ 0, %.preheader156.us.us ], [ %indvars.iv.next221.1, %.preheader156.us.us.new ]
  %.unr311 = phi double [ %.promoted.us171.us, %.preheader156.us.us ], [ %75, %.preheader156.us.us.new ]
  br i1 %lcmp.mod312.not, label %._crit_edge.us172.us, label %._crit_edge.us172.us.epilog-lcssa

._crit_edge.us172.us.epilog-lcssa:                ; preds = %._crit_edge.us172.us.unr-lcssa
  %76 = getelementptr inbounds double, ptr %60, i64 %indvars.iv220.unr
  %77 = load double, ptr %76, align 8, !tbaa !5
  %78 = getelementptr inbounds double, ptr %63, i64 %indvars.iv220.unr
  %79 = load double, ptr %78, align 8, !tbaa !5
  %80 = tail call double @llvm.fmuladd.f64(double %77, double %79, double %.unr311)
  store double %80, ptr %64, align 8, !tbaa !5
  br label %._crit_edge.us172.us

._crit_edge.us172.us:                             ; preds = %._crit_edge.us172.us.unr-lcssa, %._crit_edge.us172.us.epilog-lcssa
  %indvars.iv.next226 = add nuw nsw i64 %indvars.iv225, 1
  %exitcond231.not = icmp eq i64 %indvars.iv.next226, %indvars.iv232
  br i1 %exitcond231.not, label %.split.us.us, label %.preheader156.us.us, !llvm.loop !17

.split.us.us:                                     ; preds = %._crit_edge.us172.us
  %indvars.iv.next235 = add nuw nsw i64 %indvars.iv234, 1
  %indvars.iv.next233 = add nuw nsw i64 %indvars.iv232, 1
  %exitcond240.not = icmp eq i64 %indvars.iv.next235, %wide.trip.count239
  br i1 %exitcond240.not, label %.preheader155, label %.preheader157.us, !llvm.loop !18

.preheader155:                                    ; preds = %.split.us.us
  br i1 %.not161, label %._crit_edge199, label %.preheader154.preheader

.preheader154.preheader:                          ; preds = %.preheader157.lr.ph, %.preheader155
  %wide.trip.count249 = zext i32 %6 to i64
  br label %.preheader154

.preheader154:                                    ; preds = %.preheader154.preheader, %._crit_edge
  %indvars.iv246 = phi i64 [ 0, %.preheader154.preheader ], [ %indvars.iv.next247, %._crit_edge ]
  %.not = icmp eq i64 %indvars.iv246, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader154
  %81 = getelementptr inbounds ptr, ptr %54, i64 %indvars.iv246
  %82 = load ptr, ptr %81, align 8, !tbaa !9
  %xtraiter316 = and i64 %indvars.iv246, 3
  %83 = icmp ult i64 %indvars.iv246, 4
  br i1 %83, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter318 = and i64 %indvars.iv246, 9223372036854775804
  br label %86

.preheader153:                                    ; preds = %._crit_edge
  %.not302 = icmp eq i32 %4, 0
  br i1 %.not302, label %.preheader152, label %.lr.ph188.preheader

.lr.ph188.preheader:                              ; preds = %.preheader153
  %wide.trip.count266 = zext nneg i32 %4 to i64
  %wide.trip.count261 = zext i32 %6 to i64
  %84 = shl nuw nsw i64 %wide.trip.count249, 3
  %85 = add nsw i64 %wide.trip.count249, -1
  br label %.lr.ph186

86:                                               ; preds = %86, %.lr.ph.new
  %indvars.iv241 = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next242.3, %86 ]
  %niter319 = phi i64 [ 0, %.lr.ph.new ], [ %niter319.next.3, %86 ]
  %87 = getelementptr inbounds double, ptr %82, i64 %indvars.iv241
  %88 = load double, ptr %87, align 8, !tbaa !5
  %89 = getelementptr inbounds ptr, ptr %54, i64 %indvars.iv241
  %90 = load ptr, ptr %89, align 8, !tbaa !9
  %91 = getelementptr inbounds double, ptr %90, i64 %indvars.iv246
  store double %88, ptr %91, align 8, !tbaa !5
  %indvars.iv.next242 = or disjoint i64 %indvars.iv241, 1
  %92 = getelementptr inbounds double, ptr %82, i64 %indvars.iv.next242
  %93 = load double, ptr %92, align 8, !tbaa !5
  %94 = getelementptr inbounds ptr, ptr %54, i64 %indvars.iv.next242
  %95 = load ptr, ptr %94, align 8, !tbaa !9
  %96 = getelementptr inbounds double, ptr %95, i64 %indvars.iv246
  store double %93, ptr %96, align 8, !tbaa !5
  %indvars.iv.next242.1 = or disjoint i64 %indvars.iv241, 2
  %97 = getelementptr inbounds double, ptr %82, i64 %indvars.iv.next242.1
  %98 = load double, ptr %97, align 8, !tbaa !5
  %99 = getelementptr inbounds ptr, ptr %54, i64 %indvars.iv.next242.1
  %100 = load ptr, ptr %99, align 8, !tbaa !9
  %101 = getelementptr inbounds double, ptr %100, i64 %indvars.iv246
  store double %98, ptr %101, align 8, !tbaa !5
  %indvars.iv.next242.2 = or disjoint i64 %indvars.iv241, 3
  %102 = getelementptr inbounds double, ptr %82, i64 %indvars.iv.next242.2
  %103 = load double, ptr %102, align 8, !tbaa !5
  %104 = getelementptr inbounds ptr, ptr %54, i64 %indvars.iv.next242.2
  %105 = load ptr, ptr %104, align 8, !tbaa !9
  %106 = getelementptr inbounds double, ptr %105, i64 %indvars.iv246
  store double %103, ptr %106, align 8, !tbaa !5
  %indvars.iv.next242.3 = add nuw nsw i64 %indvars.iv241, 4
  %niter319.next.3 = add i64 %niter319, 4
  %niter319.ncmp.3 = icmp eq i64 %niter319.next.3, %unroll_iter318
  br i1 %niter319.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %86, !llvm.loop !19

._crit_edge.loopexit.unr-lcssa:                   ; preds = %86, %.lr.ph
  %indvars.iv241.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next242.3, %86 ]
  %lcmp.mod317.not = icmp eq i64 %xtraiter316, 0
  br i1 %lcmp.mod317.not, label %._crit_edge, label %.epil.preheader315

.epil.preheader315:                               ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader315
  %indvars.iv241.epil = phi i64 [ %indvars.iv.next242.epil, %.epil.preheader315 ], [ %indvars.iv241.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader315 ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %107 = getelementptr inbounds double, ptr %82, i64 %indvars.iv241.epil
  %108 = load double, ptr %107, align 8, !tbaa !5
  %109 = getelementptr inbounds ptr, ptr %54, i64 %indvars.iv241.epil
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  %111 = getelementptr inbounds double, ptr %110, i64 %indvars.iv246
  store double %108, ptr %111, align 8, !tbaa !5
  %indvars.iv.next242.epil = add nuw nsw i64 %indvars.iv241.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter316
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.epil.preheader315, !llvm.loop !20

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader315, %.preheader154
  %indvars.iv.next247 = add nuw nsw i64 %indvars.iv246, 1
  %exitcond250.not = icmp eq i64 %indvars.iv.next247, %wide.trip.count249
  br i1 %exitcond250.not, label %.preheader153, label %.preheader154, !llvm.loop !22

.loopexit:                                        ; preds = %._crit_edge182
  %indvars.iv.next252 = add nuw nsw i64 %indvars.iv251, 1
  %exitcond267.not = icmp eq i64 %indvars.iv.next264, %wide.trip.count266
  br i1 %exitcond267.not, label %.preheader152, label %.lr.ph186, !llvm.loop !23

.preheader152:                                    ; preds = %.loopexit, %.preheader153
  br i1 %.not161, label %._crit_edge199, label %.preheader151.preheader

.preheader151.preheader:                          ; preds = %.preheader152
  %wide.trip.count276 = zext i32 %6 to i64
  br label %.preheader151

.lr.ph186:                                        ; preds = %.loopexit, %.lr.ph188.preheader
  %indvars.iv263 = phi i64 [ 0, %.lr.ph188.preheader ], [ %indvars.iv.next264, %.loopexit ]
  %indvars.iv251 = phi i64 [ 1, %.lr.ph188.preheader ], [ %indvars.iv.next252, %.loopexit ]
  %112 = xor i64 %indvars.iv263, -1
  %113 = add nsw i64 %112, %wide.trip.count249
  %114 = shl nuw nsw i64 %indvars.iv263, 3
  %115 = add nuw i64 %114, 8
  %indvars.iv.next264 = add nuw nsw i64 %indvars.iv263, 1
  %116 = getelementptr inbounds ptr, ptr %54, i64 %indvars.iv263
  %117 = load ptr, ptr %116, align 8, !tbaa !9
  %118 = getelementptr inbounds double, ptr %117, i64 %indvars.iv263
  %scevgep304 = getelementptr i8, ptr %117, i64 %115
  %scevgep305 = getelementptr i8, ptr %117, i64 %84
  %min.iters.check = icmp ult i64 %113, 4
  %n.vec = and i64 %113, -4
  %ind.end = add i64 %indvars.iv251, %n.vec
  %cmp.n = icmp eq i64 %113, %n.vec
  br label %.lr.ph181

.lr.ph181:                                        ; preds = %.lr.ph186, %._crit_edge182
  %indvars.iv258 = phi i64 [ %indvars.iv251, %.lr.ph186 ], [ %indvars.iv.next259, %._crit_edge182 ]
  %119 = getelementptr inbounds ptr, ptr %54, i64 %indvars.iv258
  %120 = load ptr, ptr %119, align 8, !tbaa !9
  %121 = getelementptr inbounds double, ptr %120, i64 %indvars.iv263
  %122 = load double, ptr %121, align 8, !tbaa !5
  %123 = load double, ptr %118, align 8, !tbaa !5
  %124 = fdiv double %122, %123
  %125 = fneg double %124
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph181
  %scevgep = getelementptr i8, ptr %120, i64 %115
  %scevgep303 = getelementptr i8, ptr %120, i64 %84
  %bound0 = icmp ult ptr %scevgep, %scevgep305
  %bound1 = icmp ult ptr %scevgep304, %scevgep303
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %broadcast.splatinsert = insertelement <2 x double> poison, double %125, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = add i64 %indvars.iv251, %index
  %126 = getelementptr inbounds double, ptr %117, i64 %offset.idx
  %127 = getelementptr inbounds i8, ptr %126, i64 16
  %wide.load = load <2 x double>, ptr %126, align 8, !tbaa !5, !alias.scope !24
  %wide.load306 = load <2 x double>, ptr %127, align 8, !tbaa !5, !alias.scope !24
  %128 = getelementptr inbounds double, ptr %120, i64 %offset.idx
  %129 = getelementptr inbounds i8, ptr %128, i64 16
  %wide.load307 = load <2 x double>, ptr %128, align 8, !tbaa !5, !alias.scope !27, !noalias !24
  %wide.load308 = load <2 x double>, ptr %129, align 8, !tbaa !5, !alias.scope !27, !noalias !24
  %130 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load, <2 x double> %wide.load307)
  %131 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load306, <2 x double> %wide.load308)
  store <2 x double> %130, ptr %128, align 8, !tbaa !5, !alias.scope !27, !noalias !24
  store <2 x double> %131, ptr %129, align 8, !tbaa !5, !alias.scope !27, !noalias !24
  %index.next = add nuw i64 %index, 4
  %132 = icmp eq i64 %index.next, %n.vec
  br i1 %132, label %middle.block, label %vector.body, !llvm.loop !29

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge182, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph181
  %indvars.iv253.ph = phi i64 [ %indvars.iv251, %vector.memcheck ], [ %indvars.iv251, %.lr.ph181 ], [ %ind.end, %middle.block ]
  %133 = sub i64 %wide.trip.count249, %indvars.iv253.ph
  %xtraiter320 = and i64 %133, 1
  %lcmp.mod321.not = icmp eq i64 %xtraiter320, 0
  br i1 %lcmp.mod321.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %134 = getelementptr inbounds double, ptr %117, i64 %indvars.iv253.ph
  %135 = load double, ptr %134, align 8, !tbaa !5
  %136 = getelementptr inbounds double, ptr %120, i64 %indvars.iv253.ph
  %137 = load double, ptr %136, align 8, !tbaa !5
  %138 = tail call double @llvm.fmuladd.f64(double %125, double %135, double %137)
  store double %138, ptr %136, align 8, !tbaa !5
  %indvars.iv.next254.prol = add nuw nsw i64 %indvars.iv253.ph, 1
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv253.unr = phi i64 [ %indvars.iv253.ph, %scalar.ph.preheader ], [ %indvars.iv.next254.prol, %scalar.ph.prol ]
  %139 = icmp eq i64 %indvars.iv253.ph, %85
  br i1 %139, label %._crit_edge182, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv253 = phi i64 [ %indvars.iv.next254.1, %scalar.ph ], [ %indvars.iv253.unr, %scalar.ph.prol.loopexit ]
  %140 = getelementptr inbounds double, ptr %117, i64 %indvars.iv253
  %141 = load double, ptr %140, align 8, !tbaa !5
  %142 = getelementptr inbounds double, ptr %120, i64 %indvars.iv253
  %143 = load double, ptr %142, align 8, !tbaa !5
  %144 = tail call double @llvm.fmuladd.f64(double %125, double %141, double %143)
  store double %144, ptr %142, align 8, !tbaa !5
  %indvars.iv.next254 = add nuw nsw i64 %indvars.iv253, 1
  %145 = getelementptr inbounds double, ptr %117, i64 %indvars.iv.next254
  %146 = load double, ptr %145, align 8, !tbaa !5
  %147 = getelementptr inbounds double, ptr %120, i64 %indvars.iv.next254
  %148 = load double, ptr %147, align 8, !tbaa !5
  %149 = tail call double @llvm.fmuladd.f64(double %125, double %146, double %148)
  store double %149, ptr %147, align 8, !tbaa !5
  %indvars.iv.next254.1 = add nuw nsw i64 %indvars.iv253, 2
  %exitcond257.not.1 = icmp eq i64 %indvars.iv.next254.1, %wide.trip.count261
  br i1 %exitcond257.not.1, label %._crit_edge182, label %scalar.ph, !llvm.loop !32

._crit_edge182:                                   ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  store double %124, ptr %121, align 8, !tbaa !5
  %indvars.iv.next259 = add nuw nsw i64 %indvars.iv258, 1
  %exitcond262.not = icmp eq i64 %indvars.iv.next259, %wide.trip.count261
  br i1 %exitcond262.not, label %.loopexit, label %.lr.ph181, !llvm.loop !33

.preheader151:                                    ; preds = %.preheader151.preheader, %._crit_edge191
  %indvars.iv273 = phi i64 [ 0, %.preheader151.preheader ], [ %indvars.iv.next274, %._crit_edge191 ]
  %.not200 = icmp eq i64 %indvars.iv273, 0
  br i1 %.not200, label %._crit_edge191, label %.lr.ph190

.lr.ph190:                                        ; preds = %.preheader151
  %150 = getelementptr inbounds ptr, ptr %54, i64 %indvars.iv273
  %151 = load ptr, ptr %150, align 8, !tbaa !9
  %152 = getelementptr inbounds double, ptr %26, i64 %indvars.iv273
  %.promoted = load double, ptr %152, align 8, !tbaa !5
  %xtraiter323 = and i64 %indvars.iv273, 1
  %153 = icmp eq i64 %indvars.iv273, 1
  br i1 %153, label %._crit_edge191.loopexit.unr-lcssa, label %.lr.ph190.new

.lr.ph190.new:                                    ; preds = %.lr.ph190
  %unroll_iter327 = and i64 %indvars.iv273, 9223372036854775806
  br label %156

.preheader.preheader:                             ; preds = %._crit_edge191
  %154 = zext nneg i32 %4 to i64
  %155 = zext nneg i32 %4 to i64
  br label %.preheader

156:                                              ; preds = %156, %.lr.ph190.new
  %indvars.iv268 = phi i64 [ 0, %.lr.ph190.new ], [ %indvars.iv.next269.1, %156 ]
  %157 = phi double [ %.promoted, %.lr.ph190.new ], [ %169, %156 ]
  %niter328 = phi i64 [ 0, %.lr.ph190.new ], [ %niter328.next.1, %156 ]
  %158 = getelementptr inbounds double, ptr %151, i64 %indvars.iv268
  %159 = load double, ptr %158, align 8, !tbaa !5
  %160 = getelementptr inbounds double, ptr %26, i64 %indvars.iv268
  %161 = load double, ptr %160, align 8, !tbaa !5
  %162 = fneg double %159
  %163 = tail call double @llvm.fmuladd.f64(double %162, double %161, double %157)
  store double %163, ptr %152, align 8, !tbaa !5
  %indvars.iv.next269 = or disjoint i64 %indvars.iv268, 1
  %164 = getelementptr inbounds double, ptr %151, i64 %indvars.iv.next269
  %165 = load double, ptr %164, align 8, !tbaa !5
  %166 = getelementptr inbounds double, ptr %26, i64 %indvars.iv.next269
  %167 = load double, ptr %166, align 8, !tbaa !5
  %168 = fneg double %165
  %169 = tail call double @llvm.fmuladd.f64(double %168, double %167, double %163)
  store double %169, ptr %152, align 8, !tbaa !5
  %indvars.iv.next269.1 = add nuw nsw i64 %indvars.iv268, 2
  %niter328.next.1 = add i64 %niter328, 2
  %niter328.ncmp.1 = icmp eq i64 %niter328.next.1, %unroll_iter327
  br i1 %niter328.ncmp.1, label %._crit_edge191.loopexit.unr-lcssa, label %156, !llvm.loop !34

._crit_edge191.loopexit.unr-lcssa:                ; preds = %156, %.lr.ph190
  %indvars.iv268.unr = phi i64 [ 0, %.lr.ph190 ], [ %indvars.iv.next269.1, %156 ]
  %.unr325 = phi double [ %.promoted, %.lr.ph190 ], [ %169, %156 ]
  %lcmp.mod326.not = icmp eq i64 %xtraiter323, 0
  br i1 %lcmp.mod326.not, label %._crit_edge191, label %._crit_edge191.loopexit.epilog-lcssa

._crit_edge191.loopexit.epilog-lcssa:             ; preds = %._crit_edge191.loopexit.unr-lcssa
  %170 = getelementptr inbounds double, ptr %151, i64 %indvars.iv268.unr
  %171 = load double, ptr %170, align 8, !tbaa !5
  %172 = getelementptr inbounds double, ptr %26, i64 %indvars.iv268.unr
  %173 = load double, ptr %172, align 8, !tbaa !5
  %174 = fneg double %171
  %175 = tail call double @llvm.fmuladd.f64(double %174, double %173, double %.unr325)
  store double %175, ptr %152, align 8, !tbaa !5
  br label %._crit_edge191

._crit_edge191:                                   ; preds = %._crit_edge191.loopexit.epilog-lcssa, %._crit_edge191.loopexit.unr-lcssa, %.preheader151
  %indvars.iv.next274 = add nuw nsw i64 %indvars.iv273, 1
  %exitcond277.not = icmp eq i64 %indvars.iv.next274, %wide.trip.count276
  br i1 %exitcond277.not, label %.preheader.preheader, label %.preheader151, !llvm.loop !35

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge196
  %indvars.iv278 = phi i64 [ %154, %.preheader.preheader ], [ %indvars.iv.next279, %._crit_edge196 ]
  %176 = icmp slt i64 %indvars.iv278, %155
  %177 = getelementptr inbounds ptr, ptr %54, i64 %indvars.iv278
  %178 = load ptr, ptr %177, align 8, !tbaa !9
  %179 = getelementptr inbounds double, ptr %26, i64 %indvars.iv278
  %.promoted197 = load double, ptr %179, align 8, !tbaa !5
  br i1 %176, label %.lr.ph195, label %._crit_edge196

.lr.ph195:                                        ; preds = %.preheader, %.lr.ph195
  %indvars.iv280 = phi i64 [ %indvars.iv.next281, %.lr.ph195 ], [ %indvars.iv278, %.preheader ]
  %180 = phi double [ %186, %.lr.ph195 ], [ %.promoted197, %.preheader ]
  %indvars.iv.next281 = add nuw nsw i64 %indvars.iv280, 1
  %181 = getelementptr inbounds double, ptr %178, i64 %indvars.iv.next281
  %182 = load double, ptr %181, align 8, !tbaa !5
  %183 = getelementptr inbounds double, ptr %26, i64 %indvars.iv.next281
  %184 = load double, ptr %183, align 8, !tbaa !5
  %185 = fneg double %182
  %186 = tail call double @llvm.fmuladd.f64(double %185, double %184, double %180)
  store double %186, ptr %179, align 8, !tbaa !5
  %187 = trunc nuw i64 %indvars.iv.next281 to i32
  %188 = icmp slt i32 %187, %4
  br i1 %188, label %.lr.ph195, label %._crit_edge196, !llvm.loop !36

._crit_edge196:                                   ; preds = %.lr.ph195, %.preheader
  %189 = phi double [ %.promoted197, %.preheader ], [ %186, %.lr.ph195 ]
  %190 = getelementptr inbounds double, ptr %178, i64 %indvars.iv278
  %191 = load double, ptr %190, align 8, !tbaa !5
  %192 = getelementptr inbounds double, ptr %26, i64 %indvars.iv278
  %193 = fdiv double %189, %191
  store double %193, ptr %192, align 8, !tbaa !5
  %indvars.iv.next279 = add nsw i64 %indvars.iv278, -1
  %194 = icmp sgt i64 %indvars.iv278, 0
  br i1 %194, label %.preheader, label %._crit_edge199, !llvm.loop !37

._crit_edge199:                                   ; preds = %._crit_edge196, %.preheader155, %._crit_edge167.thread, %._crit_edge167, %.preheader152
  %195 = phi ptr [ %54, %.preheader152 ], [ %54, %.preheader155 ], [ %53, %._crit_edge167 ], [ %51, %._crit_edge167.thread ], [ %54, %._crit_edge196 ]
  %196 = phi { i64, ptr } [ %55, %.preheader152 ], [ %55, %.preheader155 ], [ %52, %._crit_edge167 ], [ %50, %._crit_edge167.thread ], [ %55, %._crit_edge196 ]
  %197 = phi { i32, ptr } [ %25, %.preheader152 ], [ %25, %.preheader155 ], [ %25, %._crit_edge167 ], [ %.ph287, %._crit_edge167.thread ], [ %25, %._crit_edge196 ]
  %198 = extractvalue { i64, ptr } %196, 0
  %199 = extractvalue { i64, ptr } %7, 0
  tail call void @_ZN4sptk5swipe5freemENS0_6matrixE(i64 %198, ptr %195)
  tail call void @_ZN4sptk5swipe5freemENS0_6matrixE(i64 %199, ptr %8)
  ret { i32, ptr } %197
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #3

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.unroll.disable"}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = !{!25}
!25 = distinct !{!25, !26}
!26 = distinct !{!26, !"LVerDomain"}
!27 = !{!28}
!28 = distinct !{!28, !26}
!29 = distinct !{!29, !12, !30, !31}
!30 = !{!"llvm.loop.isvectorized", i32 1}
!31 = !{!"llvm.loop.unroll.runtime.disable"}
!32 = distinct !{!32, !12, !30}
!33 = distinct !{!33, !12}
!34 = distinct !{!34, !12}
!35 = distinct !{!35, !12}
!36 = distinct !{!36, !12}
!37 = distinct !{!37, !12}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass