; LLVM IR from Derek-TH-Wang/quadruped_ctrl :: src/osqp/lin_sys/direct/pardiso (pardiso_interface)

; 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.csc = type { i64, i64, i64, ptr, ptr, ptr, i64 }
%struct.pardiso = type { i32, ptr, ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr, [64 x ptr], [64 x i64], i64, i64, i64, i64, i64, i64, i64, i64, i64, double, ptr, i64, ptr, ptr, ptr }

; Function Attrs: nounwind uwtable
declare dso_local void @free_linsys_solver_pardiso(ptr noundef) #0

declare void @pardiso(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local ptr @init_linsys_solver_pardiso(ptr noundef %0, ptr noundef %1, double noundef %2, ptr noundef %3, i64 noundef %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store double %2, ptr %9, align 8, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store i64 %4, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.csc, ptr %17, i32 0, i32 1
  %19 = load i64, ptr %18, align 8, !tbaa !13
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.csc, ptr %20, i32 0, i32 1
  %22 = load i64, ptr %21, align 8, !tbaa !13
  %23 = add nsw i64 %19, %22
  store i64 %23, ptr %15, align 8, !tbaa !11
  %24 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 1224) #6
  store ptr %24, ptr %14, align 8, !tbaa !5
  %25 = load i64, ptr %15, align 8, !tbaa !11
  %26 = load ptr, ptr %14, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.pardiso, ptr %26, i32 0, i32 12
  store i64 %25, ptr %27, align 8, !tbaa !15
  %28 = load i64, ptr %15, align 8, !tbaa !11
  %29 = mul i64 8, %28
  %30 = call noalias ptr @malloc(i64 noundef %29) #7
  %31 = load ptr, ptr %14, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.pardiso, ptr %31, i32 0, i32 9
  store ptr %30, ptr %32, align 8, !tbaa !18
  %33 = load i64, ptr %11, align 8, !tbaa !11
  %34 = icmp ne i64 %33, 0
  br i1 %34, label %35, label %62

35:                                               ; preds = %5
  store i64 0, ptr %12, align 8, !tbaa !11
  br label %36

36:                                               ; preds = %49, %35
  %37 = load i64, ptr %12, align 8, !tbaa !11
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.csc, ptr %38, i32 0, i32 1
  %40 = load i64, ptr %39, align 8, !tbaa !13
  %41 = icmp slt i64 %37, %40
  br i1 %41, label %42, label %52

42:                                               ; preds = %36
  %43 = load double, ptr %9, align 8, !tbaa !9
  %44 = load ptr, ptr %14, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.pardiso, ptr %44, i32 0, i32 9
  %46 = load ptr, ptr %45, align 8, !tbaa !18
  %47 = load i64, ptr %12, align 8, !tbaa !11
  %48 = getelementptr inbounds double, ptr %46, i64 %47
  store double %43, ptr %48, align 8, !tbaa !9
  br label %49

49:                                               ; preds = %42
  %50 = load i64, ptr %12, align 8, !tbaa !11
  %51 = add nsw i64 %50, 1
  store i64 %51, ptr %12, align 8, !tbaa !11
  br label %36, !llvm.loop !19

52:                                               ; preds = %36
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = load double, ptr %9, align 8, !tbaa !9
  %56 = load ptr, ptr %14, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.pardiso, ptr %56, i32 0, i32 9
  %58 = load ptr, ptr %57, align 8, !tbaa !18
  %59 = call ptr @form_KKT(ptr noundef %53, ptr noundef %54, i64 noundef 1, double noundef %55, ptr noundef %58, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef null)
  %60 = load ptr, ptr %14, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.pardiso, ptr %60, i32 0, i32 6
  store ptr %59, ptr %61, align 8, !tbaa !21
  br label %137

62:                                               ; preds = %5
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.csc, ptr %63, i32 0, i32 3
  %65 = load ptr, ptr %64, align 8, !tbaa !22
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.csc, ptr %66, i32 0, i32 2
  %68 = load i64, ptr %67, align 8, !tbaa !23
  %69 = getelementptr inbounds i64, ptr %65, i64 %68
  %70 = load i64, ptr %69, align 8, !tbaa !11
  %71 = mul i64 %70, 8
  %72 = call noalias ptr @malloc(i64 noundef %71) #7
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.pardiso, ptr %73, i32 0, i32 24
  store ptr %72, ptr %74, align 8, !tbaa !24
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.csc, ptr %75, i32 0, i32 3
  %77 = load ptr, ptr %76, align 8, !tbaa !22
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.csc, ptr %78, i32 0, i32 2
  %80 = load i64, ptr %79, align 8, !tbaa !23
  %81 = getelementptr inbounds i64, ptr %77, i64 %80
  %82 = load i64, ptr %81, align 8, !tbaa !11
  %83 = mul i64 %82, 8
  %84 = call noalias ptr @malloc(i64 noundef %83) #7
  %85 = load ptr, ptr %14, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.pardiso, ptr %85, i32 0, i32 25
  store ptr %84, ptr %86, align 8, !tbaa !25
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.csc, ptr %87, i32 0, i32 1
  %89 = load i64, ptr %88, align 8, !tbaa !13
  %90 = mul i64 %89, 8
  %91 = call noalias ptr @malloc(i64 noundef %90) #7
  %92 = load ptr, ptr %14, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.pardiso, ptr %92, i32 0, i32 26
  store ptr %91, ptr %93, align 8, !tbaa !26
  store i64 0, ptr %12, align 8, !tbaa !11
  br label %94

94:                                               ; preds = %111, %62
  %95 = load i64, ptr %12, align 8, !tbaa !11
  %96 = load ptr, ptr %8, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.csc, ptr %96, i32 0, i32 1
  %98 = load i64, ptr %97, align 8, !tbaa !13
  %99 = icmp slt i64 %95, %98
  br i1 %99, label %100, label %114

100:                                              ; preds = %94
  %101 = load ptr, ptr %10, align 8, !tbaa !5
  %102 = load i64, ptr %12, align 8, !tbaa !11
  %103 = getelementptr inbounds double, ptr %101, i64 %102
  %104 = load double, ptr %103, align 8, !tbaa !9
  %105 = fdiv double 1.000000e+00, %104
  %106 = load ptr, ptr %14, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.pardiso, ptr %106, i32 0, i32 9
  %108 = load ptr, ptr %107, align 8, !tbaa !18
  %109 = load i64, ptr %12, align 8, !tbaa !11
  %110 = getelementptr inbounds double, ptr %108, i64 %109
  store double %105, ptr %110, align 8, !tbaa !9
  br label %111

111:                                              ; preds = %100
  %112 = load i64, ptr %12, align 8, !tbaa !11
  %113 = add nsw i64 %112, 1
  store i64 %113, ptr %12, align 8, !tbaa !11
  br label %94, !llvm.loop !27

114:                                              ; preds = %94
  %115 = load ptr, ptr %7, align 8, !tbaa !5
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = load double, ptr %9, align 8, !tbaa !9
  %118 = load ptr, ptr %14, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.pardiso, ptr %118, i32 0, i32 9
  %120 = load ptr, ptr %119, align 8, !tbaa !18
  %121 = load ptr, ptr %14, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.pardiso, ptr %121, i32 0, i32 24
  %123 = load ptr, ptr %122, align 8, !tbaa !24
  %124 = load ptr, ptr %14, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.pardiso, ptr %124, i32 0, i32 25
  %126 = load ptr, ptr %125, align 8, !tbaa !25
  %127 = load ptr, ptr %14, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.pardiso, ptr %127, i32 0, i32 22
  %129 = load ptr, ptr %14, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.pardiso, ptr %129, i32 0, i32 23
  %131 = load ptr, ptr %14, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.pardiso, ptr %131, i32 0, i32 26
  %133 = load ptr, ptr %132, align 8, !tbaa !26
  %134 = call ptr @form_KKT(ptr noundef %115, ptr noundef %116, i64 noundef 1, double noundef %117, ptr noundef %120, ptr noundef %123, ptr noundef %126, ptr noundef %128, ptr noundef %130, ptr noundef %133)
  %135 = load ptr, ptr %14, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.pardiso, ptr %135, i32 0, i32 6
  store ptr %134, ptr %136, align 8, !tbaa !21
  br label %137

137:                                              ; preds = %114, %52
  %138 = load ptr, ptr %14, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.pardiso, ptr %138, i32 0, i32 6
  %140 = load ptr, ptr %139, align 8, !tbaa !21
  %141 = icmp ne ptr %140, null
  br i1 %141, label %143, label %142

142:                                              ; preds = %137
  store ptr null, ptr %6, align 8
  store i32 1, ptr %16, align 4
  br label %376

143:                                              ; preds = %137
  %144 = load ptr, ptr %14, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.pardiso, ptr %144, i32 0, i32 6
  %146 = load ptr, ptr %145, align 8, !tbaa !21
  %147 = getelementptr inbounds %struct.csc, ptr %146, i32 0, i32 3
  %148 = load ptr, ptr %147, align 8, !tbaa !22
  %149 = load ptr, ptr %14, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.pardiso, ptr %149, i32 0, i32 6
  %151 = load ptr, ptr %150, align 8, !tbaa !21
  %152 = getelementptr inbounds %struct.csc, ptr %151, i32 0, i32 1
  %153 = load i64, ptr %152, align 8, !tbaa !13
  %154 = getelementptr inbounds i64, ptr %148, i64 %153
  %155 = load i64, ptr %154, align 8, !tbaa !11
  store i64 %155, ptr %13, align 8, !tbaa !11
  %156 = load i64, ptr %13, align 8, !tbaa !11
  %157 = mul i64 %156, 8
  %158 = call noalias ptr @malloc(i64 noundef %157) #7
  %159 = load ptr, ptr %14, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.pardiso, ptr %159, i32 0, i32 7
  store ptr %158, ptr %160, align 8, !tbaa !28
  %161 = load ptr, ptr %14, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.pardiso, ptr %161, i32 0, i32 6
  %163 = load ptr, ptr %162, align 8, !tbaa !21
  %164 = getelementptr inbounds %struct.csc, ptr %163, i32 0, i32 1
  %165 = load i64, ptr %164, align 8, !tbaa !13
  %166 = add nsw i64 %165, 1
  %167 = mul i64 %166, 8
  %168 = call noalias ptr @malloc(i64 noundef %167) #7
  %169 = load ptr, ptr %14, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.pardiso, ptr %169, i32 0, i32 8
  store ptr %168, ptr %170, align 8, !tbaa !29
  store i64 0, ptr %12, align 8, !tbaa !11
  br label %171

171:                                              ; preds = %190, %143
  %172 = load i64, ptr %12, align 8, !tbaa !11
  %173 = load i64, ptr %13, align 8, !tbaa !11
  %174 = icmp slt i64 %172, %173
  br i1 %174, label %175, label %193

175:                                              ; preds = %171
  %176 = load ptr, ptr %14, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.pardiso, ptr %176, i32 0, i32 6
  %178 = load ptr, ptr %177, align 8, !tbaa !21
  %179 = getelementptr inbounds %struct.csc, ptr %178, i32 0, i32 4
  %180 = load ptr, ptr %179, align 8, !tbaa !30
  %181 = load i64, ptr %12, align 8, !tbaa !11
  %182 = getelementptr inbounds i64, ptr %180, i64 %181
  %183 = load i64, ptr %182, align 8, !tbaa !11
  %184 = add nsw i64 %183, 1
  %185 = load ptr, ptr %14, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.pardiso, ptr %185, i32 0, i32 7
  %187 = load ptr, ptr %186, align 8, !tbaa !28
  %188 = load i64, ptr %12, align 8, !tbaa !11
  %189 = getelementptr inbounds i64, ptr %187, i64 %188
  store i64 %184, ptr %189, align 8, !tbaa !11
  br label %190

190:                                              ; preds = %175
  %191 = load i64, ptr %12, align 8, !tbaa !11
  %192 = add nsw i64 %191, 1
  store i64 %192, ptr %12, align 8, !tbaa !11
  br label %171, !llvm.loop !31

193:                                              ; preds = %171
  store i64 0, ptr %12, align 8, !tbaa !11
  br label %194

194:                                              ; preds = %214, %193
  %195 = load i64, ptr %12, align 8, !tbaa !11
  %196 = load i64, ptr %15, align 8, !tbaa !11
  %197 = add nsw i64 %196, 1
  %198 = icmp slt i64 %195, %197
  br i1 %198, label %199, label %217

199:                                              ; preds = %194
  %200 = load ptr, ptr %14, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.pardiso, ptr %200, i32 0, i32 6
  %202 = load ptr, ptr %201, align 8, !tbaa !21
  %203 = getelementptr inbounds %struct.csc, ptr %202, i32 0, i32 3
  %204 = load ptr, ptr %203, align 8, !tbaa !22
  %205 = load i64, ptr %12, align 8, !tbaa !11
  %206 = getelementptr inbounds i64, ptr %204, i64 %205
  %207 = load i64, ptr %206, align 8, !tbaa !11
  %208 = add nsw i64 %207, 1
  %209 = load ptr, ptr %14, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.pardiso, ptr %209, i32 0, i32 8
  %211 = load ptr, ptr %210, align 8, !tbaa !29
  %212 = load i64, ptr %12, align 8, !tbaa !11
  %213 = getelementptr inbounds i64, ptr %211, i64 %212
  store i64 %208, ptr %213, align 8, !tbaa !11
  br label %214

214:                                              ; preds = %199
  %215 = load i64, ptr %12, align 8, !tbaa !11
  %216 = add nsw i64 %215, 1
  store i64 %216, ptr %12, align 8, !tbaa !11
  br label %194, !llvm.loop !32

217:                                              ; preds = %194
  br label %218

218:                                              ; preds = %217
  %219 = call i64 @mkl_set_interface_layer(i64 noundef 1)
  %220 = load ptr, ptr %14, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.pardiso, ptr %220, i32 0, i32 13
  store i64 -2, ptr %221, align 8, !tbaa !33
  %222 = load ptr, ptr %14, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.pardiso, ptr %222, i32 0, i32 14
  store i64 1, ptr %223, align 8, !tbaa !34
  %224 = load ptr, ptr %14, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.pardiso, ptr %224, i32 0, i32 15
  store i64 1, ptr %225, align 8, !tbaa !35
  %226 = load ptr, ptr %14, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.pardiso, ptr %226, i32 0, i32 16
  store i64 1, ptr %227, align 8, !tbaa !36
  %228 = load ptr, ptr %14, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.pardiso, ptr %228, i32 0, i32 19
  store i64 0, ptr %229, align 8, !tbaa !37
  %230 = load ptr, ptr %14, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.pardiso, ptr %230, i32 0, i32 18
  store i64 0, ptr %231, align 8, !tbaa !38
  store i64 0, ptr %12, align 8, !tbaa !11
  br label %232

232:                                              ; preds = %244, %218
  %233 = load i64, ptr %12, align 8, !tbaa !11
  %234 = icmp slt i64 %233, 64
  br i1 %234, label %235, label %247

235:                                              ; preds = %232
  %236 = load ptr, ptr %14, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.pardiso, ptr %236, i32 0, i32 11
  %238 = load i64, ptr %12, align 8, !tbaa !11
  %239 = getelementptr inbounds [64 x i64], ptr %237, i64 0, i64 %238
  store i64 0, ptr %239, align 8, !tbaa !11
  %240 = load ptr, ptr %14, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.pardiso, ptr %240, i32 0, i32 10
  %242 = load i64, ptr %12, align 8, !tbaa !11
  %243 = getelementptr inbounds [64 x ptr], ptr %241, i64 0, i64 %242
  store ptr null, ptr %243, align 8, !tbaa !5
  br label %244

244:                                              ; preds = %235
  %245 = load i64, ptr %12, align 8, !tbaa !11
  %246 = add nsw i64 %245, 1
  store i64 %246, ptr %12, align 8, !tbaa !11
  br label %232, !llvm.loop !39

247:                                              ; preds = %232
  %248 = load ptr, ptr %14, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.pardiso, ptr %248, i32 0, i32 11
  %250 = getelementptr inbounds [64 x i64], ptr %249, i64 0, i64 0
  store i64 1, ptr %250, align 8, !tbaa !11
  %251 = load ptr, ptr %14, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.pardiso, ptr %251, i32 0, i32 11
  %253 = getelementptr inbounds [64 x i64], ptr %252, i64 0, i64 1
  store i64 3, ptr %253, align 8, !tbaa !11
  %254 = load ptr, ptr %14, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.pardiso, ptr %254, i32 0, i32 11
  %256 = getelementptr inbounds [64 x i64], ptr %255, i64 0, i64 5
  store i64 1, ptr %256, align 8, !tbaa !11
  %257 = load ptr, ptr %14, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.pardiso, ptr %257, i32 0, i32 11
  %259 = getelementptr inbounds [64 x i64], ptr %258, i64 0, i64 7
  store i64 0, ptr %259, align 8, !tbaa !11
  %260 = load ptr, ptr %14, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.pardiso, ptr %260, i32 0, i32 11
  %262 = getelementptr inbounds [64 x i64], ptr %261, i64 0, i64 9
  store i64 13, ptr %262, align 8, !tbaa !11
  %263 = load ptr, ptr %14, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.pardiso, ptr %263, i32 0, i32 11
  %265 = getelementptr inbounds [64 x i64], ptr %264, i64 0, i64 34
  store i64 0, ptr %265, align 8, !tbaa !11
  %266 = call i64 (...) @mkl_get_max_threads()
  %267 = load ptr, ptr %14, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.pardiso, ptr %267, i32 0, i32 5
  store i64 %266, ptr %268, align 8, !tbaa !40
  %269 = load ptr, ptr %14, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.pardiso, ptr %269, i32 0, i32 17
  store i64 11, ptr %270, align 8, !tbaa !41
  %271 = load ptr, ptr %14, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.pardiso, ptr %271, i32 0, i32 10
  %273 = getelementptr inbounds [64 x ptr], ptr %272, i64 0, i64 0
  %274 = load ptr, ptr %14, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.pardiso, ptr %274, i32 0, i32 15
  %276 = load ptr, ptr %14, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.pardiso, ptr %276, i32 0, i32 16
  %278 = load ptr, ptr %14, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.pardiso, ptr %278, i32 0, i32 13
  %280 = load ptr, ptr %14, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.pardiso, ptr %280, i32 0, i32 17
  %282 = load ptr, ptr %14, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.pardiso, ptr %282, i32 0, i32 12
  %284 = load ptr, ptr %14, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.pardiso, ptr %284, i32 0, i32 6
  %286 = load ptr, ptr %285, align 8, !tbaa !21
  %287 = getelementptr inbounds %struct.csc, ptr %286, i32 0, i32 5
  %288 = load ptr, ptr %287, align 8, !tbaa !42
  %289 = load ptr, ptr %14, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.pardiso, ptr %289, i32 0, i32 8
  %291 = load ptr, ptr %290, align 8, !tbaa !29
  %292 = load ptr, ptr %14, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.pardiso, ptr %292, i32 0, i32 7
  %294 = load ptr, ptr %293, align 8, !tbaa !28
  %295 = load ptr, ptr %14, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.pardiso, ptr %295, i32 0, i32 20
  %297 = load ptr, ptr %14, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.pardiso, ptr %297, i32 0, i32 14
  %299 = load ptr, ptr %14, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct.pardiso, ptr %299, i32 0, i32 11
  %301 = getelementptr inbounds [64 x i64], ptr %300, i64 0, i64 0
  %302 = load ptr, ptr %14, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.pardiso, ptr %302, i32 0, i32 19
  %304 = load ptr, ptr %14, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.pardiso, ptr %304, i32 0, i32 21
  %306 = load ptr, ptr %14, align 8, !tbaa !5
  %307 = getelementptr inbounds %struct.pardiso, ptr %306, i32 0, i32 21
  %308 = load ptr, ptr %14, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.pardiso, ptr %308, i32 0, i32 18
  call void @pardiso(ptr noundef %273, ptr noundef %275, ptr noundef %277, ptr noundef %279, ptr noundef %281, ptr noundef %283, ptr noundef %288, ptr noundef %291, ptr noundef %294, ptr noundef %296, ptr noundef %298, ptr noundef %301, ptr noundef %303, ptr noundef %305, ptr noundef %307, ptr noundef %309)
  %310 = load ptr, ptr %14, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.pardiso, ptr %310, i32 0, i32 18
  %312 = load i64, ptr %311, align 8, !tbaa !38
  %313 = icmp ne i64 %312, 0
  br i1 %313, label %314, label %316

314:                                              ; preds = %247
  %315 = load ptr, ptr %14, align 8, !tbaa !5
  call void @free_linsys_solver_pardiso(ptr noundef %315)
  store ptr null, ptr %6, align 8
  store i32 1, ptr %16, align 4
  br label %376

316:                                              ; preds = %247
  %317 = load ptr, ptr %14, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct.pardiso, ptr %317, i32 0, i32 17
  store i64 22, ptr %318, align 8, !tbaa !41
  %319 = load ptr, ptr %14, align 8, !tbaa !5
  %320 = getelementptr inbounds %struct.pardiso, ptr %319, i32 0, i32 10
  %321 = getelementptr inbounds [64 x ptr], ptr %320, i64 0, i64 0
  %322 = load ptr, ptr %14, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.pardiso, ptr %322, i32 0, i32 15
  %324 = load ptr, ptr %14, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.pardiso, ptr %324, i32 0, i32 16
  %326 = load ptr, ptr %14, align 8, !tbaa !5
  %327 = getelementptr inbounds %struct.pardiso, ptr %326, i32 0, i32 13
  %328 = load ptr, ptr %14, align 8, !tbaa !5
  %329 = getelementptr inbounds %struct.pardiso, ptr %328, i32 0, i32 17
  %330 = load ptr, ptr %14, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.pardiso, ptr %330, i32 0, i32 12
  %332 = load ptr, ptr %14, align 8, !tbaa !5
  %333 = getelementptr inbounds %struct.pardiso, ptr %332, i32 0, i32 6
  %334 = load ptr, ptr %333, align 8, !tbaa !21
  %335 = getelementptr inbounds %struct.csc, ptr %334, i32 0, i32 5
  %336 = load ptr, ptr %335, align 8, !tbaa !42
  %337 = load ptr, ptr %14, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.pardiso, ptr %337, i32 0, i32 8
  %339 = load ptr, ptr %338, align 8, !tbaa !29
  %340 = load ptr, ptr %14, align 8, !tbaa !5
  %341 = getelementptr inbounds %struct.pardiso, ptr %340, i32 0, i32 7
  %342 = load ptr, ptr %341, align 8, !tbaa !28
  %343 = load ptr, ptr %14, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct.pardiso, ptr %343, i32 0, i32 20
  %345 = load ptr, ptr %14, align 8, !tbaa !5
  %346 = getelementptr inbounds %struct.pardiso, ptr %345, i32 0, i32 14
  %347 = load ptr, ptr %14, align 8, !tbaa !5
  %348 = getelementptr inbounds %struct.pardiso, ptr %347, i32 0, i32 11
  %349 = getelementptr inbounds [64 x i64], ptr %348, i64 0, i64 0
  %350 = load ptr, ptr %14, align 8, !tbaa !5
  %351 = getelementptr inbounds %struct.pardiso, ptr %350, i32 0, i32 19
  %352 = load ptr, ptr %14, align 8, !tbaa !5
  %353 = getelementptr inbounds %struct.pardiso, ptr %352, i32 0, i32 21
  %354 = load ptr, ptr %14, align 8, !tbaa !5
  %355 = getelementptr inbounds %struct.pardiso, ptr %354, i32 0, i32 21
  %356 = load ptr, ptr %14, align 8, !tbaa !5
  %357 = getelementptr inbounds %struct.pardiso, ptr %356, i32 0, i32 18
  call void @pardiso(ptr noundef %321, ptr noundef %323, ptr noundef %325, ptr noundef %327, ptr noundef %329, ptr noundef %331, ptr noundef %336, ptr noundef %339, ptr noundef %342, ptr noundef %344, ptr noundef %346, ptr noundef %349, ptr noundef %351, ptr noundef %353, ptr noundef %355, ptr noundef %357)
  %358 = load ptr, ptr %14, align 8, !tbaa !5
  %359 = getelementptr inbounds %struct.pardiso, ptr %358, i32 0, i32 18
  %360 = load i64, ptr %359, align 8, !tbaa !38
  %361 = icmp ne i64 %360, 0
  br i1 %361, label %362, label %364

362:                                              ; preds = %316
  %363 = load ptr, ptr %14, align 8, !tbaa !5
  call void @free_linsys_solver_pardiso(ptr noundef %363)
  store ptr null, ptr %6, align 8
  store i32 1, ptr %16, align 4
  br label %376

364:                                              ; preds = %316
  %365 = load ptr, ptr %14, align 8, !tbaa !5
  %366 = getelementptr inbounds %struct.pardiso, ptr %365, i32 0, i32 1
  store ptr @solve_linsys_pardiso, ptr %366, align 8, !tbaa !43
  %367 = load ptr, ptr %14, align 8, !tbaa !5
  %368 = getelementptr inbounds %struct.pardiso, ptr %367, i32 0, i32 2
  store ptr @free_linsys_solver_pardiso, ptr %368, align 8, !tbaa !44
  %369 = load ptr, ptr %14, align 8, !tbaa !5
  %370 = getelementptr inbounds %struct.pardiso, ptr %369, i32 0, i32 3
  store ptr @update_linsys_solver_matrices_pardiso, ptr %370, align 8, !tbaa !45
  %371 = load ptr, ptr %14, align 8, !tbaa !5
  %372 = getelementptr inbounds %struct.pardiso, ptr %371, i32 0, i32 4
  store ptr @update_linsys_solver_rho_vec_pardiso, ptr %372, align 8, !tbaa !46
  %373 = load ptr, ptr %14, align 8, !tbaa !5
  %374 = getelementptr inbounds %struct.pardiso, ptr %373, i32 0, i32 0
  store i32 1, ptr %374, align 8, !tbaa !47
  %375 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %375, ptr %6, align 8
  store i32 1, ptr %16, align 4
  br label %376

376:                                              ; preds = %364, %362, %314, %142
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %377 = load ptr, ptr %6, align 8
  ret ptr %377
}

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #3

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

declare ptr @form_KKT(ptr noundef, ptr noundef, i64 noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i64 @mkl_set_interface_layer(i64 noundef) #1

declare i64 @mkl_get_max_threads(...) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @solve_linsys_pardiso(ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @update_linsys_solver_matrices_pardiso(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @update_linsys_solver_rho_vec_pardiso(ptr noundef, ptr noundef, i64 noundef) #0

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

attributes #0 = { 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 = { "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 willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind allocsize(0,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 #4 = { nounwind allocsize(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 = { nounwind }
attributes #6 = { nounwind allocsize(0,1) }
attributes #7 = { nounwind allocsize(0) }

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!14, !12, i64 8}
!14 = !{!"", !12, i64 0, !12, i64 8, !12, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !12, i64 48}
!15 = !{!16, !12, i64 1104}
!16 = !{!"pardiso", !17, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !12, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !7, i64 80, !7, i64 592, !12, i64 1104, !12, i64 1112, !12, i64 1120, !12, i64 1128, !12, i64 1136, !12, i64 1144, !12, i64 1152, !12, i64 1160, !12, i64 1168, !10, i64 1176, !6, i64 1184, !12, i64 1192, !6, i64 1200, !6, i64 1208, !6, i64 1216}
!17 = !{!"int", !7, i64 0}
!18 = !{!16, !6, i64 72}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!16, !6, i64 48}
!22 = !{!14, !6, i64 24}
!23 = !{!14, !12, i64 16}
!24 = !{!16, !6, i64 1200}
!25 = !{!16, !6, i64 1208}
!26 = !{!16, !6, i64 1216}
!27 = distinct !{!27, !20}
!28 = !{!16, !6, i64 56}
!29 = !{!16, !6, i64 64}
!30 = !{!14, !6, i64 32}
!31 = distinct !{!31, !20}
!32 = distinct !{!32, !20}
!33 = !{!16, !12, i64 1112}
!34 = !{!16, !12, i64 1120}
!35 = !{!16, !12, i64 1128}
!36 = !{!16, !12, i64 1136}
!37 = !{!16, !12, i64 1160}
!38 = !{!16, !12, i64 1152}
!39 = distinct !{!39, !20}
!40 = !{!16, !12, i64 40}
!41 = !{!16, !12, i64 1144}
!42 = !{!14, !6, i64 40}
!43 = !{!16, !6, i64 8}
!44 = !{!16, !6, i64 16}
!45 = !{!16, !6, i64 24}
!46 = !{!16, !6, i64 32}
!47 = !{!16, !17, i64 0}


; 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: nounwind uwtable
declare dso_local void @free_linsys_solver_pardiso(ptr noundef) #0

declare void @pardiso(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @init_linsys_solver_pardiso(ptr noundef %0, ptr noundef %1, double noundef %2, ptr nocapture noundef readonly %3, i64 noundef %4) local_unnamed_addr #0 {
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = load i64, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %1, i64 8
  %9 = load i64, ptr %8, align 8, !tbaa !5
  %10 = add i64 %9, %7
  %11 = tail call noalias dereferenceable_or_null(1224) ptr @calloc(i64 noundef 1, i64 noundef 1224) #5
  %12 = getelementptr inbounds i8, ptr %11, i64 1104
  store i64 %10, ptr %12, align 8, !tbaa !11
  %13 = shl i64 %10, 3
  %14 = tail call noalias ptr @malloc(i64 noundef %13) #6
  %15 = getelementptr inbounds i8, ptr %11, i64 72
  store ptr %14, ptr %15, align 8, !tbaa !15
  %.not = icmp eq i64 %4, 0
  br i1 %.not, label %23, label %.preheader133

.preheader133:                                    ; preds = %5
  %16 = icmp sgt i64 %9, 0
  br i1 %16, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.preheader133
  %min.iters.check = icmp ult i64 %9, 4
  br i1 %min.iters.check, label %.lr.ph.preheader195, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %9, 9223372036854775804
  %broadcast.splatinsert = insertelement <2 x double> poison, double %2, 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 ]
  %17 = getelementptr inbounds double, ptr %14, i64 %index
  %18 = getelementptr inbounds i8, ptr %17, i64 16
  store <2 x double> %broadcast.splat, ptr %17, align 8, !tbaa !16
  store <2 x double> %broadcast.splat, ptr %18, align 8, !tbaa !16
  %index.next = add nuw i64 %index, 4
  %19 = icmp eq i64 %index.next, %n.vec
  br i1 %19, label %middle.block, label %vector.body, !llvm.loop !17

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %9, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader195

.lr.ph.preheader195:                              ; preds = %middle.block, %.lr.ph.preheader
  %.0127134.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader195, %.lr.ph
  %.0127134 = phi i64 [ %21, %.lr.ph ], [ %.0127134.ph, %.lr.ph.preheader195 ]
  %20 = getelementptr inbounds double, ptr %14, i64 %.0127134
  store double %2, ptr %20, align 8, !tbaa !16
  %21 = add nuw nsw i64 %.0127134, 1
  %exitcond.not = icmp eq i64 %21, %9
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !21

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %.preheader133
  %22 = tail call ptr @form_KKT(ptr noundef %0, ptr noundef %1, i64 noundef 1, double noundef %2, ptr noundef %14, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef null, ptr noundef null) #7
  br label %58

23:                                               ; preds = %5
  %24 = getelementptr inbounds i8, ptr %0, i64 24
  %25 = load ptr, ptr %24, align 8, !tbaa !22
  %26 = getelementptr inbounds i8, ptr %0, i64 16
  %27 = load i64, ptr %26, align 8, !tbaa !23
  %28 = getelementptr inbounds i64, ptr %25, i64 %27
  %29 = load i64, ptr %28, align 8, !tbaa !24
  %30 = shl i64 %29, 3
  %31 = tail call noalias ptr @malloc(i64 noundef %30) #6
  %32 = getelementptr inbounds i8, ptr %11, i64 1200
  store ptr %31, ptr %32, align 8, !tbaa !25
  %33 = getelementptr inbounds i8, ptr %1, i64 24
  %34 = load ptr, ptr %33, align 8, !tbaa !22
  %35 = getelementptr inbounds i8, ptr %1, i64 16
  %36 = load i64, ptr %35, align 8, !tbaa !23
  %37 = getelementptr inbounds i64, ptr %34, i64 %36
  %38 = load i64, ptr %37, align 8, !tbaa !24
  %39 = shl i64 %38, 3
  %40 = tail call noalias ptr @malloc(i64 noundef %39) #6
  %41 = getelementptr inbounds i8, ptr %11, i64 1208
  store ptr %40, ptr %41, align 8, !tbaa !26
  %42 = shl i64 %9, 3
  %43 = tail call noalias ptr @malloc(i64 noundef %42) #6
  %44 = getelementptr inbounds i8, ptr %11, i64 1216
  store ptr %43, ptr %44, align 8, !tbaa !27
  %45 = icmp sgt i64 %9, 0
  br i1 %45, label %.lr.ph137.preheader, label %._crit_edge138

.lr.ph137.preheader:                              ; preds = %23
  %min.iters.check154 = icmp eq i64 %9, 1
  br i1 %min.iters.check154, label %.lr.ph137.preheader194, label %vector.ph155

vector.ph155:                                     ; preds = %.lr.ph137.preheader
  %n.vec157 = and i64 %9, 9223372036854775806
  br label %vector.body159

vector.body159:                                   ; preds = %vector.body159, %vector.ph155
  %index160 = phi i64 [ 0, %vector.ph155 ], [ %index.next161, %vector.body159 ]
  %46 = getelementptr inbounds double, ptr %3, i64 %index160
  %wide.load = load <2 x double>, ptr %46, align 8, !tbaa !16
  %47 = fdiv <2 x double> <double 1.000000e+00, double 1.000000e+00>, %wide.load
  %48 = getelementptr inbounds double, ptr %14, i64 %index160
  store <2 x double> %47, ptr %48, align 8, !tbaa !16
  %index.next161 = add nuw i64 %index160, 2
  %49 = icmp eq i64 %index.next161, %n.vec157
  br i1 %49, label %middle.block152, label %vector.body159, !llvm.loop !28

middle.block152:                                  ; preds = %vector.body159
  %cmp.n162 = icmp eq i64 %9, %n.vec157
  br i1 %cmp.n162, label %._crit_edge138, label %.lr.ph137.preheader194

.lr.ph137.preheader194:                           ; preds = %middle.block152, %.lr.ph137.preheader
  %.1135.ph = phi i64 [ 0, %.lr.ph137.preheader ], [ %n.vec157, %middle.block152 ]
  br label %.lr.ph137

.lr.ph137:                                        ; preds = %.lr.ph137.preheader194, %.lr.ph137
  %.1135 = phi i64 [ %54, %.lr.ph137 ], [ %.1135.ph, %.lr.ph137.preheader194 ]
  %50 = getelementptr inbounds double, ptr %3, i64 %.1135
  %51 = load double, ptr %50, align 8, !tbaa !16
  %52 = fdiv double 1.000000e+00, %51
  %53 = getelementptr inbounds double, ptr %14, i64 %.1135
  store double %52, ptr %53, align 8, !tbaa !16
  %54 = add nuw nsw i64 %.1135, 1
  %exitcond147.not = icmp eq i64 %54, %9
  br i1 %exitcond147.not, label %._crit_edge138, label %.lr.ph137, !llvm.loop !29

._crit_edge138:                                   ; preds = %.lr.ph137, %middle.block152, %23
  %55 = getelementptr inbounds i8, ptr %11, i64 1184
  %56 = getelementptr inbounds i8, ptr %11, i64 1192
  %57 = tail call ptr @form_KKT(ptr noundef %0, ptr noundef %1, i64 noundef 1, double noundef %2, ptr noundef %14, ptr noundef %31, ptr noundef %40, ptr noundef nonnull %55, ptr noundef nonnull %56, ptr noundef %43) #7
  br label %58

58:                                               ; preds = %._crit_edge138, %._crit_edge
  %.sink = phi ptr [ %57, %._crit_edge138 ], [ %22, %._crit_edge ]
  %59 = getelementptr inbounds i8, ptr %11, i64 48
  store ptr %.sink, ptr %59, align 8, !tbaa !30
  %60 = getelementptr inbounds i8, ptr %11, i64 48
  %.not129 = icmp eq ptr %.sink, null
  br i1 %.not129, label %169, label %61

61:                                               ; preds = %58
  %62 = getelementptr inbounds i8, ptr %.sink, i64 24
  %63 = load ptr, ptr %62, align 8, !tbaa !22
  %64 = ptrtoint ptr %63 to i64
  %65 = getelementptr inbounds i8, ptr %.sink, i64 8
  %66 = load i64, ptr %65, align 8, !tbaa !5
  %67 = getelementptr inbounds i64, ptr %63, i64 %66
  %68 = load i64, ptr %67, align 8, !tbaa !24
  %69 = shl i64 %68, 3
  %70 = tail call noalias ptr @malloc(i64 noundef %69) #6
  %71 = getelementptr inbounds i8, ptr %11, i64 56
  store ptr %70, ptr %71, align 8, !tbaa !31
  %72 = shl i64 %66, 3
  %73 = add i64 %72, 8
  %74 = tail call noalias ptr @malloc(i64 noundef %73) #6
  %75 = ptrtoint ptr %74 to i64
  %76 = getelementptr inbounds i8, ptr %11, i64 64
  store ptr %74, ptr %76, align 8, !tbaa !32
  %77 = icmp sgt i64 %68, 0
  br i1 %77, label %.lr.ph141, label %.preheader

.lr.ph141:                                        ; preds = %61
  %78 = ptrtoint ptr %70 to i64
  %79 = getelementptr inbounds i8, ptr %.sink, i64 32
  %80 = load ptr, ptr %79, align 8, !tbaa !33
  %min.iters.check165 = icmp ult i64 %68, 4
  %81 = ptrtoint ptr %80 to i64
  %82 = sub i64 %78, %81
  %diff.check = icmp ult i64 %82, 32
  %or.cond = select i1 %min.iters.check165, i1 true, i1 %diff.check
  br i1 %or.cond, label %scalar.ph164.preheader, label %vector.ph166

scalar.ph164.preheader:                           ; preds = %middle.block163, %.lr.ph141
  %.2139.ph = phi i64 [ 0, %.lr.ph141 ], [ %n.vec168, %middle.block163 ]
  %xtraiter = and i64 %68, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph164.prol.loopexit, label %scalar.ph164.prol

scalar.ph164.prol:                                ; preds = %scalar.ph164.preheader, %scalar.ph164.prol
  %.2139.prol = phi i64 [ %87, %scalar.ph164.prol ], [ %.2139.ph, %scalar.ph164.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph164.prol ], [ 0, %scalar.ph164.preheader ]
  %83 = getelementptr inbounds i64, ptr %80, i64 %.2139.prol
  %84 = load i64, ptr %83, align 8, !tbaa !24
  %85 = add nsw i64 %84, 1
  %86 = getelementptr inbounds i64, ptr %70, i64 %.2139.prol
  store i64 %85, ptr %86, align 8, !tbaa !24
  %87 = add nuw nsw i64 %.2139.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph164.prol.loopexit, label %scalar.ph164.prol, !llvm.loop !34

scalar.ph164.prol.loopexit:                       ; preds = %scalar.ph164.prol, %scalar.ph164.preheader
  %.2139.unr = phi i64 [ %.2139.ph, %scalar.ph164.preheader ], [ %87, %scalar.ph164.prol ]
  %88 = sub nsw i64 %.2139.ph, %68
  %89 = icmp ugt i64 %88, -4
  br i1 %89, label %.preheader, label %scalar.ph164

vector.ph166:                                     ; preds = %.lr.ph141
  %n.vec168 = and i64 %68, 9223372036854775804
  br label %vector.body170

vector.body170:                                   ; preds = %vector.body170, %vector.ph166
  %index171 = phi i64 [ 0, %vector.ph166 ], [ %index.next174, %vector.body170 ]
  %90 = getelementptr inbounds i64, ptr %80, i64 %index171
  %91 = getelementptr inbounds i8, ptr %90, i64 16
  %wide.load172 = load <2 x i64>, ptr %90, align 8, !tbaa !24
  %wide.load173 = load <2 x i64>, ptr %91, align 8, !tbaa !24
  %92 = add nsw <2 x i64> %wide.load172, <i64 1, i64 1>
  %93 = add nsw <2 x i64> %wide.load173, <i64 1, i64 1>
  %94 = getelementptr inbounds i64, ptr %70, i64 %index171
  %95 = getelementptr inbounds i8, ptr %94, i64 16
  store <2 x i64> %92, ptr %94, align 8, !tbaa !24
  store <2 x i64> %93, ptr %95, align 8, !tbaa !24
  %index.next174 = add nuw i64 %index171, 4
  %96 = icmp eq i64 %index.next174, %n.vec168
  br i1 %96, label %middle.block163, label %vector.body170, !llvm.loop !36

middle.block163:                                  ; preds = %vector.body170
  %cmp.n175 = icmp eq i64 %68, %n.vec168
  br i1 %cmp.n175, label %.preheader, label %scalar.ph164.preheader

.preheader:                                       ; preds = %scalar.ph164.prol.loopexit, %scalar.ph164, %middle.block163, %61
  %.not130142 = icmp slt i64 %10, 0
  br i1 %.not130142, label %._crit_edge145, label %.lr.ph144.preheader

.lr.ph144.preheader:                              ; preds = %.preheader
  %97 = add i64 %9, %7
  %98 = add i64 %97, 1
  %min.iters.check180 = icmp ult i64 %98, 4
  %99 = sub i64 %75, %64
  %diff.check177 = icmp ult i64 %99, 32
  %or.cond192 = or i1 %min.iters.check180, %diff.check177
  br i1 %or.cond192, label %.lr.ph144.preheader193, label %vector.ph181

.lr.ph144.preheader193:                           ; preds = %middle.block178, %.lr.ph144.preheader
  %.3143.ph = phi i64 [ 0, %.lr.ph144.preheader ], [ %n.vec183, %middle.block178 ]
  br label %.lr.ph144

vector.ph181:                                     ; preds = %.lr.ph144.preheader
  %n.vec183 = and i64 %98, -4
  br label %vector.body185

vector.body185:                                   ; preds = %vector.body185, %vector.ph181
  %index186 = phi i64 [ 0, %vector.ph181 ], [ %index.next189, %vector.body185 ]
  %100 = getelementptr inbounds i64, ptr %63, i64 %index186
  %101 = getelementptr inbounds i8, ptr %100, i64 16
  %wide.load187 = load <2 x i64>, ptr %100, align 8, !tbaa !24
  %wide.load188 = load <2 x i64>, ptr %101, align 8, !tbaa !24
  %102 = add nsw <2 x i64> %wide.load187, <i64 1, i64 1>
  %103 = add nsw <2 x i64> %wide.load188, <i64 1, i64 1>
  %104 = getelementptr inbounds i64, ptr %74, i64 %index186
  %105 = getelementptr inbounds i8, ptr %104, i64 16
  store <2 x i64> %102, ptr %104, align 8, !tbaa !24
  store <2 x i64> %103, ptr %105, align 8, !tbaa !24
  %index.next189 = add nuw i64 %index186, 4
  %106 = icmp eq i64 %index.next189, %n.vec183
  br i1 %106, label %middle.block178, label %vector.body185, !llvm.loop !37

middle.block178:                                  ; preds = %vector.body185
  %cmp.n190 = icmp eq i64 %98, %n.vec183
  br i1 %cmp.n190, label %._crit_edge145, label %.lr.ph144.preheader193

scalar.ph164:                                     ; preds = %scalar.ph164.prol.loopexit, %scalar.ph164
  %.2139 = phi i64 [ %126, %scalar.ph164 ], [ %.2139.unr, %scalar.ph164.prol.loopexit ]
  %107 = getelementptr inbounds i64, ptr %80, i64 %.2139
  %108 = load i64, ptr %107, align 8, !tbaa !24
  %109 = add nsw i64 %108, 1
  %110 = getelementptr inbounds i64, ptr %70, i64 %.2139
  store i64 %109, ptr %110, align 8, !tbaa !24
  %111 = add nuw nsw i64 %.2139, 1
  %112 = getelementptr inbounds i64, ptr %80, i64 %111
  %113 = load i64, ptr %112, align 8, !tbaa !24
  %114 = add nsw i64 %113, 1
  %115 = getelementptr inbounds i64, ptr %70, i64 %111
  store i64 %114, ptr %115, align 8, !tbaa !24
  %116 = add nuw nsw i64 %.2139, 2
  %117 = getelementptr inbounds i64, ptr %80, i64 %116
  %118 = load i64, ptr %117, align 8, !tbaa !24
  %119 = add nsw i64 %118, 1
  %120 = getelementptr inbounds i64, ptr %70, i64 %116
  store i64 %119, ptr %120, align 8, !tbaa !24
  %121 = add nuw nsw i64 %.2139, 3
  %122 = getelementptr inbounds i64, ptr %80, i64 %121
  %123 = load i64, ptr %122, align 8, !tbaa !24
  %124 = add nsw i64 %123, 1
  %125 = getelementptr inbounds i64, ptr %70, i64 %121
  store i64 %124, ptr %125, align 8, !tbaa !24
  %126 = add nuw nsw i64 %.2139, 4
  %exitcond148.not.3 = icmp eq i64 %126, %68
  br i1 %exitcond148.not.3, label %.preheader, label %scalar.ph164, !llvm.loop !38

.lr.ph144:                                        ; preds = %.lr.ph144.preheader193, %.lr.ph144
  %.3143 = phi i64 [ %131, %.lr.ph144 ], [ %.3143.ph, %.lr.ph144.preheader193 ]
  %127 = getelementptr inbounds i64, ptr %63, i64 %.3143
  %128 = load i64, ptr %127, align 8, !tbaa !24
  %129 = add nsw i64 %128, 1
  %130 = getelementptr inbounds i64, ptr %74, i64 %.3143
  store i64 %129, ptr %130, align 8, !tbaa !24
  %131 = add nuw i64 %.3143, 1
  %exitcond149.not = icmp eq i64 %.3143, %10
  br i1 %exitcond149.not, label %._crit_edge145, label %.lr.ph144, !llvm.loop !39

._crit_edge145:                                   ; preds = %.lr.ph144, %middle.block178, %.preheader
  %132 = tail call i64 @mkl_set_interface_layer(i64 noundef 1) #7
  %133 = getelementptr inbounds i8, ptr %11, i64 1112
  store i64 -2, ptr %133, align 8, !tbaa !40
  %134 = getelementptr inbounds i8, ptr %11, i64 1120
  store i64 1, ptr %134, align 8, !tbaa !41
  %135 = getelementptr inbounds i8, ptr %11, i64 1128
  store i64 1, ptr %135, align 8, !tbaa !42
  %136 = getelementptr inbounds i8, ptr %11, i64 1136
  store i64 1, ptr %136, align 8, !tbaa !43
  %137 = getelementptr inbounds i8, ptr %11, i64 1160
  %138 = getelementptr inbounds i8, ptr %11, i64 1152
  %139 = getelementptr inbounds i8, ptr %11, i64 592
  %140 = getelementptr inbounds i8, ptr %11, i64 80
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1024) %140, i8 0, i64 1024, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %138, i8 0, i64 16, i1 false)
  store i64 1, ptr %139, align 8, !tbaa !24
  %141 = getelementptr inbounds i8, ptr %11, i64 600
  store i64 3, ptr %141, align 8, !tbaa !24
  %142 = getelementptr inbounds i8, ptr %11, i64 632
  store i64 1, ptr %142, align 8, !tbaa !24
  %143 = getelementptr inbounds i8, ptr %11, i64 664
  store i64 13, ptr %143, align 8, !tbaa !24
  %144 = tail call i64 (...) @mkl_get_max_threads() #7
  %145 = getelementptr inbounds i8, ptr %11, i64 40
  store i64 %144, ptr %145, align 8, !tbaa !44
  %146 = getelementptr inbounds i8, ptr %11, i64 1144
  store i64 11, ptr %146, align 8, !tbaa !45
  %147 = load ptr, ptr %60, align 8, !tbaa !30
  %148 = getelementptr inbounds i8, ptr %147, i64 40
  %149 = load ptr, ptr %148, align 8, !tbaa !46
  %150 = load ptr, ptr %76, align 8, !tbaa !32
  %151 = load ptr, ptr %71, align 8, !tbaa !31
  %152 = getelementptr inbounds i8, ptr %11, i64 1168
  %153 = getelementptr inbounds i8, ptr %11, i64 1176
  tail call void @pardiso(ptr noundef nonnull %140, ptr noundef nonnull %135, ptr noundef nonnull %136, ptr noundef nonnull %133, ptr noundef nonnull %146, ptr noundef nonnull %12, ptr noundef %149, ptr noundef %150, ptr noundef %151, ptr noundef nonnull %152, ptr noundef nonnull %134, ptr noundef nonnull %139, ptr noundef nonnull %137, ptr noundef nonnull %153, ptr noundef nonnull %153, ptr noundef nonnull %138) #7
  %154 = load i64, ptr %138, align 8, !tbaa !47
  %.not131 = icmp eq i64 %154, 0
  br i1 %.not131, label %156, label %155

155:                                              ; preds = %._crit_edge145
  tail call void @free_linsys_solver_pardiso(ptr noundef nonnull %11)
  br label %169

156:                                              ; preds = %._crit_edge145
  store i64 22, ptr %146, align 8, !tbaa !45
  %157 = load ptr, ptr %60, align 8, !tbaa !30
  %158 = getelementptr inbounds i8, ptr %157, i64 40
  %159 = load ptr, ptr %158, align 8, !tbaa !46
  %160 = load ptr, ptr %76, align 8, !tbaa !32
  %161 = load ptr, ptr %71, align 8, !tbaa !31
  tail call void @pardiso(ptr noundef nonnull %140, ptr noundef nonnull %135, ptr noundef nonnull %136, ptr noundef nonnull %133, ptr noundef nonnull %146, ptr noundef nonnull %12, ptr noundef %159, ptr noundef %160, ptr noundef %161, ptr noundef nonnull %152, ptr noundef nonnull %134, ptr noundef nonnull %139, ptr noundef nonnull %137, ptr noundef nonnull %153, ptr noundef nonnull %153, ptr noundef nonnull %138) #7
  %162 = load i64, ptr %138, align 8, !tbaa !47
  %.not132 = icmp eq i64 %162, 0
  br i1 %.not132, label %164, label %163

163:                                              ; preds = %156
  tail call void @free_linsys_solver_pardiso(ptr noundef nonnull %11)
  br label %169

164:                                              ; preds = %156
  %165 = getelementptr inbounds i8, ptr %11, i64 8
  store ptr @solve_linsys_pardiso, ptr %165, align 8, !tbaa !48
  %166 = getelementptr inbounds i8, ptr %11, i64 16
  store ptr @free_linsys_solver_pardiso, ptr %166, align 8, !tbaa !49
  %167 = getelementptr inbounds i8, ptr %11, i64 24
  store ptr @update_linsys_solver_matrices_pardiso, ptr %167, align 8, !tbaa !50
  %168 = getelementptr inbounds i8, ptr %11, i64 32
  store ptr @update_linsys_solver_rho_vec_pardiso, ptr %168, align 8, !tbaa !51
  store i32 1, ptr %11, align 8, !tbaa !52
  br label %169

169:                                              ; preds = %58, %164, %163, %155
  %.0 = phi ptr [ null, %155 ], [ null, %163 ], [ %11, %164 ], [ null, %58 ]
  ret ptr %.0
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

declare ptr @form_KKT(ptr noundef, ptr noundef, i64 noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i64 @mkl_set_interface_layer(i64 noundef) local_unnamed_addr #1

declare i64 @mkl_get_max_threads(...) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @solve_linsys_pardiso(ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @update_linsys_solver_matrices_pardiso(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @update_linsys_solver_rho_vec_pardiso(ptr noundef, ptr noundef, i64 noundef) #0

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

attributes #0 = { 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 = { "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 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind allocsize(0,1) }
attributes #6 = { nounwind allocsize(0) }
attributes #7 = { 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, !7, i64 8}
!6 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !7, i64 48}
!7 = !{!"long long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !7, i64 1104}
!12 = !{!"pardiso", !13, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !8, i64 80, !8, i64 592, !7, i64 1104, !7, i64 1112, !7, i64 1120, !7, i64 1128, !7, i64 1136, !7, i64 1144, !7, i64 1152, !7, i64 1160, !7, i64 1168, !14, i64 1176, !10, i64 1184, !7, i64 1192, !10, i64 1200, !10, i64 1208, !10, i64 1216}
!13 = !{!"int", !8, i64 0}
!14 = !{!"double", !8, i64 0}
!15 = !{!12, !10, i64 72}
!16 = !{!14, !14, i64 0}
!17 = distinct !{!17, !18, !19, !20}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !18, !20, !19}
!22 = !{!6, !10, i64 24}
!23 = !{!6, !7, i64 16}
!24 = !{!7, !7, i64 0}
!25 = !{!12, !10, i64 1200}
!26 = !{!12, !10, i64 1208}
!27 = !{!12, !10, i64 1216}
!28 = distinct !{!28, !18, !19, !20}
!29 = distinct !{!29, !18, !20, !19}
!30 = !{!12, !10, i64 48}
!31 = !{!12, !10, i64 56}
!32 = !{!12, !10, i64 64}
!33 = !{!6, !10, i64 32}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.unroll.disable"}
!36 = distinct !{!36, !18, !19, !20}
!37 = distinct !{!37, !18, !19, !20}
!38 = distinct !{!38, !18, !19}
!39 = distinct !{!39, !18, !19}
!40 = !{!12, !7, i64 1112}
!41 = !{!12, !7, i64 1120}
!42 = !{!12, !7, i64 1128}
!43 = !{!12, !7, i64 1136}
!44 = !{!12, !7, i64 40}
!45 = !{!12, !7, i64 1144}
!46 = !{!6, !10, i64 40}
!47 = !{!12, !7, i64 1152}
!48 = !{!12, !10, i64 8}
!49 = !{!12, !10, i64 16}
!50 = !{!12, !10, i64 24}
!51 = !{!12, !10, i64 32}
!52 = !{!12, !13, i64 0}


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