; LLVM IR from Tencent-RoboticsX/jbdl :: src/jbdl/experimental/qpoases/src (Matrices)

; 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"

%"class.qpOASES::SparseMatrix" = type { ptr, i32, i32, ptr, ptr, ptr, ptr, %"class.qpOASES::Matrix.base" }
%"class.qpOASES::Matrix.base" = type <{ ptr, i32 }>
%"class.qpOASES::Indexlist" = type <{ ptr, ptr, i32, i32, i32, i32, i32, [4 x i8] }>

@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [103 x i8], align 1

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

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

declare noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv() #1

declare noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i32 noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZNK7qpOASES12SymSparseMat8bilinearEPKNS_9IndexlistEiPKdiPdi(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4, ptr noundef %5, i32 noundef %6) unnamed_addr #3 align 2 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store i32 %2, ptr %11, align 4, !tbaa !9
  store ptr %3, ptr %12, align 8, !tbaa !5
  store i32 %4, ptr %13, align 4, !tbaa !9
  store ptr %5, ptr %14, align 8, !tbaa !5
  store i32 %6, ptr %15, align 4, !tbaa !9
  %24 = load ptr, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  %26 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %25, i32 0, i32 5
  %27 = load ptr, ptr %26, align 8, !tbaa !11
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %32

29:                                               ; preds = %7
  %30 = call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %31 = call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %30, i32 noundef 140, ptr noundef null, ptr noundef @.str, ptr noundef @.str.1, i64 noundef 2154, i32 noundef 1)
  store i32 %31, ptr %8, align 4
  store i32 1, ptr %23, align 4
  br label %316

32:                                               ; preds = %7
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %44, %32
  %34 = load i32, ptr %16, align 4, !tbaa !9
  %35 = load i32, ptr %11, align 4, !tbaa !9
  %36 = load i32, ptr %11, align 4, !tbaa !9
  %37 = mul nsw i32 %35, %36
  %38 = icmp slt i32 %34, %37
  br i1 %38, label %39, label %47

39:                                               ; preds = %33
  %40 = load ptr, ptr %14, align 8, !tbaa !5
  %41 = load i32, ptr %16, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds double, ptr %40, i64 %42
  store double 0.000000e+00, ptr %43, align 8, !tbaa !13
  br label %44

44:                                               ; preds = %39
  %45 = load i32, ptr %16, align 4, !tbaa !9
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %16, align 4, !tbaa !9
  br label %33, !llvm.loop !15

47:                                               ; preds = %33
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %276, %47
  %49 = load i32, ptr %19, align 4, !tbaa !9
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds %"class.qpOASES::Indexlist", ptr %50, i32 0, i32 2
  %52 = load i32, ptr %51, align 8, !tbaa !17
  %53 = icmp slt i32 %49, %52
  br i1 %53, label %54, label %279

54:                                               ; preds = %48
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = getelementptr inbounds %"class.qpOASES::Indexlist", ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !19
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = getelementptr inbounds %"class.qpOASES::Indexlist", ptr %58, i32 0, i32 1
  %60 = load ptr, ptr %59, align 8, !tbaa !20
  %61 = load i32, ptr %19, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds i32, ptr %60, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds i32, ptr %57, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !9
  store i32 %67, ptr %22, align 4, !tbaa !9
  %68 = getelementptr inbounds i8, ptr %24, i64 8
  %69 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %68, i32 0, i32 5
  %70 = load ptr, ptr %69, align 8, !tbaa !11
  %71 = load i32, ptr %22, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds i32, ptr %70, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !9
  store i32 %74, ptr %20, align 4, !tbaa !9
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %274, %54
  %76 = load i32, ptr %20, align 4, !tbaa !9
  %77 = getelementptr inbounds i8, ptr %24, i64 8
  %78 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %77, i32 0, i32 4
  %79 = load ptr, ptr %78, align 8, !tbaa !21
  %80 = load i32, ptr %22, align 4, !tbaa !9
  %81 = add nsw i32 %80, 1
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i32, ptr %79, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !9
  %85 = icmp slt i32 %76, %84
  br i1 %85, label %86, label %92

86:                                               ; preds = %75
  %87 = load i32, ptr %18, align 4, !tbaa !9
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = getelementptr inbounds %"class.qpOASES::Indexlist", ptr %88, i32 0, i32 2
  %90 = load i32, ptr %89, align 8, !tbaa !17
  %91 = icmp slt i32 %87, %90
  br label %92

92:                                               ; preds = %86, %75
  %93 = phi i1 [ false, %75 ], [ %91, %86 ]
  br i1 %93, label %94, label %275

94:                                               ; preds = %92
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = getelementptr inbounds %"class.qpOASES::Indexlist", ptr %95, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8, !tbaa !19
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  %99 = getelementptr inbounds %"class.qpOASES::Indexlist", ptr %98, i32 0, i32 1
  %100 = load ptr, ptr %99, align 8, !tbaa !20
  %101 = load i32, ptr %18, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds i32, ptr %100, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds i32, ptr %97, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !9
  store i32 %107, ptr %21, align 4, !tbaa !9
  %108 = getelementptr inbounds i8, ptr %24, i64 8
  %109 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %108, i32 0, i32 3
  %110 = load ptr, ptr %109, align 8, !tbaa !22
  %111 = load i32, ptr %20, align 4, !tbaa !9
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds i32, ptr %110, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !9
  %115 = load i32, ptr %21, align 4, !tbaa !9
  %116 = icmp eq i32 %114, %115
  br i1 %116, label %117, label %257

117:                                              ; preds = %94
  %118 = load i32, ptr %21, align 4, !tbaa !9
  %119 = load i32, ptr %22, align 4, !tbaa !9
  %120 = icmp eq i32 %118, %119
  br i1 %120, label %121, label %177

121:                                              ; preds = %117
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %122

122:                                              ; preds = %173, %121
  %123 = load i32, ptr %16, align 4, !tbaa !9
  %124 = load i32, ptr %11, align 4, !tbaa !9
  %125 = icmp slt i32 %123, %124
  br i1 %125, label %126, label %176

126:                                              ; preds = %122
  %127 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %127, ptr %17, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %169, %126
  %129 = load i32, ptr %17, align 4, !tbaa !9
  %130 = load i32, ptr %11, align 4, !tbaa !9
  %131 = icmp slt i32 %129, %130
  br i1 %131, label %132, label %172

132:                                              ; preds = %128
  %133 = getelementptr inbounds i8, ptr %24, i64 8
  %134 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %133, i32 0, i32 6
  %135 = load ptr, ptr %134, align 8, !tbaa !23
  %136 = load i32, ptr %20, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds double, ptr %135, i64 %137
  %139 = load double, ptr %138, align 8, !tbaa !13
  %140 = load ptr, ptr %12, align 8, !tbaa !5
  %141 = load i32, ptr %16, align 4, !tbaa !9
  %142 = load i32, ptr %13, align 4, !tbaa !9
  %143 = mul nsw i32 %141, %142
  %144 = load i32, ptr %22, align 4, !tbaa !9
  %145 = add nsw i32 %143, %144
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds double, ptr %140, i64 %146
  %148 = load double, ptr %147, align 8, !tbaa !13
  %149 = fmul double %139, %148
  %150 = load ptr, ptr %12, align 8, !tbaa !5
  %151 = load i32, ptr %17, align 4, !tbaa !9
  %152 = load i32, ptr %13, align 4, !tbaa !9
  %153 = mul nsw i32 %151, %152
  %154 = load i32, ptr %22, align 4, !tbaa !9
  %155 = add nsw i32 %153, %154
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds double, ptr %150, i64 %156
  %158 = load double, ptr %157, align 8, !tbaa !13
  %159 = load ptr, ptr %14, align 8, !tbaa !5
  %160 = load i32, ptr %16, align 4, !tbaa !9
  %161 = load i32, ptr %15, align 4, !tbaa !9
  %162 = mul nsw i32 %160, %161
  %163 = load i32, ptr %17, align 4, !tbaa !9
  %164 = add nsw i32 %162, %163
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds double, ptr %159, i64 %165
  %167 = load double, ptr %166, align 8, !tbaa !13
  %168 = call double @llvm.fmuladd.f64(double %149, double %158, double %167)
  store double %168, ptr %166, align 8, !tbaa !13
  br label %169

169:                                              ; preds = %132
  %170 = load i32, ptr %17, align 4, !tbaa !9
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %17, align 4, !tbaa !9
  br label %128, !llvm.loop !24

172:                                              ; preds = %128
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %16, align 4, !tbaa !9
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %16, align 4, !tbaa !9
  br label %122, !llvm.loop !25

176:                                              ; preds = %122
  br label %252

177:                                              ; preds = %117
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %178

178:                                              ; preds = %248, %177
  %179 = load i32, ptr %16, align 4, !tbaa !9
  %180 = load i32, ptr %11, align 4, !tbaa !9
  %181 = icmp slt i32 %179, %180
  br i1 %181, label %182, label %251

182:                                              ; preds = %178
  %183 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %183, ptr %17, align 4, !tbaa !9
  br label %184

184:                                              ; preds = %244, %182
  %185 = load i32, ptr %17, align 4, !tbaa !9
  %186 = load i32, ptr %11, align 4, !tbaa !9
  %187 = icmp slt i32 %185, %186
  br i1 %187, label %188, label %247

188:                                              ; preds = %184
  %189 = getelementptr inbounds i8, ptr %24, i64 8
  %190 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %189, i32 0, i32 6
  %191 = load ptr, ptr %190, align 8, !tbaa !23
  %192 = load i32, ptr %20, align 4, !tbaa !9
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds double, ptr %191, i64 %193
  %195 = load double, ptr %194, align 8, !tbaa !13
  %196 = load ptr, ptr %12, align 8, !tbaa !5
  %197 = load i32, ptr %16, align 4, !tbaa !9
  %198 = load i32, ptr %13, align 4, !tbaa !9
  %199 = mul nsw i32 %197, %198
  %200 = load i32, ptr %22, align 4, !tbaa !9
  %201 = add nsw i32 %199, %200
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds double, ptr %196, i64 %202
  %204 = load double, ptr %203, align 8, !tbaa !13
  %205 = load ptr, ptr %12, align 8, !tbaa !5
  %206 = load i32, ptr %17, align 4, !tbaa !9
  %207 = load i32, ptr %13, align 4, !tbaa !9
  %208 = mul nsw i32 %206, %207
  %209 = load i32, ptr %21, align 4, !tbaa !9
  %210 = add nsw i32 %208, %209
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds double, ptr %205, i64 %211
  %213 = load double, ptr %212, align 8, !tbaa !13
  %214 = load ptr, ptr %12, align 8, !tbaa !5
  %215 = load i32, ptr %16, align 4, !tbaa !9
  %216 = load i32, ptr %13, align 4, !tbaa !9
  %217 = mul nsw i32 %215, %216
  %218 = load i32, ptr %21, align 4, !tbaa !9
  %219 = add nsw i32 %217, %218
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds double, ptr %214, i64 %220
  %222 = load double, ptr %221, align 8, !tbaa !13
  %223 = load ptr, ptr %12, align 8, !tbaa !5
  %224 = load i32, ptr %17, align 4, !tbaa !9
  %225 = load i32, ptr %13, align 4, !tbaa !9
  %226 = mul nsw i32 %224, %225
  %227 = load i32, ptr %22, align 4, !tbaa !9
  %228 = add nsw i32 %226, %227
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds double, ptr %223, i64 %229
  %231 = load double, ptr %230, align 8, !tbaa !13
  %232 = fmul double %222, %231
  %233 = call double @llvm.fmuladd.f64(double %204, double %213, double %232)
  %234 = load ptr, ptr %14, align 8, !tbaa !5
  %235 = load i32, ptr %16, align 4, !tbaa !9
  %236 = load i32, ptr %15, align 4, !tbaa !9
  %237 = mul nsw i32 %235, %236
  %238 = load i32, ptr %17, align 4, !tbaa !9
  %239 = add nsw i32 %237, %238
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds double, ptr %234, i64 %240
  %242 = load double, ptr %241, align 8, !tbaa !13
  %243 = call double @llvm.fmuladd.f64(double %195, double %233, double %242)
  store double %243, ptr %241, align 8, !tbaa !13
  br label %244

244:                                              ; preds = %188
  %245 = load i32, ptr %17, align 4, !tbaa !9
  %246 = add nsw i32 %245, 1
  store i32 %246, ptr %17, align 4, !tbaa !9
  br label %184, !llvm.loop !26

247:                                              ; preds = %184
  br label %248

248:                                              ; preds = %247
  %249 = load i32, ptr %16, align 4, !tbaa !9
  %250 = add nsw i32 %249, 1
  store i32 %250, ptr %16, align 4, !tbaa !9
  br label %178, !llvm.loop !27

251:                                              ; preds = %178
  br label %252

252:                                              ; preds = %251, %176
  %253 = load i32, ptr %20, align 4, !tbaa !9
  %254 = add nsw i32 %253, 1
  store i32 %254, ptr %20, align 4, !tbaa !9
  %255 = load i32, ptr %18, align 4, !tbaa !9
  %256 = add nsw i32 %255, 1
  store i32 %256, ptr %18, align 4, !tbaa !9
  br label %274

257:                                              ; preds = %94
  %258 = getelementptr inbounds i8, ptr %24, i64 8
  %259 = getelementptr inbounds %"class.qpOASES::SparseMatrix", ptr %258, i32 0, i32 3
  %260 = load ptr, ptr %259, align 8, !tbaa !22
  %261 = load i32, ptr %20, align 4, !tbaa !9
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds i32, ptr %260, i64 %262
  %264 = load i32, ptr %263, align 4, !tbaa !9
  %265 = load i32, ptr %21, align 4, !tbaa !9
  %266 = icmp sgt i32 %264, %265
  br i1 %266, label %267, label %270

267:                                              ; preds = %257
  %268 = load i32, ptr %18, align 4, !tbaa !9
  %269 = add nsw i32 %268, 1
  store i32 %269, ptr %18, align 4, !tbaa !9
  br label %273

270:                                              ; preds = %257
  %271 = load i32, ptr %20, align 4, !tbaa !9
  %272 = add nsw i32 %271, 1
  store i32 %272, ptr %20, align 4, !tbaa !9
  br label %273

273:                                              ; preds = %270, %267
  br label %274

274:                                              ; preds = %273, %252
  br label %75, !llvm.loop !28

275:                                              ; preds = %92
  br label %276

276:                                              ; preds = %275
  %277 = load i32, ptr %19, align 4, !tbaa !9
  %278 = add nsw i32 %277, 1
  store i32 %278, ptr %19, align 4, !tbaa !9
  br label %48, !llvm.loop !29

279:                                              ; preds = %48
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %280

280:                                              ; preds = %312, %279
  %281 = load i32, ptr %16, align 4, !tbaa !9
  %282 = load i32, ptr %11, align 4, !tbaa !9
  %283 = icmp slt i32 %281, %282
  br i1 %283, label %284, label %315

284:                                              ; preds = %280
  %285 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %285, ptr %17, align 4, !tbaa !9
  br label %286

286:                                              ; preds = %308, %284
  %287 = load i32, ptr %17, align 4, !tbaa !9
  %288 = load i32, ptr %11, align 4, !tbaa !9
  %289 = icmp slt i32 %287, %288
  br i1 %289, label %290, label %311

290:                                              ; preds = %286
  %291 = load ptr, ptr %14, align 8, !tbaa !5
  %292 = load i32, ptr %16, align 4, !tbaa !9
  %293 = load i32, ptr %15, align 4, !tbaa !9
  %294 = mul nsw i32 %292, %293
  %295 = load i32, ptr %17, align 4, !tbaa !9
  %296 = add nsw i32 %294, %295
  %297 = sext i32 %296 to i64
  %298 = getelementptr inbounds double, ptr %291, i64 %297
  %299 = load double, ptr %298, align 8, !tbaa !13
  %300 = load ptr, ptr %14, align 8, !tbaa !5
  %301 = load i32, ptr %17, align 4, !tbaa !9
  %302 = load i32, ptr %15, align 4, !tbaa !9
  %303 = mul nsw i32 %301, %302
  %304 = load i32, ptr %16, align 4, !tbaa !9
  %305 = add nsw i32 %303, %304
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds double, ptr %300, i64 %306
  store double %299, ptr %307, align 8, !tbaa !13
  br label %308

308:                                              ; preds = %290
  %309 = load i32, ptr %17, align 4, !tbaa !9
  %310 = add nsw i32 %309, 1
  store i32 %310, ptr %17, align 4, !tbaa !9
  br label %286, !llvm.loop !30

311:                                              ; preds = %286
  br label %312

312:                                              ; preds = %311
  %313 = load i32, ptr %16, align 4, !tbaa !9
  %314 = add nsw i32 %313, 1
  store i32 %314, ptr %16, align 4, !tbaa !9
  br label %280, !llvm.loop !31

315:                                              ; preds = %280
  store i32 0, ptr %8, align 4
  store i32 1, ptr %23, align 4
  br label %316

316:                                              ; preds = %315, %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  %317 = load i32, ptr %8, align 4
  ret i32 %317
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #4 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 32}
!12 = !{!"_ZTSN7qpOASES12SparseMatrixE", !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !10, i64 16}
!18 = !{!"_ZTSN7qpOASES9IndexlistE", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!19 = !{!18, !6, i64 0}
!20 = !{!18, !6, i64 8}
!21 = !{!12, !6, i64 24}
!22 = !{!12, !6, i64 16}
!23 = !{!12, !6, i64 40}
!24 = distinct !{!24, !16}
!25 = distinct !{!25, !16}
!26 = distinct !{!26, !16}
!27 = distinct !{!27, !16}
!28 = distinct !{!28, !16}
!29 = distinct !{!29, !16}
!30 = distinct !{!30, !16}
!31 = distinct !{!31, !16}


; 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"

@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [103 x i8], align 1

declare noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv() local_unnamed_addr #0

declare noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, i32 noundef) 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 uwtable
define dso_local noundef i32 @_ZNK7qpOASES12SymSparseMat8bilinearEPKNS_9IndexlistEiPKdiPdi(ptr nocapture noundef nonnull readonly align 8 dereferenceable(56) %0, ptr nocapture noundef readonly %1, i32 noundef %2, ptr nocapture noundef readonly %3, i32 noundef %4, ptr nocapture noundef %5, i32 noundef %6) unnamed_addr #2 align 2 {
  %8 = getelementptr inbounds i8, ptr %0, i64 40
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = icmp eq ptr %9, null
  br i1 %10, label %14, label %.preheader119

.preheader119:                                    ; preds = %7
  %.not = icmp eq i32 %2, 0
  br i1 %.not, label %.preheader118, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader119
  %11 = mul i32 %2, %2
  %12 = tail call i32 @llvm.umax.i32(i32 %11, i32 1)
  %umax = zext i32 %12 to i64
  %13 = shl nuw nsw i64 %umax, 3
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %5, i8 0, i64 %13, i1 false), !tbaa !11
  br label %.preheader118

14:                                               ; preds = %7
  %15 = tail call noundef ptr @_ZN7qpOASES23getGlobalMessageHandlerEv()
  %16 = tail call noundef i32 @_ZN7qpOASES15MessageHandling10throwErrorENS_11returnValueEPKcS3_S3_mNS_16VisibilityStatusE(ptr noundef nonnull align 8 dereferenceable(28) %15, i32 noundef 140, ptr noundef null, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 2154, i32 noundef 1)
  br label %.loopexit

.preheader118:                                    ; preds = %.lr.ph.preheader, %.preheader119
  %17 = getelementptr inbounds i8, ptr %1, i64 16
  %18 = load i32, ptr %17, align 8, !tbaa !13
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph130.split.preheader, label %.preheader111

.lr.ph130.split.preheader:                        ; preds = %.preheader118
  %20 = load ptr, ptr %1, align 8, !tbaa !15
  %21 = getelementptr inbounds i8, ptr %1, i64 8
  %22 = load ptr, ptr %21, align 8, !tbaa !16
  %23 = getelementptr inbounds i8, ptr %0, i64 32
  %24 = load ptr, ptr %23, align 8, !tbaa !17
  %invariant.gep = getelementptr i8, ptr %24, i64 4
  %25 = getelementptr inbounds i8, ptr %0, i64 24
  %26 = load ptr, ptr %25, align 8
  %27 = icmp sgt i32 %2, 0
  %28 = getelementptr inbounds i8, ptr %0, i64 48
  %29 = sext i32 %4 to i64
  %30 = sext i32 %6 to i64
  %wide.trip.count155 = zext nneg i32 %18 to i64
  %wide.trip.count140 = zext i32 %2 to i64
  %wide.trip.count150 = zext nneg i32 %2 to i64
  %31 = shl nsw i64 %30, 3
  %32 = add nsw i64 %31, 8
  %33 = shl nuw nsw i64 %wide.trip.count140, 3
  %34 = shl nsw i64 %30, 3
  %scevgep193 = getelementptr i8, ptr %3, i64 %33
  %35 = add nuw nsw i64 %wide.trip.count140, 2305843009213693951
  %36 = mul i64 %35, %29
  %37 = shl i64 %36, 3
  %38 = getelementptr i8, ptr %3, i64 %37
  %scevgep195 = getelementptr i8, ptr %38, i64 8
  %39 = shl nsw i64 %30, 3
  %40 = add nsw i64 %39, 8
  %41 = shl nuw nsw i64 %wide.trip.count140, 3
  %42 = shl nsw i64 %30, 3
  %scevgep221 = getelementptr i8, ptr %3, i64 %41
  %scevgep223 = getelementptr i8, ptr %3, i64 %41
  %43 = add nuw nsw i64 %wide.trip.count140, 2305843009213693951
  %44 = mul i64 %43, %29
  %45 = shl i64 %44, 3
  %46 = getelementptr i8, ptr %3, i64 %45
  %scevgep226 = getelementptr i8, ptr %46, i64 8
  %ident.check214.not = icmp eq i32 %4, 1
  %47 = getelementptr i8, ptr %5, i64 %41
  %ident.check.not = icmp eq i32 %4, 1
  %48 = getelementptr i8, ptr %5, i64 %33
  %49 = add nsw i64 %wide.trip.count140, -1
  br label %.lr.ph130.split

.preheader111:                                    ; preds = %.critedge, %.preheader118
  %50 = icmp sgt i32 %2, 0
  br i1 %50, label %.preheader.preheader, label %.loopexit

.preheader.preheader:                             ; preds = %.preheader111
  %51 = sext i32 %6 to i64
  %wide.trip.count165 = zext nneg i32 %2 to i64
  %ident.check269.not = icmp eq i32 %6, 1
  br label %.preheader

.lr.ph130.split:                                  ; preds = %.lr.ph130.split.preheader, %.critedge
  %indvars.iv152 = phi i64 [ 0, %.lr.ph130.split.preheader ], [ %indvars.iv.next153, %.critedge ]
  %52 = getelementptr inbounds i32, ptr %22, i64 %indvars.iv152
  %53 = load i32, ptr %52, align 4, !tbaa !18
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds i32, ptr %20, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !18
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds i32, ptr %9, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !18
  %gep = getelementptr i32, ptr %invariant.gep, i64 %57
  %60 = load i32, ptr %gep, align 4, !tbaa !18
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %.lr.ph128, label %.critedge

.lr.ph128:                                        ; preds = %.lr.ph130.split
  %62 = load ptr, ptr %28, align 8
  %invariant.gep174 = getelementptr double, ptr %3, i64 %57
  %invariant.gep170 = getelementptr double, ptr %3, i64 %57
  %invariant.gep182 = getelementptr double, ptr %3, i64 %57
  %invariant.gep178 = getelementptr double, ptr %3, i64 %57
  %scevgep190 = getelementptr i8, ptr %62, i64 8
  %63 = shl nsw i64 %57, 3
  %scevgep194 = getelementptr i8, ptr %scevgep193, i64 %63
  %scevgep196 = getelementptr i8, ptr %scevgep195, i64 %63
  %scevgep218 = getelementptr i8, ptr %62, i64 8
  %64 = shl nsw i64 %57, 3
  %scevgep222 = getelementptr i8, ptr %scevgep221, i64 %64
  %scevgep227 = getelementptr i8, ptr %scevgep226, i64 %64
  %65 = getelementptr i8, ptr %3, i64 %64
  br label %66

66:                                               ; preds = %.lr.ph128, %161
  %.095127 = phi i32 [ %59, %.lr.ph128 ], [ %.196, %161 ]
  %.098126 = phi i32 [ 0, %.lr.ph128 ], [ %.199, %161 ]
  %67 = sext i32 %.098126 to i64
  %68 = getelementptr inbounds i32, ptr %22, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !18
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds i32, ptr %20, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !18
  %73 = sext i32 %.095127 to i64
  %74 = getelementptr inbounds i32, ptr %26, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !18
  %76 = icmp eq i32 %75, %72
  br i1 %76, label %77, label %155

77:                                               ; preds = %66
  %78 = icmp eq i32 %72, %56
  br i1 %78, label %.preheader114, label %.preheader116

.preheader116:                                    ; preds = %77
  br i1 %27, label %.preheader113.lr.ph, label %.loopexit115

.preheader113.lr.ph:                              ; preds = %.preheader116
  %79 = getelementptr inbounds double, ptr %62, i64 %73
  %80 = sext i32 %72 to i64
  %invariant.gep176 = getelementptr double, ptr %3, i64 %80
  %invariant.gep168 = getelementptr double, ptr %3, i64 %80
  %81 = shl nsw i64 %73, 3
  %scevgep219 = getelementptr i8, ptr %scevgep218, i64 %81
  %82 = shl nsw i64 %80, 3
  %scevgep224 = getelementptr i8, ptr %scevgep223, i64 %82
  %83 = getelementptr i8, ptr %3, i64 %82
  br label %.preheader113

.preheader114:                                    ; preds = %77
  br i1 %27, label %.preheader112.lr.ph, label %.loopexit115

.preheader112.lr.ph:                              ; preds = %.preheader114
  %84 = getelementptr inbounds double, ptr %62, i64 %73
  %85 = shl nsw i64 %73, 3
  %scevgep191 = getelementptr i8, ptr %scevgep190, i64 %85
  br label %.preheader112

.preheader112:                                    ; preds = %.preheader112.lr.ph, %.loopexit286
  %indvars.iv142 = phi i64 [ 0, %.preheader112.lr.ph ], [ %indvars.iv.next143, %.loopexit286 ]
  %86 = sub nsw i64 %wide.trip.count140, %indvars.iv142
  %87 = mul nsw i64 %indvars.iv142, %29
  %gep183 = getelementptr double, ptr %invariant.gep182, i64 %87
  %88 = mul nsw i64 %indvars.iv142, %30
  %invariant.gep180 = getelementptr double, ptr %5, i64 %88
  %min.iters.check = icmp ugt i64 %86, 5
  %or.cond288 = and i1 %min.iters.check, %ident.check.not
  br i1 %or.cond288, label %vector.memcheck, label %scalar.ph.preheader

vector.memcheck:                                  ; preds = %.preheader112
  %89 = add i64 %indvars.iv142, %57
  %90 = shl i64 %89, 3
  %scevgep192 = getelementptr i8, ptr %3, i64 %90
  %91 = mul i64 %34, %indvars.iv142
  %scevgep189 = getelementptr i8, ptr %48, i64 %91
  %92 = mul i64 %32, %indvars.iv142
  %scevgep = getelementptr i8, ptr %5, i64 %92
  %bound0 = icmp ult ptr %scevgep, %scevgep191
  %bound1 = icmp ult ptr %84, %scevgep189
  %found.conflict = and i1 %bound0, %bound1
  %bound0197 = icmp ult ptr %scevgep, %scevgep194
  %bound1198 = icmp ult ptr %scevgep192, %scevgep189
  %found.conflict199 = and i1 %bound0197, %bound1198
  %conflict.rdx = or i1 %found.conflict, %found.conflict199
  %bound0200 = icmp ult ptr %scevgep, %scevgep196
  %bound1201 = icmp ult ptr %invariant.gep182, %scevgep189
  %found.conflict202 = and i1 %bound0200, %bound1201
  %conflict.rdx203 = or i1 %conflict.rdx, %found.conflict202
  br i1 %conflict.rdx203, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %86, -4
  %ind.end = add i64 %indvars.iv142, %n.vec
  %93 = load double, ptr %84, align 8, !tbaa !11, !alias.scope !19
  %broadcast.splatinsert206 = insertelement <2 x double> poison, double %93, i64 0
  %broadcast.splat207 = shufflevector <2 x double> %broadcast.splatinsert206, <2 x double> poison, <2 x i32> zeroinitializer
  %94 = load double, ptr %gep183, align 8, !tbaa !11, !alias.scope !22
  %broadcast.splatinsert208 = insertelement <2 x double> poison, double %94, i64 0
  %broadcast.splat209 = shufflevector <2 x double> %broadcast.splatinsert208, <2 x double> poison, <2 x i32> zeroinitializer
  %95 = fmul <2 x double> %broadcast.splat207, %broadcast.splat209
  %96 = fmul <2 x double> %broadcast.splat207, %broadcast.splat209
  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.iv142, %index
  %97 = getelementptr double, ptr %invariant.gep178, i64 %offset.idx
  %98 = getelementptr i8, ptr %97, i64 16
  %wide.load = load <2 x double>, ptr %97, align 8, !tbaa !11, !alias.scope !24
  %wide.load210 = load <2 x double>, ptr %98, align 8, !tbaa !11, !alias.scope !24
  %99 = getelementptr double, ptr %invariant.gep180, i64 %offset.idx
  %100 = getelementptr i8, ptr %99, i64 16
  %wide.load211 = load <2 x double>, ptr %99, align 8, !tbaa !11, !alias.scope !26, !noalias !28
  %wide.load212 = load <2 x double>, ptr %100, align 8, !tbaa !11, !alias.scope !26, !noalias !28
  %101 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %95, <2 x double> %wide.load, <2 x double> %wide.load211)
  %102 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %96, <2 x double> %wide.load210, <2 x double> %wide.load212)
  store <2 x double> %101, ptr %99, align 8, !tbaa !11, !alias.scope !26, !noalias !28
  store <2 x double> %102, ptr %100, align 8, !tbaa !11, !alias.scope !26, !noalias !28
  %index.next = add nuw i64 %index, 4
  %103 = icmp eq i64 %index.next, %n.vec
  br i1 %103, label %middle.block, label %vector.body, !llvm.loop !29

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %86, %n.vec
  br i1 %cmp.n, label %.loopexit286, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.preheader112
  %indvars.iv144.ph = phi i64 [ %indvars.iv142, %vector.memcheck ], [ %indvars.iv142, %.preheader112 ], [ %ind.end, %middle.block ]
  %104 = sub i64 %wide.trip.count140, %indvars.iv144.ph
  %xtraiter = and i64 %104, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %105 = load double, ptr %84, align 8, !tbaa !11
  %106 = load double, ptr %gep183, align 8, !tbaa !11
  %107 = fmul double %105, %106
  %108 = mul nsw i64 %indvars.iv144.ph, %29
  %gep179.prol = getelementptr double, ptr %invariant.gep178, i64 %108
  %109 = load double, ptr %gep179.prol, align 8, !tbaa !11
  %gep181.prol = getelementptr double, ptr %invariant.gep180, i64 %indvars.iv144.ph
  %110 = load double, ptr %gep181.prol, align 8, !tbaa !11
  %111 = tail call double @llvm.fmuladd.f64(double %107, double %109, double %110)
  store double %111, ptr %gep181.prol, align 8, !tbaa !11
  %indvars.iv.next145.prol = add nuw nsw i64 %indvars.iv144.ph, 1
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv144.unr = phi i64 [ %indvars.iv144.ph, %scalar.ph.preheader ], [ %indvars.iv.next145.prol, %scalar.ph.prol ]
  %112 = icmp eq i64 %indvars.iv144.ph, %49
  br i1 %112, label %.loopexit286, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv144 = phi i64 [ %indvars.iv.next145.1, %scalar.ph ], [ %indvars.iv144.unr, %scalar.ph.prol.loopexit ]
  %113 = load double, ptr %84, align 8, !tbaa !11
  %114 = load double, ptr %gep183, align 8, !tbaa !11
  %115 = fmul double %113, %114
  %116 = mul nsw i64 %indvars.iv144, %29
  %gep179 = getelementptr double, ptr %invariant.gep178, i64 %116
  %117 = load double, ptr %gep179, align 8, !tbaa !11
  %gep181 = getelementptr double, ptr %invariant.gep180, i64 %indvars.iv144
  %118 = load double, ptr %gep181, align 8, !tbaa !11
  %119 = tail call double @llvm.fmuladd.f64(double %115, double %117, double %118)
  store double %119, ptr %gep181, align 8, !tbaa !11
  %indvars.iv.next145 = add nuw nsw i64 %indvars.iv144, 1
  %120 = load double, ptr %84, align 8, !tbaa !11
  %121 = load double, ptr %gep183, align 8, !tbaa !11
  %122 = fmul double %120, %121
  %123 = mul nsw i64 %indvars.iv.next145, %29
  %gep179.1 = getelementptr double, ptr %invariant.gep178, i64 %123
  %124 = load double, ptr %gep179.1, align 8, !tbaa !11
  %gep181.1 = getelementptr double, ptr %invariant.gep180, i64 %indvars.iv.next145
  %125 = load double, ptr %gep181.1, align 8, !tbaa !11
  %126 = tail call double @llvm.fmuladd.f64(double %122, double %124, double %125)
  store double %126, ptr %gep181.1, align 8, !tbaa !11
  %indvars.iv.next145.1 = add nuw nsw i64 %indvars.iv144, 2
  %exitcond148.not.1 = icmp eq i64 %indvars.iv.next145.1, %wide.trip.count150
  br i1 %exitcond148.not.1, label %.loopexit286, label %scalar.ph, !llvm.loop !33

.loopexit286:                                     ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %indvars.iv.next143 = add nuw nsw i64 %indvars.iv142, 1
  %exitcond151.not = icmp eq i64 %indvars.iv.next143, %wide.trip.count150
  br i1 %exitcond151.not, label %.loopexit115, label %.preheader112, !llvm.loop !34

.preheader113:                                    ; preds = %.preheader113.lr.ph, %.loopexit287
  %indvars.iv = phi i64 [ 0, %.preheader113.lr.ph ], [ %indvars.iv.next, %.loopexit287 ]
  %127 = sub nsw i64 %wide.trip.count140, %indvars.iv
  %128 = mul nsw i64 %indvars.iv, %29
  %gep175 = getelementptr double, ptr %invariant.gep174, i64 %128
  %gep177 = getelementptr double, ptr %invariant.gep176, i64 %128
  %129 = mul nsw i64 %indvars.iv, %30
  %invariant.gep172 = getelementptr double, ptr %5, i64 %129
  %min.iters.check250 = icmp ugt i64 %127, 5
  %or.cond289 = and i1 %min.iters.check250, %ident.check214.not
  br i1 %or.cond289, label %vector.memcheck215, label %scalar.ph249.preheader

vector.memcheck215:                               ; preds = %.preheader113
  %130 = shl nuw nsw i64 %indvars.iv, 3
  %scevgep225 = getelementptr i8, ptr %83, i64 %130
  %scevgep220 = getelementptr i8, ptr %65, i64 %130
  %131 = mul i64 %42, %indvars.iv
  %scevgep217 = getelementptr i8, ptr %47, i64 %131
  %132 = mul i64 %40, %indvars.iv
  %scevgep216 = getelementptr i8, ptr %5, i64 %132
  %bound0228 = icmp ult ptr %scevgep216, %scevgep219
  %bound1229 = icmp ult ptr %79, %scevgep217
  %found.conflict230 = and i1 %bound0228, %bound1229
  %bound0231 = icmp ult ptr %scevgep216, %scevgep222
  %bound1232 = icmp ult ptr %scevgep220, %scevgep217
  %found.conflict233 = and i1 %bound0231, %bound1232
  %conflict.rdx234 = or i1 %found.conflict230, %found.conflict233
  %bound0235 = icmp ult ptr %scevgep216, %scevgep224
  %bound1236 = icmp ult ptr %invariant.gep168, %scevgep217
  %found.conflict237 = and i1 %bound0235, %bound1236
  %conflict.rdx238 = or i1 %conflict.rdx234, %found.conflict237
  %bound0239 = icmp ult ptr %scevgep216, %scevgep224
  %bound1240 = icmp ult ptr %scevgep225, %scevgep217
  %found.conflict241 = and i1 %bound0239, %bound1240
  %conflict.rdx242 = or i1 %conflict.rdx238, %found.conflict241
  %bound0243 = icmp ult ptr %scevgep216, %scevgep227
  %bound1244 = icmp ult ptr %invariant.gep182, %scevgep217
  %found.conflict245 = and i1 %bound0243, %bound1244
  %conflict.rdx247 = or i1 %conflict.rdx242, %found.conflict245
  br i1 %conflict.rdx247, label %scalar.ph249.preheader, label %vector.ph251

vector.ph251:                                     ; preds = %vector.memcheck215
  %n.vec253 = and i64 %127, -2
  %ind.end254 = add i64 %indvars.iv, %n.vec253
  %133 = load double, ptr %79, align 8, !tbaa !11, !alias.scope !35
  %broadcast.splatinsert264 = insertelement <2 x double> poison, double %133, i64 0
  %broadcast.splat265 = shufflevector <2 x double> %broadcast.splatinsert264, <2 x double> poison, <2 x i32> zeroinitializer
  %134 = load double, ptr %gep175, align 8, !tbaa !11, !alias.scope !38
  %broadcast.splatinsert261 = insertelement <2 x double> poison, double %134, i64 0
  %broadcast.splat262 = shufflevector <2 x double> %broadcast.splatinsert261, <2 x double> poison, <2 x i32> zeroinitializer
  %135 = load double, ptr %gep177, align 8, !tbaa !11, !alias.scope !40
  %broadcast.splatinsert = insertelement <2 x double> poison, double %135, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body256

vector.body256:                                   ; preds = %vector.body256, %vector.ph251
  %index257 = phi i64 [ 0, %vector.ph251 ], [ %index.next266, %vector.body256 ]
  %offset.idx258 = add i64 %indvars.iv, %index257
  %136 = getelementptr double, ptr %invariant.gep168, i64 %offset.idx258
  %wide.load259 = load <2 x double>, ptr %136, align 8, !tbaa !11, !alias.scope !42
  %137 = getelementptr double, ptr %invariant.gep170, i64 %offset.idx258
  %wide.load260 = load <2 x double>, ptr %137, align 8, !tbaa !11, !alias.scope !44
  %138 = fmul <2 x double> %broadcast.splat, %wide.load260
  %139 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat262, <2 x double> %wide.load259, <2 x double> %138)
  %140 = getelementptr double, ptr %invariant.gep172, i64 %offset.idx258
  %wide.load263 = load <2 x double>, ptr %140, align 8, !tbaa !11, !alias.scope !46, !noalias !48
  %141 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat265, <2 x double> %139, <2 x double> %wide.load263)
  store <2 x double> %141, ptr %140, align 8, !tbaa !11, !alias.scope !46, !noalias !48
  %index.next266 = add nuw i64 %index257, 2
  %142 = icmp eq i64 %index.next266, %n.vec253
  br i1 %142, label %middle.block248, label %vector.body256, !llvm.loop !49

middle.block248:                                  ; preds = %vector.body256
  %cmp.n267 = icmp eq i64 %127, %n.vec253
  br i1 %cmp.n267, label %.loopexit287, label %scalar.ph249.preheader

scalar.ph249.preheader:                           ; preds = %middle.block248, %vector.memcheck215, %.preheader113
  %indvars.iv136.ph = phi i64 [ %indvars.iv, %vector.memcheck215 ], [ %indvars.iv, %.preheader113 ], [ %ind.end254, %middle.block248 ]
  br label %scalar.ph249

scalar.ph249:                                     ; preds = %scalar.ph249.preheader, %scalar.ph249
  %indvars.iv136 = phi i64 [ %indvars.iv.next137, %scalar.ph249 ], [ %indvars.iv136.ph, %scalar.ph249.preheader ]
  %143 = load double, ptr %79, align 8, !tbaa !11
  %144 = load double, ptr %gep175, align 8, !tbaa !11
  %145 = mul nsw i64 %indvars.iv136, %29
  %gep169 = getelementptr double, ptr %invariant.gep168, i64 %145
  %146 = load double, ptr %gep169, align 8, !tbaa !11
  %147 = load double, ptr %gep177, align 8, !tbaa !11
  %gep171 = getelementptr double, ptr %invariant.gep170, i64 %145
  %148 = load double, ptr %gep171, align 8, !tbaa !11
  %149 = fmul double %147, %148
  %150 = tail call double @llvm.fmuladd.f64(double %144, double %146, double %149)
  %gep173 = getelementptr double, ptr %invariant.gep172, i64 %indvars.iv136
  %151 = load double, ptr %gep173, align 8, !tbaa !11
  %152 = tail call double @llvm.fmuladd.f64(double %143, double %150, double %151)
  store double %152, ptr %gep173, align 8, !tbaa !11
  %indvars.iv.next137 = add nuw nsw i64 %indvars.iv136, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next137, %wide.trip.count140
  br i1 %exitcond.not, label %.loopexit287, label %scalar.ph249, !llvm.loop !50

.loopexit287:                                     ; preds = %scalar.ph249, %middle.block248
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond141.not = icmp eq i64 %indvars.iv.next, %wide.trip.count140
  br i1 %exitcond141.not, label %.loopexit115, label %.preheader113, !llvm.loop !51

.loopexit115:                                     ; preds = %.loopexit287, %.loopexit286, %.preheader116, %.preheader114
  %153 = add nsw i32 %.095127, 1
  %154 = add nsw i32 %.098126, 1
  br label %161

155:                                              ; preds = %66
  %156 = icmp sgt i32 %75, %72
  br i1 %156, label %157, label %159

157:                                              ; preds = %155
  %158 = add nsw i32 %.098126, 1
  br label %161

159:                                              ; preds = %155
  %160 = add nsw i32 %.095127, 1
  br label %161

161:                                              ; preds = %157, %159, %.loopexit115
  %.199 = phi i32 [ %154, %.loopexit115 ], [ %158, %157 ], [ %.098126, %159 ]
  %.196 = phi i32 [ %153, %.loopexit115 ], [ %.095127, %157 ], [ %160, %159 ]
  %162 = icmp slt i32 %.196, %60
  %163 = icmp slt i32 %.199, %18
  %or.cond = select i1 %162, i1 %163, i1 false
  br i1 %or.cond, label %66, label %.critedge, !llvm.loop !52

.critedge:                                        ; preds = %161, %.lr.ph130.split
  %indvars.iv.next153 = add nuw nsw i64 %indvars.iv152, 1
  %exitcond156.not = icmp eq i64 %indvars.iv.next153, %wide.trip.count155
  br i1 %exitcond156.not, label %.preheader111, label %.lr.ph130.split, !llvm.loop !53

.preheader:                                       ; preds = %.preheader.preheader, %.loopexit285
  %indvars.iv157 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next158, %.loopexit285 ]
  %164 = sub nsw i64 %wide.trip.count165, %indvars.iv157
  %165 = mul nsw i64 %indvars.iv157, %51
  %invariant.gep184 = getelementptr double, ptr %5, i64 %165
  %invariant.gep186 = getelementptr double, ptr %5, i64 %indvars.iv157
  %min.iters.check272 = icmp ugt i64 %164, 3
  %or.cond290 = and i1 %min.iters.check272, %ident.check269.not
  br i1 %or.cond290, label %vector.ph273, label %scalar.ph271.preheader

vector.ph273:                                     ; preds = %.preheader
  %n.vec275 = and i64 %164, -4
  %ind.end276 = add i64 %indvars.iv157, %n.vec275
  br label %vector.body278

vector.body278:                                   ; preds = %vector.body278, %vector.ph273
  %index279 = phi i64 [ 0, %vector.ph273 ], [ %index.next283, %vector.body278 ]
  %offset.idx280 = add i64 %indvars.iv157, %index279
  %166 = getelementptr double, ptr %invariant.gep184, i64 %offset.idx280
  %167 = getelementptr i8, ptr %166, i64 16
  %wide.load281 = load <2 x double>, ptr %166, align 8, !tbaa !11
  %wide.load282 = load <2 x double>, ptr %167, align 8, !tbaa !11
  %168 = getelementptr double, ptr %invariant.gep186, i64 %offset.idx280
  %169 = getelementptr i8, ptr %168, i64 16
  store <2 x double> %wide.load281, ptr %168, align 8, !tbaa !11
  store <2 x double> %wide.load282, ptr %169, align 8, !tbaa !11
  %index.next283 = add nuw i64 %index279, 4
  %170 = icmp eq i64 %index.next283, %n.vec275
  br i1 %170, label %middle.block270, label %vector.body278, !llvm.loop !54

middle.block270:                                  ; preds = %vector.body278
  %cmp.n284 = icmp eq i64 %164, %n.vec275
  br i1 %cmp.n284, label %.loopexit285, label %scalar.ph271.preheader

scalar.ph271.preheader:                           ; preds = %middle.block270, %.preheader
  %indvars.iv159.ph = phi i64 [ %indvars.iv157, %.preheader ], [ %ind.end276, %middle.block270 ]
  %171 = sub i64 %wide.trip.count165, %indvars.iv159.ph
  %xtraiter292 = and i64 %171, 3
  %lcmp.mod293.not = icmp eq i64 %xtraiter292, 0
  br i1 %lcmp.mod293.not, label %scalar.ph271.prol.loopexit, label %scalar.ph271.prol

scalar.ph271.prol:                                ; preds = %scalar.ph271.preheader, %scalar.ph271.prol
  %indvars.iv159.prol = phi i64 [ %indvars.iv.next160.prol, %scalar.ph271.prol ], [ %indvars.iv159.ph, %scalar.ph271.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph271.prol ], [ 0, %scalar.ph271.preheader ]
  %gep185.prol = getelementptr double, ptr %invariant.gep184, i64 %indvars.iv159.prol
  %172 = load double, ptr %gep185.prol, align 8, !tbaa !11
  %173 = mul nsw i64 %indvars.iv159.prol, %51
  %gep187.prol = getelementptr double, ptr %invariant.gep186, i64 %173
  store double %172, ptr %gep187.prol, align 8, !tbaa !11
  %indvars.iv.next160.prol = add nuw nsw i64 %indvars.iv159.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter292
  br i1 %prol.iter.cmp.not, label %scalar.ph271.prol.loopexit, label %scalar.ph271.prol, !llvm.loop !55

scalar.ph271.prol.loopexit:                       ; preds = %scalar.ph271.prol, %scalar.ph271.preheader
  %indvars.iv159.unr = phi i64 [ %indvars.iv159.ph, %scalar.ph271.preheader ], [ %indvars.iv.next160.prol, %scalar.ph271.prol ]
  %174 = sub i64 %indvars.iv159.ph, %wide.trip.count165
  %175 = icmp ugt i64 %174, -4
  br i1 %175, label %.loopexit285, label %scalar.ph271

scalar.ph271:                                     ; preds = %scalar.ph271.prol.loopexit, %scalar.ph271
  %indvars.iv159 = phi i64 [ %indvars.iv.next160.3, %scalar.ph271 ], [ %indvars.iv159.unr, %scalar.ph271.prol.loopexit ]
  %gep185 = getelementptr double, ptr %invariant.gep184, i64 %indvars.iv159
  %176 = load double, ptr %gep185, align 8, !tbaa !11
  %177 = mul nsw i64 %indvars.iv159, %51
  %gep187 = getelementptr double, ptr %invariant.gep186, i64 %177
  store double %176, ptr %gep187, align 8, !tbaa !11
  %indvars.iv.next160 = add nuw nsw i64 %indvars.iv159, 1
  %gep185.1 = getelementptr double, ptr %invariant.gep184, i64 %indvars.iv.next160
  %178 = load double, ptr %gep185.1, align 8, !tbaa !11
  %179 = mul nsw i64 %indvars.iv.next160, %51
  %gep187.1 = getelementptr double, ptr %invariant.gep186, i64 %179
  store double %178, ptr %gep187.1, align 8, !tbaa !11
  %indvars.iv.next160.1 = add nuw nsw i64 %indvars.iv159, 2
  %gep185.2 = getelementptr double, ptr %invariant.gep184, i64 %indvars.iv.next160.1
  %180 = load double, ptr %gep185.2, align 8, !tbaa !11
  %181 = mul nsw i64 %indvars.iv.next160.1, %51
  %gep187.2 = getelementptr double, ptr %invariant.gep186, i64 %181
  store double %180, ptr %gep187.2, align 8, !tbaa !11
  %indvars.iv.next160.2 = add nuw nsw i64 %indvars.iv159, 3
  %gep185.3 = getelementptr double, ptr %invariant.gep184, i64 %indvars.iv.next160.2
  %182 = load double, ptr %gep185.3, align 8, !tbaa !11
  %183 = mul nsw i64 %indvars.iv.next160.2, %51
  %gep187.3 = getelementptr double, ptr %invariant.gep186, i64 %183
  store double %182, ptr %gep187.3, align 8, !tbaa !11
  %indvars.iv.next160.3 = add nuw nsw i64 %indvars.iv159, 4
  %exitcond163.not.3 = icmp eq i64 %indvars.iv.next160.3, %wide.trip.count165
  br i1 %exitcond163.not.3, label %.loopexit285, label %scalar.ph271, !llvm.loop !57

.loopexit285:                                     ; preds = %scalar.ph271.prol.loopexit, %scalar.ph271, %middle.block270
  %indvars.iv.next158 = add nuw nsw i64 %indvars.iv157, 1
  %exitcond166.not = icmp eq i64 %indvars.iv.next158, %wide.trip.count165
  br i1 %exitcond166.not, label %.loopexit, label %.preheader, !llvm.loop !58

.loopexit:                                        ; preds = %.loopexit285, %.preheader111, %14
  %.0 = phi i32 [ %16, %14 ], [ 0, %.preheader111 ], [ 0, %.loopexit285 ]
  ret i32 %.0
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

; 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>) #4

attributes #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 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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, !10, i64 32}
!6 = !{!"_ZTSN7qpOASES12SparseMatrixE", !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !8, i64 0}
!13 = !{!14, !7, i64 16}
!14 = !{!"_ZTSN7qpOASES9IndexlistE", !10, i64 0, !10, i64 8, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32}
!15 = !{!14, !10, i64 0}
!16 = !{!14, !10, i64 8}
!17 = !{!6, !10, i64 24}
!18 = !{!7, !7, i64 0}
!19 = !{!20}
!20 = distinct !{!20, !21}
!21 = distinct !{!21, !"LVerDomain"}
!22 = !{!23}
!23 = distinct !{!23, !21}
!24 = !{!25}
!25 = distinct !{!25, !21}
!26 = !{!27}
!27 = distinct !{!27, !21}
!28 = !{!20, !25, !23}
!29 = distinct !{!29, !30, !31, !32}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!"llvm.loop.isvectorized", i32 1}
!32 = !{!"llvm.loop.unroll.runtime.disable"}
!33 = distinct !{!33, !30, !31}
!34 = distinct !{!34, !30}
!35 = !{!36}
!36 = distinct !{!36, !37}
!37 = distinct !{!37, !"LVerDomain"}
!38 = !{!39}
!39 = distinct !{!39, !37}
!40 = !{!41}
!41 = distinct !{!41, !37}
!42 = !{!43}
!43 = distinct !{!43, !37}
!44 = !{!45}
!45 = distinct !{!45, !37}
!46 = !{!47}
!47 = distinct !{!47, !37}
!48 = !{!36, !45, !41, !43, !39}
!49 = distinct !{!49, !30, !31, !32}
!50 = distinct !{!50, !30, !31}
!51 = distinct !{!51, !30}
!52 = distinct !{!52, !30}
!53 = distinct !{!53, !30}
!54 = distinct !{!54, !30, !31, !32}
!55 = distinct !{!55, !56}
!56 = !{!"llvm.loop.unroll.disable"}
!57 = distinct !{!57, !30, !31}
!58 = distinct !{!58, !30}


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