; 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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @acado_initializeNodesByForwardSimulation() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %3

3:                                                ; preds = %154, %0
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = icmp slt i32 %4, 30
  br i1 %5, label %6, label %157

6:                                                ; preds = %3
  %7 = load i32, ptr %1, 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 3), align 8, !tbaa !9
  %12 = load i32, ptr %1, 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 ([298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 1), align 8, !tbaa !9
  %18 = load i32, ptr %1, 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 ([298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 2), align 8, !tbaa !9
  %24 = load i32, ptr %1, 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 ([298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 3), align 8, !tbaa !9
  %30 = load i32, ptr %1, 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 ([298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 4), align 8, !tbaa !9
  %36 = load i32, ptr %1, 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 ([298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 5), align 8, !tbaa !9
  %42 = load i32, ptr %1, 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 ([298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 6), align 8, !tbaa !9
  %48 = load i32, ptr %1, 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 ([298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 7), align 8, !tbaa !9
  %54 = load i32, ptr %1, 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 ([298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 112), align 8, !tbaa !9
  %59 = load i32, ptr %1, 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 ([298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 113), align 8, !tbaa !9
  %65 = load i32, ptr %1, 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 ([298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 114), align 8, !tbaa !9
  %71 = load i32, ptr %1, 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 ([298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 115), align 8, !tbaa !9
  %77 = load i32, ptr %1, 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 ([298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 116), align 8, !tbaa !9
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %83

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

86:                                               ; preds = %83
  %87 = load i32, ptr %1, align 4, !tbaa !5
  %88 = mul nsw i32 %87, 181
  %89 = load i32, ptr %2, 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 %2, align 4, !tbaa !5
  %95 = add nsw i32 %94, 117
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 %96
  store double %93, ptr %97, align 8, !tbaa !9
  br label %98

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

101:                                              ; preds = %83
  %102 = load i32, ptr %1, align 4, !tbaa !5
  %103 = icmp eq i32 %102, 0
  %104 = zext i1 %103 to i32
  %105 = call i32 @acado_integrate(ptr noundef getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i32 noundef %104)
  %106 = load double, ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), align 8, !tbaa !9
  %107 = load i32, ptr %1, align 4, !tbaa !5
  %108 = mul nsw i32 %107, 8
  %109 = add nsw i32 %108, 8
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 %110
  store double %106, ptr %111, align 8, !tbaa !9
  %112 = load double, ptr getelementptr inbounds ([298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 1), align 8, !tbaa !9
  %113 = load i32, ptr %1, align 4, !tbaa !5
  %114 = mul nsw i32 %113, 8
  %115 = add nsw i32 %114, 9
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 %116
  store double %112, ptr %117, align 8, !tbaa !9
  %118 = load double, ptr getelementptr inbounds ([298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 2), align 8, !tbaa !9
  %119 = load i32, ptr %1, align 4, !tbaa !5
  %120 = mul nsw i32 %119, 8
  %121 = add nsw i32 %120, 10
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 %122
  store double %118, ptr %123, align 8, !tbaa !9
  %124 = load double, ptr getelementptr inbounds ([298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 3), align 8, !tbaa !9
  %125 = load i32, ptr %1, align 4, !tbaa !5
  %126 = mul nsw i32 %125, 8
  %127 = add nsw i32 %126, 11
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 %128
  store double %124, ptr %129, align 8, !tbaa !9
  %130 = load double, ptr getelementptr inbounds ([298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 4), align 8, !tbaa !9
  %131 = load i32, ptr %1, align 4, !tbaa !5
  %132 = mul nsw i32 %131, 8
  %133 = add nsw i32 %132, 12
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 %134
  store double %130, ptr %135, align 8, !tbaa !9
  %136 = load double, ptr getelementptr inbounds ([298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 5), align 8, !tbaa !9
  %137 = load i32, ptr %1, align 4, !tbaa !5
  %138 = mul nsw i32 %137, 8
  %139 = add nsw i32 %138, 13
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 %140
  store double %136, ptr %141, align 8, !tbaa !9
  %142 = load double, ptr getelementptr inbounds ([298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 6), align 8, !tbaa !9
  %143 = load i32, ptr %1, align 4, !tbaa !5
  %144 = mul nsw i32 %143, 8
  %145 = add nsw i32 %144, 14
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 %146
  store double %142, ptr %147, align 8, !tbaa !9
  %148 = load double, ptr getelementptr inbounds ([298 x double], ptr getelementptr inbounds (%struct.ACADOworkspace_, ptr @acadoWorkspace, i32 0, i32 3), i64 0, i64 7), align 8, !tbaa !9
  %149 = load i32, ptr %1, align 4, !tbaa !5
  %150 = mul nsw i32 %149, 8
  %151 = add nsw i32 %150, 15
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (%struct.ACADOvariables_, ptr @acadoVariables, i32 0, i32 1), i64 0, i64 %152
  store double %148, ptr %153, align 8, !tbaa !9
  br label %154

154:                                              ; preds = %101
  %155 = load i32, ptr %1, align 4, !tbaa !5
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %1, align 4, !tbaa !5
  br label %3, !llvm.loop !13

157:                                              ; preds = %3
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #3
  ret void
}

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


; 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

declare i32 @acado_integrate(ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @acado_initializeNodesByForwardSimulation() local_unnamed_addr #1 {
  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 5976), 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 5992), 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 6008), 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 6024), 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 6872), 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 6888), 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 6904), 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 6912), ptr noundef nonnull align 8 dereferenceable(1448) %gep, i64 1448, i1 false), !tbaa !5
  %24 = icmp eq i64 %indvar, 0
  %25 = zext i1 %24 to i32
  %26 = tail call i32 @acado_integrate(ptr noundef nonnull getelementptr inbounds (i8, ptr @acadoWorkspace, i64 5976), i32 noundef %25) #3
  %27 = add nuw nsw i64 %3, 8
  %28 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 8), i64 0, i64 %27
  %29 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 5976), align 8, !tbaa !5
  store <2 x double> %29, ptr %28, align 8, !tbaa !5
  %30 = add nuw nsw i64 %3, 10
  %31 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 8), i64 0, i64 %30
  %32 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 5992), align 8, !tbaa !5
  store <2 x double> %32, ptr %31, align 8, !tbaa !5
  %33 = add nuw nsw i64 %3, 12
  %34 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 8), i64 0, i64 %33
  %35 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 6008), align 8, !tbaa !5
  store <2 x double> %35, ptr %34, align 8, !tbaa !5
  %36 = add nuw nsw i64 %3, 14
  %37 = getelementptr inbounds [248 x double], ptr getelementptr inbounds (i8, ptr @acadoVariables, i64 8), i64 0, i64 %36
  %38 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @acadoWorkspace, i64 6024), align 8, !tbaa !5
  store <2 x double> %38, ptr %37, 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 %39, label %1, !llvm.loop !9

39:                                               ; preds = %1
  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) #2

attributes #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 = { 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 nounwind willreturn memory(argmem: readwrite) }
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 = !{!"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