; 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.OSQPData = type { i64, i64, ptr, ptr, ptr, ptr, ptr }
%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.OSQPScaling = type { double, ptr, ptr, double, ptr, ptr }
%struct.OSQPPolish = type { ptr, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, double, double }
%struct.OSQPSolution = type { ptr, ptr }
%struct.OSQPInfo = type { i64, [32 x i8], i64, i64, double, double, double, double, double, double, double, double, i64, double }

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

11:                                               ; preds = %2
  store ptr null, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %532

12:                                               ; preds = %2
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = call i64 @validate_settings(ptr noundef %13)
  %15 = icmp ne i64 %14, 0
  br i1 %15, label %16, label %17

16:                                               ; preds = %12
  store ptr null, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %532

17:                                               ; preds = %12
  %18 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 240) #6
  store ptr %18, ptr %6, align 8, !tbaa !5
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %22, label %21

21:                                               ; preds = %17
  store ptr null, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %532

22:                                               ; preds = %17
  %23 = call noalias ptr @malloc(i64 noundef 32) #7
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.OSQPWorkspace, ptr %24, i32 0, i32 27
  store ptr %23, ptr %25, align 8, !tbaa !9
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.OSQPWorkspace, ptr %26, i32 0, i32 27
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  call void @osqp_tic(ptr noundef %28)
  %29 = call noalias ptr @malloc(i64 noundef 56) #7
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.OSQPWorkspace, ptr %30, i32 0, i32 0
  store ptr %29, ptr %31, align 8, !tbaa !12
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.OSQPData, ptr %32, i32 0, i32 0
  %34 = load i64, ptr %33, align 8, !tbaa !13
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.OSQPWorkspace, ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !12
  %38 = getelementptr inbounds %struct.OSQPData, ptr %37, i32 0, i32 0
  store i64 %34, ptr %38, align 8, !tbaa !13
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.OSQPData, ptr %39, i32 0, i32 1
  %41 = load i64, ptr %40, align 8, !tbaa !15
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.OSQPWorkspace, ptr %42, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8, !tbaa !12
  %45 = getelementptr inbounds %struct.OSQPData, ptr %44, i32 0, i32 1
  store i64 %41, ptr %45, align 8, !tbaa !15
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.OSQPData, ptr %46, i32 0, i32 2
  %48 = load ptr, ptr %47, align 8, !tbaa !16
  %49 = call ptr @csc_to_triu(ptr noundef %48)
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.OSQPWorkspace, ptr %50, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8, !tbaa !12
  %53 = getelementptr inbounds %struct.OSQPData, ptr %52, i32 0, i32 2
  store ptr %49, ptr %53, align 8, !tbaa !16
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.OSQPData, ptr %54, i32 0, i32 4
  %56 = load ptr, ptr %55, align 8, !tbaa !17
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.OSQPData, ptr %57, i32 0, i32 0
  %59 = load i64, ptr %58, align 8, !tbaa !13
  %60 = call ptr @vec_copy(ptr noundef %56, i64 noundef %59)
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.OSQPWorkspace, ptr %61, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !12
  %64 = getelementptr inbounds %struct.OSQPData, ptr %63, i32 0, i32 4
  store ptr %60, ptr %64, align 8, !tbaa !17
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.OSQPData, ptr %65, i32 0, i32 3
  %67 = load ptr, ptr %66, align 8, !tbaa !18
  %68 = call ptr @copy_csc_mat(ptr noundef %67)
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.OSQPWorkspace, ptr %69, i32 0, i32 0
  %71 = load ptr, ptr %70, align 8, !tbaa !12
  %72 = getelementptr inbounds %struct.OSQPData, ptr %71, i32 0, i32 3
  store ptr %68, ptr %72, align 8, !tbaa !18
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.OSQPData, ptr %73, i32 0, i32 5
  %75 = load ptr, ptr %74, align 8, !tbaa !19
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.OSQPData, ptr %76, i32 0, i32 1
  %78 = load i64, ptr %77, align 8, !tbaa !15
  %79 = call ptr @vec_copy(ptr noundef %75, i64 noundef %78)
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.OSQPWorkspace, ptr %80, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8, !tbaa !12
  %83 = getelementptr inbounds %struct.OSQPData, ptr %82, i32 0, i32 5
  store ptr %79, ptr %83, align 8, !tbaa !19
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.OSQPData, ptr %84, i32 0, i32 6
  %86 = load ptr, ptr %85, align 8, !tbaa !20
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.OSQPData, ptr %87, i32 0, i32 1
  %89 = load i64, ptr %88, align 8, !tbaa !15
  %90 = call ptr @vec_copy(ptr noundef %86, i64 noundef %89)
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.OSQPWorkspace, ptr %91, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !12
  %94 = getelementptr inbounds %struct.OSQPData, ptr %93, i32 0, i32 6
  store ptr %90, ptr %94, align 8, !tbaa !20
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.OSQPWorkspace, ptr %95, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8, !tbaa !12
  %98 = getelementptr inbounds %struct.OSQPData, ptr %97, i32 0, i32 1
  %99 = load i64, ptr %98, align 8, !tbaa !15
  %100 = mul i64 %99, 8
  %101 = call noalias ptr @malloc(i64 noundef %100) #7
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.OSQPWorkspace, ptr %102, i32 0, i32 3
  store ptr %101, ptr %103, align 8, !tbaa !21
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.OSQPWorkspace, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !12
  %107 = getelementptr inbounds %struct.OSQPData, ptr %106, i32 0, i32 1
  %108 = load i64, ptr %107, align 8, !tbaa !15
  %109 = mul i64 %108, 8
  %110 = call noalias ptr @malloc(i64 noundef %109) #7
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.OSQPWorkspace, ptr %111, i32 0, i32 4
  store ptr %110, ptr %112, align 8, !tbaa !22
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.OSQPWorkspace, ptr %113, i32 0, i32 0
  %115 = load ptr, ptr %114, align 8, !tbaa !12
  %116 = getelementptr inbounds %struct.OSQPData, ptr %115, i32 0, i32 1
  %117 = load i64, ptr %116, align 8, !tbaa !15
  %118 = call noalias ptr @calloc(i64 noundef %117, i64 noundef 8) #6
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.OSQPWorkspace, ptr %119, i32 0, i32 5
  store ptr %118, ptr %120, align 8, !tbaa !23
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.OSQPWorkspace, ptr %121, i32 0, i32 0
  %123 = load ptr, ptr %122, align 8, !tbaa !12
  %124 = getelementptr inbounds %struct.OSQPData, ptr %123, i32 0, i32 0
  %125 = load i64, ptr %124, align 8, !tbaa !13
  %126 = call noalias ptr @calloc(i64 noundef %125, i64 noundef 8) #6
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.OSQPWorkspace, ptr %127, i32 0, i32 6
  store ptr %126, ptr %128, align 8, !tbaa !24
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.OSQPWorkspace, ptr %129, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !12
  %132 = getelementptr inbounds %struct.OSQPData, ptr %131, i32 0, i32 1
  %133 = load i64, ptr %132, align 8, !tbaa !15
  %134 = call noalias ptr @calloc(i64 noundef %133, i64 noundef 8) #6
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.OSQPWorkspace, ptr %135, i32 0, i32 8
  store ptr %134, ptr %136, align 8, !tbaa !25
  %137 = load ptr, ptr %6, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.OSQPWorkspace, ptr %137, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8, !tbaa !12
  %140 = getelementptr inbounds %struct.OSQPData, ptr %139, i32 0, i32 0
  %141 = load i64, ptr %140, align 8, !tbaa !13
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.OSQPWorkspace, ptr %142, i32 0, i32 0
  %144 = load ptr, ptr %143, align 8, !tbaa !12
  %145 = getelementptr inbounds %struct.OSQPData, ptr %144, i32 0, i32 1
  %146 = load i64, ptr %145, align 8, !tbaa !15
  %147 = add nsw i64 %141, %146
  %148 = call noalias ptr @calloc(i64 noundef %147, i64 noundef 8) #6
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.OSQPWorkspace, ptr %149, i32 0, i32 9
  store ptr %148, ptr %150, align 8, !tbaa !26
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.OSQPWorkspace, ptr %151, i32 0, i32 0
  %153 = load ptr, ptr %152, align 8, !tbaa !12
  %154 = getelementptr inbounds %struct.OSQPData, ptr %153, i32 0, i32 0
  %155 = load i64, ptr %154, align 8, !tbaa !13
  %156 = call noalias ptr @calloc(i64 noundef %155, i64 noundef 8) #6
  %157 = load ptr, ptr %6, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.OSQPWorkspace, ptr %157, i32 0, i32 10
  store ptr %156, ptr %158, align 8, !tbaa !27
  %159 = load ptr, ptr %6, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.OSQPWorkspace, ptr %159, i32 0, i32 0
  %161 = load ptr, ptr %160, align 8, !tbaa !12
  %162 = getelementptr inbounds %struct.OSQPData, ptr %161, i32 0, i32 1
  %163 = load i64, ptr %162, align 8, !tbaa !15
  %164 = call noalias ptr @calloc(i64 noundef %163, i64 noundef 8) #6
  %165 = load ptr, ptr %6, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.OSQPWorkspace, ptr %165, i32 0, i32 11
  store ptr %164, ptr %166, align 8, !tbaa !28
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.OSQPWorkspace, ptr %167, i32 0, i32 0
  %169 = load ptr, ptr %168, align 8, !tbaa !12
  %170 = getelementptr inbounds %struct.OSQPData, ptr %169, i32 0, i32 1
  %171 = load i64, ptr %170, align 8, !tbaa !15
  %172 = call noalias ptr @calloc(i64 noundef %171, i64 noundef 8) #6
  %173 = load ptr, ptr %6, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.OSQPWorkspace, ptr %173, i32 0, i32 7
  store ptr %172, ptr %174, align 8, !tbaa !29
  %175 = load ptr, ptr %6, align 8, !tbaa !5
  call void @cold_start(ptr noundef %175)
  %176 = load ptr, ptr %6, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.OSQPWorkspace, ptr %176, i32 0, i32 0
  %178 = load ptr, ptr %177, align 8, !tbaa !12
  %179 = getelementptr inbounds %struct.OSQPData, ptr %178, i32 0, i32 1
  %180 = load i64, ptr %179, align 8, !tbaa !15
  %181 = call noalias ptr @calloc(i64 noundef %180, i64 noundef 8) #6
  %182 = load ptr, ptr %6, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.OSQPWorkspace, ptr %182, i32 0, i32 12
  store ptr %181, ptr %183, align 8, !tbaa !30
  %184 = load ptr, ptr %6, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.OSQPWorkspace, ptr %184, i32 0, i32 0
  %186 = load ptr, ptr %185, align 8, !tbaa !12
  %187 = getelementptr inbounds %struct.OSQPData, ptr %186, i32 0, i32 0
  %188 = load i64, ptr %187, align 8, !tbaa !13
  %189 = call noalias ptr @calloc(i64 noundef %188, i64 noundef 8) #6
  %190 = load ptr, ptr %6, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.OSQPWorkspace, ptr %190, i32 0, i32 13
  store ptr %189, ptr %191, align 8, !tbaa !31
  %192 = load ptr, ptr %6, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.OSQPWorkspace, ptr %192, i32 0, i32 0
  %194 = load ptr, ptr %193, align 8, !tbaa !12
  %195 = getelementptr inbounds %struct.OSQPData, ptr %194, i32 0, i32 0
  %196 = load i64, ptr %195, align 8, !tbaa !13
  %197 = call noalias ptr @calloc(i64 noundef %196, i64 noundef 8) #6
  %198 = load ptr, ptr %6, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.OSQPWorkspace, ptr %198, i32 0, i32 14
  store ptr %197, ptr %199, align 8, !tbaa !32
  %200 = load ptr, ptr %6, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.OSQPWorkspace, ptr %200, i32 0, i32 0
  %202 = load ptr, ptr %201, align 8, !tbaa !12
  %203 = getelementptr inbounds %struct.OSQPData, ptr %202, i32 0, i32 1
  %204 = load i64, ptr %203, align 8, !tbaa !15
  %205 = call noalias ptr @calloc(i64 noundef %204, i64 noundef 8) #6
  %206 = load ptr, ptr %6, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.OSQPWorkspace, ptr %206, i32 0, i32 15
  store ptr %205, ptr %207, align 8, !tbaa !33
  %208 = load ptr, ptr %6, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.OSQPWorkspace, ptr %208, i32 0, i32 0
  %210 = load ptr, ptr %209, align 8, !tbaa !12
  %211 = getelementptr inbounds %struct.OSQPData, ptr %210, i32 0, i32 0
  %212 = load i64, ptr %211, align 8, !tbaa !13
  %213 = call noalias ptr @calloc(i64 noundef %212, i64 noundef 8) #6
  %214 = load ptr, ptr %6, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.OSQPWorkspace, ptr %214, i32 0, i32 16
  store ptr %213, ptr %215, align 8, !tbaa !34
  %216 = load ptr, ptr %6, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.OSQPWorkspace, ptr %216, i32 0, i32 0
  %218 = load ptr, ptr %217, align 8, !tbaa !12
  %219 = getelementptr inbounds %struct.OSQPData, ptr %218, i32 0, i32 0
  %220 = load i64, ptr %219, align 8, !tbaa !13
  %221 = call noalias ptr @calloc(i64 noundef %220, i64 noundef 8) #6
  %222 = load ptr, ptr %6, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.OSQPWorkspace, ptr %222, i32 0, i32 17
  store ptr %221, ptr %223, align 8, !tbaa !35
  %224 = load ptr, ptr %6, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.OSQPWorkspace, ptr %224, i32 0, i32 0
  %226 = load ptr, ptr %225, align 8, !tbaa !12
  %227 = getelementptr inbounds %struct.OSQPData, ptr %226, i32 0, i32 0
  %228 = load i64, ptr %227, align 8, !tbaa !13
  %229 = call noalias ptr @calloc(i64 noundef %228, i64 noundef 8) #6
  %230 = load ptr, ptr %6, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.OSQPWorkspace, ptr %230, i32 0, i32 18
  store ptr %229, ptr %231, align 8, !tbaa !36
  %232 = load ptr, ptr %6, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.OSQPWorkspace, ptr %232, i32 0, i32 0
  %234 = load ptr, ptr %233, align 8, !tbaa !12
  %235 = getelementptr inbounds %struct.OSQPData, ptr %234, i32 0, i32 1
  %236 = load i64, ptr %235, align 8, !tbaa !15
  %237 = call noalias ptr @calloc(i64 noundef %236, i64 noundef 8) #6
  %238 = load ptr, ptr %6, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.OSQPWorkspace, ptr %238, i32 0, i32 19
  store ptr %237, ptr %239, align 8, !tbaa !37
  %240 = load ptr, ptr %5, align 8, !tbaa !5
  %241 = call ptr @copy_settings(ptr noundef %240)
  %242 = load ptr, ptr %6, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.OSQPWorkspace, ptr %242, i32 0, i32 23
  store ptr %241, ptr %243, align 8, !tbaa !38
  %244 = load ptr, ptr %5, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.OSQPSettings, ptr %244, i32 0, i32 2
  %246 = load i64, ptr %245, align 8, !tbaa !39
  %247 = icmp ne i64 %246, 0
  br i1 %247, label %248, label %325

248:                                              ; preds = %22
  %249 = call noalias ptr @malloc(i64 noundef 48) #7
  %250 = load ptr, ptr %6, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.OSQPWorkspace, ptr %250, i32 0, i32 24
  store ptr %249, ptr %251, align 8, !tbaa !43
  %252 = load ptr, ptr %6, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.OSQPWorkspace, ptr %252, i32 0, i32 0
  %254 = load ptr, ptr %253, align 8, !tbaa !12
  %255 = getelementptr inbounds %struct.OSQPData, ptr %254, i32 0, i32 0
  %256 = load i64, ptr %255, align 8, !tbaa !13
  %257 = mul i64 %256, 8
  %258 = call noalias ptr @malloc(i64 noundef %257) #7
  %259 = load ptr, ptr %6, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.OSQPWorkspace, ptr %259, i32 0, i32 24
  %261 = load ptr, ptr %260, align 8, !tbaa !43
  %262 = getelementptr inbounds %struct.OSQPScaling, ptr %261, i32 0, i32 1
  store ptr %258, ptr %262, align 8, !tbaa !44
  %263 = load ptr, ptr %6, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.OSQPWorkspace, ptr %263, i32 0, i32 0
  %265 = load ptr, ptr %264, align 8, !tbaa !12
  %266 = getelementptr inbounds %struct.OSQPData, ptr %265, i32 0, i32 0
  %267 = load i64, ptr %266, align 8, !tbaa !13
  %268 = mul i64 %267, 8
  %269 = call noalias ptr @malloc(i64 noundef %268) #7
  %270 = load ptr, ptr %6, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.OSQPWorkspace, ptr %270, i32 0, i32 24
  %272 = load ptr, ptr %271, align 8, !tbaa !43
  %273 = getelementptr inbounds %struct.OSQPScaling, ptr %272, i32 0, i32 4
  store ptr %269, ptr %273, align 8, !tbaa !46
  %274 = load ptr, ptr %6, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.OSQPWorkspace, ptr %274, i32 0, i32 0
  %276 = load ptr, ptr %275, align 8, !tbaa !12
  %277 = getelementptr inbounds %struct.OSQPData, ptr %276, i32 0, i32 1
  %278 = load i64, ptr %277, align 8, !tbaa !15
  %279 = mul i64 %278, 8
  %280 = call noalias ptr @malloc(i64 noundef %279) #7
  %281 = load ptr, ptr %6, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.OSQPWorkspace, ptr %281, i32 0, i32 24
  %283 = load ptr, ptr %282, align 8, !tbaa !43
  %284 = getelementptr inbounds %struct.OSQPScaling, ptr %283, i32 0, i32 2
  store ptr %280, ptr %284, align 8, !tbaa !47
  %285 = load ptr, ptr %6, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.OSQPWorkspace, ptr %285, i32 0, i32 0
  %287 = load ptr, ptr %286, align 8, !tbaa !12
  %288 = getelementptr inbounds %struct.OSQPData, ptr %287, i32 0, i32 1
  %289 = load i64, ptr %288, align 8, !tbaa !15
  %290 = mul i64 %289, 8
  %291 = call noalias ptr @malloc(i64 noundef %290) #7
  %292 = load ptr, ptr %6, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.OSQPWorkspace, ptr %292, i32 0, i32 24
  %294 = load ptr, ptr %293, align 8, !tbaa !43
  %295 = getelementptr inbounds %struct.OSQPScaling, ptr %294, i32 0, i32 5
  store ptr %291, ptr %295, align 8, !tbaa !48
  %296 = load ptr, ptr %6, align 8, !tbaa !5
  %297 = getelementptr inbounds %struct.OSQPWorkspace, ptr %296, i32 0, i32 0
  %298 = load ptr, ptr %297, align 8, !tbaa !12
  %299 = getelementptr inbounds %struct.OSQPData, ptr %298, i32 0, i32 0
  %300 = load i64, ptr %299, align 8, !tbaa !13
  %301 = mul i64 %300, 8
  %302 = call noalias ptr @malloc(i64 noundef %301) #7
  %303 = load ptr, ptr %6, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.OSQPWorkspace, ptr %303, i32 0, i32 20
  store ptr %302, ptr %304, align 8, !tbaa !49
  %305 = load ptr, ptr %6, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.OSQPWorkspace, ptr %305, i32 0, i32 0
  %307 = load ptr, ptr %306, align 8, !tbaa !12
  %308 = getelementptr inbounds %struct.OSQPData, ptr %307, i32 0, i32 0
  %309 = load i64, ptr %308, align 8, !tbaa !13
  %310 = mul i64 %309, 8
  %311 = call noalias ptr @malloc(i64 noundef %310) #7
  %312 = load ptr, ptr %6, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct.OSQPWorkspace, ptr %312, i32 0, i32 21
  store ptr %311, ptr %313, align 8, !tbaa !50
  %314 = load ptr, ptr %6, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.OSQPWorkspace, ptr %314, i32 0, i32 0
  %316 = load ptr, ptr %315, align 8, !tbaa !12
  %317 = getelementptr inbounds %struct.OSQPData, ptr %316, i32 0, i32 1
  %318 = load i64, ptr %317, align 8, !tbaa !15
  %319 = mul i64 %318, 8
  %320 = call noalias ptr @malloc(i64 noundef %319) #7
  %321 = load ptr, ptr %6, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct.OSQPWorkspace, ptr %321, i32 0, i32 22
  store ptr %320, ptr %322, align 8, !tbaa !51
  %323 = load ptr, ptr %6, align 8, !tbaa !5
  %324 = call i64 @scale_data(ptr noundef %323)
  br label %328

325:                                              ; preds = %22
  %326 = load ptr, ptr %6, align 8, !tbaa !5
  %327 = getelementptr inbounds %struct.OSQPWorkspace, ptr %326, i32 0, i32 24
  store ptr null, ptr %327, align 8, !tbaa !43
  br label %328

328:                                              ; preds = %325, %248
  %329 = load ptr, ptr %6, align 8, !tbaa !5
  call void @set_rho_vec(ptr noundef %329)
  %330 = load ptr, ptr %6, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.OSQPWorkspace, ptr %330, i32 0, i32 23
  %332 = load ptr, ptr %331, align 8, !tbaa !38
  %333 = getelementptr inbounds %struct.OSQPSettings, ptr %332, i32 0, i32 13
  %334 = load i32, ptr %333, align 8, !tbaa !52
  %335 = call i64 @load_linsys_solver(i32 noundef %334)
  %336 = icmp ne i64 %335, 0
  br i1 %336, label %337, label %340

337:                                              ; preds = %328
  %338 = load ptr, ptr %6, align 8, !tbaa !5
  %339 = call i64 @osqp_cleanup(ptr noundef %338)
  store ptr null, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %532

340:                                              ; preds = %328
  %341 = load ptr, ptr %6, align 8, !tbaa !5
  %342 = getelementptr inbounds %struct.OSQPWorkspace, ptr %341, i32 0, i32 0
  %343 = load ptr, ptr %342, align 8, !tbaa !12
  %344 = getelementptr inbounds %struct.OSQPData, ptr %343, i32 0, i32 2
  %345 = load ptr, ptr %344, align 8, !tbaa !16
  %346 = load ptr, ptr %6, align 8, !tbaa !5
  %347 = getelementptr inbounds %struct.OSQPWorkspace, ptr %346, i32 0, i32 0
  %348 = load ptr, ptr %347, align 8, !tbaa !12
  %349 = getelementptr inbounds %struct.OSQPData, ptr %348, i32 0, i32 3
  %350 = load ptr, ptr %349, align 8, !tbaa !18
  %351 = load ptr, ptr %6, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.OSQPWorkspace, ptr %351, i32 0, i32 23
  %353 = load ptr, ptr %352, align 8, !tbaa !38
  %354 = getelementptr inbounds %struct.OSQPSettings, ptr %353, i32 0, i32 1
  %355 = load double, ptr %354, align 8, !tbaa !53
  %356 = load ptr, ptr %6, align 8, !tbaa !5
  %357 = getelementptr inbounds %struct.OSQPWorkspace, ptr %356, i32 0, i32 3
  %358 = load ptr, ptr %357, align 8, !tbaa !21
  %359 = load ptr, ptr %6, align 8, !tbaa !5
  %360 = getelementptr inbounds %struct.OSQPWorkspace, ptr %359, i32 0, i32 23
  %361 = load ptr, ptr %360, align 8, !tbaa !38
  %362 = getelementptr inbounds %struct.OSQPSettings, ptr %361, i32 0, i32 13
  %363 = load i32, ptr %362, align 8, !tbaa !52
  %364 = call ptr @init_linsys_solver(ptr noundef %345, ptr noundef %350, double noundef %355, ptr noundef %358, i32 noundef %363, i64 noundef 0)
  %365 = load ptr, ptr %6, align 8, !tbaa !5
  %366 = getelementptr inbounds %struct.OSQPWorkspace, ptr %365, i32 0, i32 1
  store ptr %364, ptr %366, align 8, !tbaa !54
  %367 = load ptr, ptr %6, align 8, !tbaa !5
  %368 = getelementptr inbounds %struct.OSQPWorkspace, ptr %367, i32 0, i32 1
  %369 = load ptr, ptr %368, align 8, !tbaa !54
  %370 = icmp ne ptr %369, null
  br i1 %370, label %374, label %371

371:                                              ; preds = %340
  %372 = load ptr, ptr %6, align 8, !tbaa !5
  %373 = call i64 @osqp_cleanup(ptr noundef %372)
  store ptr null, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %532

374:                                              ; preds = %340
  %375 = call noalias ptr @malloc(i64 noundef 104) #7
  %376 = load ptr, ptr %6, align 8, !tbaa !5
  %377 = getelementptr inbounds %struct.OSQPWorkspace, ptr %376, i32 0, i32 2
  store ptr %375, ptr %377, align 8, !tbaa !55
  %378 = load ptr, ptr %6, align 8, !tbaa !5
  %379 = getelementptr inbounds %struct.OSQPWorkspace, ptr %378, i32 0, i32 0
  %380 = load ptr, ptr %379, align 8, !tbaa !12
  %381 = getelementptr inbounds %struct.OSQPData, ptr %380, i32 0, i32 1
  %382 = load i64, ptr %381, align 8, !tbaa !15
  %383 = mul i64 %382, 8
  %384 = call noalias ptr @malloc(i64 noundef %383) #7
  %385 = load ptr, ptr %6, align 8, !tbaa !5
  %386 = getelementptr inbounds %struct.OSQPWorkspace, ptr %385, i32 0, i32 2
  %387 = load ptr, ptr %386, align 8, !tbaa !55
  %388 = getelementptr inbounds %struct.OSQPPolish, ptr %387, i32 0, i32 5
  store ptr %384, ptr %388, align 8, !tbaa !56
  %389 = load ptr, ptr %6, align 8, !tbaa !5
  %390 = getelementptr inbounds %struct.OSQPWorkspace, ptr %389, i32 0, i32 0
  %391 = load ptr, ptr %390, align 8, !tbaa !12
  %392 = getelementptr inbounds %struct.OSQPData, ptr %391, i32 0, i32 1
  %393 = load i64, ptr %392, align 8, !tbaa !15
  %394 = mul i64 %393, 8
  %395 = call noalias ptr @malloc(i64 noundef %394) #7
  %396 = load ptr, ptr %6, align 8, !tbaa !5
  %397 = getelementptr inbounds %struct.OSQPWorkspace, ptr %396, i32 0, i32 2
  %398 = load ptr, ptr %397, align 8, !tbaa !55
  %399 = getelementptr inbounds %struct.OSQPPolish, ptr %398, i32 0, i32 6
  store ptr %395, ptr %399, align 8, !tbaa !58
  %400 = load ptr, ptr %6, align 8, !tbaa !5
  %401 = getelementptr inbounds %struct.OSQPWorkspace, ptr %400, i32 0, i32 0
  %402 = load ptr, ptr %401, align 8, !tbaa !12
  %403 = getelementptr inbounds %struct.OSQPData, ptr %402, i32 0, i32 1
  %404 = load i64, ptr %403, align 8, !tbaa !15
  %405 = mul i64 %404, 8
  %406 = call noalias ptr @malloc(i64 noundef %405) #7
  %407 = load ptr, ptr %6, align 8, !tbaa !5
  %408 = getelementptr inbounds %struct.OSQPWorkspace, ptr %407, i32 0, i32 2
  %409 = load ptr, ptr %408, align 8, !tbaa !55
  %410 = getelementptr inbounds %struct.OSQPPolish, ptr %409, i32 0, i32 3
  store ptr %406, ptr %410, align 8, !tbaa !59
  %411 = load ptr, ptr %6, align 8, !tbaa !5
  %412 = getelementptr inbounds %struct.OSQPWorkspace, ptr %411, i32 0, i32 0
  %413 = load ptr, ptr %412, align 8, !tbaa !12
  %414 = getelementptr inbounds %struct.OSQPData, ptr %413, i32 0, i32 1
  %415 = load i64, ptr %414, align 8, !tbaa !15
  %416 = mul i64 %415, 8
  %417 = call noalias ptr @malloc(i64 noundef %416) #7
  %418 = load ptr, ptr %6, align 8, !tbaa !5
  %419 = getelementptr inbounds %struct.OSQPWorkspace, ptr %418, i32 0, i32 2
  %420 = load ptr, ptr %419, align 8, !tbaa !55
  %421 = getelementptr inbounds %struct.OSQPPolish, ptr %420, i32 0, i32 4
  store ptr %417, ptr %421, align 8, !tbaa !60
  %422 = load ptr, ptr %6, align 8, !tbaa !5
  %423 = getelementptr inbounds %struct.OSQPWorkspace, ptr %422, i32 0, i32 0
  %424 = load ptr, ptr %423, align 8, !tbaa !12
  %425 = getelementptr inbounds %struct.OSQPData, ptr %424, i32 0, i32 0
  %426 = load i64, ptr %425, align 8, !tbaa !13
  %427 = mul i64 %426, 8
  %428 = call noalias ptr @malloc(i64 noundef %427) #7
  %429 = load ptr, ptr %6, align 8, !tbaa !5
  %430 = getelementptr inbounds %struct.OSQPWorkspace, ptr %429, i32 0, i32 2
  %431 = load ptr, ptr %430, align 8, !tbaa !55
  %432 = getelementptr inbounds %struct.OSQPPolish, ptr %431, i32 0, i32 7
  store ptr %428, ptr %432, align 8, !tbaa !61
  %433 = load ptr, ptr %6, align 8, !tbaa !5
  %434 = getelementptr inbounds %struct.OSQPWorkspace, ptr %433, i32 0, i32 0
  %435 = load ptr, ptr %434, align 8, !tbaa !12
  %436 = getelementptr inbounds %struct.OSQPData, ptr %435, i32 0, i32 1
  %437 = load i64, ptr %436, align 8, !tbaa !15
  %438 = mul i64 %437, 8
  %439 = call noalias ptr @malloc(i64 noundef %438) #7
  %440 = load ptr, ptr %6, align 8, !tbaa !5
  %441 = getelementptr inbounds %struct.OSQPWorkspace, ptr %440, i32 0, i32 2
  %442 = load ptr, ptr %441, align 8, !tbaa !55
  %443 = getelementptr inbounds %struct.OSQPPolish, ptr %442, i32 0, i32 8
  store ptr %439, ptr %443, align 8, !tbaa !62
  %444 = load ptr, ptr %6, align 8, !tbaa !5
  %445 = getelementptr inbounds %struct.OSQPWorkspace, ptr %444, i32 0, i32 0
  %446 = load ptr, ptr %445, align 8, !tbaa !12
  %447 = getelementptr inbounds %struct.OSQPData, ptr %446, i32 0, i32 1
  %448 = load i64, ptr %447, align 8, !tbaa !15
  %449 = mul i64 %448, 8
  %450 = call noalias ptr @malloc(i64 noundef %449) #7
  %451 = load ptr, ptr %6, align 8, !tbaa !5
  %452 = getelementptr inbounds %struct.OSQPWorkspace, ptr %451, i32 0, i32 2
  %453 = load ptr, ptr %452, align 8, !tbaa !55
  %454 = getelementptr inbounds %struct.OSQPPolish, ptr %453, i32 0, i32 9
  store ptr %450, ptr %454, align 8, !tbaa !63
  %455 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 16) #6
  %456 = load ptr, ptr %6, align 8, !tbaa !5
  %457 = getelementptr inbounds %struct.OSQPWorkspace, ptr %456, i32 0, i32 25
  store ptr %455, ptr %457, align 8, !tbaa !64
  %458 = load ptr, ptr %6, align 8, !tbaa !5
  %459 = getelementptr inbounds %struct.OSQPWorkspace, ptr %458, i32 0, i32 0
  %460 = load ptr, ptr %459, align 8, !tbaa !12
  %461 = getelementptr inbounds %struct.OSQPData, ptr %460, i32 0, i32 0
  %462 = load i64, ptr %461, align 8, !tbaa !13
  %463 = mul i64 %462, 8
  %464 = call noalias ptr @calloc(i64 noundef 1, i64 noundef %463) #6
  %465 = load ptr, ptr %6, align 8, !tbaa !5
  %466 = getelementptr inbounds %struct.OSQPWorkspace, ptr %465, i32 0, i32 25
  %467 = load ptr, ptr %466, align 8, !tbaa !64
  %468 = getelementptr inbounds %struct.OSQPSolution, ptr %467, i32 0, i32 0
  store ptr %464, ptr %468, align 8, !tbaa !65
  %469 = load ptr, ptr %6, align 8, !tbaa !5
  %470 = getelementptr inbounds %struct.OSQPWorkspace, ptr %469, i32 0, i32 0
  %471 = load ptr, ptr %470, align 8, !tbaa !12
  %472 = getelementptr inbounds %struct.OSQPData, ptr %471, i32 0, i32 1
  %473 = load i64, ptr %472, align 8, !tbaa !15
  %474 = mul i64 %473, 8
  %475 = call noalias ptr @calloc(i64 noundef 1, i64 noundef %474) #6
  %476 = load ptr, ptr %6, align 8, !tbaa !5
  %477 = getelementptr inbounds %struct.OSQPWorkspace, ptr %476, i32 0, i32 25
  %478 = load ptr, ptr %477, align 8, !tbaa !64
  %479 = getelementptr inbounds %struct.OSQPSolution, ptr %478, i32 0, i32 1
  store ptr %475, ptr %479, align 8, !tbaa !67
  %480 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 136) #6
  %481 = load ptr, ptr %6, align 8, !tbaa !5
  %482 = getelementptr inbounds %struct.OSQPWorkspace, ptr %481, i32 0, i32 26
  store ptr %480, ptr %482, align 8, !tbaa !68
  %483 = load ptr, ptr %6, align 8, !tbaa !5
  %484 = getelementptr inbounds %struct.OSQPWorkspace, ptr %483, i32 0, i32 26
  %485 = load ptr, ptr %484, align 8, !tbaa !68
  %486 = getelementptr inbounds %struct.OSQPInfo, ptr %485, i32 0, i32 3
  store i64 0, ptr %486, align 8, !tbaa !69
  %487 = load ptr, ptr %6, align 8, !tbaa !5
  %488 = getelementptr inbounds %struct.OSQPWorkspace, ptr %487, i32 0, i32 26
  %489 = load ptr, ptr %488, align 8, !tbaa !68
  call void @update_status(ptr noundef %489, i64 noundef -10)
  %490 = load ptr, ptr %6, align 8, !tbaa !5
  %491 = getelementptr inbounds %struct.OSQPWorkspace, ptr %490, i32 0, i32 26
  %492 = load ptr, ptr %491, align 8, !tbaa !68
  %493 = getelementptr inbounds %struct.OSQPInfo, ptr %492, i32 0, i32 8
  store double 0.000000e+00, ptr %493, align 8, !tbaa !71
  %494 = load ptr, ptr %6, align 8, !tbaa !5
  %495 = getelementptr inbounds %struct.OSQPWorkspace, ptr %494, i32 0, i32 26
  %496 = load ptr, ptr %495, align 8, !tbaa !68
  %497 = getelementptr inbounds %struct.OSQPInfo, ptr %496, i32 0, i32 9
  store double 0.000000e+00, ptr %497, align 8, !tbaa !72
  %498 = load ptr, ptr %6, align 8, !tbaa !5
  %499 = getelementptr inbounds %struct.OSQPWorkspace, ptr %498, i32 0, i32 26
  %500 = load ptr, ptr %499, align 8, !tbaa !68
  %501 = getelementptr inbounds %struct.OSQPInfo, ptr %500, i32 0, i32 10
  store double 0.000000e+00, ptr %501, align 8, !tbaa !73
  %502 = load ptr, ptr %6, align 8, !tbaa !5
  %503 = getelementptr inbounds %struct.OSQPWorkspace, ptr %502, i32 0, i32 26
  %504 = load ptr, ptr %503, align 8, !tbaa !68
  %505 = getelementptr inbounds %struct.OSQPInfo, ptr %504, i32 0, i32 11
  store double 0.000000e+00, ptr %505, align 8, !tbaa !74
  %506 = load ptr, ptr %6, align 8, !tbaa !5
  %507 = getelementptr inbounds %struct.OSQPWorkspace, ptr %506, i32 0, i32 27
  %508 = load ptr, ptr %507, align 8, !tbaa !9
  %509 = call double @osqp_toc(ptr noundef %508)
  %510 = load ptr, ptr %6, align 8, !tbaa !5
  %511 = getelementptr inbounds %struct.OSQPWorkspace, ptr %510, i32 0, i32 26
  %512 = load ptr, ptr %511, align 8, !tbaa !68
  %513 = getelementptr inbounds %struct.OSQPInfo, ptr %512, i32 0, i32 7
  store double %509, ptr %513, align 8, !tbaa !75
  %514 = load ptr, ptr %6, align 8, !tbaa !5
  %515 = getelementptr inbounds %struct.OSQPWorkspace, ptr %514, i32 0, i32 28
  store i64 1, ptr %515, align 8, !tbaa !76
  %516 = load ptr, ptr %6, align 8, !tbaa !5
  %517 = getelementptr inbounds %struct.OSQPWorkspace, ptr %516, i32 0, i32 29
  store i64 0, ptr %517, align 8, !tbaa !77
  %518 = load ptr, ptr %6, align 8, !tbaa !5
  %519 = getelementptr inbounds %struct.OSQPWorkspace, ptr %518, i32 0, i32 26
  %520 = load ptr, ptr %519, align 8, !tbaa !68
  %521 = getelementptr inbounds %struct.OSQPInfo, ptr %520, i32 0, i32 12
  store i64 0, ptr %521, align 8, !tbaa !78
  %522 = load ptr, ptr %6, align 8, !tbaa !5
  %523 = getelementptr inbounds %struct.OSQPWorkspace, ptr %522, i32 0, i32 23
  %524 = load ptr, ptr %523, align 8, !tbaa !38
  %525 = getelementptr inbounds %struct.OSQPSettings, ptr %524, i32 0, i32 0
  %526 = load double, ptr %525, align 8, !tbaa !79
  %527 = load ptr, ptr %6, align 8, !tbaa !5
  %528 = getelementptr inbounds %struct.OSQPWorkspace, ptr %527, i32 0, i32 26
  %529 = load ptr, ptr %528, align 8, !tbaa !68
  %530 = getelementptr inbounds %struct.OSQPInfo, ptr %529, i32 0, i32 13
  store double %526, ptr %530, align 8, !tbaa !80
  %531 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %531, ptr %3, align 8
  store i32 1, ptr %7, align 4
  br label %532

532:                                              ; preds = %374, %371, %337, %21, %16, %11
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %533 = load ptr, ptr %3, align 8
  ret ptr %533
}

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

declare i64 @validate_data(ptr noundef) #2

declare i64 @validate_settings(ptr noundef) #2

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

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

declare void @osqp_tic(ptr noundef) #2

declare ptr @csc_to_triu(ptr noundef) #2

declare ptr @vec_copy(ptr noundef, i64 noundef) #2

declare ptr @copy_csc_mat(ptr noundef) #2

declare void @cold_start(ptr noundef) #2

declare ptr @copy_settings(ptr noundef) #2

declare i64 @scale_data(ptr noundef) #2

declare void @set_rho_vec(ptr noundef) #2

declare i64 @load_linsys_solver(i32 noundef) #2

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

declare ptr @init_linsys_solver(ptr noundef, ptr noundef, double noundef, ptr noundef, i32 noundef, i64 noundef) #2

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

declare double @osqp_toc(ptr noundef) #2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 216}
!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 0}
!13 = !{!14, !11, i64 0}
!14 = !{!"", !11, i64 0, !11, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!15 = !{!14, !11, i64 8}
!16 = !{!14, !6, i64 16}
!17 = !{!14, !6, i64 32}
!18 = !{!14, !6, i64 24}
!19 = !{!14, !6, i64 40}
!20 = !{!14, !6, i64 48}
!21 = !{!10, !6, i64 24}
!22 = !{!10, !6, i64 32}
!23 = !{!10, !6, i64 40}
!24 = !{!10, !6, i64 48}
!25 = !{!10, !6, i64 64}
!26 = !{!10, !6, i64 72}
!27 = !{!10, !6, i64 80}
!28 = !{!10, !6, i64 88}
!29 = !{!10, !6, i64 56}
!30 = !{!10, !6, i64 96}
!31 = !{!10, !6, i64 104}
!32 = !{!10, !6, i64 112}
!33 = !{!10, !6, i64 120}
!34 = !{!10, !6, i64 128}
!35 = !{!10, !6, i64 136}
!36 = !{!10, !6, i64 144}
!37 = !{!10, !6, i64 152}
!38 = !{!10, !6, i64 184}
!39 = !{!40, !11, i64 16}
!40 = !{!"", !41, i64 0, !41, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !41, i64 40, !41, i64 48, !11, i64 56, !41, i64 64, !41, i64 72, !41, i64 80, !41, i64 88, !41, i64 96, !42, i64 104, !41, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !41, i64 168}
!41 = !{!"double", !7, i64 0}
!42 = !{!"int", !7, i64 0}
!43 = !{!10, !6, i64 192}
!44 = !{!45, !6, i64 8}
!45 = !{!"", !41, i64 0, !6, i64 8, !6, i64 16, !41, i64 24, !6, i64 32, !6, i64 40}
!46 = !{!45, !6, i64 32}
!47 = !{!45, !6, i64 16}
!48 = !{!45, !6, i64 40}
!49 = !{!10, !6, i64 160}
!50 = !{!10, !6, i64 168}
!51 = !{!10, !6, i64 176}
!52 = !{!40, !42, i64 104}
!53 = !{!40, !41, i64 8}
!54 = !{!10, !6, i64 8}
!55 = !{!10, !6, i64 16}
!56 = !{!57, !6, i64 40}
!57 = !{!"", !6, i64 0, !11, i64 8, !11, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !41, i64 80, !41, i64 88, !41, i64 96}
!58 = !{!57, !6, i64 48}
!59 = !{!57, !6, i64 24}
!60 = !{!57, !6, i64 32}
!61 = !{!57, !6, i64 56}
!62 = !{!57, !6, i64 64}
!63 = !{!57, !6, i64 72}
!64 = !{!10, !6, i64 200}
!65 = !{!66, !6, i64 0}
!66 = !{!"", !6, i64 0, !6, i64 8}
!67 = !{!66, !6, i64 8}
!68 = !{!10, !6, i64 208}
!69 = !{!70, !11, i64 48}
!70 = !{!"", !11, i64 0, !7, i64 8, !11, i64 40, !11, i64 48, !41, i64 56, !41, i64 64, !41, i64 72, !41, i64 80, !41, i64 88, !41, i64 96, !41, i64 104, !41, i64 112, !11, i64 120, !41, i64 128}
!71 = !{!70, !41, i64 88}
!72 = !{!70, !41, i64 96}
!73 = !{!70, !41, i64 104}
!74 = !{!70, !41, i64 112}
!75 = !{!70, !41, i64 80}
!76 = !{!10, !11, i64 224}
!77 = !{!10, !11, i64 232}
!78 = !{!70, !11, i64 120}
!79 = !{!40, !41, i64 0}
!80 = !{!70, !41, i64 128}


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

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @osqp_setup(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = tail call i64 @validate_data(ptr noundef %0) #5
  %.not = icmp eq i64 %3, 0
  br i1 %.not, label %4, label %176

4:                                                ; preds = %2
  %5 = tail call i64 @validate_settings(ptr noundef %1) #5
  %.not127 = icmp eq i64 %5, 0
  br i1 %.not127, label %6, label %176

6:                                                ; preds = %4
  %7 = tail call noalias dereferenceable_or_null(240) ptr @calloc(i64 noundef 1, i64 noundef 240) #6
  %.not128 = icmp eq ptr %7, null
  br i1 %.not128, label %176, label %8

8:                                                ; preds = %6
  %9 = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #7
  %10 = getelementptr inbounds i8, ptr %7, i64 216
  store ptr %9, ptr %10, align 8, !tbaa !5
  tail call void @osqp_tic(ptr noundef %9) #5
  %11 = tail call noalias dereferenceable_or_null(56) ptr @malloc(i64 noundef 56) #7
  store ptr %11, ptr %7, align 8, !tbaa !11
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = getelementptr inbounds i8, ptr %11, i64 8
  %14 = load <2 x i64>, ptr %0, align 8, !tbaa !12
  store <2 x i64> %14, ptr %11, align 8, !tbaa !12
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  %16 = load ptr, ptr %15, align 8, !tbaa !13
  %17 = tail call ptr @csc_to_triu(ptr noundef %16) #5
  %18 = getelementptr inbounds i8, ptr %11, i64 16
  store ptr %17, ptr %18, align 8, !tbaa !13
  %19 = getelementptr inbounds i8, ptr %0, i64 32
  %20 = load ptr, ptr %19, align 8, !tbaa !15
  %21 = load i64, ptr %0, align 8, !tbaa !16
  %22 = tail call ptr @vec_copy(ptr noundef %20, i64 noundef %21) #5
  %23 = getelementptr inbounds i8, ptr %11, i64 32
  store ptr %22, ptr %23, align 8, !tbaa !15
  %24 = getelementptr inbounds i8, ptr %0, i64 24
  %25 = load ptr, ptr %24, align 8, !tbaa !17
  %26 = tail call ptr @copy_csc_mat(ptr noundef %25) #5
  %27 = getelementptr inbounds i8, ptr %11, i64 24
  store ptr %26, ptr %27, align 8, !tbaa !17
  %28 = getelementptr inbounds i8, ptr %0, i64 40
  %29 = load ptr, ptr %28, align 8, !tbaa !18
  %30 = load i64, ptr %12, align 8, !tbaa !19
  %31 = tail call ptr @vec_copy(ptr noundef %29, i64 noundef %30) #5
  %32 = getelementptr inbounds i8, ptr %11, i64 40
  store ptr %31, ptr %32, align 8, !tbaa !18
  %33 = getelementptr inbounds i8, ptr %0, i64 48
  %34 = load ptr, ptr %33, align 8, !tbaa !20
  %35 = load i64, ptr %12, align 8, !tbaa !19
  %36 = tail call ptr @vec_copy(ptr noundef %34, i64 noundef %35) #5
  %37 = getelementptr inbounds i8, ptr %11, i64 48
  store ptr %36, ptr %37, align 8, !tbaa !20
  %38 = load i64, ptr %13, align 8, !tbaa !19
  %39 = shl i64 %38, 3
  %40 = tail call noalias ptr @malloc(i64 noundef %39) #7
  %41 = getelementptr inbounds i8, ptr %7, i64 24
  store ptr %40, ptr %41, align 8, !tbaa !21
  %42 = tail call noalias ptr @malloc(i64 noundef %39) #7
  %43 = getelementptr inbounds i8, ptr %7, i64 32
  store ptr %42, ptr %43, align 8, !tbaa !22
  %44 = tail call noalias ptr @calloc(i64 noundef %38, i64 noundef 8) #6
  %45 = getelementptr inbounds i8, ptr %7, i64 40
  store ptr %44, ptr %45, align 8, !tbaa !23
  %46 = load i64, ptr %11, align 8, !tbaa !16
  %47 = tail call noalias ptr @calloc(i64 noundef %46, i64 noundef 8) #6
  %48 = getelementptr inbounds i8, ptr %7, i64 48
  store ptr %47, ptr %48, align 8, !tbaa !24
  %49 = tail call noalias ptr @calloc(i64 noundef %38, i64 noundef 8) #6
  %50 = getelementptr inbounds i8, ptr %7, i64 64
  store ptr %49, ptr %50, align 8, !tbaa !25
  %51 = add nsw i64 %46, %38
  %52 = tail call noalias ptr @calloc(i64 noundef %51, i64 noundef 8) #6
  %53 = getelementptr inbounds i8, ptr %7, i64 72
  store ptr %52, ptr %53, align 8, !tbaa !26
  %54 = tail call noalias ptr @calloc(i64 noundef %46, i64 noundef 8) #6
  %55 = getelementptr inbounds i8, ptr %7, i64 80
  store ptr %54, ptr %55, align 8, !tbaa !27
  %56 = tail call noalias ptr @calloc(i64 noundef %38, i64 noundef 8) #6
  %57 = getelementptr inbounds i8, ptr %7, i64 88
  store ptr %56, ptr %57, align 8, !tbaa !28
  %58 = tail call noalias ptr @calloc(i64 noundef %38, i64 noundef 8) #6
  %59 = getelementptr inbounds i8, ptr %7, i64 56
  store ptr %58, ptr %59, align 8, !tbaa !29
  tail call void @cold_start(ptr noundef nonnull %7) #5
  %60 = load ptr, ptr %7, align 8, !tbaa !11
  %61 = getelementptr inbounds i8, ptr %60, i64 8
  %62 = load i64, ptr %61, align 8, !tbaa !19
  %63 = tail call noalias ptr @calloc(i64 noundef %62, i64 noundef 8) #6
  %64 = getelementptr inbounds i8, ptr %7, i64 96
  store ptr %63, ptr %64, align 8, !tbaa !30
  %65 = load i64, ptr %60, align 8, !tbaa !16
  %66 = tail call noalias ptr @calloc(i64 noundef %65, i64 noundef 8) #6
  %67 = getelementptr inbounds i8, ptr %7, i64 104
  store ptr %66, ptr %67, align 8, !tbaa !31
  %68 = tail call noalias ptr @calloc(i64 noundef %65, i64 noundef 8) #6
  %69 = getelementptr inbounds i8, ptr %7, i64 112
  store ptr %68, ptr %69, align 8, !tbaa !32
  %70 = tail call noalias ptr @calloc(i64 noundef %62, i64 noundef 8) #6
  %71 = getelementptr inbounds i8, ptr %7, i64 120
  store ptr %70, ptr %71, align 8, !tbaa !33
  %72 = tail call noalias ptr @calloc(i64 noundef %65, i64 noundef 8) #6
  %73 = getelementptr inbounds i8, ptr %7, i64 128
  store ptr %72, ptr %73, align 8, !tbaa !34
  %74 = tail call noalias ptr @calloc(i64 noundef %65, i64 noundef 8) #6
  %75 = getelementptr inbounds i8, ptr %7, i64 136
  store ptr %74, ptr %75, align 8, !tbaa !35
  %76 = tail call noalias ptr @calloc(i64 noundef %65, i64 noundef 8) #6
  %77 = getelementptr inbounds i8, ptr %7, i64 144
  store ptr %76, ptr %77, align 8, !tbaa !36
  %78 = tail call noalias ptr @calloc(i64 noundef %62, i64 noundef 8) #6
  %79 = getelementptr inbounds i8, ptr %7, i64 152
  store ptr %78, ptr %79, align 8, !tbaa !37
  %80 = tail call ptr @copy_settings(ptr noundef %1) #5
  %81 = getelementptr inbounds i8, ptr %7, i64 184
  store ptr %80, ptr %81, align 8, !tbaa !38
  %82 = getelementptr inbounds i8, ptr %1, i64 16
  %83 = load i64, ptr %82, align 8, !tbaa !39
  %.not129 = icmp eq i64 %83, 0
  br i1 %.not129, label %108, label %84

84:                                               ; preds = %8
  %85 = tail call noalias dereferenceable_or_null(48) ptr @malloc(i64 noundef 48) #7
  %86 = getelementptr inbounds i8, ptr %7, i64 192
  store ptr %85, ptr %86, align 8, !tbaa !43
  %87 = load ptr, ptr %7, align 8, !tbaa !11
  %88 = load i64, ptr %87, align 8, !tbaa !16
  %89 = shl i64 %88, 3
  %90 = tail call noalias ptr @malloc(i64 noundef %89) #7
  %91 = getelementptr inbounds i8, ptr %85, i64 8
  store ptr %90, ptr %91, align 8, !tbaa !44
  %92 = tail call noalias ptr @malloc(i64 noundef %89) #7
  %93 = getelementptr inbounds i8, ptr %85, i64 32
  store ptr %92, ptr %93, align 8, !tbaa !46
  %94 = getelementptr inbounds i8, ptr %87, i64 8
  %95 = load i64, ptr %94, align 8, !tbaa !19
  %96 = shl i64 %95, 3
  %97 = tail call noalias ptr @malloc(i64 noundef %96) #7
  %98 = getelementptr inbounds i8, ptr %85, i64 16
  store ptr %97, ptr %98, align 8, !tbaa !47
  %99 = tail call noalias ptr @malloc(i64 noundef %96) #7
  %100 = getelementptr inbounds i8, ptr %85, i64 40
  store ptr %99, ptr %100, align 8, !tbaa !48
  %101 = tail call noalias ptr @malloc(i64 noundef %89) #7
  %102 = getelementptr inbounds i8, ptr %7, i64 160
  store ptr %101, ptr %102, align 8, !tbaa !49
  %103 = tail call noalias ptr @malloc(i64 noundef %89) #7
  %104 = getelementptr inbounds i8, ptr %7, i64 168
  store ptr %103, ptr %104, align 8, !tbaa !50
  %105 = tail call noalias ptr @malloc(i64 noundef %96) #7
  %106 = getelementptr inbounds i8, ptr %7, i64 176
  store ptr %105, ptr %106, align 8, !tbaa !51
  %107 = tail call i64 @scale_data(ptr noundef nonnull %7) #5
  br label %110

108:                                              ; preds = %8
  %109 = getelementptr inbounds i8, ptr %7, i64 192
  store ptr null, ptr %109, align 8, !tbaa !43
  br label %110

110:                                              ; preds = %108, %84
  tail call void @set_rho_vec(ptr noundef nonnull %7) #5
  %111 = load ptr, ptr %81, align 8, !tbaa !38
  %112 = getelementptr inbounds i8, ptr %111, i64 104
  %113 = load i32, ptr %112, align 8, !tbaa !52
  %114 = tail call i64 @load_linsys_solver(i32 noundef %113) #5
  %.not130 = icmp eq i64 %114, 0
  br i1 %.not130, label %117, label %115

115:                                              ; preds = %110
  %116 = tail call i64 @osqp_cleanup(ptr noundef nonnull %7)
  br label %176

117:                                              ; preds = %110
  %118 = load ptr, ptr %7, align 8, !tbaa !11
  %119 = getelementptr inbounds i8, ptr %118, i64 16
  %120 = load ptr, ptr %119, align 8, !tbaa !13
  %121 = getelementptr inbounds i8, ptr %118, i64 24
  %122 = load ptr, ptr %121, align 8, !tbaa !17
  %123 = load ptr, ptr %81, align 8, !tbaa !38
  %124 = getelementptr inbounds i8, ptr %123, i64 8
  %125 = load double, ptr %124, align 8, !tbaa !53
  %126 = load ptr, ptr %41, align 8, !tbaa !21
  %127 = getelementptr inbounds i8, ptr %123, i64 104
  %128 = load i32, ptr %127, align 8, !tbaa !52
  %129 = tail call ptr @init_linsys_solver(ptr noundef %120, ptr noundef %122, double noundef %125, ptr noundef %126, i32 noundef %128, i64 noundef 0) #5
  %130 = getelementptr inbounds i8, ptr %7, i64 8
  store ptr %129, ptr %130, align 8, !tbaa !54
  %.not131 = icmp eq ptr %129, null
  br i1 %.not131, label %131, label %133

131:                                              ; preds = %117
  %132 = tail call i64 @osqp_cleanup(ptr noundef nonnull %7)
  br label %176

133:                                              ; preds = %117
  %134 = tail call noalias dereferenceable_or_null(104) ptr @malloc(i64 noundef 104) #7
  %135 = getelementptr inbounds i8, ptr %7, i64 16
  store ptr %134, ptr %135, align 8, !tbaa !55
  %136 = load ptr, ptr %7, align 8, !tbaa !11
  %137 = getelementptr inbounds i8, ptr %136, i64 8
  %138 = load i64, ptr %137, align 8, !tbaa !19
  %139 = shl i64 %138, 3
  %140 = tail call noalias ptr @malloc(i64 noundef %139) #7
  %141 = getelementptr inbounds i8, ptr %134, i64 40
  store ptr %140, ptr %141, align 8, !tbaa !56
  %142 = tail call noalias ptr @malloc(i64 noundef %139) #7
  %143 = getelementptr inbounds i8, ptr %134, i64 48
  store ptr %142, ptr %143, align 8, !tbaa !58
  %144 = tail call noalias ptr @malloc(i64 noundef %139) #7
  %145 = getelementptr inbounds i8, ptr %134, i64 24
  store ptr %144, ptr %145, align 8, !tbaa !59
  %146 = tail call noalias ptr @malloc(i64 noundef %139) #7
  %147 = getelementptr inbounds i8, ptr %134, i64 32
  store ptr %146, ptr %147, align 8, !tbaa !60
  %148 = load i64, ptr %136, align 8, !tbaa !16
  %149 = shl i64 %148, 3
  %150 = tail call noalias ptr @malloc(i64 noundef %149) #7
  %151 = getelementptr inbounds i8, ptr %134, i64 56
  store ptr %150, ptr %151, align 8, !tbaa !61
  %152 = tail call noalias ptr @malloc(i64 noundef %139) #7
  %153 = getelementptr inbounds i8, ptr %134, i64 64
  store ptr %152, ptr %153, align 8, !tbaa !62
  %154 = tail call noalias ptr @malloc(i64 noundef %139) #7
  %155 = getelementptr inbounds i8, ptr %134, i64 72
  store ptr %154, ptr %155, align 8, !tbaa !63
  %156 = tail call noalias dereferenceable_or_null(16) ptr @calloc(i64 noundef 1, i64 noundef 16) #6
  %157 = getelementptr inbounds i8, ptr %7, i64 200
  store ptr %156, ptr %157, align 8, !tbaa !64
  %158 = tail call noalias ptr @calloc(i64 noundef 1, i64 noundef %149) #6
  store ptr %158, ptr %156, align 8, !tbaa !65
  %159 = tail call noalias ptr @calloc(i64 noundef 1, i64 noundef %139) #6
  %160 = getelementptr inbounds i8, ptr %156, i64 8
  store ptr %159, ptr %160, align 8, !tbaa !67
  %161 = tail call noalias dereferenceable_or_null(136) ptr @calloc(i64 noundef 1, i64 noundef 136) #6
  %162 = getelementptr inbounds i8, ptr %7, i64 208
  store ptr %161, ptr %162, align 8, !tbaa !68
  %163 = getelementptr inbounds i8, ptr %161, i64 48
  store i64 0, ptr %163, align 8, !tbaa !69
  tail call void @update_status(ptr noundef %161, i64 noundef -10) #5
  %164 = load ptr, ptr %162, align 8, !tbaa !68
  %165 = getelementptr inbounds i8, ptr %164, i64 88
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %165, i8 0, i64 32, i1 false)
  %166 = load ptr, ptr %10, align 8, !tbaa !5
  %167 = tail call double @osqp_toc(ptr noundef %166) #5
  %168 = load ptr, ptr %162, align 8, !tbaa !68
  %169 = getelementptr inbounds i8, ptr %168, i64 80
  store double %167, ptr %169, align 8, !tbaa !71
  %170 = getelementptr inbounds i8, ptr %7, i64 224
  store i64 1, ptr %170, align 8, !tbaa !72
  %171 = getelementptr inbounds i8, ptr %7, i64 232
  store i64 0, ptr %171, align 8, !tbaa !73
  %172 = getelementptr inbounds i8, ptr %168, i64 120
  store i64 0, ptr %172, align 8, !tbaa !74
  %173 = load ptr, ptr %81, align 8, !tbaa !38
  %174 = load double, ptr %173, align 8, !tbaa !75
  %175 = getelementptr inbounds i8, ptr %168, i64 128
  store double %174, ptr %175, align 8, !tbaa !76
  br label %176

176:                                              ; preds = %6, %4, %2, %133, %131, %115
  %.0 = phi ptr [ null, %115 ], [ %7, %133 ], [ null, %131 ], [ null, %2 ], [ null, %4 ], [ null, %6 ]
  ret ptr %.0
}

declare i64 @validate_data(ptr noundef) local_unnamed_addr #1

declare i64 @validate_settings(ptr noundef) local_unnamed_addr #1

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

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

declare void @osqp_tic(ptr noundef) local_unnamed_addr #1

declare ptr @csc_to_triu(ptr noundef) local_unnamed_addr #1

declare ptr @vec_copy(ptr noundef, i64 noundef) local_unnamed_addr #1

declare ptr @copy_csc_mat(ptr noundef) local_unnamed_addr #1

declare void @cold_start(ptr noundef) local_unnamed_addr #1

declare ptr @copy_settings(ptr noundef) local_unnamed_addr #1

declare i64 @scale_data(ptr noundef) local_unnamed_addr #1

declare void @set_rho_vec(ptr noundef) local_unnamed_addr #1

declare i64 @load_linsys_solver(i32 noundef) local_unnamed_addr #1

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

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

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

declare double @osqp_toc(ptr noundef) local_unnamed_addr #1

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }
attributes #6 = { nounwind allocsize(0,1) }
attributes #7 = { nounwind allocsize(0) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 216}
!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 0}
!12 = !{!10, !10, i64 0}
!13 = !{!14, !7, i64 16}
!14 = !{!"", !10, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48}
!15 = !{!14, !7, i64 32}
!16 = !{!14, !10, i64 0}
!17 = !{!14, !7, i64 24}
!18 = !{!14, !7, i64 40}
!19 = !{!14, !10, i64 8}
!20 = !{!14, !7, i64 48}
!21 = !{!6, !7, i64 24}
!22 = !{!6, !7, i64 32}
!23 = !{!6, !7, i64 40}
!24 = !{!6, !7, i64 48}
!25 = !{!6, !7, i64 64}
!26 = !{!6, !7, i64 72}
!27 = !{!6, !7, i64 80}
!28 = !{!6, !7, i64 88}
!29 = !{!6, !7, i64 56}
!30 = !{!6, !7, i64 96}
!31 = !{!6, !7, i64 104}
!32 = !{!6, !7, i64 112}
!33 = !{!6, !7, i64 120}
!34 = !{!6, !7, i64 128}
!35 = !{!6, !7, i64 136}
!36 = !{!6, !7, i64 144}
!37 = !{!6, !7, i64 152}
!38 = !{!6, !7, i64 184}
!39 = !{!40, !10, i64 16}
!40 = !{!"", !41, i64 0, !41, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !41, i64 40, !41, i64 48, !10, i64 56, !41, i64 64, !41, i64 72, !41, i64 80, !41, i64 88, !41, i64 96, !42, i64 104, !41, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !41, i64 168}
!41 = !{!"double", !8, i64 0}
!42 = !{!"int", !8, i64 0}
!43 = !{!6, !7, i64 192}
!44 = !{!45, !7, i64 8}
!45 = !{!"", !41, i64 0, !7, i64 8, !7, i64 16, !41, i64 24, !7, i64 32, !7, i64 40}
!46 = !{!45, !7, i64 32}
!47 = !{!45, !7, i64 16}
!48 = !{!45, !7, i64 40}
!49 = !{!6, !7, i64 160}
!50 = !{!6, !7, i64 168}
!51 = !{!6, !7, i64 176}
!52 = !{!40, !42, i64 104}
!53 = !{!40, !41, i64 8}
!54 = !{!6, !7, i64 8}
!55 = !{!6, !7, i64 16}
!56 = !{!57, !7, i64 40}
!57 = !{!"", !7, i64 0, !10, i64 8, !10, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !41, i64 80, !41, i64 88, !41, i64 96}
!58 = !{!57, !7, i64 48}
!59 = !{!57, !7, i64 24}
!60 = !{!57, !7, i64 32}
!61 = !{!57, !7, i64 56}
!62 = !{!57, !7, i64 64}
!63 = !{!57, !7, i64 72}
!64 = !{!6, !7, i64 200}
!65 = !{!66, !7, i64 0}
!66 = !{!"", !7, i64 0, !7, i64 8}
!67 = !{!66, !7, i64 8}
!68 = !{!6, !7, i64 208}
!69 = !{!70, !10, i64 48}
!70 = !{!"", !10, i64 0, !8, i64 8, !10, i64 40, !10, i64 48, !41, i64 56, !41, i64 64, !41, i64 72, !41, i64 80, !41, i64 88, !41, i64 96, !41, i64 104, !41, i64 112, !10, i64 120, !41, i64 128}
!71 = !{!70, !41, i64 80}
!72 = !{!6, !10, i64 224}
!73 = !{!6, !10, i64 232}
!74 = !{!70, !10, i64 120}
!75 = !{!40, !41, i64 0}
!76 = !{!70, !41, i64 128}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass