; LLVM IR from HRI-EU/Rcs :: src/RcsCore (ViaPointSequence)

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

%"class.Rcs::ViaPointSequence" = type { ptr, ptr, ptr, ptr, ptr, ptr, i8, i32, %"class.std::vector", %"class.std::vector.0" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct._MatNd = type { ptr, i32, i32, i32, i8 }

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

declare double @MatNd_get(ptr noundef, i32 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: mustprogress uwtable
define dso_local void @_ZNK3Rcs16ViaPointSequence28computeTrajectoryPoint_poly5ERdS1_S1_d(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3, double noundef %4) #2 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca i64, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store double %4, ptr %10, align 8, !tbaa !9
  %26 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %27 = load double, ptr %10, align 8, !tbaa !9
  %28 = load double, ptr %10, align 8, !tbaa !9
  %29 = fmul double %27, %28
  store double %29, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %30 = load double, ptr %11, align 8, !tbaa !9
  %31 = load double, ptr %10, align 8, !tbaa !9
  %32 = fmul double %30, %31
  store double %32, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %33 = load double, ptr %11, align 8, !tbaa !9
  %34 = load double, ptr %11, align 8, !tbaa !9
  %35 = fmul double %33, %34
  store double %35, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %36 = load double, ptr %12, align 8, !tbaa !9
  %37 = load double, ptr %11, align 8, !tbaa !9
  %38 = fmul double %36, %37
  store double %38, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %39 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %26, i32 0, i32 5
  %40 = load ptr, ptr %39, align 8, !tbaa !11
  %41 = getelementptr inbounds %struct._MatNd, ptr %40, i32 0, i32 0
  %42 = load ptr, ptr %41, align 8, !tbaa !23
  %43 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %26, i32 0, i32 5
  %44 = load ptr, ptr %43, align 8, !tbaa !11
  %45 = getelementptr inbounds %struct._MatNd, ptr %44, i32 0, i32 2
  %46 = load i32, ptr %45, align 4, !tbaa !26
  %47 = mul i32 0, %46
  %48 = add i32 %47, 0
  %49 = zext i32 %48 to i64
  %50 = getelementptr inbounds double, ptr %42, i64 %49
  %51 = load double, ptr %50, align 8, !tbaa !9
  store double %51, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %52 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %26, i32 0, i32 5
  %53 = load ptr, ptr %52, align 8, !tbaa !11
  %54 = getelementptr inbounds %struct._MatNd, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !23
  %56 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %26, i32 0, i32 5
  %57 = load ptr, ptr %56, align 8, !tbaa !11
  %58 = getelementptr inbounds %struct._MatNd, ptr %57, i32 0, i32 2
  %59 = load i32, ptr %58, align 4, !tbaa !26
  %60 = mul i32 1, %59
  %61 = add i32 %60, 0
  %62 = zext i32 %61 to i64
  %63 = getelementptr inbounds double, ptr %55, i64 %62
  %64 = load double, ptr %63, align 8, !tbaa !9
  store double %64, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %65 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %26, i32 0, i32 5
  %66 = load ptr, ptr %65, align 8, !tbaa !11
  %67 = getelementptr inbounds %struct._MatNd, ptr %66, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !23
  %69 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %26, i32 0, i32 5
  %70 = load ptr, ptr %69, align 8, !tbaa !11
  %71 = getelementptr inbounds %struct._MatNd, ptr %70, i32 0, i32 2
  %72 = load i32, ptr %71, align 4, !tbaa !26
  %73 = mul i32 2, %72
  %74 = add i32 %73, 0
  %75 = zext i32 %74 to i64
  %76 = getelementptr inbounds double, ptr %68, i64 %75
  %77 = load double, ptr %76, align 8, !tbaa !9
  store double %77, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %78 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %26, i32 0, i32 5
  %79 = load ptr, ptr %78, align 8, !tbaa !11
  %80 = getelementptr inbounds %struct._MatNd, ptr %79, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8, !tbaa !23
  %82 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %26, i32 0, i32 5
  %83 = load ptr, ptr %82, align 8, !tbaa !11
  %84 = getelementptr inbounds %struct._MatNd, ptr %83, i32 0, i32 2
  %85 = load i32, ptr %84, align 4, !tbaa !26
  %86 = mul i32 3, %85
  %87 = add i32 %86, 0
  %88 = zext i32 %87 to i64
  %89 = getelementptr inbounds double, ptr %81, i64 %88
  %90 = load double, ptr %89, align 8, !tbaa !9
  store double %90, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %91 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %26, i32 0, i32 5
  %92 = load ptr, ptr %91, align 8, !tbaa !11
  %93 = getelementptr inbounds %struct._MatNd, ptr %92, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8, !tbaa !23
  %95 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %26, i32 0, i32 5
  %96 = load ptr, ptr %95, align 8, !tbaa !11
  %97 = getelementptr inbounds %struct._MatNd, ptr %96, i32 0, i32 2
  %98 = load i32, ptr %97, align 4, !tbaa !26
  %99 = mul i32 4, %98
  %100 = add i32 %99, 0
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds double, ptr %94, i64 %101
  %103 = load double, ptr %102, align 8, !tbaa !9
  store double %103, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %104 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %26, i32 0, i32 5
  %105 = load ptr, ptr %104, align 8, !tbaa !11
  %106 = getelementptr inbounds %struct._MatNd, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !23
  %108 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %26, i32 0, i32 5
  %109 = load ptr, ptr %108, align 8, !tbaa !11
  %110 = getelementptr inbounds %struct._MatNd, ptr %109, i32 0, i32 2
  %111 = load i32, ptr %110, align 4, !tbaa !26
  %112 = mul i32 5, %111
  %113 = add i32 %112, 0
  %114 = zext i32 %113 to i64
  %115 = getelementptr inbounds double, ptr %107, i64 %114
  %116 = load double, ptr %115, align 8, !tbaa !9
  store double %116, ptr %20, align 8, !tbaa !9
  %117 = load double, ptr %15, align 8, !tbaa !9
  %118 = load double, ptr %14, align 8, !tbaa !9
  %119 = load double, ptr %16, align 8, !tbaa !9
  %120 = load double, ptr %13, align 8, !tbaa !9
  %121 = fmul double %119, %120
  %122 = call double @llvm.fmuladd.f64(double %117, double %118, double %121)
  %123 = load double, ptr %17, align 8, !tbaa !9
  %124 = load double, ptr %12, align 8, !tbaa !9
  %125 = call double @llvm.fmuladd.f64(double %123, double %124, double %122)
  %126 = load double, ptr %18, align 8, !tbaa !9
  %127 = load double, ptr %11, align 8, !tbaa !9
  %128 = call double @llvm.fmuladd.f64(double %126, double %127, double %125)
  %129 = load double, ptr %19, align 8, !tbaa !9
  %130 = load double, ptr %10, align 8, !tbaa !9
  %131 = call double @llvm.fmuladd.f64(double %129, double %130, double %128)
  %132 = load double, ptr %20, align 8, !tbaa !9
  %133 = fadd double %131, %132
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  store double %133, ptr %134, align 8, !tbaa !9
  %135 = load double, ptr %15, align 8, !tbaa !9
  %136 = fmul double 5.000000e+00, %135
  %137 = load double, ptr %13, align 8, !tbaa !9
  %138 = load double, ptr %16, align 8, !tbaa !9
  %139 = fmul double 4.000000e+00, %138
  %140 = load double, ptr %12, align 8, !tbaa !9
  %141 = fmul double %139, %140
  %142 = call double @llvm.fmuladd.f64(double %136, double %137, double %141)
  %143 = load double, ptr %17, align 8, !tbaa !9
  %144 = fmul double 3.000000e+00, %143
  %145 = load double, ptr %11, align 8, !tbaa !9
  %146 = call double @llvm.fmuladd.f64(double %144, double %145, double %142)
  %147 = load double, ptr %18, align 8, !tbaa !9
  %148 = fmul double 2.000000e+00, %147
  %149 = load double, ptr %10, align 8, !tbaa !9
  %150 = call double @llvm.fmuladd.f64(double %148, double %149, double %146)
  %151 = load double, ptr %19, align 8, !tbaa !9
  %152 = fadd double %150, %151
  %153 = load ptr, ptr %8, align 8, !tbaa !5
  store double %152, ptr %153, align 8, !tbaa !9
  %154 = load double, ptr %15, align 8, !tbaa !9
  %155 = fmul double 2.000000e+01, %154
  %156 = load double, ptr %12, align 8, !tbaa !9
  %157 = load double, ptr %16, align 8, !tbaa !9
  %158 = fmul double 1.200000e+01, %157
  %159 = load double, ptr %11, align 8, !tbaa !9
  %160 = fmul double %158, %159
  %161 = call double @llvm.fmuladd.f64(double %155, double %156, double %160)
  %162 = load double, ptr %17, align 8, !tbaa !9
  %163 = fmul double 6.000000e+00, %162
  %164 = load double, ptr %10, align 8, !tbaa !9
  %165 = call double @llvm.fmuladd.f64(double %163, double %164, double %161)
  %166 = load double, ptr %18, align 8, !tbaa !9
  %167 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %166, double %165)
  %168 = load ptr, ptr %9, align 8, !tbaa !5
  store double %167, ptr %168, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  store i64 3, ptr %21, align 8, !tbaa !27
  br label %169

169:                                              ; preds = %290, %5
  %170 = load i64, ptr %21, align 8, !tbaa !27
  %171 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %26, i32 0, i32 8
  %172 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %171) #5
  %173 = sub i64 %172, 3
  %174 = icmp ult i64 %170, %173
  br i1 %174, label %176, label %175

175:                                              ; preds = %169
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %293

176:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %177 = load double, ptr %10, align 8, !tbaa !9
  %178 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %26, i32 0, i32 9
  %179 = load i64, ptr %21, align 8, !tbaa !27
  %180 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %178, i64 noundef %179) #5
  %181 = load double, ptr %180, align 8, !tbaa !9
  %182 = fsub double %177, %181
  %183 = fcmp ogt double %182, 0.000000e+00
  br i1 %183, label %184, label %191

184:                                              ; preds = %176
  %185 = load double, ptr %10, align 8, !tbaa !9
  %186 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %26, i32 0, i32 9
  %187 = load i64, ptr %21, align 8, !tbaa !27
  %188 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %186, i64 noundef %187) #5
  %189 = load double, ptr %188, align 8, !tbaa !9
  %190 = fsub double %185, %189
  br label %192

191:                                              ; preds = %176
  br label %192

192:                                              ; preds = %191, %184
  %193 = phi double [ %190, %184 ], [ 0.000000e+00, %191 ]
  store double %193, ptr %22, align 8, !tbaa !9
  %194 = load double, ptr %22, align 8, !tbaa !9
  %195 = fcmp ogt double %194, 0.000000e+00
  br i1 %195, label %196, label %289

196:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %197 = load double, ptr %22, align 8, !tbaa !9
  %198 = load double, ptr %22, align 8, !tbaa !9
  %199 = fmul double %197, %198
  store double %199, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %200 = load double, ptr %23, align 8, !tbaa !9
  %201 = load double, ptr %22, align 8, !tbaa !9
  %202 = fmul double %200, %201
  store double %202, ptr %24, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %203 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %26, i32 0, i32 5
  %204 = load ptr, ptr %203, align 8, !tbaa !11
  %205 = load i64, ptr %21, align 8, !tbaa !27
  %206 = add i64 %205, 3
  %207 = trunc i64 %206 to i32
  %208 = call double @MatNd_get(ptr noundef %204, i32 noundef %207, i32 noundef 0)
  store double %208, ptr %25, align 8, !tbaa !9
  %209 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %26, i32 0, i32 8
  %210 = load i64, ptr %21, align 8, !tbaa !27
  %211 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %209, i64 noundef %210) #5
  %212 = load i32, ptr %211, align 4, !tbaa !29
  %213 = icmp eq i32 %212, 0
  br i1 %213, label %214, label %236

214:                                              ; preds = %196
  %215 = load double, ptr %25, align 8, !tbaa !9
  %216 = load double, ptr %24, align 8, !tbaa !9
  %217 = fmul double %215, %216
  %218 = load double, ptr %23, align 8, !tbaa !9
  %219 = load ptr, ptr %7, align 8, !tbaa !5
  %220 = load double, ptr %219, align 8, !tbaa !9
  %221 = call double @llvm.fmuladd.f64(double %217, double %218, double %220)
  store double %221, ptr %219, align 8, !tbaa !9
  %222 = load double, ptr %25, align 8, !tbaa !9
  %223 = fmul double %222, 5.000000e+00
  %224 = load double, ptr %23, align 8, !tbaa !9
  %225 = fmul double %223, %224
  %226 = load double, ptr %23, align 8, !tbaa !9
  %227 = load ptr, ptr %8, align 8, !tbaa !5
  %228 = load double, ptr %227, align 8, !tbaa !9
  %229 = call double @llvm.fmuladd.f64(double %225, double %226, double %228)
  store double %229, ptr %227, align 8, !tbaa !9
  %230 = load double, ptr %25, align 8, !tbaa !9
  %231 = fmul double %230, 2.000000e+01
  %232 = load double, ptr %24, align 8, !tbaa !9
  %233 = load ptr, ptr %9, align 8, !tbaa !5
  %234 = load double, ptr %233, align 8, !tbaa !9
  %235 = call double @llvm.fmuladd.f64(double %231, double %232, double %234)
  store double %235, ptr %233, align 8, !tbaa !9
  br label %288

236:                                              ; preds = %196
  %237 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %26, i32 0, i32 8
  %238 = load i64, ptr %21, align 8, !tbaa !27
  %239 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %237, i64 noundef %238) #5
  %240 = load i32, ptr %239, align 4, !tbaa !29
  %241 = icmp eq i32 %240, 1
  br i1 %241, label %242, label %262

242:                                              ; preds = %236
  %243 = load double, ptr %25, align 8, !tbaa !9
  %244 = load double, ptr %23, align 8, !tbaa !9
  %245 = fmul double %243, %244
  %246 = load double, ptr %23, align 8, !tbaa !9
  %247 = load ptr, ptr %7, align 8, !tbaa !5
  %248 = load double, ptr %247, align 8, !tbaa !9
  %249 = call double @llvm.fmuladd.f64(double %245, double %246, double %248)
  store double %249, ptr %247, align 8, !tbaa !9
  %250 = load double, ptr %25, align 8, !tbaa !9
  %251 = fmul double %250, 4.000000e+00
  %252 = load double, ptr %24, align 8, !tbaa !9
  %253 = load ptr, ptr %8, align 8, !tbaa !5
  %254 = load double, ptr %253, align 8, !tbaa !9
  %255 = call double @llvm.fmuladd.f64(double %251, double %252, double %254)
  store double %255, ptr %253, align 8, !tbaa !9
  %256 = load double, ptr %25, align 8, !tbaa !9
  %257 = fmul double %256, 1.200000e+01
  %258 = load double, ptr %23, align 8, !tbaa !9
  %259 = load ptr, ptr %9, align 8, !tbaa !5
  %260 = load double, ptr %259, align 8, !tbaa !9
  %261 = call double @llvm.fmuladd.f64(double %257, double %258, double %260)
  store double %261, ptr %259, align 8, !tbaa !9
  br label %287

262:                                              ; preds = %236
  %263 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %26, i32 0, i32 8
  %264 = load i64, ptr %21, align 8, !tbaa !27
  %265 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %263, i64 noundef %264) #5
  %266 = load i32, ptr %265, align 4, !tbaa !29
  %267 = icmp eq i32 %266, 2
  br i1 %267, label %268, label %286

268:                                              ; preds = %262
  %269 = load double, ptr %25, align 8, !tbaa !9
  %270 = load double, ptr %24, align 8, !tbaa !9
  %271 = load ptr, ptr %7, align 8, !tbaa !5
  %272 = load double, ptr %271, align 8, !tbaa !9
  %273 = call double @llvm.fmuladd.f64(double %269, double %270, double %272)
  store double %273, ptr %271, align 8, !tbaa !9
  %274 = load double, ptr %25, align 8, !tbaa !9
  %275 = fmul double %274, 3.000000e+00
  %276 = load double, ptr %23, align 8, !tbaa !9
  %277 = load ptr, ptr %8, align 8, !tbaa !5
  %278 = load double, ptr %277, align 8, !tbaa !9
  %279 = call double @llvm.fmuladd.f64(double %275, double %276, double %278)
  store double %279, ptr %277, align 8, !tbaa !9
  %280 = load double, ptr %25, align 8, !tbaa !9
  %281 = fmul double %280, 6.000000e+00
  %282 = load double, ptr %22, align 8, !tbaa !9
  %283 = load ptr, ptr %9, align 8, !tbaa !5
  %284 = load double, ptr %283, align 8, !tbaa !9
  %285 = call double @llvm.fmuladd.f64(double %281, double %282, double %284)
  store double %285, ptr %283, align 8, !tbaa !9
  br label %286

286:                                              ; preds = %268, %262
  br label %287

287:                                              ; preds = %286, %242
  br label %288

288:                                              ; preds = %287, %214
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %289

289:                                              ; preds = %288, %192
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %290

290:                                              ; preds = %289
  %291 = load i64, ptr %21, align 8, !tbaa !27
  %292 = add i64 %291, 1
  store i64 %292, ptr %21, align 8, !tbaa !27
  br label %169, !llvm.loop !30

293:                                              ; preds = %175
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #4 align 2

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 = { mustprogress 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { mustprogress 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 #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 40}
!12 = !{!"_ZTSN3Rcs16ViaPointSequenceE", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !13, i64 48, !14, i64 52, !15, i64 56, !19, i64 80}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN3Rcs16ViaPointSequence12ViaPointTypeE", !7, i64 0}
!15 = !{!"_ZTSSt6vectorIiSaIiEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt6vectorIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!24, !6, i64 0}
!24 = !{!"_ZTS6_MatNd", !6, i64 0, !25, i64 8, !25, i64 12, !25, i64 16, !13, i64 20}
!25 = !{!"int", !7, i64 0}
!26 = !{!24, !25, i64 12}
!27 = !{!28, !28, i64 0}
!28 = !{!"long", !7, i64 0}
!29 = !{!25, !25, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


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

declare double @MatNd_get(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3Rcs16ViaPointSequence28computeTrajectoryPoint_poly5ERdS1_S1_d(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr nocapture noundef nonnull align 8 dereferenceable(8) %1, ptr nocapture noundef nonnull align 8 dereferenceable(8) %2, ptr nocapture noundef nonnull align 8 dereferenceable(8) %3, double noundef %4) local_unnamed_addr #1 align 2 {
  %6 = fmul double %4, %4
  %7 = fmul double %6, %4
  %8 = fmul double %6, %6
  %9 = fmul double %6, %7
  %10 = getelementptr inbounds i8, ptr %0, i64 40
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = load ptr, ptr %11, align 8, !tbaa !20
  %13 = getelementptr inbounds i8, ptr %11, i64 12
  %14 = load i32, ptr %13, align 4, !tbaa !23
  %15 = load double, ptr %12, align 8, !tbaa !24
  %16 = zext i32 %14 to i64
  %17 = getelementptr inbounds double, ptr %12, i64 %16
  %18 = load double, ptr %17, align 8, !tbaa !24
  %19 = shl i32 %14, 1
  %20 = zext i32 %19 to i64
  %21 = getelementptr inbounds double, ptr %12, i64 %20
  %22 = load double, ptr %21, align 8, !tbaa !24
  %23 = mul i32 %14, 3
  %24 = zext i32 %23 to i64
  %25 = getelementptr inbounds double, ptr %12, i64 %24
  %26 = load double, ptr %25, align 8, !tbaa !24
  %27 = shl i32 %14, 2
  %28 = zext i32 %27 to i64
  %29 = getelementptr inbounds double, ptr %12, i64 %28
  %30 = load double, ptr %29, align 8, !tbaa !24
  %31 = mul i32 %14, 5
  %32 = zext i32 %31 to i64
  %33 = getelementptr inbounds double, ptr %12, i64 %32
  %34 = load double, ptr %33, align 8, !tbaa !24
  %35 = fmul double %8, %18
  %36 = tail call double @llvm.fmuladd.f64(double %15, double %9, double %35)
  %37 = tail call double @llvm.fmuladd.f64(double %22, double %7, double %36)
  %38 = tail call double @llvm.fmuladd.f64(double %26, double %6, double %37)
  %39 = tail call double @llvm.fmuladd.f64(double %30, double %4, double %38)
  %40 = fadd double %34, %39
  store double %40, ptr %1, align 8, !tbaa !24
  %41 = fmul double %15, 5.000000e+00
  %42 = fmul double %18, 4.000000e+00
  %43 = fmul double %7, %42
  %44 = tail call double @llvm.fmuladd.f64(double %41, double %8, double %43)
  %45 = fmul double %22, 3.000000e+00
  %46 = tail call double @llvm.fmuladd.f64(double %45, double %6, double %44)
  %47 = fmul double %26, 2.000000e+00
  %48 = tail call double @llvm.fmuladd.f64(double %47, double %4, double %46)
  %49 = fadd double %30, %48
  store double %49, ptr %2, align 8, !tbaa !24
  %50 = fmul double %15, 2.000000e+01
  %51 = fmul double %18, 1.200000e+01
  %52 = fmul double %6, %51
  %53 = tail call double @llvm.fmuladd.f64(double %50, double %7, double %52)
  %54 = fmul double %22, 6.000000e+00
  %55 = tail call double @llvm.fmuladd.f64(double %54, double %4, double %53)
  %56 = tail call double @llvm.fmuladd.f64(double %26, double 2.000000e+00, double %55)
  store double %56, ptr %3, align 8, !tbaa !24
  %57 = getelementptr inbounds i8, ptr %0, i64 56
  %58 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %57) #4
  %59 = add i64 %58, -7
  %60 = icmp ult i64 %59, -4
  br i1 %60, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %5
  %61 = getelementptr inbounds i8, ptr %0, i64 80
  br label %62

._crit_edge:                                      ; preds = %.thread, %5
  ret void

62:                                               ; preds = %.lr.ph, %.thread
  %.084 = phi i64 [ 3, %.lr.ph ], [ %113, %.thread ]
  %63 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %.084) #4
  %64 = load double, ptr %63, align 8, !tbaa !24
  %65 = fcmp olt double %64, %4
  br i1 %65, label %66, label %.thread

66:                                               ; preds = %62
  %67 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %.084) #4
  %68 = load double, ptr %67, align 8, !tbaa !24
  %69 = fsub double %4, %68
  %70 = fcmp ogt double %69, 0.000000e+00
  br i1 %70, label %71, label %.thread

71:                                               ; preds = %66
  %72 = fmul double %69, %69
  %73 = fmul double %69, %72
  %74 = load ptr, ptr %10, align 8, !tbaa !5
  %75 = trunc i64 %.084 to i32
  %76 = add i32 %75, 3
  %77 = tail call double @MatNd_get(ptr noundef %74, i32 noundef %76, i32 noundef 0)
  %78 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %.084) #4
  %79 = load i32, ptr %78, align 4, !tbaa !26
  %80 = icmp eq i32 %79, 0
  br i1 %80, label %81, label %89

81:                                               ; preds = %71
  %82 = fmul double %73, %77
  %83 = load double, ptr %1, align 8, !tbaa !24
  %84 = tail call double @llvm.fmuladd.f64(double %82, double %72, double %83)
  store double %84, ptr %1, align 8, !tbaa !24
  %85 = fmul double %77, 5.000000e+00
  %86 = fmul double %72, %85
  %87 = load double, ptr %2, align 8, !tbaa !24
  %88 = tail call double @llvm.fmuladd.f64(double %86, double %72, double %87)
  br label %.thread.sink.split

89:                                               ; preds = %71
  %90 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %.084) #4
  %91 = load i32, ptr %90, align 4, !tbaa !26
  %92 = icmp eq i32 %91, 1
  br i1 %92, label %93, label %100

93:                                               ; preds = %89
  %94 = fmul double %72, %77
  %95 = load double, ptr %1, align 8, !tbaa !24
  %96 = tail call double @llvm.fmuladd.f64(double %94, double %72, double %95)
  store double %96, ptr %1, align 8, !tbaa !24
  %97 = fmul double %77, 4.000000e+00
  %98 = load double, ptr %2, align 8, !tbaa !24
  %99 = tail call double @llvm.fmuladd.f64(double %97, double %73, double %98)
  br label %.thread.sink.split

100:                                              ; preds = %89
  %101 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %.084) #4
  %102 = load i32, ptr %101, align 4, !tbaa !26
  %103 = icmp eq i32 %102, 2
  br i1 %103, label %104, label %.thread

104:                                              ; preds = %100
  %105 = load double, ptr %1, align 8, !tbaa !24
  %106 = tail call double @llvm.fmuladd.f64(double %77, double %73, double %105)
  store double %106, ptr %1, align 8, !tbaa !24
  %107 = fmul double %77, 3.000000e+00
  %108 = load double, ptr %2, align 8, !tbaa !24
  %109 = tail call double @llvm.fmuladd.f64(double %107, double %72, double %108)
  br label %.thread.sink.split

.thread.sink.split:                               ; preds = %93, %104, %81
  %.sink88 = phi double [ %88, %81 ], [ %109, %104 ], [ %99, %93 ]
  %.sink = phi double [ 2.000000e+01, %81 ], [ 6.000000e+00, %104 ], [ 1.200000e+01, %93 ]
  %.sink86 = phi double [ %73, %81 ], [ %69, %104 ], [ %72, %93 ]
  store double %.sink88, ptr %2, align 8, !tbaa !24
  %110 = fmul double %77, %.sink
  %111 = load double, ptr %3, align 8, !tbaa !24
  %112 = tail call double @llvm.fmuladd.f64(double %110, double %.sink86, double %111)
  store double %112, ptr %3, align 8, !tbaa !24
  br label %.thread

.thread:                                          ; preds = %.thread.sink.split, %62, %100, %66
  %113 = add nuw i64 %.084, 1
  %114 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %57) #4
  %115 = add i64 %114, -3
  %116 = icmp ult i64 %113, %115
  br i1 %116, label %62, label %._crit_edge, !llvm.loop !27
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 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 = { mustprogress 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { mustprogress 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 #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 40}
!6 = !{!"_ZTSN3Rcs16ViaPointSequenceE", !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !10, i64 48, !11, i64 52, !12, i64 56, !16, i64 80}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSN3Rcs16ViaPointSequence12ViaPointTypeE", !8, i64 0}
!12 = !{!"_ZTSSt6vectorIiSaIiEE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!16 = !{!"_ZTSSt6vectorIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!20 = !{!21, !7, i64 0}
!21 = !{!"_ZTS6_MatNd", !7, i64 0, !22, i64 8, !22, i64 12, !22, i64 16, !10, i64 20}
!22 = !{!"int", !8, i64 0}
!23 = !{!21, !22, i64 12}
!24 = !{!25, !25, i64 0}
!25 = !{!"double", !8, i64 0}
!26 = !{!22, !22, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


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