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

; 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.OSQPScaling = type { double, ptr, ptr, double, 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 }

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

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

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

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

declare void @mat_inf_norm_cols_sym_triu(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i64 @scale_data(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %8 = load ptr, ptr %2, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct.OSQPWorkspace, ptr %8, i32 0, i32 0
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  %11 = getelementptr inbounds %struct.OSQPData, ptr %10, i32 0, i32 0
  %12 = load i64, ptr %11, align 8, !tbaa !12
  store i64 %12, ptr %4, align 8, !tbaa !14
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.OSQPWorkspace, ptr %13, i32 0, i32 0
  %15 = load ptr, ptr %14, align 8, !tbaa !9
  %16 = getelementptr inbounds %struct.OSQPData, ptr %15, i32 0, i32 1
  %17 = load i64, ptr %16, align 8, !tbaa !15
  store i64 %17, ptr %5, align 8, !tbaa !14
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.OSQPWorkspace, ptr %18, i32 0, i32 24
  %20 = load ptr, ptr %19, align 8, !tbaa !16
  %21 = getelementptr inbounds %struct.OSQPScaling, ptr %20, i32 0, i32 0
  store double 1.000000e+00, ptr %21, align 8, !tbaa !17
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.OSQPWorkspace, ptr %22, i32 0, i32 24
  %24 = load ptr, ptr %23, align 8, !tbaa !16
  %25 = getelementptr inbounds %struct.OSQPScaling, ptr %24, i32 0, i32 1
  %26 = load ptr, ptr %25, align 8, !tbaa !20
  %27 = load ptr, ptr %2, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.OSQPWorkspace, ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = getelementptr inbounds %struct.OSQPData, ptr %29, i32 0, i32 0
  %31 = load i64, ptr %30, align 8, !tbaa !12
  call void @vec_set_scalar(ptr noundef %26, double noundef 1.000000e+00, i64 noundef %31)
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.OSQPWorkspace, ptr %32, i32 0, i32 24
  %34 = load ptr, ptr %33, align 8, !tbaa !16
  %35 = getelementptr inbounds %struct.OSQPScaling, ptr %34, i32 0, i32 4
  %36 = load ptr, ptr %35, align 8, !tbaa !21
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.OSQPWorkspace, ptr %37, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !9
  %40 = getelementptr inbounds %struct.OSQPData, ptr %39, i32 0, i32 0
  %41 = load i64, ptr %40, align 8, !tbaa !12
  call void @vec_set_scalar(ptr noundef %36, double noundef 1.000000e+00, i64 noundef %41)
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.OSQPWorkspace, ptr %42, i32 0, i32 24
  %44 = load ptr, ptr %43, align 8, !tbaa !16
  %45 = getelementptr inbounds %struct.OSQPScaling, ptr %44, i32 0, i32 2
  %46 = load ptr, ptr %45, align 8, !tbaa !22
  %47 = load ptr, ptr %2, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.OSQPWorkspace, ptr %47, i32 0, i32 0
  %49 = load ptr, ptr %48, align 8, !tbaa !9
  %50 = getelementptr inbounds %struct.OSQPData, ptr %49, i32 0, i32 1
  %51 = load i64, ptr %50, align 8, !tbaa !15
  call void @vec_set_scalar(ptr noundef %46, double noundef 1.000000e+00, i64 noundef %51)
  %52 = load ptr, ptr %2, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.OSQPWorkspace, ptr %52, i32 0, i32 24
  %54 = load ptr, ptr %53, align 8, !tbaa !16
  %55 = getelementptr inbounds %struct.OSQPScaling, ptr %54, i32 0, i32 5
  %56 = load ptr, ptr %55, align 8, !tbaa !23
  %57 = load ptr, ptr %2, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.OSQPWorkspace, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct.OSQPData, ptr %59, i32 0, i32 1
  %61 = load i64, ptr %60, align 8, !tbaa !15
  call void @vec_set_scalar(ptr noundef %56, double noundef 1.000000e+00, i64 noundef %61)
  store i64 0, ptr %3, align 8, !tbaa !14
  br label %62

62:                                               ; preds = %246, %1
  %63 = load i64, ptr %3, align 8, !tbaa !14
  %64 = load ptr, ptr %2, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.OSQPWorkspace, ptr %64, i32 0, i32 23
  %66 = load ptr, ptr %65, align 8, !tbaa !24
  %67 = getelementptr inbounds %struct.OSQPSettings, ptr %66, i32 0, i32 2
  %68 = load i64, ptr %67, align 8, !tbaa !25
  %69 = icmp slt i64 %63, %68
  br i1 %69, label %70, label %249

70:                                               ; preds = %62
  %71 = load ptr, ptr %2, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.OSQPWorkspace, ptr %71, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.OSQPData, ptr %73, i32 0, i32 2
  %75 = load ptr, ptr %74, align 8, !tbaa !28
  %76 = load ptr, ptr %2, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.OSQPWorkspace, ptr %76, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8, !tbaa !9
  %79 = getelementptr inbounds %struct.OSQPData, ptr %78, i32 0, i32 3
  %80 = load ptr, ptr %79, align 8, !tbaa !29
  %81 = load ptr, ptr %2, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.OSQPWorkspace, ptr %81, i32 0, i32 20
  %83 = load ptr, ptr %82, align 8, !tbaa !30
  %84 = load ptr, ptr %2, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.OSQPWorkspace, ptr %84, i32 0, i32 21
  %86 = load ptr, ptr %85, align 8, !tbaa !31
  %87 = load ptr, ptr %2, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.OSQPWorkspace, ptr %87, i32 0, i32 22
  %89 = load ptr, ptr %88, align 8, !tbaa !32
  %90 = load i64, ptr %4, align 8, !tbaa !14
  call void @compute_inf_norm_cols_KKT(ptr noundef %75, ptr noundef %80, ptr noundef %83, ptr noundef %86, ptr noundef %89, i64 noundef %90)
  %91 = load ptr, ptr %2, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.OSQPWorkspace, ptr %91, i32 0, i32 20
  %93 = load ptr, ptr %92, align 8, !tbaa !30
  %94 = load i64, ptr %4, align 8, !tbaa !14
  call void @limit_scaling(ptr noundef %93, i64 noundef %94)
  %95 = load ptr, ptr %2, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.OSQPWorkspace, ptr %95, i32 0, i32 22
  %97 = load ptr, ptr %96, align 8, !tbaa !32
  %98 = load i64, ptr %5, align 8, !tbaa !14
  call void @limit_scaling(ptr noundef %97, i64 noundef %98)
  %99 = load ptr, ptr %2, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.OSQPWorkspace, ptr %99, i32 0, i32 20
  %101 = load ptr, ptr %100, align 8, !tbaa !30
  %102 = load i64, ptr %4, align 8, !tbaa !14
  call void @vec_ew_sqrt(ptr noundef %101, i64 noundef %102)
  %103 = load ptr, ptr %2, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.OSQPWorkspace, ptr %103, i32 0, i32 22
  %105 = load ptr, ptr %104, align 8, !tbaa !32
  %106 = load i64, ptr %5, align 8, !tbaa !14
  call void @vec_ew_sqrt(ptr noundef %105, i64 noundef %106)
  %107 = load ptr, ptr %2, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.OSQPWorkspace, ptr %107, i32 0, i32 20
  %109 = load ptr, ptr %108, align 8, !tbaa !30
  %110 = load ptr, ptr %2, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.OSQPWorkspace, ptr %110, i32 0, i32 20
  %112 = load ptr, ptr %111, align 8, !tbaa !30
  %113 = load i64, ptr %4, align 8, !tbaa !14
  call void @vec_ew_recipr(ptr noundef %109, ptr noundef %112, i64 noundef %113)
  %114 = load ptr, ptr %2, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.OSQPWorkspace, ptr %114, i32 0, i32 22
  %116 = load ptr, ptr %115, align 8, !tbaa !32
  %117 = load ptr, ptr %2, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.OSQPWorkspace, ptr %117, i32 0, i32 22
  %119 = load ptr, ptr %118, align 8, !tbaa !32
  %120 = load i64, ptr %5, align 8, !tbaa !14
  call void @vec_ew_recipr(ptr noundef %116, ptr noundef %119, i64 noundef %120)
  %121 = load ptr, ptr %2, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.OSQPWorkspace, ptr %121, i32 0, i32 0
  %123 = load ptr, ptr %122, align 8, !tbaa !9
  %124 = getelementptr inbounds %struct.OSQPData, ptr %123, i32 0, i32 2
  %125 = load ptr, ptr %124, align 8, !tbaa !28
  %126 = load ptr, ptr %2, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.OSQPWorkspace, ptr %126, i32 0, i32 20
  %128 = load ptr, ptr %127, align 8, !tbaa !30
  call void @mat_premult_diag(ptr noundef %125, ptr noundef %128)
  %129 = load ptr, ptr %2, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.OSQPWorkspace, ptr %129, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !9
  %132 = getelementptr inbounds %struct.OSQPData, ptr %131, i32 0, i32 2
  %133 = load ptr, ptr %132, align 8, !tbaa !28
  %134 = load ptr, ptr %2, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.OSQPWorkspace, ptr %134, i32 0, i32 20
  %136 = load ptr, ptr %135, align 8, !tbaa !30
  call void @mat_postmult_diag(ptr noundef %133, ptr noundef %136)
  %137 = load ptr, ptr %2, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.OSQPWorkspace, ptr %137, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8, !tbaa !9
  %140 = getelementptr inbounds %struct.OSQPData, ptr %139, i32 0, i32 3
  %141 = load ptr, ptr %140, align 8, !tbaa !29
  %142 = load ptr, ptr %2, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.OSQPWorkspace, ptr %142, i32 0, i32 22
  %144 = load ptr, ptr %143, align 8, !tbaa !32
  call void @mat_premult_diag(ptr noundef %141, ptr noundef %144)
  %145 = load ptr, ptr %2, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.OSQPWorkspace, ptr %145, i32 0, i32 0
  %147 = load ptr, ptr %146, align 8, !tbaa !9
  %148 = getelementptr inbounds %struct.OSQPData, ptr %147, i32 0, i32 3
  %149 = load ptr, ptr %148, align 8, !tbaa !29
  %150 = load ptr, ptr %2, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.OSQPWorkspace, ptr %150, i32 0, i32 20
  %152 = load ptr, ptr %151, align 8, !tbaa !30
  call void @mat_postmult_diag(ptr noundef %149, ptr noundef %152)
  %153 = load ptr, ptr %2, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.OSQPWorkspace, ptr %153, i32 0, i32 20
  %155 = load ptr, ptr %154, align 8, !tbaa !30
  %156 = load ptr, ptr %2, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.OSQPWorkspace, ptr %156, i32 0, i32 0
  %158 = load ptr, ptr %157, align 8, !tbaa !9
  %159 = getelementptr inbounds %struct.OSQPData, ptr %158, i32 0, i32 4
  %160 = load ptr, ptr %159, align 8, !tbaa !33
  %161 = load ptr, ptr %2, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.OSQPWorkspace, ptr %161, i32 0, i32 0
  %163 = load ptr, ptr %162, align 8, !tbaa !9
  %164 = getelementptr inbounds %struct.OSQPData, ptr %163, i32 0, i32 4
  %165 = load ptr, ptr %164, align 8, !tbaa !33
  %166 = load i64, ptr %4, align 8, !tbaa !14
  call void @vec_ew_prod(ptr noundef %155, ptr noundef %160, ptr noundef %165, i64 noundef %166)
  %167 = load ptr, ptr %2, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.OSQPWorkspace, ptr %167, i32 0, i32 24
  %169 = load ptr, ptr %168, align 8, !tbaa !16
  %170 = getelementptr inbounds %struct.OSQPScaling, ptr %169, i32 0, i32 1
  %171 = load ptr, ptr %170, align 8, !tbaa !20
  %172 = load ptr, ptr %2, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.OSQPWorkspace, ptr %172, i32 0, i32 20
  %174 = load ptr, ptr %173, align 8, !tbaa !30
  %175 = load ptr, ptr %2, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.OSQPWorkspace, ptr %175, i32 0, i32 24
  %177 = load ptr, ptr %176, align 8, !tbaa !16
  %178 = getelementptr inbounds %struct.OSQPScaling, ptr %177, i32 0, i32 1
  %179 = load ptr, ptr %178, align 8, !tbaa !20
  %180 = load i64, ptr %4, align 8, !tbaa !14
  call void @vec_ew_prod(ptr noundef %171, ptr noundef %174, ptr noundef %179, i64 noundef %180)
  %181 = load ptr, ptr %2, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.OSQPWorkspace, ptr %181, i32 0, i32 24
  %183 = load ptr, ptr %182, align 8, !tbaa !16
  %184 = getelementptr inbounds %struct.OSQPScaling, ptr %183, i32 0, i32 2
  %185 = load ptr, ptr %184, align 8, !tbaa !22
  %186 = load ptr, ptr %2, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.OSQPWorkspace, ptr %186, i32 0, i32 22
  %188 = load ptr, ptr %187, align 8, !tbaa !32
  %189 = load ptr, ptr %2, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.OSQPWorkspace, ptr %189, i32 0, i32 24
  %191 = load ptr, ptr %190, align 8, !tbaa !16
  %192 = getelementptr inbounds %struct.OSQPScaling, ptr %191, i32 0, i32 2
  %193 = load ptr, ptr %192, align 8, !tbaa !22
  %194 = load i64, ptr %5, align 8, !tbaa !14
  call void @vec_ew_prod(ptr noundef %185, ptr noundef %188, ptr noundef %193, i64 noundef %194)
  %195 = load ptr, ptr %2, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.OSQPWorkspace, ptr %195, i32 0, i32 0
  %197 = load ptr, ptr %196, align 8, !tbaa !9
  %198 = getelementptr inbounds %struct.OSQPData, ptr %197, i32 0, i32 2
  %199 = load ptr, ptr %198, align 8, !tbaa !28
  %200 = load ptr, ptr %2, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.OSQPWorkspace, ptr %200, i32 0, i32 20
  %202 = load ptr, ptr %201, align 8, !tbaa !30
  call void @mat_inf_norm_cols_sym_triu(ptr noundef %199, ptr noundef %202)
  %203 = load ptr, ptr %2, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.OSQPWorkspace, ptr %203, i32 0, i32 20
  %205 = load ptr, ptr %204, align 8, !tbaa !30
  %206 = load i64, ptr %4, align 8, !tbaa !14
  %207 = call double @vec_mean(ptr noundef %205, i64 noundef %206)
  store double %207, ptr %6, align 8, !tbaa !34
  %208 = load ptr, ptr %2, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.OSQPWorkspace, ptr %208, i32 0, i32 0
  %210 = load ptr, ptr %209, align 8, !tbaa !9
  %211 = getelementptr inbounds %struct.OSQPData, ptr %210, i32 0, i32 4
  %212 = load ptr, ptr %211, align 8, !tbaa !33
  %213 = load i64, ptr %4, align 8, !tbaa !14
  %214 = call double @vec_norm_inf(ptr noundef %212, i64 noundef %213)
  store double %214, ptr %7, align 8, !tbaa !34
  call void @limit_scaling(ptr noundef %7, i64 noundef 1)
  %215 = load double, ptr %6, align 8, !tbaa !34
  %216 = load double, ptr %7, align 8, !tbaa !34
  %217 = fcmp ogt double %215, %216
  br i1 %217, label %218, label %220

218:                                              ; preds = %70
  %219 = load double, ptr %6, align 8, !tbaa !34
  br label %222

220:                                              ; preds = %70
  %221 = load double, ptr %7, align 8, !tbaa !34
  br label %222

222:                                              ; preds = %220, %218
  %223 = phi double [ %219, %218 ], [ %221, %220 ]
  store double %223, ptr %6, align 8, !tbaa !34
  call void @limit_scaling(ptr noundef %6, i64 noundef 1)
  %224 = load double, ptr %6, align 8, !tbaa !34
  %225 = fdiv double 1.000000e+00, %224
  store double %225, ptr %6, align 8, !tbaa !34
  %226 = load ptr, ptr %2, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.OSQPWorkspace, ptr %226, i32 0, i32 0
  %228 = load ptr, ptr %227, align 8, !tbaa !9
  %229 = getelementptr inbounds %struct.OSQPData, ptr %228, i32 0, i32 2
  %230 = load ptr, ptr %229, align 8, !tbaa !28
  %231 = load double, ptr %6, align 8, !tbaa !34
  call void @mat_mult_scalar(ptr noundef %230, double noundef %231)
  %232 = load ptr, ptr %2, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.OSQPWorkspace, ptr %232, i32 0, i32 0
  %234 = load ptr, ptr %233, align 8, !tbaa !9
  %235 = getelementptr inbounds %struct.OSQPData, ptr %234, i32 0, i32 4
  %236 = load ptr, ptr %235, align 8, !tbaa !33
  %237 = load double, ptr %6, align 8, !tbaa !34
  %238 = load i64, ptr %4, align 8, !tbaa !14
  call void @vec_mult_scalar(ptr noundef %236, double noundef %237, i64 noundef %238)
  %239 = load double, ptr %6, align 8, !tbaa !34
  %240 = load ptr, ptr %2, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.OSQPWorkspace, ptr %240, i32 0, i32 24
  %242 = load ptr, ptr %241, align 8, !tbaa !16
  %243 = getelementptr inbounds %struct.OSQPScaling, ptr %242, i32 0, i32 0
  %244 = load double, ptr %243, align 8, !tbaa !17
  %245 = fmul double %244, %239
  store double %245, ptr %243, align 8, !tbaa !17
  br label %246

246:                                              ; preds = %222
  %247 = load i64, ptr %3, align 8, !tbaa !14
  %248 = add nsw i64 %247, 1
  store i64 %248, ptr %3, align 8, !tbaa !14
  br label %62, !llvm.loop !35

249:                                              ; preds = %62
  %250 = load ptr, ptr %2, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.OSQPWorkspace, ptr %250, i32 0, i32 24
  %252 = load ptr, ptr %251, align 8, !tbaa !16
  %253 = getelementptr inbounds %struct.OSQPScaling, ptr %252, i32 0, i32 0
  %254 = load double, ptr %253, align 8, !tbaa !17
  %255 = fdiv double 1.000000e+00, %254
  %256 = load ptr, ptr %2, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.OSQPWorkspace, ptr %256, i32 0, i32 24
  %258 = load ptr, ptr %257, align 8, !tbaa !16
  %259 = getelementptr inbounds %struct.OSQPScaling, ptr %258, i32 0, i32 3
  store double %255, ptr %259, align 8, !tbaa !37
  %260 = load ptr, ptr %2, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.OSQPWorkspace, ptr %260, i32 0, i32 24
  %262 = load ptr, ptr %261, align 8, !tbaa !16
  %263 = getelementptr inbounds %struct.OSQPScaling, ptr %262, i32 0, i32 1
  %264 = load ptr, ptr %263, align 8, !tbaa !20
  %265 = load ptr, ptr %2, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.OSQPWorkspace, ptr %265, i32 0, i32 24
  %267 = load ptr, ptr %266, align 8, !tbaa !16
  %268 = getelementptr inbounds %struct.OSQPScaling, ptr %267, i32 0, i32 4
  %269 = load ptr, ptr %268, align 8, !tbaa !21
  %270 = load ptr, ptr %2, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.OSQPWorkspace, ptr %270, i32 0, i32 0
  %272 = load ptr, ptr %271, align 8, !tbaa !9
  %273 = getelementptr inbounds %struct.OSQPData, ptr %272, i32 0, i32 0
  %274 = load i64, ptr %273, align 8, !tbaa !12
  call void @vec_ew_recipr(ptr noundef %264, ptr noundef %269, i64 noundef %274)
  %275 = load ptr, ptr %2, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.OSQPWorkspace, ptr %275, i32 0, i32 24
  %277 = load ptr, ptr %276, align 8, !tbaa !16
  %278 = getelementptr inbounds %struct.OSQPScaling, ptr %277, i32 0, i32 2
  %279 = load ptr, ptr %278, align 8, !tbaa !22
  %280 = load ptr, ptr %2, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.OSQPWorkspace, ptr %280, i32 0, i32 24
  %282 = load ptr, ptr %281, align 8, !tbaa !16
  %283 = getelementptr inbounds %struct.OSQPScaling, ptr %282, i32 0, i32 5
  %284 = load ptr, ptr %283, align 8, !tbaa !23
  %285 = load ptr, ptr %2, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.OSQPWorkspace, ptr %285, i32 0, i32 0
  %287 = load ptr, ptr %286, align 8, !tbaa !9
  %288 = getelementptr inbounds %struct.OSQPData, ptr %287, i32 0, i32 1
  %289 = load i64, ptr %288, align 8, !tbaa !15
  call void @vec_ew_recipr(ptr noundef %279, ptr noundef %284, i64 noundef %289)
  %290 = load ptr, ptr %2, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.OSQPWorkspace, ptr %290, i32 0, i32 24
  %292 = load ptr, ptr %291, align 8, !tbaa !16
  %293 = getelementptr inbounds %struct.OSQPScaling, ptr %292, i32 0, i32 2
  %294 = load ptr, ptr %293, align 8, !tbaa !22
  %295 = load ptr, ptr %2, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.OSQPWorkspace, ptr %295, i32 0, i32 0
  %297 = load ptr, ptr %296, align 8, !tbaa !9
  %298 = getelementptr inbounds %struct.OSQPData, ptr %297, i32 0, i32 5
  %299 = load ptr, ptr %298, align 8, !tbaa !38
  %300 = load ptr, ptr %2, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.OSQPWorkspace, ptr %300, i32 0, i32 0
  %302 = load ptr, ptr %301, align 8, !tbaa !9
  %303 = getelementptr inbounds %struct.OSQPData, ptr %302, i32 0, i32 5
  %304 = load ptr, ptr %303, align 8, !tbaa !38
  %305 = load ptr, ptr %2, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.OSQPWorkspace, ptr %305, i32 0, i32 0
  %307 = load ptr, ptr %306, align 8, !tbaa !9
  %308 = getelementptr inbounds %struct.OSQPData, ptr %307, i32 0, i32 1
  %309 = load i64, ptr %308, align 8, !tbaa !15
  call void @vec_ew_prod(ptr noundef %294, ptr noundef %299, ptr noundef %304, i64 noundef %309)
  %310 = load ptr, ptr %2, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.OSQPWorkspace, ptr %310, i32 0, i32 24
  %312 = load ptr, ptr %311, align 8, !tbaa !16
  %313 = getelementptr inbounds %struct.OSQPScaling, ptr %312, i32 0, i32 2
  %314 = load ptr, ptr %313, align 8, !tbaa !22
  %315 = load ptr, ptr %2, align 8, !tbaa !5
  %316 = getelementptr inbounds %struct.OSQPWorkspace, ptr %315, i32 0, i32 0
  %317 = load ptr, ptr %316, align 8, !tbaa !9
  %318 = getelementptr inbounds %struct.OSQPData, ptr %317, i32 0, i32 6
  %319 = load ptr, ptr %318, align 8, !tbaa !39
  %320 = load ptr, ptr %2, align 8, !tbaa !5
  %321 = getelementptr inbounds %struct.OSQPWorkspace, ptr %320, i32 0, i32 0
  %322 = load ptr, ptr %321, align 8, !tbaa !9
  %323 = getelementptr inbounds %struct.OSQPData, ptr %322, i32 0, i32 6
  %324 = load ptr, ptr %323, align 8, !tbaa !39
  %325 = load ptr, ptr %2, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.OSQPWorkspace, ptr %325, i32 0, i32 0
  %327 = load ptr, ptr %326, align 8, !tbaa !9
  %328 = getelementptr inbounds %struct.OSQPData, ptr %327, i32 0, i32 1
  %329 = load i64, ptr %328, align 8, !tbaa !15
  call void @vec_ew_prod(ptr noundef %314, ptr noundef %319, ptr noundef %324, i64 noundef %329)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  ret i64 0
}

declare void @vec_set_scalar(ptr noundef, double noundef, i64 noundef) #2

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

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

declare void @mat_premult_diag(ptr noundef, ptr noundef) #2

declare void @mat_postmult_diag(ptr noundef, ptr noundef) #2

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

declare double @vec_mean(ptr noundef, i64 noundef) #2

declare double @vec_norm_inf(ptr noundef, i64 noundef) #2

declare void @mat_mult_scalar(ptr noundef, double noundef) #2

declare void @vec_mult_scalar(ptr noundef, double noundef, i64 noundef) #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 = { 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 }

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


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

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

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

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

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

declare void @mat_inf_norm_cols_sym_triu(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local noundef i64 @scale_data(ptr nocapture noundef readonly %0) local_unnamed_addr #0 {
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  %4 = load ptr, ptr %0, align 8, !tbaa !5
  %5 = load i64, ptr %4, align 8, !tbaa !11
  %6 = getelementptr inbounds i8, ptr %4, i64 8
  %7 = load i64, ptr %6, align 8, !tbaa !13
  %8 = getelementptr inbounds i8, ptr %0, i64 192
  %9 = load ptr, ptr %8, align 8, !tbaa !14
  store double 1.000000e+00, ptr %9, align 8, !tbaa !15
  %10 = getelementptr inbounds i8, ptr %9, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !18
  tail call void @vec_set_scalar(ptr noundef %11, double noundef 1.000000e+00, i64 noundef %5) #3
  %12 = load ptr, ptr %8, align 8, !tbaa !14
  %13 = getelementptr inbounds i8, ptr %12, i64 32
  %14 = load ptr, ptr %13, align 8, !tbaa !19
  %15 = load ptr, ptr %0, align 8, !tbaa !5
  %16 = load i64, ptr %15, align 8, !tbaa !11
  tail call void @vec_set_scalar(ptr noundef %14, double noundef 1.000000e+00, i64 noundef %16) #3
  %17 = load ptr, ptr %8, align 8, !tbaa !14
  %18 = getelementptr inbounds i8, ptr %17, i64 16
  %19 = load ptr, ptr %18, align 8, !tbaa !20
  %20 = load ptr, ptr %0, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 8
  %22 = load i64, ptr %21, align 8, !tbaa !13
  tail call void @vec_set_scalar(ptr noundef %19, double noundef 1.000000e+00, i64 noundef %22) #3
  %23 = load ptr, ptr %8, align 8, !tbaa !14
  %24 = getelementptr inbounds i8, ptr %23, i64 40
  %25 = load ptr, ptr %24, align 8, !tbaa !21
  %26 = load ptr, ptr %0, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %26, i64 8
  %28 = load i64, ptr %27, align 8, !tbaa !13
  tail call void @vec_set_scalar(ptr noundef %25, double noundef 1.000000e+00, i64 noundef %28) #3
  %29 = getelementptr inbounds i8, ptr %0, i64 184
  %30 = load ptr, ptr %29, align 8, !tbaa !22
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  %32 = load i64, ptr %31, align 8, !tbaa !23
  %33 = icmp sgt i64 %32, 0
  br i1 %33, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %1
  %.pre = load ptr, ptr %8, align 8, !tbaa !14
  %.pre80 = load double, ptr %.pre, align 8, !tbaa !15
  br label %._crit_edge

.lr.ph:                                           ; preds = %1
  %34 = getelementptr inbounds i8, ptr %0, i64 160
  %35 = getelementptr inbounds i8, ptr %0, i64 168
  %36 = getelementptr inbounds i8, ptr %0, i64 176
  br label %37

37:                                               ; preds = %.lr.ph, %37
  %.079 = phi i64 [ 0, %.lr.ph ], [ %107, %37 ]
  %38 = load ptr, ptr %0, align 8, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %38, i64 16
  %40 = load ptr, ptr %39, align 8, !tbaa !26
  %41 = getelementptr inbounds i8, ptr %38, i64 24
  %42 = load ptr, ptr %41, align 8, !tbaa !27
  %43 = load ptr, ptr %34, align 8, !tbaa !28
  %44 = load ptr, ptr %35, align 8, !tbaa !29
  %45 = load ptr, ptr %36, align 8, !tbaa !30
  call void @compute_inf_norm_cols_KKT(ptr noundef %40, ptr noundef %42, ptr noundef %43, ptr noundef %44, ptr noundef %45, i64 noundef %5)
  %46 = load ptr, ptr %34, align 8, !tbaa !28
  call void @limit_scaling(ptr noundef %46, i64 noundef %5)
  %47 = load ptr, ptr %36, align 8, !tbaa !30
  call void @limit_scaling(ptr noundef %47, i64 noundef %7)
  %48 = load ptr, ptr %34, align 8, !tbaa !28
  call void @vec_ew_sqrt(ptr noundef %48, i64 noundef %5) #3
  %49 = load ptr, ptr %36, align 8, !tbaa !30
  call void @vec_ew_sqrt(ptr noundef %49, i64 noundef %7) #3
  %50 = load ptr, ptr %34, align 8, !tbaa !28
  call void @vec_ew_recipr(ptr noundef %50, ptr noundef %50, i64 noundef %5) #3
  %51 = load ptr, ptr %36, align 8, !tbaa !30
  call void @vec_ew_recipr(ptr noundef %51, ptr noundef %51, i64 noundef %7) #3
  %52 = load ptr, ptr %0, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %52, i64 16
  %54 = load ptr, ptr %53, align 8, !tbaa !26
  %55 = load ptr, ptr %34, align 8, !tbaa !28
  call void @mat_premult_diag(ptr noundef %54, ptr noundef %55) #3
  %56 = load ptr, ptr %0, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %56, i64 16
  %58 = load ptr, ptr %57, align 8, !tbaa !26
  %59 = load ptr, ptr %34, align 8, !tbaa !28
  call void @mat_postmult_diag(ptr noundef %58, ptr noundef %59) #3
  %60 = load ptr, ptr %0, align 8, !tbaa !5
  %61 = getelementptr inbounds i8, ptr %60, i64 24
  %62 = load ptr, ptr %61, align 8, !tbaa !27
  %63 = load ptr, ptr %36, align 8, !tbaa !30
  call void @mat_premult_diag(ptr noundef %62, ptr noundef %63) #3
  %64 = load ptr, ptr %0, align 8, !tbaa !5
  %65 = getelementptr inbounds i8, ptr %64, i64 24
  %66 = load ptr, ptr %65, align 8, !tbaa !27
  %67 = load ptr, ptr %34, align 8, !tbaa !28
  call void @mat_postmult_diag(ptr noundef %66, ptr noundef %67) #3
  %68 = load ptr, ptr %34, align 8, !tbaa !28
  %69 = load ptr, ptr %0, align 8, !tbaa !5
  %70 = getelementptr inbounds i8, ptr %69, i64 32
  %71 = load ptr, ptr %70, align 8, !tbaa !31
  call void @vec_ew_prod(ptr noundef %68, ptr noundef %71, ptr noundef %71, i64 noundef %5) #3
  %72 = load ptr, ptr %8, align 8, !tbaa !14
  %73 = getelementptr inbounds i8, ptr %72, i64 8
  %74 = load ptr, ptr %73, align 8, !tbaa !18
  %75 = load ptr, ptr %34, align 8, !tbaa !28
  call void @vec_ew_prod(ptr noundef %74, ptr noundef %75, ptr noundef %74, i64 noundef %5) #3
  %76 = load ptr, ptr %8, align 8, !tbaa !14
  %77 = getelementptr inbounds i8, ptr %76, i64 16
  %78 = load ptr, ptr %77, align 8, !tbaa !20
  %79 = load ptr, ptr %36, align 8, !tbaa !30
  call void @vec_ew_prod(ptr noundef %78, ptr noundef %79, ptr noundef %78, i64 noundef %7) #3
  %80 = load ptr, ptr %0, align 8, !tbaa !5
  %81 = getelementptr inbounds i8, ptr %80, i64 16
  %82 = load ptr, ptr %81, align 8, !tbaa !26
  %83 = load ptr, ptr %34, align 8, !tbaa !28
  call void @mat_inf_norm_cols_sym_triu(ptr noundef %82, ptr noundef %83) #3
  %84 = load ptr, ptr %34, align 8, !tbaa !28
  %85 = call double @vec_mean(ptr noundef %84, i64 noundef %5) #3
  store double %85, ptr %2, align 8, !tbaa !32
  %86 = load ptr, ptr %0, align 8, !tbaa !5
  %87 = getelementptr inbounds i8, ptr %86, i64 32
  %88 = load ptr, ptr %87, align 8, !tbaa !31
  %89 = call double @vec_norm_inf(ptr noundef %88, i64 noundef %5) #3
  store double %89, ptr %3, align 8, !tbaa !32
  call void @limit_scaling(ptr noundef nonnull %3, i64 noundef 1)
  %90 = load double, ptr %2, align 8
  %91 = load double, ptr %3, align 8
  %92 = fcmp ogt double %90, %91
  %93 = select i1 %92, double %90, double %91
  store double %93, ptr %2, align 8, !tbaa !32
  call void @limit_scaling(ptr noundef nonnull %2, i64 noundef 1)
  %94 = load double, ptr %2, align 8, !tbaa !32
  %95 = fdiv double 1.000000e+00, %94
  store double %95, ptr %2, align 8, !tbaa !32
  %96 = load ptr, ptr %0, align 8, !tbaa !5
  %97 = getelementptr inbounds i8, ptr %96, i64 16
  %98 = load ptr, ptr %97, align 8, !tbaa !26
  call void @mat_mult_scalar(ptr noundef %98, double noundef %95) #3
  %99 = load ptr, ptr %0, align 8, !tbaa !5
  %100 = getelementptr inbounds i8, ptr %99, i64 32
  %101 = load ptr, ptr %100, align 8, !tbaa !31
  %102 = load double, ptr %2, align 8, !tbaa !32
  call void @vec_mult_scalar(ptr noundef %101, double noundef %102, i64 noundef %5) #3
  %103 = load double, ptr %2, align 8, !tbaa !32
  %104 = load ptr, ptr %8, align 8, !tbaa !14
  %105 = load double, ptr %104, align 8, !tbaa !15
  %106 = fmul double %103, %105
  store double %106, ptr %104, align 8, !tbaa !15
  %107 = add nuw nsw i64 %.079, 1
  %108 = load ptr, ptr %29, align 8, !tbaa !22
  %109 = getelementptr inbounds i8, ptr %108, i64 16
  %110 = load i64, ptr %109, align 8, !tbaa !23
  %111 = icmp slt i64 %107, %110
  br i1 %111, label %37, label %._crit_edge, !llvm.loop !33

._crit_edge:                                      ; preds = %37, %.._crit_edge_crit_edge
  %112 = phi double [ %.pre80, %.._crit_edge_crit_edge ], [ %106, %37 ]
  %113 = phi ptr [ %.pre, %.._crit_edge_crit_edge ], [ %104, %37 ]
  %114 = fdiv double 1.000000e+00, %112
  %115 = getelementptr inbounds i8, ptr %113, i64 24
  store double %114, ptr %115, align 8, !tbaa !35
  %116 = getelementptr inbounds i8, ptr %113, i64 8
  %117 = load ptr, ptr %116, align 8, !tbaa !18
  %118 = getelementptr inbounds i8, ptr %113, i64 32
  %119 = load ptr, ptr %118, align 8, !tbaa !19
  %120 = load ptr, ptr %0, align 8, !tbaa !5
  %121 = load i64, ptr %120, align 8, !tbaa !11
  call void @vec_ew_recipr(ptr noundef %117, ptr noundef %119, i64 noundef %121) #3
  %122 = load ptr, ptr %8, align 8, !tbaa !14
  %123 = getelementptr inbounds i8, ptr %122, i64 16
  %124 = load ptr, ptr %123, align 8, !tbaa !20
  %125 = getelementptr inbounds i8, ptr %122, i64 40
  %126 = load ptr, ptr %125, align 8, !tbaa !21
  %127 = load ptr, ptr %0, align 8, !tbaa !5
  %128 = getelementptr inbounds i8, ptr %127, i64 8
  %129 = load i64, ptr %128, align 8, !tbaa !13
  call void @vec_ew_recipr(ptr noundef %124, ptr noundef %126, i64 noundef %129) #3
  %130 = load ptr, ptr %8, align 8, !tbaa !14
  %131 = getelementptr inbounds i8, ptr %130, i64 16
  %132 = load ptr, ptr %131, align 8, !tbaa !20
  %133 = load ptr, ptr %0, align 8, !tbaa !5
  %134 = getelementptr inbounds i8, ptr %133, i64 40
  %135 = load ptr, ptr %134, align 8, !tbaa !36
  %136 = getelementptr inbounds i8, ptr %133, i64 8
  %137 = load i64, ptr %136, align 8, !tbaa !13
  call void @vec_ew_prod(ptr noundef %132, ptr noundef %135, ptr noundef %135, i64 noundef %137) #3
  %138 = load ptr, ptr %8, align 8, !tbaa !14
  %139 = getelementptr inbounds i8, ptr %138, i64 16
  %140 = load ptr, ptr %139, align 8, !tbaa !20
  %141 = load ptr, ptr %0, align 8, !tbaa !5
  %142 = getelementptr inbounds i8, ptr %141, i64 48
  %143 = load ptr, ptr %142, align 8, !tbaa !37
  %144 = getelementptr inbounds i8, ptr %141, i64 8
  %145 = load i64, ptr %144, align 8, !tbaa !13
  call void @vec_ew_prod(ptr noundef %140, ptr noundef %143, ptr noundef %143, i64 noundef %145) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #3
  ret i64 0
}

declare void @vec_set_scalar(ptr noundef, double noundef, i64 noundef) local_unnamed_addr #2

declare void @vec_ew_sqrt(ptr noundef, i64 noundef) local_unnamed_addr #2

declare void @vec_ew_recipr(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare void @mat_premult_diag(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @mat_postmult_diag(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @vec_ew_prod(ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare double @vec_mean(ptr noundef, i64 noundef) local_unnamed_addr #2

declare double @vec_norm_inf(ptr noundef, i64 noundef) local_unnamed_addr #2

declare void @mat_mult_scalar(ptr noundef, double noundef) local_unnamed_addr #2

declare void @vec_mult_scalar(ptr noundef, double noundef, i64 noundef) local_unnamed_addr #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 = { mustprogress 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 }

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


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