; LLVM IR from Derek-TH-Wang/quadruped_ctrl :: src/osqp/src (osqp)

; 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.OSQPWorkspace = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64 }
%struct.OSQPInfo = type { i64, [32 x i8], i64, i64, double, double, double, double, double, double, double, double, i64, double }
%struct.OSQPSettings = type { double, double, i64, i64, i64, double, double, i64, double, double, double, double, double, i32, double, i64, i64, i64, i64, i64, i64, double }

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

declare void @osqp_tic(ptr noundef) #1

declare void @cold_start(ptr noundef) #1

declare void @update_status(ptr noundef, i64 noundef) #1

declare double @osqp_toc(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i64 @osqp_solve(ptr noundef %0) #2 {
  %2 = alloca i64, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = icmp ne ptr %10, null
  br i1 %11, label %13, label %12

12:                                               ; preds = %1
  store i64 -1, ptr %2, align 8
  store i32 1, ptr %9, align 4
  br label %422

13:                                               ; preds = %1
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.OSQPWorkspace, ptr %14, i32 0, i32 29
  %16 = load i64, ptr %15, align 8, !tbaa !9
  %17 = icmp eq i64 %16, 1
  br i1 %17, label %18, label %23

18:                                               ; preds = %13
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.OSQPWorkspace, ptr %19, i32 0, i32 26
  %21 = load ptr, ptr %20, align 8, !tbaa !12
  %22 = getelementptr inbounds %struct.OSQPInfo, ptr %21, i32 0, i32 9
  store double 0.000000e+00, ptr %22, align 8, !tbaa !13
  br label %23

23:                                               ; preds = %18, %13
  store i64 0, ptr %4, align 8, !tbaa !16
  store i64 0, ptr %7, align 8, !tbaa !16
  store i64 0, ptr %6, align 8, !tbaa !16
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.OSQPWorkspace, ptr %24, i32 0, i32 27
  %26 = load ptr, ptr %25, align 8, !tbaa !17
  call void @osqp_tic(ptr noundef %26)
  call void @osqp_start_interrupt_listener()
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.OSQPWorkspace, ptr %27, i32 0, i32 23
  %29 = load ptr, ptr %28, align 8, !tbaa !18
  %30 = getelementptr inbounds %struct.OSQPSettings, ptr %29, i32 0, i32 20
  %31 = load i64, ptr %30, align 8, !tbaa !19
  %32 = icmp ne i64 %31, 0
  br i1 %32, label %35, label %33

33:                                               ; preds = %23
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  call void @cold_start(ptr noundef %34)
  br label %35

35:                                               ; preds = %33, %23
  store i64 1, ptr %5, align 8, !tbaa !16
  br label %36

36:                                               ; preds = %286, %35
  %37 = load i64, ptr %5, align 8, !tbaa !16
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.OSQPWorkspace, ptr %38, i32 0, i32 23
  %40 = load ptr, ptr %39, align 8, !tbaa !18
  %41 = getelementptr inbounds %struct.OSQPSettings, ptr %40, i32 0, i32 7
  %42 = load i64, ptr %41, align 8, !tbaa !22
  %43 = icmp sle i64 %37, %42
  br i1 %43, label %44, label %289

44:                                               ; preds = %36
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.OSQPWorkspace, ptr %45, i32 0, i32 6
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.OSQPWorkspace, ptr %47, i32 0, i32 10
  call void @swap_vectors(ptr noundef %46, ptr noundef %48)
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.OSQPWorkspace, ptr %49, i32 0, i32 8
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.OSQPWorkspace, ptr %51, i32 0, i32 11
  call void @swap_vectors(ptr noundef %50, ptr noundef %52)
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  call void @update_xz_tilde(ptr noundef %53)
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  call void @update_x(ptr noundef %54)
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  call void @update_z(ptr noundef %55)
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  call void @update_y(ptr noundef %56)
  %57 = call i32 @osqp_is_interrupted()
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %59, label %63

59:                                               ; preds = %44
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.OSQPWorkspace, ptr %60, i32 0, i32 26
  %62 = load ptr, ptr %61, align 8, !tbaa !12
  call void @update_status(ptr noundef %62, i64 noundef -5)
  store i64 1, ptr %4, align 8, !tbaa !16
  br label %420

63:                                               ; preds = %44
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.OSQPWorkspace, ptr %64, i32 0, i32 28
  %66 = load i64, ptr %65, align 8, !tbaa !23
  %67 = icmp ne i64 %66, 0
  br i1 %67, label %68, label %79

68:                                               ; preds = %63
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.OSQPWorkspace, ptr %69, i32 0, i32 26
  %71 = load ptr, ptr %70, align 8, !tbaa !12
  %72 = getelementptr inbounds %struct.OSQPInfo, ptr %71, i32 0, i32 7
  %73 = load double, ptr %72, align 8, !tbaa !24
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.OSQPWorkspace, ptr %74, i32 0, i32 27
  %76 = load ptr, ptr %75, align 8, !tbaa !17
  %77 = call double @osqp_toc(ptr noundef %76)
  %78 = fadd double %73, %77
  store double %78, ptr %8, align 8, !tbaa !25
  br label %84

79:                                               ; preds = %63
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.OSQPWorkspace, ptr %80, i32 0, i32 27
  %82 = load ptr, ptr %81, align 8, !tbaa !17
  %83 = call double @osqp_toc(ptr noundef %82)
  store double %83, ptr %8, align 8, !tbaa !25
  br label %84

84:                                               ; preds = %79, %68
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.OSQPWorkspace, ptr %85, i32 0, i32 23
  %87 = load ptr, ptr %86, align 8, !tbaa !18
  %88 = getelementptr inbounds %struct.OSQPSettings, ptr %87, i32 0, i32 21
  %89 = load double, ptr %88, align 8, !tbaa !26
  %90 = fcmp une double %89, 0.000000e+00
  br i1 %90, label %91, label %103

91:                                               ; preds = %84
  %92 = load double, ptr %8, align 8, !tbaa !25
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.OSQPWorkspace, ptr %93, i32 0, i32 23
  %95 = load ptr, ptr %94, align 8, !tbaa !18
  %96 = getelementptr inbounds %struct.OSQPSettings, ptr %95, i32 0, i32 21
  %97 = load double, ptr %96, align 8, !tbaa !26
  %98 = fcmp oge double %92, %97
  br i1 %98, label %99, label %103

99:                                               ; preds = %91
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.OSQPWorkspace, ptr %100, i32 0, i32 26
  %102 = load ptr, ptr %101, align 8, !tbaa !12
  call void @update_status(ptr noundef %102, i64 noundef -6)
  store i64 1, ptr %4, align 8, !tbaa !16
  br label %420

103:                                              ; preds = %91, %84
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.OSQPWorkspace, ptr %104, i32 0, i32 23
  %106 = load ptr, ptr %105, align 8, !tbaa !18
  %107 = getelementptr inbounds %struct.OSQPSettings, ptr %106, i32 0, i32 19
  %108 = load i64, ptr %107, align 8, !tbaa !27
  %109 = icmp ne i64 %108, 0
  br i1 %109, label %110, label %119

110:                                              ; preds = %103
  %111 = load i64, ptr %5, align 8, !tbaa !16
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.OSQPWorkspace, ptr %112, i32 0, i32 23
  %114 = load ptr, ptr %113, align 8, !tbaa !18
  %115 = getelementptr inbounds %struct.OSQPSettings, ptr %114, i32 0, i32 19
  %116 = load i64, ptr %115, align 8, !tbaa !27
  %117 = srem i64 %111, %116
  %118 = icmp eq i64 %117, 0
  br label %119

119:                                              ; preds = %110, %103
  %120 = phi i1 [ false, %103 ], [ %118, %110 ]
  %121 = zext i1 %120 to i32
  %122 = sext i32 %121 to i64
  store i64 %122, ptr %7, align 8, !tbaa !16
  %123 = load i64, ptr %7, align 8, !tbaa !16
  %124 = icmp ne i64 %123, 0
  br i1 %124, label %125, label %134

125:                                              ; preds = %119
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = load i64, ptr %5, align 8, !tbaa !16
  %128 = load i64, ptr %6, align 8, !tbaa !16
  call void @update_info(ptr noundef %126, i64 noundef %127, i64 noundef %128, i64 noundef 0)
  %129 = load ptr, ptr %3, align 8, !tbaa !5
  %130 = call i64 @check_termination(ptr noundef %129, i64 noundef 0)
  %131 = icmp ne i64 %130, 0
  br i1 %131, label %132, label %133

132:                                              ; preds = %125
  br label %289

133:                                              ; preds = %125
  br label %134

134:                                              ; preds = %133, %119
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.OSQPWorkspace, ptr %135, i32 0, i32 23
  %137 = load ptr, ptr %136, align 8, !tbaa !18
  %138 = getelementptr inbounds %struct.OSQPSettings, ptr %137, i32 0, i32 3
  %139 = load i64, ptr %138, align 8, !tbaa !28
  %140 = icmp ne i64 %139, 0
  br i1 %140, label %141, label %249

141:                                              ; preds = %134
  %142 = load ptr, ptr %3, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.OSQPWorkspace, ptr %142, i32 0, i32 23
  %144 = load ptr, ptr %143, align 8, !tbaa !18
  %145 = getelementptr inbounds %struct.OSQPSettings, ptr %144, i32 0, i32 4
  %146 = load i64, ptr %145, align 8, !tbaa !29
  %147 = icmp ne i64 %146, 0
  br i1 %147, label %249, label %148

148:                                              ; preds = %141
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.OSQPWorkspace, ptr %149, i32 0, i32 27
  %151 = load ptr, ptr %150, align 8, !tbaa !17
  %152 = call double @osqp_toc(ptr noundef %151)
  %153 = load ptr, ptr %3, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.OSQPWorkspace, ptr %153, i32 0, i32 23
  %155 = load ptr, ptr %154, align 8, !tbaa !18
  %156 = getelementptr inbounds %struct.OSQPSettings, ptr %155, i32 0, i32 6
  %157 = load double, ptr %156, align 8, !tbaa !30
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.OSQPWorkspace, ptr %158, i32 0, i32 26
  %160 = load ptr, ptr %159, align 8, !tbaa !12
  %161 = getelementptr inbounds %struct.OSQPInfo, ptr %160, i32 0, i32 7
  %162 = load double, ptr %161, align 8, !tbaa !24
  %163 = fmul double %157, %162
  %164 = fcmp ogt double %152, %163
  br i1 %164, label %165, label %248

165:                                              ; preds = %148
  %166 = load ptr, ptr %3, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.OSQPWorkspace, ptr %166, i32 0, i32 23
  %168 = load ptr, ptr %167, align 8, !tbaa !18
  %169 = getelementptr inbounds %struct.OSQPSettings, ptr %168, i32 0, i32 19
  %170 = load i64, ptr %169, align 8, !tbaa !27
  %171 = icmp ne i64 %170, 0
  br i1 %171, label %172, label %204

172:                                              ; preds = %165
  %173 = load i64, ptr %5, align 8, !tbaa !16
  %174 = sitofp i64 %173 to double
  %175 = load ptr, ptr %3, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.OSQPWorkspace, ptr %175, i32 0, i32 23
  %177 = load ptr, ptr %176, align 8, !tbaa !18
  %178 = getelementptr inbounds %struct.OSQPSettings, ptr %177, i32 0, i32 19
  %179 = load i64, ptr %178, align 8, !tbaa !27
  %180 = sitofp i64 %179 to double
  %181 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %180, double %174)
  %182 = load i64, ptr %5, align 8, !tbaa !16
  %183 = sitofp i64 %182 to double
  %184 = load ptr, ptr %3, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.OSQPWorkspace, ptr %184, i32 0, i32 23
  %186 = load ptr, ptr %185, align 8, !tbaa !18
  %187 = getelementptr inbounds %struct.OSQPSettings, ptr %186, i32 0, i32 19
  %188 = load i64, ptr %187, align 8, !tbaa !27
  %189 = sitofp i64 %188 to double
  %190 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %189, double %183)
  %191 = load ptr, ptr %3, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.OSQPWorkspace, ptr %191, i32 0, i32 23
  %193 = load ptr, ptr %192, align 8, !tbaa !18
  %194 = getelementptr inbounds %struct.OSQPSettings, ptr %193, i32 0, i32 19
  %195 = load i64, ptr %194, align 8, !tbaa !27
  %196 = sitofp i64 %195 to double
  %197 = call double @fmod(double noundef %190, double noundef %196) #5
  %198 = fsub double %181, %197
  %199 = fptosi double %198 to i64
  %200 = load ptr, ptr %3, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.OSQPWorkspace, ptr %200, i32 0, i32 23
  %202 = load ptr, ptr %201, align 8, !tbaa !18
  %203 = getelementptr inbounds %struct.OSQPSettings, ptr %202, i32 0, i32 4
  store i64 %199, ptr %203, align 8, !tbaa !29
  br label %218

204:                                              ; preds = %165
  %205 = load i64, ptr %5, align 8, !tbaa !16
  %206 = sitofp i64 %205 to double
  %207 = fadd double %206, 1.250000e+01
  %208 = load i64, ptr %5, align 8, !tbaa !16
  %209 = sitofp i64 %208 to double
  %210 = fadd double %209, 1.250000e+01
  %211 = call double @fmod(double noundef %210, double noundef 2.500000e+01) #5
  %212 = fsub double %207, %211
  %213 = fptosi double %212 to i64
  %214 = load ptr, ptr %3, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.OSQPWorkspace, ptr %214, i32 0, i32 23
  %216 = load ptr, ptr %215, align 8, !tbaa !18
  %217 = getelementptr inbounds %struct.OSQPSettings, ptr %216, i32 0, i32 4
  store i64 %213, ptr %217, align 8, !tbaa !29
  br label %218

218:                                              ; preds = %204, %172
  %219 = load ptr, ptr %3, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.OSQPWorkspace, ptr %219, i32 0, i32 23
  %221 = load ptr, ptr %220, align 8, !tbaa !18
  %222 = getelementptr inbounds %struct.OSQPSettings, ptr %221, i32 0, i32 4
  %223 = load i64, ptr %222, align 8, !tbaa !29
  %224 = load ptr, ptr %3, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.OSQPWorkspace, ptr %224, i32 0, i32 23
  %226 = load ptr, ptr %225, align 8, !tbaa !18
  %227 = getelementptr inbounds %struct.OSQPSettings, ptr %226, i32 0, i32 19
  %228 = load i64, ptr %227, align 8, !tbaa !27
  %229 = icmp sgt i64 %223, %228
  br i1 %229, label %230, label %236

230:                                              ; preds = %218
  %231 = load ptr, ptr %3, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.OSQPWorkspace, ptr %231, i32 0, i32 23
  %233 = load ptr, ptr %232, align 8, !tbaa !18
  %234 = getelementptr inbounds %struct.OSQPSettings, ptr %233, i32 0, i32 4
  %235 = load i64, ptr %234, align 8, !tbaa !29
  br label %242

236:                                              ; preds = %218
  %237 = load ptr, ptr %3, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.OSQPWorkspace, ptr %237, i32 0, i32 23
  %239 = load ptr, ptr %238, align 8, !tbaa !18
  %240 = getelementptr inbounds %struct.OSQPSettings, ptr %239, i32 0, i32 19
  %241 = load i64, ptr %240, align 8, !tbaa !27
  br label %242

242:                                              ; preds = %236, %230
  %243 = phi i64 [ %235, %230 ], [ %241, %236 ]
  %244 = load ptr, ptr %3, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.OSQPWorkspace, ptr %244, i32 0, i32 23
  %246 = load ptr, ptr %245, align 8, !tbaa !18
  %247 = getelementptr inbounds %struct.OSQPSettings, ptr %246, i32 0, i32 4
  store i64 %243, ptr %247, align 8, !tbaa !29
  br label %248

248:                                              ; preds = %242, %148
  br label %249

249:                                              ; preds = %248, %141, %134
  %250 = load ptr, ptr %3, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.OSQPWorkspace, ptr %250, i32 0, i32 23
  %252 = load ptr, ptr %251, align 8, !tbaa !18
  %253 = getelementptr inbounds %struct.OSQPSettings, ptr %252, i32 0, i32 3
  %254 = load i64, ptr %253, align 8, !tbaa !28
  %255 = icmp ne i64 %254, 0
  br i1 %255, label %256, label %285

256:                                              ; preds = %249
  %257 = load ptr, ptr %3, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.OSQPWorkspace, ptr %257, i32 0, i32 23
  %259 = load ptr, ptr %258, align 8, !tbaa !18
  %260 = getelementptr inbounds %struct.OSQPSettings, ptr %259, i32 0, i32 4
  %261 = load i64, ptr %260, align 8, !tbaa !29
  %262 = icmp ne i64 %261, 0
  br i1 %262, label %263, label %285

263:                                              ; preds = %256
  %264 = load i64, ptr %5, align 8, !tbaa !16
  %265 = load ptr, ptr %3, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.OSQPWorkspace, ptr %265, i32 0, i32 23
  %267 = load ptr, ptr %266, align 8, !tbaa !18
  %268 = getelementptr inbounds %struct.OSQPSettings, ptr %267, i32 0, i32 4
  %269 = load i64, ptr %268, align 8, !tbaa !29
  %270 = srem i64 %264, %269
  %271 = icmp eq i64 %270, 0
  br i1 %271, label %272, label %285

272:                                              ; preds = %263
  %273 = load i64, ptr %7, align 8, !tbaa !16
  %274 = icmp ne i64 %273, 0
  br i1 %274, label %279, label %275

275:                                              ; preds = %272
  %276 = load ptr, ptr %3, align 8, !tbaa !5
  %277 = load i64, ptr %5, align 8, !tbaa !16
  %278 = load i64, ptr %6, align 8, !tbaa !16
  call void @update_info(ptr noundef %276, i64 noundef %277, i64 noundef %278, i64 noundef 0)
  br label %279

279:                                              ; preds = %275, %272
  %280 = load ptr, ptr %3, align 8, !tbaa !5
  %281 = call i64 @adapt_rho(ptr noundef %280)
  %282 = icmp ne i64 %281, 0
  br i1 %282, label %283, label %284

283:                                              ; preds = %279
  store i64 1, ptr %4, align 8, !tbaa !16
  br label %420

284:                                              ; preds = %279
  br label %285

285:                                              ; preds = %284, %263, %256, %249
  br label %286

286:                                              ; preds = %285
  %287 = load i64, ptr %5, align 8, !tbaa !16
  %288 = add nsw i64 %287, 1
  store i64 %288, ptr %5, align 8, !tbaa !16
  br label %36, !llvm.loop !31

289:                                              ; preds = %132, %36
  %290 = load i64, ptr %7, align 8, !tbaa !16
  %291 = icmp ne i64 %290, 0
  br i1 %291, label %299, label %292

292:                                              ; preds = %289
  %293 = load ptr, ptr %3, align 8, !tbaa !5
  %294 = load i64, ptr %5, align 8, !tbaa !16
  %295 = sub nsw i64 %294, 1
  %296 = load i64, ptr %6, align 8, !tbaa !16
  call void @update_info(ptr noundef %293, i64 noundef %295, i64 noundef %296, i64 noundef 0)
  %297 = load ptr, ptr %3, align 8, !tbaa !5
  %298 = call i64 @check_termination(ptr noundef %297, i64 noundef 0)
  br label %299

299:                                              ; preds = %292, %289
  %300 = load i64, ptr %6, align 8, !tbaa !16
  %301 = icmp ne i64 %300, 0
  br i1 %301, label %312, label %302

302:                                              ; preds = %299
  %303 = load ptr, ptr %3, align 8, !tbaa !5
  %304 = load ptr, ptr %3, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.OSQPWorkspace, ptr %304, i32 0, i32 6
  %306 = load ptr, ptr %305, align 8, !tbaa !33
  %307 = call double @compute_obj_val(ptr noundef %303, ptr noundef %306)
  %308 = load ptr, ptr %3, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.OSQPWorkspace, ptr %308, i32 0, i32 26
  %310 = load ptr, ptr %309, align 8, !tbaa !12
  %311 = getelementptr inbounds %struct.OSQPInfo, ptr %310, i32 0, i32 4
  store double %307, ptr %311, align 8, !tbaa !34
  br label %312

312:                                              ; preds = %302, %299
  %313 = load ptr, ptr %3, align 8, !tbaa !5
  %314 = getelementptr inbounds %struct.OSQPWorkspace, ptr %313, i32 0, i32 26
  %315 = load ptr, ptr %314, align 8, !tbaa !12
  %316 = getelementptr inbounds %struct.OSQPInfo, ptr %315, i32 0, i32 2
  %317 = load i64, ptr %316, align 8, !tbaa !35
  %318 = icmp eq i64 %317, -10
  br i1 %318, label %319, label %328

319:                                              ; preds = %312
  %320 = load ptr, ptr %3, align 8, !tbaa !5
  %321 = call i64 @check_termination(ptr noundef %320, i64 noundef 1)
  %322 = icmp ne i64 %321, 0
  br i1 %322, label %327, label %323

323:                                              ; preds = %319
  %324 = load ptr, ptr %3, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.OSQPWorkspace, ptr %324, i32 0, i32 26
  %326 = load ptr, ptr %325, align 8, !tbaa !12
  call void @update_status(ptr noundef %326, i64 noundef -2)
  br label %327

327:                                              ; preds = %323, %319
  br label %328

328:                                              ; preds = %327, %312
  %329 = load ptr, ptr %3, align 8, !tbaa !5
  %330 = call double @compute_rho_estimate(ptr noundef %329)
  %331 = load ptr, ptr %3, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.OSQPWorkspace, ptr %331, i32 0, i32 26
  %333 = load ptr, ptr %332, align 8, !tbaa !12
  %334 = getelementptr inbounds %struct.OSQPInfo, ptr %333, i32 0, i32 13
  store double %330, ptr %334, align 8, !tbaa !36
  %335 = load ptr, ptr %3, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.OSQPWorkspace, ptr %335, i32 0, i32 27
  %337 = load ptr, ptr %336, align 8, !tbaa !17
  %338 = call double @osqp_toc(ptr noundef %337)
  %339 = load ptr, ptr %3, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.OSQPWorkspace, ptr %339, i32 0, i32 26
  %341 = load ptr, ptr %340, align 8, !tbaa !12
  %342 = getelementptr inbounds %struct.OSQPInfo, ptr %341, i32 0, i32 8
  store double %338, ptr %342, align 8, !tbaa !37
  %343 = load ptr, ptr %3, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct.OSQPWorkspace, ptr %343, i32 0, i32 23
  %345 = load ptr, ptr %344, align 8, !tbaa !18
  %346 = getelementptr inbounds %struct.OSQPSettings, ptr %345, i32 0, i32 15
  %347 = load i64, ptr %346, align 8, !tbaa !38
  %348 = icmp ne i64 %347, 0
  br i1 %348, label %349, label %359

349:                                              ; preds = %328
  %350 = load ptr, ptr %3, align 8, !tbaa !5
  %351 = getelementptr inbounds %struct.OSQPWorkspace, ptr %350, i32 0, i32 26
  %352 = load ptr, ptr %351, align 8, !tbaa !12
  %353 = getelementptr inbounds %struct.OSQPInfo, ptr %352, i32 0, i32 2
  %354 = load i64, ptr %353, align 8, !tbaa !35
  %355 = icmp eq i64 %354, 1
  br i1 %355, label %356, label %359

356:                                              ; preds = %349
  %357 = load ptr, ptr %3, align 8, !tbaa !5
  %358 = call i64 @polish(ptr noundef %357)
  br label %359

359:                                              ; preds = %356, %349, %328
  %360 = load ptr, ptr %3, align 8, !tbaa !5
  %361 = getelementptr inbounds %struct.OSQPWorkspace, ptr %360, i32 0, i32 28
  %362 = load i64, ptr %361, align 8, !tbaa !23
  %363 = icmp ne i64 %362, 0
  br i1 %363, label %364, label %386

364:                                              ; preds = %359
  %365 = load ptr, ptr %3, align 8, !tbaa !5
  %366 = getelementptr inbounds %struct.OSQPWorkspace, ptr %365, i32 0, i32 26
  %367 = load ptr, ptr %366, align 8, !tbaa !12
  %368 = getelementptr inbounds %struct.OSQPInfo, ptr %367, i32 0, i32 7
  %369 = load double, ptr %368, align 8, !tbaa !24
  %370 = load ptr, ptr %3, align 8, !tbaa !5
  %371 = getelementptr inbounds %struct.OSQPWorkspace, ptr %370, i32 0, i32 26
  %372 = load ptr, ptr %371, align 8, !tbaa !12
  %373 = getelementptr inbounds %struct.OSQPInfo, ptr %372, i32 0, i32 8
  %374 = load double, ptr %373, align 8, !tbaa !37
  %375 = fadd double %369, %374
  %376 = load ptr, ptr %3, align 8, !tbaa !5
  %377 = getelementptr inbounds %struct.OSQPWorkspace, ptr %376, i32 0, i32 26
  %378 = load ptr, ptr %377, align 8, !tbaa !12
  %379 = getelementptr inbounds %struct.OSQPInfo, ptr %378, i32 0, i32 10
  %380 = load double, ptr %379, align 8, !tbaa !39
  %381 = fadd double %375, %380
  %382 = load ptr, ptr %3, align 8, !tbaa !5
  %383 = getelementptr inbounds %struct.OSQPWorkspace, ptr %382, i32 0, i32 26
  %384 = load ptr, ptr %383, align 8, !tbaa !12
  %385 = getelementptr inbounds %struct.OSQPInfo, ptr %384, i32 0, i32 11
  store double %381, ptr %385, align 8, !tbaa !40
  br label %408

386:                                              ; preds = %359
  %387 = load ptr, ptr %3, align 8, !tbaa !5
  %388 = getelementptr inbounds %struct.OSQPWorkspace, ptr %387, i32 0, i32 26
  %389 = load ptr, ptr %388, align 8, !tbaa !12
  %390 = getelementptr inbounds %struct.OSQPInfo, ptr %389, i32 0, i32 9
  %391 = load double, ptr %390, align 8, !tbaa !13
  %392 = load ptr, ptr %3, align 8, !tbaa !5
  %393 = getelementptr inbounds %struct.OSQPWorkspace, ptr %392, i32 0, i32 26
  %394 = load ptr, ptr %393, align 8, !tbaa !12
  %395 = getelementptr inbounds %struct.OSQPInfo, ptr %394, i32 0, i32 8
  %396 = load double, ptr %395, align 8, !tbaa !37
  %397 = fadd double %391, %396
  %398 = load ptr, ptr %3, align 8, !tbaa !5
  %399 = getelementptr inbounds %struct.OSQPWorkspace, ptr %398, i32 0, i32 26
  %400 = load ptr, ptr %399, align 8, !tbaa !12
  %401 = getelementptr inbounds %struct.OSQPInfo, ptr %400, i32 0, i32 10
  %402 = load double, ptr %401, align 8, !tbaa !39
  %403 = fadd double %397, %402
  %404 = load ptr, ptr %3, align 8, !tbaa !5
  %405 = getelementptr inbounds %struct.OSQPWorkspace, ptr %404, i32 0, i32 26
  %406 = load ptr, ptr %405, align 8, !tbaa !12
  %407 = getelementptr inbounds %struct.OSQPInfo, ptr %406, i32 0, i32 11
  store double %403, ptr %407, align 8, !tbaa !40
  br label %408

408:                                              ; preds = %386, %364
  %409 = load ptr, ptr %3, align 8, !tbaa !5
  %410 = getelementptr inbounds %struct.OSQPWorkspace, ptr %409, i32 0, i32 28
  %411 = load i64, ptr %410, align 8, !tbaa !23
  %412 = icmp ne i64 %411, 0
  br i1 %412, label %413, label %416

413:                                              ; preds = %408
  %414 = load ptr, ptr %3, align 8, !tbaa !5
  %415 = getelementptr inbounds %struct.OSQPWorkspace, ptr %414, i32 0, i32 28
  store i64 0, ptr %415, align 8, !tbaa !23
  br label %416

416:                                              ; preds = %413, %408
  %417 = load ptr, ptr %3, align 8, !tbaa !5
  %418 = getelementptr inbounds %struct.OSQPWorkspace, ptr %417, i32 0, i32 29
  store i64 1, ptr %418, align 8, !tbaa !9
  %419 = load ptr, ptr %3, align 8, !tbaa !5
  call void @store_solution(ptr noundef %419)
  br label %420

420:                                              ; preds = %416, %283, %99, %59
  call void @osqp_end_interrupt_listener()
  %421 = load i64, ptr %4, align 8, !tbaa !16
  store i64 %421, ptr %2, align 8
  store i32 1, ptr %9, align 4
  br label %422

422:                                              ; preds = %420, %12
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  %423 = load i64, ptr %2, align 8
  ret i64 %423
}

declare void @osqp_start_interrupt_listener() #1

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

declare void @update_xz_tilde(ptr noundef) #1

declare void @update_x(ptr noundef) #1

declare void @update_z(ptr noundef) #1

declare void @update_y(ptr noundef) #1

declare i32 @osqp_is_interrupted() #1

declare void @update_info(ptr noundef, i64 noundef, i64 noundef, i64 noundef) #1

declare i64 @check_termination(ptr noundef, i64 noundef) #1

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

; Function Attrs: nounwind
declare double @fmod(double noundef, double noundef) #4

declare i64 @adapt_rho(ptr noundef) #1

declare double @compute_obj_val(ptr noundef, ptr noundef) #1

declare double @compute_rho_estimate(ptr noundef) #1

declare i64 @polish(ptr noundef) #1

declare void @store_solution(ptr noundef) #1

declare void @osqp_end_interrupt_listener() #1

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

!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, !11, i64 232}
!10 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !11, i64 224, !11, i64 232}
!11 = !{!"long long", !7, i64 0}
!12 = !{!10, !6, i64 208}
!13 = !{!14, !15, i64 96}
!14 = !{!"", !11, i64 0, !7, i64 8, !11, i64 40, !11, i64 48, !15, i64 56, !15, i64 64, !15, i64 72, !15, i64 80, !15, i64 88, !15, i64 96, !15, i64 104, !15, i64 112, !11, i64 120, !15, i64 128}
!15 = !{!"double", !7, i64 0}
!16 = !{!11, !11, i64 0}
!17 = !{!10, !6, i64 216}
!18 = !{!10, !6, i64 184}
!19 = !{!20, !11, i64 160}
!20 = !{!"", !15, i64 0, !15, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !15, i64 40, !15, i64 48, !11, i64 56, !15, i64 64, !15, i64 72, !15, i64 80, !15, i64 88, !15, i64 96, !21, i64 104, !15, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !15, i64 168}
!21 = !{!"int", !7, i64 0}
!22 = !{!20, !11, i64 56}
!23 = !{!10, !11, i64 224}
!24 = !{!14, !15, i64 80}
!25 = !{!15, !15, i64 0}
!26 = !{!20, !15, i64 168}
!27 = !{!20, !11, i64 152}
!28 = !{!20, !11, i64 24}
!29 = !{!20, !11, i64 32}
!30 = !{!20, !15, i64 48}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!10, !6, i64 48}
!34 = !{!14, !15, i64 56}
!35 = !{!14, !11, i64 40}
!36 = !{!14, !15, i64 128}
!37 = !{!14, !15, i64 88}
!38 = !{!20, !11, i64 120}
!39 = !{!14, !15, i64 104}
!40 = !{!14, !15, i64 112}


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

declare void @osqp_tic(ptr noundef) local_unnamed_addr #0

declare void @cold_start(ptr noundef) local_unnamed_addr #0

declare void @update_status(ptr noundef, i64 noundef) local_unnamed_addr #0

declare double @osqp_toc(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i64 -1, 2) i64 @osqp_solve(ptr noundef %0) local_unnamed_addr #1 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %168, label %2

2:                                                ; preds = %1
  %3 = getelementptr inbounds i8, ptr %0, i64 232
  %4 = load i64, ptr %3, align 8, !tbaa !5
  %5 = icmp eq i64 %4, 1
  br i1 %5, label %6, label %10

6:                                                ; preds = %2
  %7 = getelementptr inbounds i8, ptr %0, i64 208
  %8 = load ptr, ptr %7, align 8, !tbaa !11
  %9 = getelementptr inbounds i8, ptr %8, i64 96
  store double 0.000000e+00, ptr %9, align 8, !tbaa !12
  br label %10

10:                                               ; preds = %6, %2
  %11 = getelementptr inbounds i8, ptr %0, i64 216
  %12 = load ptr, ptr %11, align 8, !tbaa !15
  tail call void @osqp_tic(ptr noundef %12) #5
  tail call void @osqp_start_interrupt_listener() #5
  %13 = getelementptr inbounds i8, ptr %0, i64 184
  %14 = load ptr, ptr %13, align 8, !tbaa !16
  %15 = getelementptr inbounds i8, ptr %14, i64 160
  %16 = load i64, ptr %15, align 8, !tbaa !17
  %.not107 = icmp eq i64 %16, 0
  br i1 %.not107, label %17, label %18

17:                                               ; preds = %10
  tail call void @cold_start(ptr noundef nonnull %0) #5
  %.pre = load ptr, ptr %13, align 8, !tbaa !16
  br label %18

18:                                               ; preds = %17, %10
  %19 = phi ptr [ %.pre, %17 ], [ %14, %10 ]
  %20 = getelementptr inbounds i8, ptr %19, i64 56
  %21 = load i64, ptr %20, align 8, !tbaa !20
  %.not108136 = icmp slt i64 %21, 1
  br i1 %.not108136, label %._crit_edge.thread, label %.lr.ph

.lr.ph:                                           ; preds = %18
  %22 = getelementptr inbounds i8, ptr %0, i64 48
  %23 = getelementptr inbounds i8, ptr %0, i64 80
  %24 = getelementptr inbounds i8, ptr %0, i64 64
  %25 = getelementptr inbounds i8, ptr %0, i64 88
  %26 = getelementptr inbounds i8, ptr %0, i64 224
  %27 = getelementptr inbounds i8, ptr %0, i64 208
  br label %28

28:                                               ; preds = %.lr.ph, %113
  %.098137 = phi i64 [ 1, %.lr.ph ], [ %115, %113 ]
  tail call void @swap_vectors(ptr noundef nonnull %22, ptr noundef nonnull %23) #5
  tail call void @swap_vectors(ptr noundef nonnull %24, ptr noundef nonnull %25) #5
  tail call void @update_xz_tilde(ptr noundef nonnull %0) #5
  tail call void @update_x(ptr noundef nonnull %0) #5
  tail call void @update_z(ptr noundef nonnull %0) #5
  tail call void @update_y(ptr noundef nonnull %0) #5
  %29 = tail call i32 @osqp_is_interrupted() #5
  %.not109 = icmp eq i32 %29, 0
  br i1 %.not109, label %32, label %30

30:                                               ; preds = %28
  %31 = load ptr, ptr %27, align 8, !tbaa !11
  tail call void @update_status(ptr noundef %31, i64 noundef -5) #5
  br label %.loopexit

32:                                               ; preds = %28
  %33 = load i64, ptr %26, align 8, !tbaa !21
  %.not110 = icmp eq i64 %33, 0
  br i1 %.not110, label %41, label %34

34:                                               ; preds = %32
  %35 = load ptr, ptr %27, align 8, !tbaa !11
  %36 = getelementptr inbounds i8, ptr %35, i64 80
  %37 = load double, ptr %36, align 8, !tbaa !22
  %38 = load ptr, ptr %11, align 8, !tbaa !15
  %39 = tail call double @osqp_toc(ptr noundef %38) #5
  %40 = fadd double %37, %39
  br label %44

41:                                               ; preds = %32
  %42 = load ptr, ptr %11, align 8, !tbaa !15
  %43 = tail call double @osqp_toc(ptr noundef %42) #5
  br label %44

44:                                               ; preds = %41, %34
  %.0 = phi double [ %40, %34 ], [ %43, %41 ]
  %45 = load ptr, ptr %13, align 8, !tbaa !16
  %46 = getelementptr inbounds i8, ptr %45, i64 168
  %47 = load double, ptr %46, align 8, !tbaa !23
  %48 = fcmp oeq double %47, 0.000000e+00
  %49 = fcmp ult double %.0, %47
  %or.cond = select i1 %48, i1 true, i1 %49
  br i1 %or.cond, label %52, label %50

50:                                               ; preds = %44
  %51 = load ptr, ptr %27, align 8, !tbaa !11
  tail call void @update_status(ptr noundef %51, i64 noundef -6) #5
  br label %.loopexit

52:                                               ; preds = %44
  %53 = getelementptr inbounds i8, ptr %45, i64 152
  %54 = load i64, ptr %53, align 8, !tbaa !24
  %.not111 = icmp eq i64 %54, 0
  br i1 %.not111, label %.thread, label %55

55:                                               ; preds = %52
  %56 = srem i64 %.098137, %54
  %57 = icmp eq i64 %56, 0
  br i1 %57, label %58, label %.thread

58:                                               ; preds = %55
  tail call void @update_info(ptr noundef nonnull %0, i64 noundef %.098137, i64 noundef 0, i64 noundef 0) #5
  %59 = tail call i64 @check_termination(ptr noundef nonnull %0, i64 noundef 0) #5
  %.not112 = icmp eq i64 %59, 0
  br i1 %.not112, label %..thread_crit_edge, label %.thread124

..thread_crit_edge:                               ; preds = %58
  %.pre146 = load ptr, ptr %13, align 8, !tbaa !16
  br label %.thread

.thread:                                          ; preds = %..thread_crit_edge, %52, %55
  %60 = phi ptr [ %.pre146, %..thread_crit_edge ], [ %45, %55 ], [ %45, %52 ]
  %61 = phi i1 [ false, %..thread_crit_edge ], [ true, %55 ], [ true, %52 ]
  %62 = phi i1 [ true, %..thread_crit_edge ], [ false, %55 ], [ false, %52 ]
  %63 = getelementptr inbounds i8, ptr %60, i64 24
  %64 = load i64, ptr %63, align 8, !tbaa !25
  %.not113 = icmp eq i64 %64, 0
  br i1 %.not113, label %99, label %65

65:                                               ; preds = %.thread
  %66 = getelementptr inbounds i8, ptr %60, i64 32
  %67 = load i64, ptr %66, align 8, !tbaa !26
  %.not114 = icmp eq i64 %67, 0
  br i1 %.not114, label %68, label %99

68:                                               ; preds = %65
  %69 = load ptr, ptr %11, align 8, !tbaa !15
  %70 = tail call double @osqp_toc(ptr noundef %69) #5
  %71 = load ptr, ptr %13, align 8, !tbaa !16
  %72 = getelementptr inbounds i8, ptr %71, i64 48
  %73 = load double, ptr %72, align 8, !tbaa !27
  %74 = load ptr, ptr %27, align 8, !tbaa !11
  %75 = getelementptr inbounds i8, ptr %74, i64 80
  %76 = load double, ptr %75, align 8, !tbaa !22
  %77 = fmul double %73, %76
  %78 = fcmp ogt double %70, %77
  br i1 %78, label %79, label %99

79:                                               ; preds = %68
  %80 = getelementptr inbounds i8, ptr %71, i64 152
  %81 = load i64, ptr %80, align 8, !tbaa !24
  %.not115 = icmp eq i64 %81, 0
  %82 = uitofp nneg i64 %.098137 to double
  br i1 %.not115, label %88, label %83

83:                                               ; preds = %79
  %84 = sitofp i64 %81 to double
  %85 = tail call double @llvm.fmuladd.f64(double %84, double 5.000000e-01, double %82)
  %86 = tail call double @fmod(double noundef %85, double noundef %84) #5
  %87 = fsub double %85, %86
  br label %92

88:                                               ; preds = %79
  %89 = fadd double %82, 1.250000e+01
  %90 = tail call double @fmod(double noundef %89, double noundef 2.500000e+01) #5
  %91 = fsub double %89, %90
  br label %92

92:                                               ; preds = %88, %83
  %.sink159 = phi double [ %91, %88 ], [ %87, %83 ]
  %93 = fptosi double %.sink159 to i64
  %94 = load ptr, ptr %13, align 8, !tbaa !16
  %95 = getelementptr inbounds i8, ptr %94, i64 32
  store i64 %93, ptr %95, align 8, !tbaa !26
  %96 = getelementptr inbounds i8, ptr %94, i64 32
  %97 = getelementptr inbounds i8, ptr %94, i64 152
  %98 = load i64, ptr %97, align 8, !tbaa !24
  %. = tail call i64 @llvm.smax.i64(i64 %93, i64 %98)
  store i64 %., ptr %96, align 8, !tbaa !26
  br label %99

99:                                               ; preds = %68, %92, %65, %.thread
  %100 = phi ptr [ %71, %68 ], [ %94, %92 ], [ %60, %65 ], [ %60, %.thread ]
  %101 = getelementptr inbounds i8, ptr %100, i64 24
  %102 = load i64, ptr %101, align 8, !tbaa !25
  %.not116 = icmp eq i64 %102, 0
  br i1 %.not116, label %113, label %103

103:                                              ; preds = %99
  %104 = getelementptr inbounds i8, ptr %100, i64 32
  %105 = load i64, ptr %104, align 8, !tbaa !26
  %.not117 = icmp eq i64 %105, 0
  br i1 %.not117, label %113, label %106

106:                                              ; preds = %103
  %107 = srem i64 %.098137, %105
  %108 = icmp eq i64 %107, 0
  br i1 %108, label %109, label %113

109:                                              ; preds = %106
  br i1 %62, label %111, label %110

110:                                              ; preds = %109
  tail call void @update_info(ptr noundef nonnull %0, i64 noundef %.098137, i64 noundef 0, i64 noundef 0) #5
  br label %111

111:                                              ; preds = %110, %109
  %112 = tail call i64 @adapt_rho(ptr noundef nonnull %0) #5
  %.not118 = icmp eq i64 %112, 0
  br i1 %.not118, label %._crit_edge147, label %.loopexit

._crit_edge147:                                   ; preds = %111
  %.pre148 = load ptr, ptr %13, align 8, !tbaa !16
  br label %113

113:                                              ; preds = %._crit_edge147, %99, %103, %106
  %114 = phi ptr [ %.pre148, %._crit_edge147 ], [ %100, %99 ], [ %100, %103 ], [ %100, %106 ]
  %115 = add nuw nsw i64 %.098137, 1
  %116 = getelementptr inbounds i8, ptr %114, i64 56
  %117 = load i64, ptr %116, align 8, !tbaa !20
  %.not108.not = icmp slt i64 %.098137, %117
  br i1 %.not108.not, label %28, label %._crit_edge, !llvm.loop !28

._crit_edge:                                      ; preds = %113
  br i1 %61, label %._crit_edge.thread, label %.thread124

._crit_edge.thread:                               ; preds = %18, %._crit_edge
  %.098.lcssa151 = phi i64 [ %.098137, %._crit_edge ], [ 0, %18 ]
  tail call void @update_info(ptr noundef nonnull %0, i64 noundef %.098.lcssa151, i64 noundef 0, i64 noundef 0) #5
  %118 = tail call i64 @check_termination(ptr noundef nonnull %0, i64 noundef 0) #5
  br label %.thread124

.thread124:                                       ; preds = %58, %._crit_edge, %._crit_edge.thread
  %119 = getelementptr inbounds i8, ptr %0, i64 48
  %120 = load ptr, ptr %119, align 8, !tbaa !30
  %121 = tail call double @compute_obj_val(ptr noundef nonnull %0, ptr noundef %120) #5
  %122 = getelementptr inbounds i8, ptr %0, i64 208
  %123 = load ptr, ptr %122, align 8, !tbaa !11
  %124 = getelementptr inbounds i8, ptr %123, i64 56
  store double %121, ptr %124, align 8, !tbaa !31
  %125 = getelementptr inbounds i8, ptr %123, i64 40
  %126 = load i64, ptr %125, align 8, !tbaa !32
  %127 = icmp eq i64 %126, -10
  br i1 %127, label %128, label %132

128:                                              ; preds = %.thread124
  %129 = tail call i64 @check_termination(ptr noundef nonnull %0, i64 noundef 1) #5
  %.not120 = icmp eq i64 %129, 0
  br i1 %.not120, label %130, label %132

130:                                              ; preds = %128
  %131 = load ptr, ptr %122, align 8, !tbaa !11
  tail call void @update_status(ptr noundef %131, i64 noundef -2) #5
  br label %132

132:                                              ; preds = %128, %130, %.thread124
  %133 = tail call double @compute_rho_estimate(ptr noundef nonnull %0) #5
  %134 = load ptr, ptr %122, align 8, !tbaa !11
  %135 = getelementptr inbounds i8, ptr %134, i64 128
  store double %133, ptr %135, align 8, !tbaa !33
  %136 = load ptr, ptr %11, align 8, !tbaa !15
  %137 = tail call double @osqp_toc(ptr noundef %136) #5
  %138 = load ptr, ptr %122, align 8, !tbaa !11
  %139 = getelementptr inbounds i8, ptr %138, i64 88
  store double %137, ptr %139, align 8, !tbaa !34
  %140 = load ptr, ptr %13, align 8, !tbaa !16
  %141 = getelementptr inbounds i8, ptr %140, i64 120
  %142 = load i64, ptr %141, align 8, !tbaa !35
  %.not121 = icmp eq i64 %142, 0
  br i1 %.not121, label %149, label %143

143:                                              ; preds = %132
  %144 = getelementptr inbounds i8, ptr %138, i64 40
  %145 = load i64, ptr %144, align 8, !tbaa !32
  %146 = icmp eq i64 %145, 1
  br i1 %146, label %147, label %149

147:                                              ; preds = %143
  %148 = tail call i64 @polish(ptr noundef nonnull %0) #5
  br label %149

149:                                              ; preds = %147, %143, %132
  %150 = getelementptr inbounds i8, ptr %0, i64 224
  %151 = load i64, ptr %150, align 8, !tbaa !21
  %.not122 = icmp eq i64 %151, 0
  %152 = load ptr, ptr %122, align 8, !tbaa !11
  %153 = getelementptr inbounds i8, ptr %152, i64 88
  %154 = load double, ptr %153, align 8, !tbaa !34
  %155 = getelementptr inbounds i8, ptr %152, i64 104
  %156 = load double, ptr %155, align 8, !tbaa !36
  %157 = getelementptr inbounds i8, ptr %152, i64 112
  br i1 %.not122, label %.thread127, label %162

.thread127:                                       ; preds = %149
  %158 = getelementptr inbounds i8, ptr %152, i64 96
  %159 = load double, ptr %158, align 8, !tbaa !12
  %160 = fadd double %159, %154
  %161 = fadd double %160, %156
  store double %161, ptr %157, align 8, !tbaa !37
  br label %167

162:                                              ; preds = %149
  %163 = getelementptr inbounds i8, ptr %152, i64 80
  %164 = load double, ptr %163, align 8, !tbaa !22
  %165 = fadd double %164, %154
  %166 = fadd double %165, %156
  store double %166, ptr %157, align 8, !tbaa !37
  store i64 0, ptr %150, align 8, !tbaa !21
  br label %167

167:                                              ; preds = %.thread127, %162
  store i64 1, ptr %3, align 8, !tbaa !5
  tail call void @store_solution(ptr noundef nonnull %0) #5
  br label %.loopexit

.loopexit:                                        ; preds = %111, %167, %50, %30
  %.099 = phi i64 [ 1, %30 ], [ 1, %50 ], [ 0, %167 ], [ 1, %111 ]
  tail call void @osqp_end_interrupt_listener() #5
  br label %168

168:                                              ; preds = %1, %.loopexit
  %.097 = phi i64 [ %.099, %.loopexit ], [ -1, %1 ]
  ret i64 %.097
}

declare void @osqp_start_interrupt_listener() local_unnamed_addr #0

declare void @swap_vectors(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @update_xz_tilde(ptr noundef) local_unnamed_addr #0

declare void @update_x(ptr noundef) local_unnamed_addr #0

declare void @update_z(ptr noundef) local_unnamed_addr #0

declare void @update_y(ptr noundef) local_unnamed_addr #0

declare i32 @osqp_is_interrupted() local_unnamed_addr #0

declare void @update_info(ptr noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

declare i64 @check_termination(ptr noundef, i64 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @fmod(double noundef, double noundef) local_unnamed_addr #3

declare i64 @adapt_rho(ptr noundef) local_unnamed_addr #0

declare double @compute_obj_val(ptr noundef, ptr noundef) local_unnamed_addr #0

declare double @compute_rho_estimate(ptr noundef) local_unnamed_addr #0

declare i64 @polish(ptr noundef) local_unnamed_addr #0

declare void @store_solution(ptr noundef) local_unnamed_addr #0

declare void @osqp_end_interrupt_listener() local_unnamed_addr #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { mustprogress nofree nounwind willreturn memory(write) "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 nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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, !10, i64 232}
!6 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !10, i64 224, !10, i64 232}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long long", !8, i64 0}
!11 = !{!6, !7, i64 208}
!12 = !{!13, !14, i64 96}
!13 = !{!"", !10, i64 0, !8, i64 8, !10, i64 40, !10, i64 48, !14, i64 56, !14, i64 64, !14, i64 72, !14, i64 80, !14, i64 88, !14, i64 96, !14, i64 104, !14, i64 112, !10, i64 120, !14, i64 128}
!14 = !{!"double", !8, i64 0}
!15 = !{!6, !7, i64 216}
!16 = !{!6, !7, i64 184}
!17 = !{!18, !10, i64 160}
!18 = !{!"", !14, i64 0, !14, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !14, i64 40, !14, i64 48, !10, i64 56, !14, i64 64, !14, i64 72, !14, i64 80, !14, i64 88, !14, i64 96, !19, i64 104, !14, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !14, i64 168}
!19 = !{!"int", !8, i64 0}
!20 = !{!18, !10, i64 56}
!21 = !{!6, !10, i64 224}
!22 = !{!13, !14, i64 80}
!23 = !{!18, !14, i64 168}
!24 = !{!18, !10, i64 152}
!25 = !{!18, !10, i64 24}
!26 = !{!18, !10, i64 32}
!27 = !{!18, !14, i64 48}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!6, !7, i64 48}
!31 = !{!13, !14, i64 56}
!32 = !{!13, !10, i64 40}
!33 = !{!13, !14, i64 128}
!34 = !{!13, !14, i64 88}
!35 = !{!18, !10, i64 120}
!36 = !{!13, !14, i64 104}
!37 = !{!13, !14, i64 112}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass