; 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.OSQPData = type { i64, i64, ptr, ptr, ptr, ptr, ptr }
%struct.csc = type { i64, i64, i64, ptr, ptr, ptr, i64 }
%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 }
%struct.linsys_solver = type { i32, ptr, ptr, ptr, ptr, i64 }

; 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 i64 @scale_data(ptr 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

declare void @reset_info(ptr noundef) #1

declare i64 @unscale_data(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i64 @osqp_update_P_A(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, i64 noundef %6) #2 {
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store i64 %3, ptr %12, align 8, !tbaa !9
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store i64 %6, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %21 = load ptr, ptr %9, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.OSQPWorkspace, ptr %21, i32 0, i32 29
  %23 = load i64, ptr %22, align 8, !tbaa !11
  %24 = icmp eq i64 %23, 1
  br i1 %24, label %25, label %32

25:                                               ; preds = %7
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.OSQPWorkspace, ptr %26, i32 0, i32 29
  store i64 0, ptr %27, align 8, !tbaa !11
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.OSQPWorkspace, ptr %28, i32 0, i32 26
  %30 = load ptr, ptr %29, align 8, !tbaa !13
  %31 = getelementptr inbounds %struct.OSQPInfo, ptr %30, i32 0, i32 9
  store double 0.000000e+00, ptr %31, align 8, !tbaa !14
  br label %32

32:                                               ; preds = %25, %7
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.OSQPWorkspace, ptr %33, i32 0, i32 27
  %35 = load ptr, ptr %34, align 8, !tbaa !17
  call void @osqp_tic(ptr noundef %35)
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.OSQPWorkspace, ptr %36, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8, !tbaa !18
  %39 = getelementptr inbounds %struct.OSQPData, ptr %38, i32 0, i32 2
  %40 = load ptr, ptr %39, align 8, !tbaa !19
  %41 = getelementptr inbounds %struct.csc, ptr %40, i32 0, i32 3
  %42 = load ptr, ptr %41, align 8, !tbaa !21
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.OSQPWorkspace, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !18
  %46 = getelementptr inbounds %struct.OSQPData, ptr %45, i32 0, i32 2
  %47 = load ptr, ptr %46, align 8, !tbaa !19
  %48 = getelementptr inbounds %struct.csc, ptr %47, i32 0, i32 2
  %49 = load i64, ptr %48, align 8, !tbaa !23
  %50 = getelementptr inbounds i64, ptr %42, i64 %49
  %51 = load i64, ptr %50, align 8, !tbaa !9
  store i64 %51, ptr %18, align 8, !tbaa !9
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.OSQPWorkspace, ptr %52, i32 0, i32 0
  %54 = load ptr, ptr %53, align 8, !tbaa !18
  %55 = getelementptr inbounds %struct.OSQPData, ptr %54, i32 0, i32 3
  %56 = load ptr, ptr %55, align 8, !tbaa !24
  %57 = getelementptr inbounds %struct.csc, ptr %56, i32 0, i32 3
  %58 = load ptr, ptr %57, align 8, !tbaa !21
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.OSQPWorkspace, ptr %59, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8, !tbaa !18
  %62 = getelementptr inbounds %struct.OSQPData, ptr %61, i32 0, i32 3
  %63 = load ptr, ptr %62, align 8, !tbaa !24
  %64 = getelementptr inbounds %struct.csc, ptr %63, i32 0, i32 2
  %65 = load i64, ptr %64, align 8, !tbaa !23
  %66 = getelementptr inbounds i64, ptr %58, i64 %65
  %67 = load i64, ptr %66, align 8, !tbaa !9
  store i64 %67, ptr %19, align 8, !tbaa !9
  %68 = load ptr, ptr %11, align 8, !tbaa !5
  %69 = icmp ne ptr %68, null
  br i1 %69, label %70, label %76

70:                                               ; preds = %32
  %71 = load i64, ptr %12, align 8, !tbaa !9
  %72 = load i64, ptr %18, align 8, !tbaa !9
  %73 = icmp sgt i64 %71, %72
  br i1 %73, label %74, label %75

74:                                               ; preds = %70
  store i64 1, ptr %8, align 8
  store i32 1, ptr %20, align 4
  br label %246

75:                                               ; preds = %70
  br label %76

76:                                               ; preds = %75, %32
  %77 = load ptr, ptr %14, align 8, !tbaa !5
  %78 = icmp ne ptr %77, null
  br i1 %78, label %79, label %85

79:                                               ; preds = %76
  %80 = load i64, ptr %15, align 8, !tbaa !9
  %81 = load i64, ptr %19, align 8, !tbaa !9
  %82 = icmp sgt i64 %80, %81
  br i1 %82, label %83, label %84

83:                                               ; preds = %79
  store i64 2, ptr %8, align 8
  store i32 1, ptr %20, align 4
  br label %246

84:                                               ; preds = %79
  br label %85

85:                                               ; preds = %84, %76
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.OSQPWorkspace, ptr %86, i32 0, i32 23
  %88 = load ptr, ptr %87, align 8, !tbaa !25
  %89 = getelementptr inbounds %struct.OSQPSettings, ptr %88, i32 0, i32 2
  %90 = load i64, ptr %89, align 8, !tbaa !26
  %91 = icmp ne i64 %90, 0
  br i1 %91, label %92, label %95

92:                                               ; preds = %85
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = call i64 @unscale_data(ptr noundef %93)
  br label %95

95:                                               ; preds = %92, %85
  %96 = load ptr, ptr %11, align 8, !tbaa !5
  %97 = icmp ne ptr %96, null
  br i1 %97, label %98, label %124

98:                                               ; preds = %95
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %99

99:                                               ; preds = %120, %98
  %100 = load i64, ptr %16, align 8, !tbaa !9
  %101 = load i64, ptr %12, align 8, !tbaa !9
  %102 = icmp slt i64 %100, %101
  br i1 %102, label %103, label %123

103:                                              ; preds = %99
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = load i64, ptr %16, align 8, !tbaa !9
  %106 = getelementptr inbounds double, ptr %104, i64 %105
  %107 = load double, ptr %106, align 8, !tbaa !29
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.OSQPWorkspace, ptr %108, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8, !tbaa !18
  %111 = getelementptr inbounds %struct.OSQPData, ptr %110, i32 0, i32 2
  %112 = load ptr, ptr %111, align 8, !tbaa !19
  %113 = getelementptr inbounds %struct.csc, ptr %112, i32 0, i32 5
  %114 = load ptr, ptr %113, align 8, !tbaa !30
  %115 = load ptr, ptr %11, align 8, !tbaa !5
  %116 = load i64, ptr %16, align 8, !tbaa !9
  %117 = getelementptr inbounds i64, ptr %115, i64 %116
  %118 = load i64, ptr %117, align 8, !tbaa !9
  %119 = getelementptr inbounds double, ptr %114, i64 %118
  store double %107, ptr %119, align 8, !tbaa !29
  br label %120

120:                                              ; preds = %103
  %121 = load i64, ptr %16, align 8, !tbaa !9
  %122 = add nsw i64 %121, 1
  store i64 %122, ptr %16, align 8, !tbaa !9
  br label %99, !llvm.loop !31

123:                                              ; preds = %99
  br label %147

124:                                              ; preds = %95
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %125

125:                                              ; preds = %143, %124
  %126 = load i64, ptr %16, align 8, !tbaa !9
  %127 = load i64, ptr %18, align 8, !tbaa !9
  %128 = icmp slt i64 %126, %127
  br i1 %128, label %129, label %146

129:                                              ; preds = %125
  %130 = load ptr, ptr %10, align 8, !tbaa !5
  %131 = load i64, ptr %16, align 8, !tbaa !9
  %132 = getelementptr inbounds double, ptr %130, i64 %131
  %133 = load double, ptr %132, align 8, !tbaa !29
  %134 = load ptr, ptr %9, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.OSQPWorkspace, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !18
  %137 = getelementptr inbounds %struct.OSQPData, ptr %136, i32 0, i32 2
  %138 = load ptr, ptr %137, align 8, !tbaa !19
  %139 = getelementptr inbounds %struct.csc, ptr %138, i32 0, i32 5
  %140 = load ptr, ptr %139, align 8, !tbaa !30
  %141 = load i64, ptr %16, align 8, !tbaa !9
  %142 = getelementptr inbounds double, ptr %140, i64 %141
  store double %133, ptr %142, align 8, !tbaa !29
  br label %143

143:                                              ; preds = %129
  %144 = load i64, ptr %16, align 8, !tbaa !9
  %145 = add nsw i64 %144, 1
  store i64 %145, ptr %16, align 8, !tbaa !9
  br label %125, !llvm.loop !33

146:                                              ; preds = %125
  br label %147

147:                                              ; preds = %146, %123
  %148 = load ptr, ptr %14, align 8, !tbaa !5
  %149 = icmp ne ptr %148, null
  br i1 %149, label %150, label %176

150:                                              ; preds = %147
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %151

151:                                              ; preds = %172, %150
  %152 = load i64, ptr %16, align 8, !tbaa !9
  %153 = load i64, ptr %15, align 8, !tbaa !9
  %154 = icmp slt i64 %152, %153
  br i1 %154, label %155, label %175

155:                                              ; preds = %151
  %156 = load ptr, ptr %13, align 8, !tbaa !5
  %157 = load i64, ptr %16, align 8, !tbaa !9
  %158 = getelementptr inbounds double, ptr %156, i64 %157
  %159 = load double, ptr %158, align 8, !tbaa !29
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.OSQPWorkspace, ptr %160, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8, !tbaa !18
  %163 = getelementptr inbounds %struct.OSQPData, ptr %162, i32 0, i32 3
  %164 = load ptr, ptr %163, align 8, !tbaa !24
  %165 = getelementptr inbounds %struct.csc, ptr %164, i32 0, i32 5
  %166 = load ptr, ptr %165, align 8, !tbaa !30
  %167 = load ptr, ptr %14, align 8, !tbaa !5
  %168 = load i64, ptr %16, align 8, !tbaa !9
  %169 = getelementptr inbounds i64, ptr %167, i64 %168
  %170 = load i64, ptr %169, align 8, !tbaa !9
  %171 = getelementptr inbounds double, ptr %166, i64 %170
  store double %159, ptr %171, align 8, !tbaa !29
  br label %172

172:                                              ; preds = %155
  %173 = load i64, ptr %16, align 8, !tbaa !9
  %174 = add nsw i64 %173, 1
  store i64 %174, ptr %16, align 8, !tbaa !9
  br label %151, !llvm.loop !34

175:                                              ; preds = %151
  br label %199

176:                                              ; preds = %147
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %177

177:                                              ; preds = %195, %176
  %178 = load i64, ptr %16, align 8, !tbaa !9
  %179 = load i64, ptr %19, align 8, !tbaa !9
  %180 = icmp slt i64 %178, %179
  br i1 %180, label %181, label %198

181:                                              ; preds = %177
  %182 = load ptr, ptr %13, align 8, !tbaa !5
  %183 = load i64, ptr %16, align 8, !tbaa !9
  %184 = getelementptr inbounds double, ptr %182, i64 %183
  %185 = load double, ptr %184, align 8, !tbaa !29
  %186 = load ptr, ptr %9, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.OSQPWorkspace, ptr %186, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8, !tbaa !18
  %189 = getelementptr inbounds %struct.OSQPData, ptr %188, i32 0, i32 3
  %190 = load ptr, ptr %189, align 8, !tbaa !24
  %191 = getelementptr inbounds %struct.csc, ptr %190, i32 0, i32 5
  %192 = load ptr, ptr %191, align 8, !tbaa !30
  %193 = load i64, ptr %16, align 8, !tbaa !9
  %194 = getelementptr inbounds double, ptr %192, i64 %193
  store double %185, ptr %194, align 8, !tbaa !29
  br label %195

195:                                              ; preds = %181
  %196 = load i64, ptr %16, align 8, !tbaa !9
  %197 = add nsw i64 %196, 1
  store i64 %197, ptr %16, align 8, !tbaa !9
  br label %177, !llvm.loop !35

198:                                              ; preds = %177
  br label %199

199:                                              ; preds = %198, %175
  %200 = load ptr, ptr %9, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.OSQPWorkspace, ptr %200, i32 0, i32 23
  %202 = load ptr, ptr %201, align 8, !tbaa !25
  %203 = getelementptr inbounds %struct.OSQPSettings, ptr %202, i32 0, i32 2
  %204 = load i64, ptr %203, align 8, !tbaa !26
  %205 = icmp ne i64 %204, 0
  br i1 %205, label %206, label %209

206:                                              ; preds = %199
  %207 = load ptr, ptr %9, align 8, !tbaa !5
  %208 = call i64 @scale_data(ptr noundef %207)
  br label %209

209:                                              ; preds = %206, %199
  %210 = load ptr, ptr %9, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.OSQPWorkspace, ptr %210, i32 0, i32 1
  %212 = load ptr, ptr %211, align 8, !tbaa !36
  %213 = getelementptr inbounds %struct.linsys_solver, ptr %212, i32 0, i32 3
  %214 = load ptr, ptr %213, align 8, !tbaa !37
  %215 = load ptr, ptr %9, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.OSQPWorkspace, ptr %215, i32 0, i32 1
  %217 = load ptr, ptr %216, align 8, !tbaa !36
  %218 = load ptr, ptr %9, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.OSQPWorkspace, ptr %218, i32 0, i32 0
  %220 = load ptr, ptr %219, align 8, !tbaa !18
  %221 = getelementptr inbounds %struct.OSQPData, ptr %220, i32 0, i32 2
  %222 = load ptr, ptr %221, align 8, !tbaa !19
  %223 = load ptr, ptr %9, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.OSQPWorkspace, ptr %223, i32 0, i32 0
  %225 = load ptr, ptr %224, align 8, !tbaa !18
  %226 = getelementptr inbounds %struct.OSQPData, ptr %225, i32 0, i32 3
  %227 = load ptr, ptr %226, align 8, !tbaa !24
  %228 = load ptr, ptr %9, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.OSQPWorkspace, ptr %228, i32 0, i32 23
  %230 = load ptr, ptr %229, align 8, !tbaa !25
  %231 = call i64 %214(ptr noundef %217, ptr noundef %222, ptr noundef %227, ptr noundef %230)
  store i64 %231, ptr %17, align 8, !tbaa !9
  %232 = load ptr, ptr %9, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.OSQPWorkspace, ptr %232, i32 0, i32 26
  %234 = load ptr, ptr %233, align 8, !tbaa !13
  call void @reset_info(ptr noundef %234)
  %235 = load ptr, ptr %9, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.OSQPWorkspace, ptr %235, i32 0, i32 27
  %237 = load ptr, ptr %236, align 8, !tbaa !17
  %238 = call double @osqp_toc(ptr noundef %237)
  %239 = load ptr, ptr %9, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.OSQPWorkspace, ptr %239, i32 0, i32 26
  %241 = load ptr, ptr %240, align 8, !tbaa !13
  %242 = getelementptr inbounds %struct.OSQPInfo, ptr %241, i32 0, i32 9
  %243 = load double, ptr %242, align 8, !tbaa !14
  %244 = fadd double %243, %238
  store double %244, ptr %242, align 8, !tbaa !14
  %245 = load i64, ptr %17, align 8, !tbaa !9
  store i64 %245, ptr %8, align 8
  store i32 1, ptr %20, align 4
  br label %246

246:                                              ; preds = %209, %83, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  %247 = load i64, ptr %8, align 8
  ret i64 %247
}

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


; 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 i64 @scale_data(ptr noundef) local_unnamed_addr #0

declare double @osqp_toc(ptr noundef) local_unnamed_addr #0

declare void @reset_info(ptr noundef) local_unnamed_addr #0

declare i64 @unscale_data(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i64 @osqp_update_P_A(ptr noundef %0, ptr nocapture noundef readonly %1, ptr noundef readonly %2, i64 noundef %3, ptr nocapture noundef readonly %4, ptr noundef readonly %5, i64 noundef %6) local_unnamed_addr #1 {
  %8 = ptrtoint ptr %4 to i64
  %9 = ptrtoint ptr %1 to i64
  %10 = getelementptr inbounds i8, ptr %0, i64 232
  %11 = load i64, ptr %10, align 8, !tbaa !5
  %12 = icmp eq i64 %11, 1
  br i1 %12, label %13, label %17

13:                                               ; preds = %7
  store i64 0, ptr %10, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %0, i64 208
  %15 = load ptr, ptr %14, align 8, !tbaa !11
  %16 = getelementptr inbounds i8, ptr %15, i64 96
  store double 0.000000e+00, ptr %16, align 8, !tbaa !12
  br label %17

17:                                               ; preds = %13, %7
  %18 = getelementptr inbounds i8, ptr %0, i64 216
  %19 = load ptr, ptr %18, align 8, !tbaa !15
  tail call void @osqp_tic(ptr noundef %19) #2
  %20 = load ptr, ptr %0, align 8, !tbaa !16
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  %22 = load ptr, ptr %21, align 8, !tbaa !17
  %23 = getelementptr inbounds i8, ptr %22, i64 24
  %24 = load ptr, ptr %23, align 8, !tbaa !19
  %25 = getelementptr inbounds i8, ptr %22, i64 16
  %26 = load i64, ptr %25, align 8, !tbaa !21
  %27 = getelementptr inbounds i64, ptr %24, i64 %26
  %28 = load i64, ptr %27, align 8, !tbaa !22
  %29 = getelementptr inbounds i8, ptr %20, i64 24
  %30 = load ptr, ptr %29, align 8, !tbaa !23
  %31 = getelementptr inbounds i8, ptr %30, i64 24
  %32 = load ptr, ptr %31, align 8, !tbaa !19
  %33 = getelementptr inbounds i8, ptr %30, i64 16
  %34 = load i64, ptr %33, align 8, !tbaa !21
  %35 = getelementptr inbounds i64, ptr %32, i64 %34
  %36 = load i64, ptr %35, align 8, !tbaa !22
  %.not = icmp ne ptr %2, null
  %37 = icmp slt i64 %28, %3
  %or.cond = select i1 %.not, i1 %37, i1 false
  br i1 %or.cond, label %219, label %38

38:                                               ; preds = %17
  %.not62 = icmp ne ptr %5, null
  %39 = icmp slt i64 %36, %6
  %or.cond65 = select i1 %.not62, i1 %39, i1 false
  br i1 %or.cond65, label %219, label %40

40:                                               ; preds = %38
  %41 = getelementptr inbounds i8, ptr %0, i64 184
  %42 = load ptr, ptr %41, align 8, !tbaa !24
  %43 = getelementptr inbounds i8, ptr %42, i64 16
  %44 = load i64, ptr %43, align 8, !tbaa !25
  %.not63 = icmp eq i64 %44, 0
  br i1 %.not63, label %47, label %45

45:                                               ; preds = %40
  %46 = tail call i64 @unscale_data(ptr noundef nonnull %0) #2
  br label %47

47:                                               ; preds = %45, %40
  br i1 %.not, label %.preheader68, label %.preheader70

.preheader70:                                     ; preds = %47
  %48 = icmp sgt i64 %28, 0
  br i1 %48, label %.lr.ph, label %.loopexit69

.lr.ph:                                           ; preds = %.preheader70
  %49 = load ptr, ptr %0, align 8, !tbaa !16
  %50 = getelementptr inbounds i8, ptr %49, i64 16
  %51 = load ptr, ptr %50, align 8, !tbaa !17
  %52 = getelementptr inbounds i8, ptr %51, i64 40
  %53 = load ptr, ptr %52, align 8, !tbaa !28
  %min.iters.check = icmp ult i64 %28, 6
  %54 = ptrtoint ptr %53 to i64
  %55 = sub i64 %54, %9
  %diff.check = icmp ult i64 %55, 32
  %or.cond105 = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond105, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %.172.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %28, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %.172.prol = phi i64 [ %59, %scalar.ph.prol ], [ %.172.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %56 = getelementptr inbounds double, ptr %1, i64 %.172.prol
  %57 = load double, ptr %56, align 8, !tbaa !29
  %58 = getelementptr inbounds double, ptr %53, i64 %.172.prol
  store double %57, ptr %58, align 8, !tbaa !29
  %59 = add nuw nsw i64 %.172.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.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !30

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %.172.unr = phi i64 [ %.172.ph, %scalar.ph.preheader ], [ %59, %scalar.ph.prol ]
  %60 = sub nsw i64 %.172.ph, %28
  %61 = icmp ugt i64 %60, -4
  br i1 %61, label %.loopexit69, label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %28, 9223372036854775804
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %62 = getelementptr inbounds double, ptr %1, i64 %index
  %63 = getelementptr inbounds i8, ptr %62, i64 16
  %wide.load = load <2 x double>, ptr %62, align 8, !tbaa !29
  %wide.load88 = load <2 x double>, ptr %63, align 8, !tbaa !29
  %64 = getelementptr inbounds double, ptr %53, i64 %index
  %65 = getelementptr inbounds i8, ptr %64, i64 16
  store <2 x double> %wide.load, ptr %64, align 8, !tbaa !29
  store <2 x double> %wide.load88, ptr %65, align 8, !tbaa !29
  %index.next = add nuw i64 %index, 4
  %66 = icmp eq i64 %index.next, %n.vec
  br i1 %66, label %middle.block, label %vector.body, !llvm.loop !32

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

.preheader68:                                     ; preds = %47
  %67 = icmp sgt i64 %3, 0
  br i1 %67, label %.lr.ph74, label %.loopexit69

.lr.ph74:                                         ; preds = %.preheader68
  %68 = load ptr, ptr %0, align 8, !tbaa !16
  %69 = getelementptr inbounds i8, ptr %68, i64 16
  %70 = load ptr, ptr %69, align 8, !tbaa !17
  %71 = getelementptr inbounds i8, ptr %70, i64 40
  %72 = load ptr, ptr %71, align 8, !tbaa !28
  %xtraiter110 = and i64 %3, 3
  %73 = icmp ult i64 %3, 4
  br i1 %73, label %.loopexit69.loopexit.unr-lcssa, label %.lr.ph74.new

.lr.ph74.new:                                     ; preds = %.lr.ph74
  %unroll_iter = and i64 %3, 9223372036854775804
  br label %74

74:                                               ; preds = %74, %.lr.ph74.new
  %.05973 = phi i64 [ 0, %.lr.ph74.new ], [ %98, %74 ]
  %niter = phi i64 [ 0, %.lr.ph74.new ], [ %niter.next.3, %74 ]
  %75 = getelementptr inbounds double, ptr %1, i64 %.05973
  %76 = load double, ptr %75, align 8, !tbaa !29
  %77 = getelementptr inbounds i64, ptr %2, i64 %.05973
  %78 = load i64, ptr %77, align 8, !tbaa !22
  %79 = getelementptr inbounds double, ptr %72, i64 %78
  store double %76, ptr %79, align 8, !tbaa !29
  %80 = or disjoint i64 %.05973, 1
  %81 = getelementptr inbounds double, ptr %1, i64 %80
  %82 = load double, ptr %81, align 8, !tbaa !29
  %83 = getelementptr inbounds i64, ptr %2, i64 %80
  %84 = load i64, ptr %83, align 8, !tbaa !22
  %85 = getelementptr inbounds double, ptr %72, i64 %84
  store double %82, ptr %85, align 8, !tbaa !29
  %86 = or disjoint i64 %.05973, 2
  %87 = getelementptr inbounds double, ptr %1, i64 %86
  %88 = load double, ptr %87, align 8, !tbaa !29
  %89 = getelementptr inbounds i64, ptr %2, i64 %86
  %90 = load i64, ptr %89, align 8, !tbaa !22
  %91 = getelementptr inbounds double, ptr %72, i64 %90
  store double %88, ptr %91, align 8, !tbaa !29
  %92 = or disjoint i64 %.05973, 3
  %93 = getelementptr inbounds double, ptr %1, i64 %92
  %94 = load double, ptr %93, align 8, !tbaa !29
  %95 = getelementptr inbounds i64, ptr %2, i64 %92
  %96 = load i64, ptr %95, align 8, !tbaa !22
  %97 = getelementptr inbounds double, ptr %72, i64 %96
  store double %94, ptr %97, align 8, !tbaa !29
  %98 = add nuw nsw i64 %.05973, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit69.loopexit.unr-lcssa, label %74, !llvm.loop !36

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %.172 = phi i64 [ %114, %scalar.ph ], [ %.172.unr, %scalar.ph.prol.loopexit ]
  %99 = getelementptr inbounds double, ptr %1, i64 %.172
  %100 = load double, ptr %99, align 8, !tbaa !29
  %101 = getelementptr inbounds double, ptr %53, i64 %.172
  store double %100, ptr %101, align 8, !tbaa !29
  %102 = add nuw nsw i64 %.172, 1
  %103 = getelementptr inbounds double, ptr %1, i64 %102
  %104 = load double, ptr %103, align 8, !tbaa !29
  %105 = getelementptr inbounds double, ptr %53, i64 %102
  store double %104, ptr %105, align 8, !tbaa !29
  %106 = add nuw nsw i64 %.172, 2
  %107 = getelementptr inbounds double, ptr %1, i64 %106
  %108 = load double, ptr %107, align 8, !tbaa !29
  %109 = getelementptr inbounds double, ptr %53, i64 %106
  store double %108, ptr %109, align 8, !tbaa !29
  %110 = add nuw nsw i64 %.172, 3
  %111 = getelementptr inbounds double, ptr %1, i64 %110
  %112 = load double, ptr %111, align 8, !tbaa !29
  %113 = getelementptr inbounds double, ptr %53, i64 %110
  store double %112, ptr %113, align 8, !tbaa !29
  %114 = add nuw nsw i64 %.172, 4
  %exitcond.not.3 = icmp eq i64 %114, %28
  br i1 %exitcond.not.3, label %.loopexit69, label %scalar.ph, !llvm.loop !37

.loopexit69.loopexit.unr-lcssa:                   ; preds = %74, %.lr.ph74
  %.05973.unr = phi i64 [ 0, %.lr.ph74 ], [ %98, %74 ]
  %lcmp.mod111.not = icmp eq i64 %xtraiter110, 0
  br i1 %lcmp.mod111.not, label %.loopexit69, label %.epil.preheader

.epil.preheader:                                  ; preds = %.loopexit69.loopexit.unr-lcssa, %.epil.preheader
  %.05973.epil = phi i64 [ %120, %.epil.preheader ], [ %.05973.unr, %.loopexit69.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.loopexit69.loopexit.unr-lcssa ]
  %115 = getelementptr inbounds double, ptr %1, i64 %.05973.epil
  %116 = load double, ptr %115, align 8, !tbaa !29
  %117 = getelementptr inbounds i64, ptr %2, i64 %.05973.epil
  %118 = load i64, ptr %117, align 8, !tbaa !22
  %119 = getelementptr inbounds double, ptr %72, i64 %118
  store double %116, ptr %119, align 8, !tbaa !29
  %120 = add nuw nsw i64 %.05973.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter110
  br i1 %epil.iter.cmp.not, label %.loopexit69, label %.epil.preheader, !llvm.loop !38

.loopexit69:                                      ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %.loopexit69.loopexit.unr-lcssa, %.epil.preheader, %middle.block, %.preheader70, %.preheader68
  br i1 %.not62, label %.preheader, label %.preheader66

.preheader66:                                     ; preds = %.loopexit69
  %121 = icmp sgt i64 %36, 0
  br i1 %121, label %.lr.ph76, label %.loopexit

.lr.ph76:                                         ; preds = %.preheader66
  %122 = load ptr, ptr %0, align 8, !tbaa !16
  %123 = getelementptr inbounds i8, ptr %122, i64 24
  %124 = load ptr, ptr %123, align 8, !tbaa !23
  %125 = getelementptr inbounds i8, ptr %124, i64 40
  %126 = load ptr, ptr %125, align 8, !tbaa !28
  %min.iters.check93 = icmp ult i64 %36, 6
  %127 = ptrtoint ptr %126 to i64
  %128 = sub i64 %127, %8
  %diff.check90 = icmp ult i64 %128, 32
  %or.cond107 = select i1 %min.iters.check93, i1 true, i1 %diff.check90
  br i1 %or.cond107, label %scalar.ph92.preheader, label %vector.ph94

scalar.ph92.preheader:                            ; preds = %middle.block91, %.lr.ph76
  %.375.ph = phi i64 [ 0, %.lr.ph76 ], [ %n.vec96, %middle.block91 ]
  %xtraiter112 = and i64 %36, 3
  %lcmp.mod113.not = icmp eq i64 %xtraiter112, 0
  br i1 %lcmp.mod113.not, label %scalar.ph92.prol.loopexit, label %scalar.ph92.prol

scalar.ph92.prol:                                 ; preds = %scalar.ph92.preheader, %scalar.ph92.prol
  %.375.prol = phi i64 [ %132, %scalar.ph92.prol ], [ %.375.ph, %scalar.ph92.preheader ]
  %prol.iter114 = phi i64 [ %prol.iter114.next, %scalar.ph92.prol ], [ 0, %scalar.ph92.preheader ]
  %129 = getelementptr inbounds double, ptr %4, i64 %.375.prol
  %130 = load double, ptr %129, align 8, !tbaa !29
  %131 = getelementptr inbounds double, ptr %126, i64 %.375.prol
  store double %130, ptr %131, align 8, !tbaa !29
  %132 = add nuw nsw i64 %.375.prol, 1
  %prol.iter114.next = add i64 %prol.iter114, 1
  %prol.iter114.cmp.not = icmp eq i64 %prol.iter114.next, %xtraiter112
  br i1 %prol.iter114.cmp.not, label %scalar.ph92.prol.loopexit, label %scalar.ph92.prol, !llvm.loop !39

scalar.ph92.prol.loopexit:                        ; preds = %scalar.ph92.prol, %scalar.ph92.preheader
  %.375.unr = phi i64 [ %.375.ph, %scalar.ph92.preheader ], [ %132, %scalar.ph92.prol ]
  %133 = sub nsw i64 %.375.ph, %36
  %134 = icmp ugt i64 %133, -4
  br i1 %134, label %.loopexit, label %scalar.ph92

vector.ph94:                                      ; preds = %.lr.ph76
  %n.vec96 = and i64 %36, 9223372036854775804
  br label %vector.body98

vector.body98:                                    ; preds = %vector.body98, %vector.ph94
  %index99 = phi i64 [ 0, %vector.ph94 ], [ %index.next102, %vector.body98 ]
  %135 = getelementptr inbounds double, ptr %4, i64 %index99
  %136 = getelementptr inbounds i8, ptr %135, i64 16
  %wide.load100 = load <2 x double>, ptr %135, align 8, !tbaa !29
  %wide.load101 = load <2 x double>, ptr %136, align 8, !tbaa !29
  %137 = getelementptr inbounds double, ptr %126, i64 %index99
  %138 = getelementptr inbounds i8, ptr %137, i64 16
  store <2 x double> %wide.load100, ptr %137, align 8, !tbaa !29
  store <2 x double> %wide.load101, ptr %138, align 8, !tbaa !29
  %index.next102 = add nuw i64 %index99, 4
  %139 = icmp eq i64 %index.next102, %n.vec96
  br i1 %139, label %middle.block91, label %vector.body98, !llvm.loop !40

middle.block91:                                   ; preds = %vector.body98
  %cmp.n103 = icmp eq i64 %36, %n.vec96
  br i1 %cmp.n103, label %.loopexit, label %scalar.ph92.preheader

.preheader:                                       ; preds = %.loopexit69
  %140 = icmp sgt i64 %6, 0
  br i1 %140, label %.lr.ph78, label %.loopexit

.lr.ph78:                                         ; preds = %.preheader
  %141 = load ptr, ptr %0, align 8, !tbaa !16
  %142 = getelementptr inbounds i8, ptr %141, i64 24
  %143 = load ptr, ptr %142, align 8, !tbaa !23
  %144 = getelementptr inbounds i8, ptr %143, i64 40
  %145 = load ptr, ptr %144, align 8, !tbaa !28
  %xtraiter116 = and i64 %6, 3
  %146 = icmp ult i64 %6, 4
  br i1 %146, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph78.new

.lr.ph78.new:                                     ; preds = %.lr.ph78
  %unroll_iter119 = and i64 %6, 9223372036854775804
  br label %147

147:                                              ; preds = %147, %.lr.ph78.new
  %.277 = phi i64 [ 0, %.lr.ph78.new ], [ %171, %147 ]
  %niter120 = phi i64 [ 0, %.lr.ph78.new ], [ %niter120.next.3, %147 ]
  %148 = getelementptr inbounds double, ptr %4, i64 %.277
  %149 = load double, ptr %148, align 8, !tbaa !29
  %150 = getelementptr inbounds i64, ptr %5, i64 %.277
  %151 = load i64, ptr %150, align 8, !tbaa !22
  %152 = getelementptr inbounds double, ptr %145, i64 %151
  store double %149, ptr %152, align 8, !tbaa !29
  %153 = or disjoint i64 %.277, 1
  %154 = getelementptr inbounds double, ptr %4, i64 %153
  %155 = load double, ptr %154, align 8, !tbaa !29
  %156 = getelementptr inbounds i64, ptr %5, i64 %153
  %157 = load i64, ptr %156, align 8, !tbaa !22
  %158 = getelementptr inbounds double, ptr %145, i64 %157
  store double %155, ptr %158, align 8, !tbaa !29
  %159 = or disjoint i64 %.277, 2
  %160 = getelementptr inbounds double, ptr %4, i64 %159
  %161 = load double, ptr %160, align 8, !tbaa !29
  %162 = getelementptr inbounds i64, ptr %5, i64 %159
  %163 = load i64, ptr %162, align 8, !tbaa !22
  %164 = getelementptr inbounds double, ptr %145, i64 %163
  store double %161, ptr %164, align 8, !tbaa !29
  %165 = or disjoint i64 %.277, 3
  %166 = getelementptr inbounds double, ptr %4, i64 %165
  %167 = load double, ptr %166, align 8, !tbaa !29
  %168 = getelementptr inbounds i64, ptr %5, i64 %165
  %169 = load i64, ptr %168, align 8, !tbaa !22
  %170 = getelementptr inbounds double, ptr %145, i64 %169
  store double %167, ptr %170, align 8, !tbaa !29
  %171 = add nuw nsw i64 %.277, 4
  %niter120.next.3 = add i64 %niter120, 4
  %niter120.ncmp.3 = icmp eq i64 %niter120.next.3, %unroll_iter119
  br i1 %niter120.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %147, !llvm.loop !41

scalar.ph92:                                      ; preds = %scalar.ph92.prol.loopexit, %scalar.ph92
  %.375 = phi i64 [ %187, %scalar.ph92 ], [ %.375.unr, %scalar.ph92.prol.loopexit ]
  %172 = getelementptr inbounds double, ptr %4, i64 %.375
  %173 = load double, ptr %172, align 8, !tbaa !29
  %174 = getelementptr inbounds double, ptr %126, i64 %.375
  store double %173, ptr %174, align 8, !tbaa !29
  %175 = add nuw nsw i64 %.375, 1
  %176 = getelementptr inbounds double, ptr %4, i64 %175
  %177 = load double, ptr %176, align 8, !tbaa !29
  %178 = getelementptr inbounds double, ptr %126, i64 %175
  store double %177, ptr %178, align 8, !tbaa !29
  %179 = add nuw nsw i64 %.375, 2
  %180 = getelementptr inbounds double, ptr %4, i64 %179
  %181 = load double, ptr %180, align 8, !tbaa !29
  %182 = getelementptr inbounds double, ptr %126, i64 %179
  store double %181, ptr %182, align 8, !tbaa !29
  %183 = add nuw nsw i64 %.375, 3
  %184 = getelementptr inbounds double, ptr %4, i64 %183
  %185 = load double, ptr %184, align 8, !tbaa !29
  %186 = getelementptr inbounds double, ptr %126, i64 %183
  store double %185, ptr %186, align 8, !tbaa !29
  %187 = add nuw nsw i64 %.375, 4
  %exitcond82.not.3 = icmp eq i64 %187, %36
  br i1 %exitcond82.not.3, label %.loopexit, label %scalar.ph92, !llvm.loop !42

.loopexit.loopexit.unr-lcssa:                     ; preds = %147, %.lr.ph78
  %.277.unr = phi i64 [ 0, %.lr.ph78 ], [ %171, %147 ]
  %lcmp.mod118.not = icmp eq i64 %xtraiter116, 0
  br i1 %lcmp.mod118.not, label %.loopexit, label %.epil.preheader115

.epil.preheader115:                               ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader115
  %.277.epil = phi i64 [ %193, %.epil.preheader115 ], [ %.277.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter117 = phi i64 [ %epil.iter117.next, %.epil.preheader115 ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %188 = getelementptr inbounds double, ptr %4, i64 %.277.epil
  %189 = load double, ptr %188, align 8, !tbaa !29
  %190 = getelementptr inbounds i64, ptr %5, i64 %.277.epil
  %191 = load i64, ptr %190, align 8, !tbaa !22
  %192 = getelementptr inbounds double, ptr %145, i64 %191
  store double %189, ptr %192, align 8, !tbaa !29
  %193 = add nuw nsw i64 %.277.epil, 1
  %epil.iter117.next = add i64 %epil.iter117, 1
  %epil.iter117.cmp.not = icmp eq i64 %epil.iter117.next, %xtraiter116
  br i1 %epil.iter117.cmp.not, label %.loopexit, label %.epil.preheader115, !llvm.loop !43

.loopexit:                                        ; preds = %scalar.ph92.prol.loopexit, %scalar.ph92, %.loopexit.loopexit.unr-lcssa, %.epil.preheader115, %middle.block91, %.preheader66, %.preheader
  %194 = load ptr, ptr %41, align 8, !tbaa !24
  %195 = getelementptr inbounds i8, ptr %194, i64 16
  %196 = load i64, ptr %195, align 8, !tbaa !25
  %.not64 = icmp eq i64 %196, 0
  br i1 %.not64, label %199, label %197

197:                                              ; preds = %.loopexit
  %198 = tail call i64 @scale_data(ptr noundef nonnull %0) #2
  %.pre = load ptr, ptr %41, align 8, !tbaa !24
  br label %199

199:                                              ; preds = %197, %.loopexit
  %200 = phi ptr [ %.pre, %197 ], [ %194, %.loopexit ]
  %201 = getelementptr inbounds i8, ptr %0, i64 8
  %202 = load ptr, ptr %201, align 8, !tbaa !44
  %203 = getelementptr inbounds i8, ptr %202, i64 24
  %204 = load ptr, ptr %203, align 8, !tbaa !45
  %205 = load ptr, ptr %0, align 8, !tbaa !16
  %206 = getelementptr inbounds i8, ptr %205, i64 16
  %207 = load ptr, ptr %206, align 8, !tbaa !17
  %208 = getelementptr inbounds i8, ptr %205, i64 24
  %209 = load ptr, ptr %208, align 8, !tbaa !23
  %210 = tail call i64 %204(ptr noundef %202, ptr noundef %207, ptr noundef %209, ptr noundef %200) #2
  %211 = getelementptr inbounds i8, ptr %0, i64 208
  %212 = load ptr, ptr %211, align 8, !tbaa !11
  tail call void @reset_info(ptr noundef %212) #2
  %213 = load ptr, ptr %18, align 8, !tbaa !15
  %214 = tail call double @osqp_toc(ptr noundef %213) #2
  %215 = load ptr, ptr %211, align 8, !tbaa !11
  %216 = getelementptr inbounds i8, ptr %215, i64 96
  %217 = load double, ptr %216, align 8, !tbaa !12
  %218 = fadd double %214, %217
  store double %218, ptr %216, align 8, !tbaa !12
  br label %219

219:                                              ; preds = %38, %17, %199
  %.0 = phi i64 [ %210, %199 ], [ 1, %17 ], [ 2, %38 ]
  ret i64 %.0
}

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 = { 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 0}
!17 = !{!18, !7, i64 16}
!18 = !{!"", !10, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48}
!19 = !{!20, !7, i64 24}
!20 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !10, i64 48}
!21 = !{!20, !10, i64 16}
!22 = !{!10, !10, i64 0}
!23 = !{!18, !7, i64 24}
!24 = !{!6, !7, i64 184}
!25 = !{!26, !10, i64 16}
!26 = !{!"", !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, !27, 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}
!27 = !{!"int", !8, i64 0}
!28 = !{!20, !7, i64 40}
!29 = !{!14, !14, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.unroll.disable"}
!32 = distinct !{!32, !33, !34, !35}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!"llvm.loop.isvectorized", i32 1}
!35 = !{!"llvm.loop.unroll.runtime.disable"}
!36 = distinct !{!36, !33}
!37 = distinct !{!37, !33, !34}
!38 = distinct !{!38, !31}
!39 = distinct !{!39, !31}
!40 = distinct !{!40, !33, !34, !35}
!41 = distinct !{!41, !33}
!42 = distinct !{!42, !33, !34}
!43 = distinct !{!43, !31}
!44 = !{!6, !7, i64 8}
!45 = !{!46, !7, i64 24}
!46 = !{!"linsys_solver", !27, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40}


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