; LLVM IR from cvxgrp/scs :: linsys/mkl/direct (private)

; 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.ScsMatrix = type { ptr, ptr, ptr, i32, i32 }
%struct.SCS_LIN_SYS_WORK = type { ptr, ptr, i32, i32, [64 x ptr], [64 x i32], i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [52 x i8], align 1

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

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

declare i32 @printf(ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
define dso_local ptr @scs_init_lin_sys_work(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %12 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 840) #6
  store ptr %12, ptr %9, align 8, !tbaa !5
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.ScsMatrix, ptr %13, i32 0, i32 4
  %15 = load i32, ptr %14, align 4, !tbaa !9
  %16 = load ptr, ptr %9, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %16, i32 0, i32 2
  store i32 %15, ptr %17, align 8, !tbaa !12
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.ScsMatrix, ptr %18, i32 0, i32 3
  %20 = load i32, ptr %19, align 8, !tbaa !14
  %21 = load ptr, ptr %9, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %21, i32 0, i32 3
  store i32 %20, ptr %22, align 4, !tbaa !15
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %23, i32 0, i32 2
  %25 = load i32, ptr %24, align 8, !tbaa !12
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %26, i32 0, i32 3
  %28 = load i32, ptr %27, align 4, !tbaa !15
  %29 = add nsw i32 %25, %28
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %30, i32 0, i32 6
  store i32 %29, ptr %31, align 8, !tbaa !16
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %32, i32 0, i32 6
  %34 = load i32, ptr %33, align 8, !tbaa !16
  %35 = sext i32 %34 to i64
  %36 = mul i64 8, %35
  %37 = call noalias ptr @malloc(i64 noundef %36) #7
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %38, i32 0, i32 1
  store ptr %37, ptr %39, align 8, !tbaa !17
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %40, i32 0, i32 6
  %42 = load i32, ptr %41, align 8, !tbaa !16
  %43 = sext i32 %42 to i64
  %44 = call noalias ptr @calloc(i64 noundef %43, i64 noundef 4) #6
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %45, i32 0, i32 14
  store ptr %44, ptr %46, align 8, !tbaa !18
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %47, i32 0, i32 2
  %49 = load i32, ptr %48, align 8, !tbaa !12
  %50 = sext i32 %49 to i64
  %51 = call noalias ptr @calloc(i64 noundef %50, i64 noundef 8) #6
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %52, i32 0, i32 15
  store ptr %51, ptr %53, align 8, !tbaa !19
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %56, i32 0, i32 15
  %58 = load ptr, ptr %57, align 8, !tbaa !19
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %60, i32 0, i32 14
  %62 = load ptr, ptr %61, align 8, !tbaa !18
  %63 = call ptr @_scs_form_kkt(ptr noundef %54, ptr noundef %55, ptr noundef %58, ptr noundef %59, ptr noundef %62, i32 noundef 0)
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %64, i32 0, i32 0
  store ptr %63, ptr %65, align 8, !tbaa !20
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %66, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !20
  %69 = icmp ne ptr %68, null
  br i1 %69, label %73, label %70

70:                                               ; preds = %3
  %71 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  call void @scs_free_lin_sys_work(ptr noundef %72)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %231

73:                                               ; preds = %3
  store i32 0, ptr %8, align 4, !tbaa !21
  br label %74

74:                                               ; preds = %88, %73
  %75 = load i32, ptr %8, align 4, !tbaa !21
  %76 = icmp slt i32 %75, 64
  br i1 %76, label %77, label %91

77:                                               ; preds = %74
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %78, i32 0, i32 5
  %80 = load i32, ptr %8, align 4, !tbaa !21
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [64 x i32], ptr %79, i64 0, i64 %81
  store i32 0, ptr %82, align 4, !tbaa !21
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %83, i32 0, i32 4
  %85 = load i32, ptr %8, align 4, !tbaa !21
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [64 x ptr], ptr %84, i64 0, i64 %86
  store ptr null, ptr %87, align 8, !tbaa !5
  br label %88

88:                                               ; preds = %77
  %89 = load i32, ptr %8, align 4, !tbaa !21
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %8, align 4, !tbaa !21
  br label %74, !llvm.loop !22

91:                                               ; preds = %74
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %92, i32 0, i32 7
  store i32 -2, ptr %93, align 4, !tbaa !24
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %94, i32 0, i32 8
  store i32 1, ptr %95, align 8, !tbaa !25
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %96, i32 0, i32 9
  store i32 1, ptr %97, align 4, !tbaa !26
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %98, i32 0, i32 10
  store i32 1, ptr %99, align 8, !tbaa !27
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %100, i32 0, i32 12
  store i32 0, ptr %101, align 8, !tbaa !28
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %102, i32 0, i32 13
  store i32 0, ptr %103, align 4, !tbaa !29
  %104 = load ptr, ptr %9, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %104, i32 0, i32 5
  %106 = getelementptr inbounds [64 x i32], ptr %105, i64 0, i64 0
  store i32 1, ptr %106, align 8, !tbaa !21
  %107 = load ptr, ptr %9, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %107, i32 0, i32 5
  %109 = getelementptr inbounds [64 x i32], ptr %108, i64 0, i64 1
  store i32 3, ptr %109, align 4, !tbaa !21
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %110, i32 0, i32 5
  %112 = getelementptr inbounds [64 x i32], ptr %111, i64 0, i64 5
  store i32 1, ptr %112, align 4, !tbaa !21
  %113 = load ptr, ptr %9, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %113, i32 0, i32 5
  %115 = getelementptr inbounds [64 x i32], ptr %114, i64 0, i64 7
  store i32 0, ptr %115, align 4, !tbaa !21
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %116, i32 0, i32 5
  %118 = getelementptr inbounds [64 x i32], ptr %117, i64 0, i64 9
  store i32 8, ptr %118, align 4, !tbaa !21
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %119, i32 0, i32 5
  %121 = getelementptr inbounds [64 x i32], ptr %120, i64 0, i64 34
  store i32 1, ptr %121, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 11, ptr %11, align 4, !tbaa !21
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %122, i32 0, i32 4
  %124 = getelementptr inbounds [64 x ptr], ptr %123, i64 0, i64 0
  %125 = load ptr, ptr %9, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %125, i32 0, i32 9
  %127 = load ptr, ptr %9, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %127, i32 0, i32 10
  %129 = load ptr, ptr %9, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %129, i32 0, i32 7
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %131, i32 0, i32 6
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %133, i32 0, i32 0
  %135 = load ptr, ptr %134, align 8, !tbaa !20
  %136 = getelementptr inbounds %struct.ScsMatrix, ptr %135, i32 0, i32 0
  %137 = load ptr, ptr %136, align 8, !tbaa !30
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %138, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8, !tbaa !20
  %141 = getelementptr inbounds %struct.ScsMatrix, ptr %140, i32 0, i32 2
  %142 = load ptr, ptr %141, align 8, !tbaa !31
  %143 = load ptr, ptr %9, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %143, i32 0, i32 0
  %145 = load ptr, ptr %144, align 8, !tbaa !20
  %146 = getelementptr inbounds %struct.ScsMatrix, ptr %145, i32 0, i32 1
  %147 = load ptr, ptr %146, align 8, !tbaa !32
  %148 = load ptr, ptr %9, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %148, i32 0, i32 8
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %150, i32 0, i32 5
  %152 = getelementptr inbounds [64 x i32], ptr %151, i64 0, i64 0
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %153, i32 0, i32 13
  %155 = load ptr, ptr %9, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %155, i32 0, i32 12
  call void @pardiso(ptr noundef %124, ptr noundef %126, ptr noundef %128, ptr noundef %130, ptr noundef %11, ptr noundef %132, ptr noundef %137, ptr noundef %142, ptr noundef %147, ptr noundef null, ptr noundef %149, ptr noundef %152, ptr noundef %154, ptr noundef null, ptr noundef null, ptr noundef %156)
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %157, i32 0, i32 12
  %159 = load i32, ptr %158, align 8, !tbaa !28
  %160 = icmp ne i32 %159, 0
  br i1 %160, label %161, label %167

161:                                              ; preds = %91
  %162 = load ptr, ptr %9, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %162, i32 0, i32 12
  %164 = load i32, ptr %163, align 8, !tbaa !28
  %165 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %164)
  %166 = load ptr, ptr %9, align 8, !tbaa !5
  call void @scs_free_lin_sys_work(ptr noundef %166)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %230

167:                                              ; preds = %91
  %168 = load ptr, ptr %9, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %168, i32 0, i32 11
  store i32 22, ptr %169, align 4, !tbaa !33
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %170, i32 0, i32 4
  %172 = getelementptr inbounds [64 x ptr], ptr %171, i64 0, i64 0
  %173 = load ptr, ptr %9, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %173, i32 0, i32 9
  %175 = load ptr, ptr %9, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %175, i32 0, i32 10
  %177 = load ptr, ptr %9, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %177, i32 0, i32 7
  %179 = load ptr, ptr %9, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %179, i32 0, i32 11
  %181 = load ptr, ptr %9, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %181, i32 0, i32 6
  %183 = load ptr, ptr %9, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %183, i32 0, i32 0
  %185 = load ptr, ptr %184, align 8, !tbaa !20
  %186 = getelementptr inbounds %struct.ScsMatrix, ptr %185, i32 0, i32 0
  %187 = load ptr, ptr %186, align 8, !tbaa !30
  %188 = load ptr, ptr %9, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %188, i32 0, i32 0
  %190 = load ptr, ptr %189, align 8, !tbaa !20
  %191 = getelementptr inbounds %struct.ScsMatrix, ptr %190, i32 0, i32 2
  %192 = load ptr, ptr %191, align 8, !tbaa !31
  %193 = load ptr, ptr %9, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %193, i32 0, i32 0
  %195 = load ptr, ptr %194, align 8, !tbaa !20
  %196 = getelementptr inbounds %struct.ScsMatrix, ptr %195, i32 0, i32 1
  %197 = load ptr, ptr %196, align 8, !tbaa !32
  %198 = load ptr, ptr %9, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %198, i32 0, i32 8
  %200 = load ptr, ptr %9, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %200, i32 0, i32 5
  %202 = getelementptr inbounds [64 x i32], ptr %201, i64 0, i64 0
  %203 = load ptr, ptr %9, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %203, i32 0, i32 13
  %205 = load ptr, ptr %9, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %205, i32 0, i32 12
  call void @pardiso(ptr noundef %172, ptr noundef %174, ptr noundef %176, ptr noundef %178, ptr noundef %180, ptr noundef %182, ptr noundef %187, ptr noundef %192, ptr noundef %197, ptr noundef null, ptr noundef %199, ptr noundef %202, ptr noundef %204, ptr noundef null, ptr noundef null, ptr noundef %206)
  %207 = load ptr, ptr %9, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %207, i32 0, i32 12
  %209 = load i32, ptr %208, align 8, !tbaa !28
  %210 = icmp ne i32 %209, 0
  br i1 %210, label %211, label %217

211:                                              ; preds = %167
  %212 = load ptr, ptr %9, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %212, i32 0, i32 12
  %214 = load i32, ptr %213, align 8, !tbaa !28
  %215 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %214)
  %216 = load ptr, ptr %9, align 8, !tbaa !5
  call void @scs_free_lin_sys_work(ptr noundef %216)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %230

217:                                              ; preds = %167
  %218 = load ptr, ptr %9, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %218, i32 0, i32 5
  %220 = getelementptr inbounds [64 x i32], ptr %219, i64 0, i64 21
  %221 = load i32, ptr %220, align 4, !tbaa !21
  %222 = load ptr, ptr %9, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.SCS_LIN_SYS_WORK, ptr %222, i32 0, i32 2
  %224 = load i32, ptr %223, align 8, !tbaa !12
  %225 = icmp slt i32 %221, %224
  br i1 %225, label %226, label %228

226:                                              ; preds = %217
  %227 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %230

228:                                              ; preds = %217
  %229 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %229, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %230

230:                                              ; preds = %228, %226, %211, %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %231

231:                                              ; preds = %230, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  %232 = load ptr, ptr %4, align 8
  ret ptr %232
}

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

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

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

declare ptr @_scs_form_kkt(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 28}
!10 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24, !11, i64 28}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !11, i64 16}
!13 = !{!"SCS_LIN_SYS_WORK", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !7, i64 24, !7, i64 536, !11, i64 792, !11, i64 796, !11, i64 800, !11, i64 804, !11, i64 808, !11, i64 812, !11, i64 816, !11, i64 820, !6, i64 824, !6, i64 832}
!14 = !{!10, !11, i64 24}
!15 = !{!13, !11, i64 20}
!16 = !{!13, !11, i64 792}
!17 = !{!13, !6, i64 8}
!18 = !{!13, !6, i64 824}
!19 = !{!13, !6, i64 832}
!20 = !{!13, !6, i64 0}
!21 = !{!11, !11, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!13, !11, i64 796}
!25 = !{!13, !11, i64 800}
!26 = !{!13, !11, i64 804}
!27 = !{!13, !11, i64 808}
!28 = !{!13, !11, i64 816}
!29 = !{!13, !11, i64 820}
!30 = !{!10, !6, i64 0}
!31 = !{!10, !6, i64 16}
!32 = !{!10, !6, i64 8}
!33 = !{!13, !11, i64 812}


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

@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [52 x i8], align 1

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @scs_init_lin_sys_work(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = alloca i32, align 4
  %5 = tail call noalias dereferenceable_or_null(840) ptr @calloc(i64 noundef 1, i64 noundef 840) #7
  %6 = getelementptr inbounds i8, ptr %0, i64 28
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %5, i64 16
  store i32 %7, ptr %8, align 8, !tbaa !11
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  %10 = load i32, ptr %9, align 8, !tbaa !13
  %11 = getelementptr inbounds i8, ptr %5, i64 20
  store i32 %10, ptr %11, align 4, !tbaa !14
  %12 = add nsw i32 %10, %7
  %13 = getelementptr inbounds i8, ptr %5, i64 792
  store i32 %12, ptr %13, align 8, !tbaa !15
  %14 = sext i32 %12 to i64
  %15 = shl nsw i64 %14, 3
  %16 = tail call noalias ptr @malloc(i64 noundef %15) #8
  %17 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr %16, ptr %17, align 8, !tbaa !16
  %18 = tail call noalias ptr @calloc(i64 noundef %14, i64 noundef 4) #7
  %19 = getelementptr inbounds i8, ptr %5, i64 824
  store ptr %18, ptr %19, align 8, !tbaa !17
  %20 = sext i32 %7 to i64
  %21 = tail call noalias ptr @calloc(i64 noundef %20, i64 noundef 8) #7
  %22 = getelementptr inbounds i8, ptr %5, i64 832
  store ptr %21, ptr %22, align 8, !tbaa !18
  %23 = tail call ptr @_scs_form_kkt(ptr noundef %0, ptr noundef %1, ptr noundef %21, ptr noundef %2, ptr noundef %18, i32 noundef 0) #9
  store ptr %23, ptr %5, align 8, !tbaa !19
  %.not = icmp eq ptr %23, null
  br i1 %.not, label %42, label %.preheader

.preheader:                                       ; preds = %3
  %24 = getelementptr inbounds i8, ptr %5, i64 536
  %25 = getelementptr inbounds i8, ptr %5, i64 24
  %26 = getelementptr inbounds i8, ptr %5, i64 796
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(768) %25, i8 0, i64 768, i1 false)
  %27 = getelementptr inbounds i8, ptr %5, i64 800
  %28 = getelementptr inbounds i8, ptr %5, i64 804
  %29 = getelementptr inbounds i8, ptr %5, i64 808
  store <4 x i32> <i32 -2, i32 1, i32 1, i32 1>, ptr %26, align 4, !tbaa !20
  %30 = getelementptr inbounds i8, ptr %5, i64 816
  store i32 0, ptr %30, align 8, !tbaa !21
  %31 = getelementptr inbounds i8, ptr %5, i64 820
  store i32 0, ptr %31, align 4, !tbaa !22
  store i32 1, ptr %24, align 8, !tbaa !20
  %32 = getelementptr inbounds i8, ptr %5, i64 540
  store i32 3, ptr %32, align 4, !tbaa !20
  %33 = getelementptr inbounds i8, ptr %5, i64 556
  store i32 1, ptr %33, align 4, !tbaa !20
  %34 = getelementptr inbounds i8, ptr %5, i64 572
  store i32 8, ptr %34, align 4, !tbaa !20
  %35 = getelementptr inbounds i8, ptr %5, i64 672
  store i32 1, ptr %35, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  store i32 11, ptr %4, align 4, !tbaa !20
  %36 = load ptr, ptr %23, align 8, !tbaa !23
  %37 = getelementptr inbounds i8, ptr %23, i64 16
  %38 = load ptr, ptr %37, align 8, !tbaa !24
  %39 = getelementptr inbounds i8, ptr %23, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !25
  call void @pardiso(ptr noundef nonnull %25, ptr noundef nonnull %28, ptr noundef nonnull %29, ptr noundef nonnull %26, ptr noundef nonnull %4, ptr noundef nonnull %13, ptr noundef %36, ptr noundef %38, ptr noundef %40, ptr noundef null, ptr noundef nonnull %27, ptr noundef nonnull %24, ptr noundef nonnull %31, ptr noundef null, ptr noundef null, ptr noundef nonnull %30) #9
  %41 = load i32, ptr %30, align 8, !tbaa !21
  %.not77 = icmp eq i32 %41, 0
  br i1 %.not77, label %46, label %44

42:                                               ; preds = %3
  %43 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @scs_free_lin_sys_work(ptr noundef nonnull %5)
  br label %65

44:                                               ; preds = %.preheader
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %41)
  call void @scs_free_lin_sys_work(ptr noundef nonnull %5)
  br label %64

46:                                               ; preds = %.preheader
  %47 = getelementptr inbounds i8, ptr %5, i64 812
  store i32 22, ptr %47, align 4, !tbaa !26
  %48 = load ptr, ptr %5, align 8, !tbaa !19
  %49 = load ptr, ptr %48, align 8, !tbaa !23
  %50 = getelementptr inbounds i8, ptr %48, i64 16
  %51 = load ptr, ptr %50, align 8, !tbaa !24
  %52 = getelementptr inbounds i8, ptr %48, i64 8
  %53 = load ptr, ptr %52, align 8, !tbaa !25
  call void @pardiso(ptr noundef nonnull %25, ptr noundef nonnull %28, ptr noundef nonnull %29, ptr noundef nonnull %26, ptr noundef nonnull %47, ptr noundef nonnull %13, ptr noundef %49, ptr noundef %51, ptr noundef %53, ptr noundef null, ptr noundef nonnull %27, ptr noundef nonnull %24, ptr noundef nonnull %31, ptr noundef null, ptr noundef null, ptr noundef nonnull %30) #9
  %54 = load i32, ptr %30, align 8, !tbaa !21
  %.not78 = icmp eq i32 %54, 0
  br i1 %.not78, label %57, label %55

55:                                               ; preds = %46
  %56 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %54)
  call void @scs_free_lin_sys_work(ptr noundef nonnull %5)
  br label %64

57:                                               ; preds = %46
  %58 = getelementptr inbounds i8, ptr %5, i64 620
  %59 = load i32, ptr %58, align 4, !tbaa !20
  %60 = load i32, ptr %8, align 8, !tbaa !11
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %62, label %64

62:                                               ; preds = %57
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %64

64:                                               ; preds = %57, %62, %55, %44
  %.0 = phi ptr [ null, %44 ], [ null, %55 ], [ null, %62 ], [ %5, %57 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  br label %65

65:                                               ; preds = %64, %42
  %.1 = phi ptr [ %.0, %64 ], [ null, %42 ]
  ret ptr %.1
}

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

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

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

declare ptr @_scs_form_kkt(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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

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

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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind allocsize(0,1) }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { 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 28}
!6 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"SCS_LIN_SYS_WORK", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !8, i64 24, !8, i64 536, !10, i64 792, !10, i64 796, !10, i64 800, !10, i64 804, !10, i64 808, !10, i64 812, !10, i64 816, !10, i64 820, !7, i64 824, !7, i64 832}
!13 = !{!6, !10, i64 24}
!14 = !{!12, !10, i64 20}
!15 = !{!12, !10, i64 792}
!16 = !{!12, !7, i64 8}
!17 = !{!12, !7, i64 824}
!18 = !{!12, !7, i64 832}
!19 = !{!12, !7, i64 0}
!20 = !{!10, !10, i64 0}
!21 = !{!12, !10, i64 816}
!22 = !{!12, !10, i64 820}
!23 = !{!6, !7, i64 0}
!24 = !{!6, !7, i64 16}
!25 = !{!6, !7, i64 8}
!26 = !{!12, !10, i64 812}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass