; 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: nounwind uwtable
define dso_local void @acado_evaluateObjective() #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #2
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %3

3:                                                ; preds = %149, %0
  %4 = load i32, ptr %2, align 4, !tbaa !5
  %5 = icmp slt i32 %4, 30
  br i1 %5, label %6, label %152

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

83:                                               ; preds = %98, %6
  %84 = load i32, ptr %1, align 4, !tbaa !5
  %85 = icmp slt i32 %84, 181
  br i1 %85, label %86, label %101

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

98:                                               ; preds = %86
  %99 = load i32, ptr %1, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %1, align 4, !tbaa !5
  br label %83, !llvm.loop !11

101:                                              ; preds = %83
  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))
  %102 = load double, ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 9), align 8, !tbaa !9
  %103 = load i32, ptr %2, align 4, !tbaa !5
  %104 = mul nsw i32 %103, 8
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %105
  store double %102, ptr %106, align 8, !tbaa !9
  %107 = 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
  %108 = load i32, ptr %2, align 4, !tbaa !5
  %109 = mul nsw i32 %108, 8
  %110 = add nsw i32 %109, 1
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %111
  store double %107, ptr %112, align 8, !tbaa !9
  %113 = 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
  %114 = load i32, ptr %2, align 4, !tbaa !5
  %115 = mul nsw i32 %114, 8
  %116 = add nsw i32 %115, 2
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %117
  store double %113, ptr %118, align 8, !tbaa !9
  %119 = 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
  %120 = load i32, ptr %2, align 4, !tbaa !5
  %121 = mul nsw i32 %120, 8
  %122 = add nsw i32 %121, 3
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %123
  store double %119, ptr %124, align 8, !tbaa !9
  %125 = 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
  %126 = load i32, ptr %2, align 4, !tbaa !5
  %127 = mul nsw i32 %126, 8
  %128 = add nsw i32 %127, 4
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %129
  store double %125, ptr %130, align 8, !tbaa !9
  %131 = 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
  %132 = load i32, ptr %2, align 4, !tbaa !5
  %133 = mul nsw i32 %132, 8
  %134 = add nsw i32 %133, 5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %135
  store double %131, ptr %136, align 8, !tbaa !9
  %137 = 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
  %138 = load i32, ptr %2, align 4, !tbaa !5
  %139 = mul nsw i32 %138, 8
  %140 = add nsw i32 %139, 6
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %141
  store double %137, ptr %142, align 8, !tbaa !9
  %143 = 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
  %144 = load i32, ptr %2, align 4, !tbaa !5
  %145 = mul nsw i32 %144, 8
  %146 = add nsw i32 %145, 7
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 4), i64 0, i64 %147
  store double %143, ptr %148, align 8, !tbaa !9
  br label %149

149:                                              ; preds = %101
  %150 = load i32, ptr %2, align 4, !tbaa !5
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %2, align 4, !tbaa !5
  br label %3, !llvm.loop !13

152:                                              ; preds = %3
  %153 = 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 %153, ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), align 8, !tbaa !9
  %154 = 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 %154, 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
  %155 = 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 %155, 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
  %156 = 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 %156, 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
  %157 = 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 %157, 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
  %158 = 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 %158, 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
  %159 = 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 %159, 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
  %160 = 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 %160, 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 %1, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %174, %152
  %162 = load i32, ptr %1, align 4, !tbaa !5
  %163 = icmp slt i32 %162, 181
  br i1 %163, label %164, label %177

164:                                              ; preds = %161
  %165 = load i32, ptr %1, align 4, !tbaa !5
  %166 = add nsw i32 %165, 5430
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [5611 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 3), i64 0, i64 %167
  %169 = load double, ptr %168, align 8, !tbaa !9
  %170 = load i32, ptr %1, align 4, !tbaa !5
  %171 = add nsw i32 %170, 8
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [194 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 8), i64 0, i64 %172
  store double %169, ptr %173, align 8, !tbaa !9
  br label %174

174:                                              ; preds = %164
  %175 = load i32, ptr %1, align 4, !tbaa !5
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %1, align 4, !tbaa !5
  br label %161, !llvm.loop !14

177:                                              ; preds = %161
  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))
  %178 = load double, ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 9), align 8, !tbaa !9
  store double %178, ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 5), align 8, !tbaa !9
  %179 = 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
  store double %179, 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
  %180 = 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
  store double %180, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #2
  ret void
}

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 = { 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}


; 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: nounwind uwtable
define dso_local void @acado_evaluateObjective() 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 @acadoWorkspace, i64 8360), i64 0, i64 %3
  %25 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 36816), align 8, !tbaa !5
  store <2 x double> %25, ptr %24, align 8, !tbaa !5
  %26 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 8360), i64 0, i64 %6
  %27 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 36832), align 8, !tbaa !5
  store <2 x double> %27, ptr %26, align 8, !tbaa !5
  %28 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 8360), i64 0, i64 %9
  %29 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 36848), align 8, !tbaa !5
  store <2 x double> %29, ptr %28, align 8, !tbaa !5
  %30 = getelementptr inbounds [240 x double], ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 8360), i64 0, i64 %12
  %31 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 36864), align 8, !tbaa !5
  store <2 x double> %31, ptr %30, 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 %32, label %1, !llvm.loop !9

32:                                               ; preds = %1
  %33 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 1928), align 8, !tbaa !5
  store <2 x double> %33, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 35264), align 8, !tbaa !5
  %34 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 1944), align 8, !tbaa !5
  store <2 x double> %34, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 35280), align 8, !tbaa !5
  %35 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 1960), align 8, !tbaa !5
  store <2 x double> %35, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 35296), align 8, !tbaa !5
  %36 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 1976), align 8, !tbaa !5
  store <2 x double> %36, 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))
  %37 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 36816), align 8, !tbaa !5
  store <2 x double> %37, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 10280), align 8, !tbaa !5
  %38 = load double, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 36832), align 8, !tbaa !5
  store double %38, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 10296), align 8, !tbaa !5
  ret void
}

; 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) #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree 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"}


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