; LLVM IR from Zhefan-Xu/Intent-MPC :: trajectory_planner/include/trajectory_planner/mpc_solver (acado_solver)

; 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.ACADOvariables_ = type { i32, [248 x double], [150 x double], [5611 x double], [240 x double], [3 x double], [8 x double], [150 x double], [150 x double], [1230 x double], [1230 x double] }
%struct.ACADOworkspace_ = type { double, [298 x double], [448 x double], [298 x double], [240 x double], [3 x double], [1920 x double], [1200 x double], [194 x double], [8 x double], [1183 x double], [194 x double], [574 x double], [1230 x double], [9840 x double], [6150 x double], [8 x double], [64 x double], [18600 x double], [18600 x double], [248 x double], [1200 x double], [9840 x double], [1230 x double], [22500 x double], [184500 x double], [150 x double], [150 x double], [150 x double], [1230 x double], [1230 x double], [150 x double], [1380 x double] }

@acadoVariables = external global %struct.ACADOvariables_, align 8
@acadoWorkspace = external global %struct.ACADOworkspace_, align 8

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @acado_evaluateLSQ(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @acado_evaluateLSQEndTerm(ptr noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local double @acado_getObjective() #1 {
  %1 = alloca double, align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca [8 x double], align 16
  %5 = alloca [3 x double], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 64, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #3
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %6

6:                                                ; preds = %207, %0
  %7 = load i32, ptr %2, align 4, !tbaa !5
  %8 = icmp slt i32 %7, 30
  br i1 %8, label %9, label %210

9:                                                ; preds = %6
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = mul nsw i32 %10, 8
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 %12
  %14 = load double, ptr %13, align 8, !tbaa !9
  store double %14, ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), align 8, !tbaa !9
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = mul nsw i32 %15, 8
  %17 = add nsw i32 %16, 1
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 %18
  %20 = load double, ptr %19, align 8, !tbaa !9
  store double %20, ptr getelementptr inbounds ([194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 1), align 8, !tbaa !9
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = mul nsw i32 %21, 8
  %23 = add nsw i32 %22, 2
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 %24
  %26 = load double, ptr %25, align 8, !tbaa !9
  store double %26, ptr getelementptr inbounds ([194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 2), align 8, !tbaa !9
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = mul nsw i32 %27, 8
  %29 = add nsw i32 %28, 3
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 %30
  %32 = load double, ptr %31, align 8, !tbaa !9
  store double %32, ptr getelementptr inbounds ([194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 3), align 8, !tbaa !9
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = mul nsw i32 %33, 8
  %35 = add nsw i32 %34, 4
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 %36
  %38 = load double, ptr %37, align 8, !tbaa !9
  store double %38, ptr getelementptr inbounds ([194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 4), align 8, !tbaa !9
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = mul nsw i32 %39, 8
  %41 = add nsw i32 %40, 5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 %42
  %44 = load double, ptr %43, align 8, !tbaa !9
  store double %44, ptr getelementptr inbounds ([194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 5), align 8, !tbaa !9
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = mul nsw i32 %45, 8
  %47 = add nsw i32 %46, 6
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 %48
  %50 = load double, ptr %49, align 8, !tbaa !9
  store double %50, ptr getelementptr inbounds ([194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 6), align 8, !tbaa !9
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = mul nsw i32 %51, 8
  %53 = add nsw i32 %52, 7
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 %54
  %56 = load double, ptr %55, align 8, !tbaa !9
  store double %56, ptr getelementptr inbounds ([194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 7), align 8, !tbaa !9
  %57 = load i32, ptr %2, align 4, !tbaa !5
  %58 = mul nsw i32 %57, 5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [150 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 2), i64 0, i64 %59
  %61 = load double, ptr %60, align 8, !tbaa !9
  store double %61, ptr getelementptr inbounds ([194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 8), align 8, !tbaa !9
  %62 = load i32, ptr %2, align 4, !tbaa !5
  %63 = mul nsw i32 %62, 5
  %64 = add nsw i32 %63, 1
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [150 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 2), i64 0, i64 %65
  %67 = load double, ptr %66, align 8, !tbaa !9
  store double %67, ptr getelementptr inbounds ([194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 9), align 8, !tbaa !9
  %68 = load i32, ptr %2, align 4, !tbaa !5
  %69 = mul nsw i32 %68, 5
  %70 = add nsw i32 %69, 2
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [150 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 2), i64 0, i64 %71
  %73 = load double, ptr %72, align 8, !tbaa !9
  store double %73, ptr getelementptr inbounds ([194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 10), align 8, !tbaa !9
  %74 = load i32, ptr %2, align 4, !tbaa !5
  %75 = mul nsw i32 %74, 5
  %76 = add nsw i32 %75, 3
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [150 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 2), i64 0, i64 %77
  %79 = load double, ptr %78, align 8, !tbaa !9
  store double %79, ptr getelementptr inbounds ([194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 11), align 8, !tbaa !9
  %80 = load i32, ptr %2, align 4, !tbaa !5
  %81 = mul nsw i32 %80, 5
  %82 = add nsw i32 %81, 4
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [150 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 2), i64 0, i64 %83
  %85 = load double, ptr %84, align 8, !tbaa !9
  store double %85, ptr getelementptr inbounds ([194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 12), align 8, !tbaa !9
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %101, %9
  %87 = load i32, ptr %3, align 4, !tbaa !5
  %88 = icmp slt i32 %87, 181
  br i1 %88, label %89, label %104

89:                                               ; preds = %86
  %90 = load i32, ptr %2, align 4, !tbaa !5
  %91 = mul nsw i32 %90, 181
  %92 = load i32, ptr %3, align 4, !tbaa !5
  %93 = add nsw i32 %91, %92
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [5611 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 3), i64 0, i64 %94
  %96 = load double, ptr %95, align 8, !tbaa !9
  %97 = load i32, ptr %3, align 4, !tbaa !5
  %98 = add nsw i32 %97, 13
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 %99
  store double %96, ptr %100, align 8, !tbaa !9
  br label %101

101:                                              ; preds = %89
  %102 = load i32, ptr %3, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %3, align 4, !tbaa !5
  br label %86, !llvm.loop !11

104:                                              ; preds = %86
  call void @acado_evaluateLSQ(ptr noundef getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), ptr noundef getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 9))
  %105 = load double, ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 9), align 8, !tbaa !9
  %106 = load i32, ptr %2, align 4, !tbaa !5
  %107 = mul nsw i32 %106, 8
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 4), i64 0, i64 %108
  %110 = load double, ptr %109, align 8, !tbaa !9
  %111 = fsub double %105, %110
  %112 = load i32, ptr %2, align 4, !tbaa !5
  %113 = mul nsw i32 %112, 8
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %114
  store double %111, ptr %115, align 8, !tbaa !9
  %116 = load double, ptr getelementptr inbounds ([8 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 9), i64 0, i64 1), align 8, !tbaa !9
  %117 = load i32, ptr %2, align 4, !tbaa !5
  %118 = mul nsw i32 %117, 8
  %119 = add nsw i32 %118, 1
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 4), i64 0, i64 %120
  %122 = load double, ptr %121, align 8, !tbaa !9
  %123 = fsub double %116, %122
  %124 = load i32, ptr %2, align 4, !tbaa !5
  %125 = mul nsw i32 %124, 8
  %126 = add nsw i32 %125, 1
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %127
  store double %123, ptr %128, align 8, !tbaa !9
  %129 = load double, ptr getelementptr inbounds ([8 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 9), i64 0, i64 2), align 8, !tbaa !9
  %130 = load i32, ptr %2, align 4, !tbaa !5
  %131 = mul nsw i32 %130, 8
  %132 = add nsw i32 %131, 2
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 4), i64 0, i64 %133
  %135 = load double, ptr %134, align 8, !tbaa !9
  %136 = fsub double %129, %135
  %137 = load i32, ptr %2, align 4, !tbaa !5
  %138 = mul nsw i32 %137, 8
  %139 = add nsw i32 %138, 2
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %140
  store double %136, ptr %141, align 8, !tbaa !9
  %142 = load double, ptr getelementptr inbounds ([8 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 9), i64 0, i64 3), align 8, !tbaa !9
  %143 = load i32, ptr %2, align 4, !tbaa !5
  %144 = mul nsw i32 %143, 8
  %145 = add nsw i32 %144, 3
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 4), i64 0, i64 %146
  %148 = load double, ptr %147, align 8, !tbaa !9
  %149 = fsub double %142, %148
  %150 = load i32, ptr %2, align 4, !tbaa !5
  %151 = mul nsw i32 %150, 8
  %152 = add nsw i32 %151, 3
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %153
  store double %149, ptr %154, align 8, !tbaa !9
  %155 = load double, ptr getelementptr inbounds ([8 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 9), i64 0, i64 4), align 8, !tbaa !9
  %156 = load i32, ptr %2, align 4, !tbaa !5
  %157 = mul nsw i32 %156, 8
  %158 = add nsw i32 %157, 4
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 4), i64 0, i64 %159
  %161 = load double, ptr %160, align 8, !tbaa !9
  %162 = fsub double %155, %161
  %163 = load i32, ptr %2, align 4, !tbaa !5
  %164 = mul nsw i32 %163, 8
  %165 = add nsw i32 %164, 4
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %166
  store double %162, ptr %167, align 8, !tbaa !9
  %168 = load double, ptr getelementptr inbounds ([8 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 9), i64 0, i64 5), align 8, !tbaa !9
  %169 = load i32, ptr %2, align 4, !tbaa !5
  %170 = mul nsw i32 %169, 8
  %171 = add nsw i32 %170, 5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 4), i64 0, i64 %172
  %174 = load double, ptr %173, align 8, !tbaa !9
  %175 = fsub double %168, %174
  %176 = load i32, ptr %2, align 4, !tbaa !5
  %177 = mul nsw i32 %176, 8
  %178 = add nsw i32 %177, 5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %179
  store double %175, ptr %180, align 8, !tbaa !9
  %181 = load double, ptr getelementptr inbounds ([8 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 9), i64 0, i64 6), align 8, !tbaa !9
  %182 = load i32, ptr %2, align 4, !tbaa !5
  %183 = mul nsw i32 %182, 8
  %184 = add nsw i32 %183, 6
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 4), i64 0, i64 %185
  %187 = load double, ptr %186, align 8, !tbaa !9
  %188 = fsub double %181, %187
  %189 = load i32, ptr %2, align 4, !tbaa !5
  %190 = mul nsw i32 %189, 8
  %191 = add nsw i32 %190, 6
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %192
  store double %188, ptr %193, align 8, !tbaa !9
  %194 = load double, ptr getelementptr inbounds ([8 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 9), i64 0, i64 7), align 8, !tbaa !9
  %195 = load i32, ptr %2, align 4, !tbaa !5
  %196 = mul nsw i32 %195, 8
  %197 = add nsw i32 %196, 7
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 4), i64 0, i64 %198
  %200 = load double, ptr %199, align 8, !tbaa !9
  %201 = fsub double %194, %200
  %202 = load i32, ptr %2, align 4, !tbaa !5
  %203 = mul nsw i32 %202, 8
  %204 = add nsw i32 %203, 7
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %205
  store double %201, ptr %206, align 8, !tbaa !9
  br label %207

207:                                              ; preds = %104
  %208 = load i32, ptr %2, align 4, !tbaa !5
  %209 = add nsw i32 %208, 1
  store i32 %209, ptr %2, align 4, !tbaa !5
  br label %6, !llvm.loop !13

210:                                              ; preds = %6
  %211 = load double, ptr getelementptr inbounds ([248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 240), align 8, !tbaa !9
  store double %211, ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), align 8, !tbaa !9
  %212 = load double, ptr getelementptr inbounds ([248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 241), align 8, !tbaa !9
  store double %212, ptr getelementptr inbounds ([194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 1), align 8, !tbaa !9
  %213 = load double, ptr getelementptr inbounds ([248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 242), align 8, !tbaa !9
  store double %213, ptr getelementptr inbounds ([194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 2), align 8, !tbaa !9
  %214 = load double, ptr getelementptr inbounds ([248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 243), align 8, !tbaa !9
  store double %214, ptr getelementptr inbounds ([194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 3), align 8, !tbaa !9
  %215 = load double, ptr getelementptr inbounds ([248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 244), align 8, !tbaa !9
  store double %215, ptr getelementptr inbounds ([194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 4), align 8, !tbaa !9
  %216 = load double, ptr getelementptr inbounds ([248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 245), align 8, !tbaa !9
  store double %216, ptr getelementptr inbounds ([194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 5), align 8, !tbaa !9
  %217 = load double, ptr getelementptr inbounds ([248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 246), align 8, !tbaa !9
  store double %217, ptr getelementptr inbounds ([194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 6), align 8, !tbaa !9
  %218 = load double, ptr getelementptr inbounds ([248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 247), align 8, !tbaa !9
  store double %218, ptr getelementptr inbounds ([194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 7), align 8, !tbaa !9
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %219

219:                                              ; preds = %232, %210
  %220 = load i32, ptr %3, align 4, !tbaa !5
  %221 = icmp slt i32 %220, 181
  br i1 %221, label %222, label %235

222:                                              ; preds = %219
  %223 = load i32, ptr %3, align 4, !tbaa !5
  %224 = add nsw i32 %223, 5430
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [5611 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 3), i64 0, i64 %225
  %227 = load double, ptr %226, align 8, !tbaa !9
  %228 = load i32, ptr %3, align 4, !tbaa !5
  %229 = add nsw i32 %228, 8
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 %230
  store double %227, ptr %231, align 8, !tbaa !9
  br label %232

232:                                              ; preds = %222
  %233 = load i32, ptr %3, align 4, !tbaa !5
  %234 = add nsw i32 %233, 1
  store i32 %234, ptr %3, align 4, !tbaa !5
  br label %219, !llvm.loop !14

235:                                              ; preds = %219
  call void @acado_evaluateLSQEndTerm(ptr noundef getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), ptr noundef getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 9))
  %236 = load double, ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 9), align 8, !tbaa !9
  %237 = load double, ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 5), align 8, !tbaa !9
  %238 = fsub double %236, %237
  store double %238, ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 5), align 8, !tbaa !9
  %239 = load double, ptr getelementptr inbounds ([8 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 9), i64 0, i64 1), align 8, !tbaa !9
  %240 = load double, ptr getelementptr inbounds ([3 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 5), i64 0, i64 1), align 8, !tbaa !9
  %241 = fsub double %239, %240
  store double %241, ptr getelementptr inbounds ([3 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 5), i64 0, i64 1), align 8, !tbaa !9
  %242 = load double, ptr getelementptr inbounds ([8 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 9), i64 0, i64 2), align 8, !tbaa !9
  %243 = load double, ptr getelementptr inbounds ([3 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 5), i64 0, i64 2), align 8, !tbaa !9
  %244 = fsub double %242, %243
  store double %244, ptr getelementptr inbounds ([3 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 5), i64 0, i64 2), align 8, !tbaa !9
  store double 0.000000e+00, ptr %1, align 8, !tbaa !9
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %245

245:                                              ; preds = %382, %235
  %246 = load i32, ptr %2, align 4, !tbaa !5
  %247 = icmp slt i32 %246, 30
  br i1 %247, label %248, label %385

248:                                              ; preds = %245
  %249 = load i32, ptr %2, align 4, !tbaa !5
  %250 = mul nsw i32 %249, 8
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %251
  %253 = load double, ptr %252, align 8, !tbaa !9
  %254 = fmul double %253, 1.000000e+01
  %255 = getelementptr inbounds [8 x double], ptr %4, i64 0, i64 0
  store double %254, ptr %255, align 16, !tbaa !9
  %256 = load i32, ptr %2, align 4, !tbaa !5
  %257 = mul nsw i32 %256, 8
  %258 = add nsw i32 %257, 1
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %259
  %261 = load double, ptr %260, align 8, !tbaa !9
  %262 = fmul double %261, 1.000000e+01
  %263 = getelementptr inbounds [8 x double], ptr %4, i64 0, i64 1
  store double %262, ptr %263, align 8, !tbaa !9
  %264 = load i32, ptr %2, align 4, !tbaa !5
  %265 = mul nsw i32 %264, 8
  %266 = add nsw i32 %265, 2
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %267
  %269 = load double, ptr %268, align 8, !tbaa !9
  %270 = fmul double %269, 1.000000e+01
  %271 = getelementptr inbounds [8 x double], ptr %4, i64 0, i64 2
  store double %270, ptr %271, align 16, !tbaa !9
  %272 = load i32, ptr %2, align 4, !tbaa !5
  %273 = mul nsw i32 %272, 8
  %274 = add nsw i32 %273, 3
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %275
  %277 = load double, ptr %276, align 8, !tbaa !9
  %278 = getelementptr inbounds [8 x double], ptr %4, i64 0, i64 3
  store double %277, ptr %278, align 8, !tbaa !9
  %279 = load i32, ptr %2, align 4, !tbaa !5
  %280 = mul nsw i32 %279, 8
  %281 = add nsw i32 %280, 4
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %282
  %284 = load double, ptr %283, align 8, !tbaa !9
  %285 = getelementptr inbounds [8 x double], ptr %4, i64 0, i64 4
  store double %284, ptr %285, align 16, !tbaa !9
  %286 = load i32, ptr %2, align 4, !tbaa !5
  %287 = mul nsw i32 %286, 8
  %288 = add nsw i32 %287, 5
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %289
  %291 = load double, ptr %290, align 8, !tbaa !9
  %292 = getelementptr inbounds [8 x double], ptr %4, i64 0, i64 5
  store double %291, ptr %292, align 8, !tbaa !9
  %293 = load i32, ptr %2, align 4, !tbaa !5
  %294 = mul nsw i32 %293, 8
  %295 = add nsw i32 %294, 6
  %296 = sext i32 %295 to i64
  %297 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %296
  %298 = load double, ptr %297, align 8, !tbaa !9
  %299 = fmul double %298, 1.000000e+02
  %300 = getelementptr inbounds [8 x double], ptr %4, i64 0, i64 6
  store double %299, ptr %300, align 16, !tbaa !9
  %301 = load i32, ptr %2, align 4, !tbaa !5
  %302 = mul nsw i32 %301, 8
  %303 = add nsw i32 %302, 7
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %304
  %306 = load double, ptr %305, align 8, !tbaa !9
  %307 = fmul double %306, 1.000000e+03
  %308 = getelementptr inbounds [8 x double], ptr %4, i64 0, i64 7
  store double %307, ptr %308, align 8, !tbaa !9
  %309 = load i32, ptr %2, align 4, !tbaa !5
  %310 = mul nsw i32 %309, 8
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %311
  %313 = load double, ptr %312, align 8, !tbaa !9
  %314 = getelementptr inbounds [8 x double], ptr %4, i64 0, i64 0
  %315 = load double, ptr %314, align 16, !tbaa !9
  %316 = load i32, ptr %2, align 4, !tbaa !5
  %317 = mul nsw i32 %316, 8
  %318 = add nsw i32 %317, 1
  %319 = sext i32 %318 to i64
  %320 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %319
  %321 = load double, ptr %320, align 8, !tbaa !9
  %322 = getelementptr inbounds [8 x double], ptr %4, i64 0, i64 1
  %323 = load double, ptr %322, align 8, !tbaa !9
  %324 = fmul double %321, %323
  %325 = call double @llvm.fmuladd.f64(double %313, double %315, double %324)
  %326 = load i32, ptr %2, align 4, !tbaa !5
  %327 = mul nsw i32 %326, 8
  %328 = add nsw i32 %327, 2
  %329 = sext i32 %328 to i64
  %330 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %329
  %331 = load double, ptr %330, align 8, !tbaa !9
  %332 = getelementptr inbounds [8 x double], ptr %4, i64 0, i64 2
  %333 = load double, ptr %332, align 16, !tbaa !9
  %334 = call double @llvm.fmuladd.f64(double %331, double %333, double %325)
  %335 = load i32, ptr %2, align 4, !tbaa !5
  %336 = mul nsw i32 %335, 8
  %337 = add nsw i32 %336, 3
  %338 = sext i32 %337 to i64
  %339 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %338
  %340 = load double, ptr %339, align 8, !tbaa !9
  %341 = getelementptr inbounds [8 x double], ptr %4, i64 0, i64 3
  %342 = load double, ptr %341, align 8, !tbaa !9
  %343 = call double @llvm.fmuladd.f64(double %340, double %342, double %334)
  %344 = load i32, ptr %2, align 4, !tbaa !5
  %345 = mul nsw i32 %344, 8
  %346 = add nsw i32 %345, 4
  %347 = sext i32 %346 to i64
  %348 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %347
  %349 = load double, ptr %348, align 8, !tbaa !9
  %350 = getelementptr inbounds [8 x double], ptr %4, i64 0, i64 4
  %351 = load double, ptr %350, align 16, !tbaa !9
  %352 = call double @llvm.fmuladd.f64(double %349, double %351, double %343)
  %353 = load i32, ptr %2, align 4, !tbaa !5
  %354 = mul nsw i32 %353, 8
  %355 = add nsw i32 %354, 5
  %356 = sext i32 %355 to i64
  %357 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %356
  %358 = load double, ptr %357, align 8, !tbaa !9
  %359 = getelementptr inbounds [8 x double], ptr %4, i64 0, i64 5
  %360 = load double, ptr %359, align 8, !tbaa !9
  %361 = call double @llvm.fmuladd.f64(double %358, double %360, double %352)
  %362 = load i32, ptr %2, align 4, !tbaa !5
  %363 = mul nsw i32 %362, 8
  %364 = add nsw i32 %363, 6
  %365 = sext i32 %364 to i64
  %366 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %365
  %367 = load double, ptr %366, align 8, !tbaa !9
  %368 = getelementptr inbounds [8 x double], ptr %4, i64 0, i64 6
  %369 = load double, ptr %368, align 16, !tbaa !9
  %370 = call double @llvm.fmuladd.f64(double %367, double %369, double %361)
  %371 = load i32, ptr %2, align 4, !tbaa !5
  %372 = mul nsw i32 %371, 8
  %373 = add nsw i32 %372, 7
  %374 = sext i32 %373 to i64
  %375 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %374
  %376 = load double, ptr %375, align 8, !tbaa !9
  %377 = getelementptr inbounds [8 x double], ptr %4, i64 0, i64 7
  %378 = load double, ptr %377, align 8, !tbaa !9
  %379 = call double @llvm.fmuladd.f64(double %376, double %378, double %370)
  %380 = load double, ptr %1, align 8, !tbaa !9
  %381 = fadd double %380, %379
  store double %381, ptr %1, align 8, !tbaa !9
  br label %382

382:                                              ; preds = %248
  %383 = load i32, ptr %2, align 4, !tbaa !5
  %384 = add nsw i32 %383, 1
  store i32 %384, ptr %2, align 4, !tbaa !5
  br label %245, !llvm.loop !15

385:                                              ; preds = %245
  %386 = load double, ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 5), align 8, !tbaa !9
  %387 = fmul double %386, 1.000000e+01
  %388 = getelementptr inbounds [3 x double], ptr %5, i64 0, i64 0
  store double %387, ptr %388, align 16, !tbaa !9
  %389 = load double, ptr getelementptr inbounds ([3 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 5), i64 0, i64 1), align 8, !tbaa !9
  %390 = fmul double %389, 1.000000e+01
  %391 = getelementptr inbounds [3 x double], ptr %5, i64 0, i64 1
  store double %390, ptr %391, align 8, !tbaa !9
  %392 = load double, ptr getelementptr inbounds ([3 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 5), i64 0, i64 2), align 8, !tbaa !9
  %393 = fmul double %392, 1.000000e+01
  %394 = getelementptr inbounds [3 x double], ptr %5, i64 0, i64 2
  store double %393, ptr %394, align 16, !tbaa !9
  %395 = load double, ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 5), align 8, !tbaa !9
  %396 = getelementptr inbounds [3 x double], ptr %5, i64 0, i64 0
  %397 = load double, ptr %396, align 16, !tbaa !9
  %398 = load double, ptr getelementptr inbounds ([3 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 5), i64 0, i64 1), align 8, !tbaa !9
  %399 = getelementptr inbounds [3 x double], ptr %5, i64 0, i64 1
  %400 = load double, ptr %399, align 8, !tbaa !9
  %401 = fmul double %398, %400
  %402 = call double @llvm.fmuladd.f64(double %395, double %397, double %401)
  %403 = load double, ptr getelementptr inbounds ([3 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 5), i64 0, i64 2), align 8, !tbaa !9
  %404 = getelementptr inbounds [3 x double], ptr %5, i64 0, i64 2
  %405 = load double, ptr %404, align 16, !tbaa !9
  %406 = call double @llvm.fmuladd.f64(double %403, double %405, double %402)
  %407 = load double, ptr %1, align 8, !tbaa !9
  %408 = fadd double %407, %406
  store double %408, ptr %1, align 8, !tbaa !9
  %409 = load double, ptr %1, align 8, !tbaa !9
  %410 = fmul double %409, 5.000000e-01
  store double %410, ptr %1, align 8, !tbaa !9
  %411 = load double, ptr %1, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 64, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #3
  ret double %411
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


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

%struct.ACADOvariables_ = type { i32, [248 x double], [150 x double], [5611 x double], [240 x double], [3 x double], [8 x double], [150 x double], [150 x double], [1230 x double], [1230 x double] }
%struct.ACADOworkspace_ = type { double, [298 x double], [448 x double], [298 x double], [240 x double], [3 x double], [1920 x double], [1200 x double], [194 x double], [8 x double], [1183 x double], [194 x double], [574 x double], [1230 x double], [9840 x double], [6150 x double], [8 x double], [64 x double], [18600 x double], [18600 x double], [248 x double], [1200 x double], [9840 x double], [1230 x double], [22500 x double], [184500 x double], [150 x double], [150 x double], [150 x double], [1230 x double], [1230 x double], [150 x double], [1380 x double] }

@acadoVariables = external local_unnamed_addr global %struct.ACADOvariables_, align 8
@acadoWorkspace = external global %struct.ACADOworkspace_, align 8

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

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

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

; Function Attrs: nounwind uwtable
define dso_local double @acado_getObjective() local_unnamed_addr #0 {
  br label %1

1:                                                ; preds = %0, %1
  %indvar = phi i64 [ 0, %0 ], [ %indvar.next, %1 ]
  %2 = mul nuw nsw i64 %indvar, 1448
  %gep = getelementptr i8, ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 3192), i64 %2
  %3 = shl nuw nsw i64 %indvar, 3
  %4 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 8), i64 0, i64 %3
  %5 = load <2 x double>, ptr %4, align 8, !tbaa !5
  store <2 x double> %5, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 35264), align 8, !tbaa !5
  %6 = or disjoint i64 %3, 2
  %7 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 8), i64 0, i64 %6
  %8 = load <2 x double>, ptr %7, align 8, !tbaa !5
  store <2 x double> %8, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 35280), align 8, !tbaa !5
  %9 = or disjoint i64 %3, 4
  %10 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 8), i64 0, i64 %9
  %11 = load <2 x double>, ptr %10, align 8, !tbaa !5
  store <2 x double> %11, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 35296), align 8, !tbaa !5
  %12 = or disjoint i64 %3, 6
  %13 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 8), i64 0, i64 %12
  %14 = load <2 x double>, ptr %13, align 8, !tbaa !5
  store <2 x double> %14, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 35312), align 8, !tbaa !5
  %15 = mul nuw nsw i64 %indvar, 5
  %16 = getelementptr inbounds [150 x double], ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 1992), i64 0, i64 %15
  %17 = load <2 x double>, ptr %16, align 8, !tbaa !5
  store <2 x double> %17, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 35328), align 8, !tbaa !5
  %18 = add nuw nsw i64 %15, 2
  %19 = getelementptr inbounds [150 x double], ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 1992), i64 0, i64 %18
  %20 = load <2 x double>, ptr %19, align 8, !tbaa !5
  store <2 x double> %20, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 35344), align 8, !tbaa !5
  %21 = add nuw nsw i64 %15, 4
  %22 = getelementptr inbounds [150 x double], ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 1992), i64 0, i64 %21
  %23 = load double, ptr %22, align 8, !tbaa !5
  store double %23, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 35360), align 8, !tbaa !5
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1448) getelementptr inbounds (i8, ptr @acadoWorkspace, i64 35368), ptr noundef nonnull align 8 dereferenceable(1448) %gep, i64 1448, i1 false), !tbaa !5
  tail call void @acado_evaluateLSQ(ptr noundef nonnull getelementptr inbounds (i8, ptr @acadoWorkspace, i64 35264), ptr noundef nonnull getelementptr inbounds (i8, ptr @acadoWorkspace, i64 36816))
  %24 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 48080), i64 0, i64 %3
  %25 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 8360), i64 0, i64 %3
  %26 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 36816), align 8, !tbaa !5
  %27 = load <2 x double>, ptr %24, align 8, !tbaa !5
  %28 = fsub <2 x double> %26, %27
  store <2 x double> %28, ptr %25, align 8, !tbaa !5
  %29 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 48080), i64 0, i64 %6
  %30 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 8360), i64 0, i64 %6
  %31 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 36832), align 8, !tbaa !5
  %32 = load <2 x double>, ptr %29, align 8, !tbaa !5
  %33 = fsub <2 x double> %31, %32
  store <2 x double> %33, ptr %30, align 8, !tbaa !5
  %34 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 48080), i64 0, i64 %9
  %35 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 8360), i64 0, i64 %9
  %36 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 36848), align 8, !tbaa !5
  %37 = load <2 x double>, ptr %34, align 8, !tbaa !5
  %38 = fsub <2 x double> %36, %37
  store <2 x double> %38, ptr %35, align 8, !tbaa !5
  %39 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 48080), i64 0, i64 %12
  %40 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 8360), i64 0, i64 %12
  %41 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 36864), align 8, !tbaa !5
  %42 = load <2 x double>, ptr %39, align 8, !tbaa !5
  %43 = fsub <2 x double> %41, %42
  store <2 x double> %43, ptr %40, align 8, !tbaa !5
  %indvar.next = add nuw nsw i64 %indvar, 1
  %exitcond.not = icmp eq i64 %indvar.next, 30
  br i1 %exitcond.not, label %44, label %1, !llvm.loop !9

44:                                               ; preds = %1
  %45 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 1928), align 8, !tbaa !5
  store <2 x double> %45, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 35264), align 8, !tbaa !5
  %46 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 1944), align 8, !tbaa !5
  store <2 x double> %46, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 35280), align 8, !tbaa !5
  %47 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 1960), align 8, !tbaa !5
  store <2 x double> %47, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 35296), align 8, !tbaa !5
  %48 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 1976), align 8, !tbaa !5
  store <2 x double> %48, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 35312), align 8, !tbaa !5
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1448) getelementptr inbounds (i8, ptr @acadoWorkspace, i64 35328), ptr noundef nonnull align 8 dereferenceable(1448) getelementptr inbounds (i8, ptr @acadoVariables, i64 46632), i64 1448, i1 false), !tbaa !5
  tail call void @acado_evaluateLSQEndTerm(ptr noundef nonnull getelementptr inbounds (i8, ptr @acadoWorkspace, i64 35264), ptr noundef nonnull getelementptr inbounds (i8, ptr @acadoWorkspace, i64 36816))
  %49 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 36816), align 8, !tbaa !5
  %50 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 50000), align 8, !tbaa !5
  %51 = fsub <2 x double> %49, %50
  store <2 x double> %51, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 10280), align 8, !tbaa !5
  %52 = load double, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 36832), align 8, !tbaa !5
  %53 = load double, ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 50016), align 8, !tbaa !5
  %54 = fsub double %52, %53
  store double %54, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 10296), align 8, !tbaa !5
  br label %55

55:                                               ; preds = %44, %55
  %indvars.iv = phi i64 [ 0, %44 ], [ %indvars.iv.next, %55 ]
  %.071 = phi double [ 0.000000e+00, %44 ], [ %93, %55 ]
  %56 = shl nuw nsw i64 %indvars.iv, 3
  %57 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 8360), i64 0, i64 %56
  %58 = load double, ptr %57, align 8, !tbaa !5
  %59 = fmul double %58, 1.000000e+01
  %60 = or disjoint i64 %56, 1
  %61 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 8360), i64 0, i64 %60
  %62 = load double, ptr %61, align 8, !tbaa !5
  %63 = fmul double %62, 1.000000e+01
  %64 = or disjoint i64 %56, 2
  %65 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 8360), i64 0, i64 %64
  %66 = load double, ptr %65, align 8, !tbaa !5
  %67 = fmul double %66, 1.000000e+01
  %68 = or disjoint i64 %56, 3
  %69 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 8360), i64 0, i64 %68
  %70 = load double, ptr %69, align 8, !tbaa !5
  %71 = or disjoint i64 %56, 4
  %72 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 8360), i64 0, i64 %71
  %73 = load double, ptr %72, align 8, !tbaa !5
  %74 = or disjoint i64 %56, 5
  %75 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 8360), i64 0, i64 %74
  %76 = load double, ptr %75, align 8, !tbaa !5
  %77 = or disjoint i64 %56, 6
  %78 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 8360), i64 0, i64 %77
  %79 = load double, ptr %78, align 8, !tbaa !5
  %80 = fmul double %79, 1.000000e+02
  %81 = or disjoint i64 %56, 7
  %82 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 8360), i64 0, i64 %81
  %83 = load double, ptr %82, align 8, !tbaa !5
  %84 = fmul double %83, 1.000000e+03
  %85 = fmul double %62, %63
  %86 = tail call double @llvm.fmuladd.f64(double %58, double %59, double %85)
  %87 = tail call double @llvm.fmuladd.f64(double %66, double %67, double %86)
  %88 = tail call double @llvm.fmuladd.f64(double %70, double %70, double %87)
  %89 = tail call double @llvm.fmuladd.f64(double %73, double %73, double %88)
  %90 = tail call double @llvm.fmuladd.f64(double %76, double %76, double %89)
  %91 = tail call double @llvm.fmuladd.f64(double %79, double %80, double %90)
  %92 = tail call double @llvm.fmuladd.f64(double %83, double %84, double %91)
  %93 = fadd double %.071, %92
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond76.not = icmp eq i64 %indvars.iv.next, 30
  br i1 %exitcond76.not, label %94, label %55, !llvm.loop !11

94:                                               ; preds = %55
  %95 = extractelement <2 x double> %51, i64 0
  %96 = fmul double %95, 1.000000e+01
  %97 = extractelement <2 x double> %51, i64 1
  %98 = fmul double %97, 1.000000e+01
  %99 = fmul double %54, 1.000000e+01
  %100 = fmul double %97, %98
  %101 = tail call double @llvm.fmuladd.f64(double %95, double %96, double %100)
  %102 = tail call double @llvm.fmuladd.f64(double %54, double %99, double %101)
  %103 = fadd double %102, %93
  %104 = fmul double %103, 5.000000e-01
  ret double %104
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #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 speculatable willreturn memory(none) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }

!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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass