; LLVM IR from HRI-EU/Rcs :: src/RcsCore/Rcs_mathTests.ll (Z21testViaPointSequence2iPPc)

; 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::CmdLineParser" = type { i8 }
%"class.Rcs::ViaPointSequence" = type { ptr, ptr, ptr, ptr, ptr, ptr, i8, i32, %"class.std::vector", %"class.std::vector.3" }
%"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.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = 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 }

@.str.3 = external hidden unnamed_addr constant [74 x i8], align 1
@stderr = external global ptr, align 8
@.str.57 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.279 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.336 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.338 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.339 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.340 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.341 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.342 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.343 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.344 = external hidden unnamed_addr constant [50 x i8], align 1
@__func__._Z21testViaPointSequence2iPPc = external hidden unnamed_addr constant [22 x i8], align 1
@.str.345 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.346 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.347 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.348 = external hidden unnamed_addr constant [5 x i8], align 1

; 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

declare void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, ptr noundef) unnamed_addr #2

declare noundef zeroext i1 @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef, ptr noundef, ptr noundef, ...) #2

declare ptr @MatNd_create(i32 noundef, i32 noundef) #2

declare void @MatNd_printCommentDigits(ptr noundef, ptr noundef, i32 noundef) #2

declare void @MatNd_destroy(ptr noundef) #2

declare void @MatNd_set(ptr noundef, i32 noundef, i32 noundef, double noundef) #2

declare ptr @MatNd_clone(ptr noundef) #2

declare void @print_trace() #2

; Function Attrs: noreturn nounwind
declare void @abort() #3

; Function Attrs: nounwind
declare i64 @lround(double noundef) #1

declare void @VecNd_copy(ptr noundef, ptr noundef, i32 noundef) #2

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

declare void @MatNd_transposeSelf(ptr noundef) #2

declare ptr @MatNd_getRowPtr(ptr noundef, i32 noundef) #2

declare noundef zeroext i1 @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPjS2_z(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef, ptr noundef, ptr noundef, ...) #2

declare ptr @MatNd_createFromString(ptr noundef) #2

declare void @_ZN3Rcs16ViaPointSequenceC1EPK6_MatNdNS0_12ViaPointTypeE(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef, i32 noundef) unnamed_addr #2

declare noundef zeroext i1 @_ZNK3Rcs16ViaPointSequence5checkEv(ptr noundef nonnull align 8 dereferenceable(104)) #2

; Function Attrs: nounwind
declare void @_ZN3Rcs16ViaPointSequenceD1Ev(ptr noundef nonnull align 8 dereferenceable(104)) unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z21testViaPointSequence2iPPc(i32 noundef %0, ptr noundef %1) #5 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca %"class.Rcs::CmdLineParser", align 1
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.Rcs::ViaPointSequence", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca %"class.Rcs::ViaPointSequence", align 8
  %21 = alloca ptr, align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store double 1.000000e-02, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 4, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store double 1.000000e-01, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1) %8, i32 noundef %22, ptr noundef %23)
  %24 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef @.str.279, ptr noundef %5, ptr noundef @.str.339)
  %25 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPjS2_z(ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef @.str.340, ptr noundef %6, ptr noundef @.str.341)
  %26 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef @.str.342, ptr noundef %7, ptr noundef @.str.343)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %27 = call ptr @MatNd_createFromString(ptr noundef @.str.344)
  store ptr %27, ptr %9, align 8, !tbaa !9
  br label %28

28:                                               ; preds = %2
  %29 = load ptr, ptr %9, align 8, !tbaa !9
  %30 = icmp ne ptr %29, null
  br i1 %30, label %34, label %31

31:                                               ; preds = %28
  %32 = load ptr, ptr @stderr, align 8, !tbaa !9
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef @.str.57, ptr noundef @.str.3, ptr noundef @__func__._Z21testViaPointSequence2iPPc, i32 noundef 3354, ptr noundef @.str.336) #6
  call void @print_trace()
  call void @abort() #7
  unreachable

34:                                               ; preds = %28
  br label %35

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35
  %37 = load ptr, ptr %9, align 8, !tbaa !9
  call void @MatNd_printCommentDigits(ptr noundef @.str.345, ptr noundef %37, i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %38 = load double, ptr %5, align 8, !tbaa !11
  %39 = fdiv double 1.500000e+00, %38
  %40 = call i64 @lround(double noundef %39) #6
  %41 = add nsw i64 %40, 1
  %42 = trunc i64 %41 to i32
  %43 = call ptr @MatNd_create(i32 noundef 4, i32 noundef %42)
  store ptr %43, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 104, ptr %11) #6
  %44 = load ptr, ptr %9, align 8, !tbaa !9
  call void @_ZN3Rcs16ViaPointSequenceC1EPK6_MatNdNS0_12ViaPointTypeE(ptr noundef nonnull align 8 dereferenceable(104) %11, ptr noundef %44, i32 noundef 0)
  br label %45

45:                                               ; preds = %36
  %46 = invoke noundef zeroext i1 @_ZNK3Rcs16ViaPointSequence5checkEv(ptr noundef nonnull align 8 dereferenceable(104) %11)
          to label %47 unwind label %52

47:                                               ; preds = %45
  br i1 %46, label %56, label %48

48:                                               ; preds = %47
  %49 = load ptr, ptr @stderr, align 8, !tbaa !9
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef @.str.57, ptr noundef @.str.3, ptr noundef @__func__._Z21testViaPointSequence2iPPc, i32 noundef 3359, ptr noundef @.str.338) #6
  invoke void @print_trace()
          to label %51 unwind label %52

51:                                               ; preds = %48
  call void @abort() #7
  unreachable

52:                                               ; preds = %58, %48, %45
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %12, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %13, align 4
  br label %192

56:                                               ; preds = %47
  br label %57

57:                                               ; preds = %56
  br label %58

58:                                               ; preds = %57
  %59 = load ptr, ptr %10, align 8, !tbaa !9
  %60 = load double, ptr %5, align 8, !tbaa !11
  invoke void @_ZNK3Rcs16ViaPointSequence17computeTrajectoryEP6_MatNdddd(ptr noundef nonnull align 8 dereferenceable(104) %11, ptr noundef %59, double noundef 0.000000e+00, double noundef 1.500000e+00, double noundef %60)
          to label %61 unwind label %52

61:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = add i32 %62, 1
  %64 = load ptr, ptr %10, align 8, !tbaa !9
  %65 = getelementptr inbounds %struct._MatNd, ptr %64, i32 0, i32 2
  %66 = load i32, ptr %65, align 4, !tbaa !13
  %67 = invoke ptr @MatNd_create(i32 noundef %63, i32 noundef %66)
          to label %68 unwind label %77

68:                                               ; preds = %61
  store ptr %67, ptr %17, align 8, !tbaa !9
  %69 = load ptr, ptr %17, align 8, !tbaa !9
  %70 = load ptr, ptr %10, align 8, !tbaa !9
  invoke void @MatNd_copyRow(ptr noundef %69, i32 noundef 0, ptr noundef %70, i32 noundef 1)
          to label %71 unwind label %77

71:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 1, ptr %18, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %171, %71
  %73 = load i32, ptr %18, align 4, !tbaa !5
  %74 = load i32, ptr %6, align 4, !tbaa !5
  %75 = icmp ule i32 %73, %74
  br i1 %75, label %81, label %76

76:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %181

77:                                               ; preds = %188, %186, %183, %181, %68, %61
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %12, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %13, align 4
  br label %191

81:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %82 = invoke ptr @MatNd_create(i32 noundef 4, i32 noundef 5)
          to label %83 unwind label %142

83:                                               ; preds = %81
  store ptr %82, ptr %19, align 8, !tbaa !9
  %84 = load i32, ptr %18, align 4, !tbaa !5
  %85 = uitofp i32 %84 to double
  %86 = load double, ptr %7, align 8, !tbaa !11
  %87 = fmul double %85, %86
  invoke void @_ZNK3Rcs16ViaPointSequence22computeTrajectoryPointERdS1_S1_d(ptr noundef nonnull align 8 dereferenceable(104) %11, ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16, double noundef %87)
          to label %88 unwind label %142

88:                                               ; preds = %83
  %89 = load ptr, ptr %19, align 8, !tbaa !9
  %90 = load i32, ptr %18, align 4, !tbaa !5
  %91 = uitofp i32 %90 to double
  %92 = load double, ptr %7, align 8, !tbaa !11
  %93 = fmul double %91, %92
  invoke void @MatNd_set(ptr noundef %89, i32 noundef 0, i32 noundef 0, double noundef %93)
          to label %94 unwind label %142

94:                                               ; preds = %88
  %95 = load ptr, ptr %19, align 8, !tbaa !9
  %96 = load double, ptr %14, align 8, !tbaa !11
  invoke void @MatNd_set(ptr noundef %95, i32 noundef 0, i32 noundef 1, double noundef %96)
          to label %97 unwind label %142

97:                                               ; preds = %94
  %98 = load ptr, ptr %19, align 8, !tbaa !9
  %99 = load double, ptr %15, align 8, !tbaa !11
  invoke void @MatNd_set(ptr noundef %98, i32 noundef 0, i32 noundef 2, double noundef %99)
          to label %100 unwind label %142

100:                                              ; preds = %97
  %101 = load ptr, ptr %19, align 8, !tbaa !9
  %102 = load double, ptr %16, align 8, !tbaa !11
  invoke void @MatNd_set(ptr noundef %101, i32 noundef 0, i32 noundef 3, double noundef %102)
          to label %103 unwind label %142

103:                                              ; preds = %100
  %104 = load ptr, ptr %19, align 8, !tbaa !9
  invoke void @MatNd_set(ptr noundef %104, i32 noundef 0, i32 noundef 4, double noundef 7.000000e+00)
          to label %105 unwind label %142

105:                                              ; preds = %103
  %106 = load ptr, ptr %19, align 8, !tbaa !9
  %107 = invoke ptr @MatNd_getRowPtr(ptr noundef %106, i32 noundef 1)
          to label %108 unwind label %142

108:                                              ; preds = %105
  %109 = load ptr, ptr %9, align 8, !tbaa !9
  %110 = invoke ptr @MatNd_getRowPtr(ptr noundef %109, i32 noundef 1)
          to label %111 unwind label %142

111:                                              ; preds = %108
  invoke void @VecNd_copy(ptr noundef %107, ptr noundef %110, i32 noundef 5)
          to label %112 unwind label %142

112:                                              ; preds = %111
  %113 = load ptr, ptr %19, align 8, !tbaa !9
  %114 = invoke ptr @MatNd_getRowPtr(ptr noundef %113, i32 noundef 2)
          to label %115 unwind label %142

115:                                              ; preds = %112
  %116 = load ptr, ptr %9, align 8, !tbaa !9
  %117 = invoke ptr @MatNd_getRowPtr(ptr noundef %116, i32 noundef 2)
          to label %118 unwind label %142

118:                                              ; preds = %115
  invoke void @VecNd_copy(ptr noundef %114, ptr noundef %117, i32 noundef 5)
          to label %119 unwind label %142

119:                                              ; preds = %118
  %120 = load ptr, ptr %19, align 8, !tbaa !9
  %121 = invoke ptr @MatNd_getRowPtr(ptr noundef %120, i32 noundef 3)
          to label %122 unwind label %142

122:                                              ; preds = %119
  %123 = load ptr, ptr %9, align 8, !tbaa !9
  %124 = invoke ptr @MatNd_getRowPtr(ptr noundef %123, i32 noundef 2)
          to label %125 unwind label %142

125:                                              ; preds = %122
  invoke void @VecNd_copy(ptr noundef %121, ptr noundef %124, i32 noundef 5)
          to label %126 unwind label %142

126:                                              ; preds = %125
  %127 = load ptr, ptr %19, align 8, !tbaa !9
  %128 = load i32, ptr %18, align 4, !tbaa !5
  %129 = uitofp i32 %128 to double
  %130 = load double, ptr %7, align 8, !tbaa !11
  %131 = call double @llvm.fmuladd.f64(double %129, double %130, double 1.000000e+00)
  invoke void @MatNd_set(ptr noundef %127, i32 noundef 3, i32 noundef 0, double noundef %131)
          to label %132 unwind label %142

132:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 104, ptr %20) #6
  %133 = load ptr, ptr %19, align 8, !tbaa !9
  invoke void @_ZN3Rcs16ViaPointSequenceC1EPK6_MatNdNS0_12ViaPointTypeE(ptr noundef nonnull align 8 dereferenceable(104) %20, ptr noundef %133, i32 noundef 0)
          to label %134 unwind label %146

134:                                              ; preds = %132
  br label %135

135:                                              ; preds = %134
  %136 = invoke noundef zeroext i1 @_ZNK3Rcs16ViaPointSequence5checkEv(ptr noundef nonnull align 8 dereferenceable(104) %20)
          to label %137 unwind label %150

137:                                              ; preds = %135
  br i1 %136, label %154, label %138

138:                                              ; preds = %137
  %139 = load ptr, ptr @stderr, align 8, !tbaa !9
  %140 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %139, ptr noundef @.str.57, ptr noundef @.str.3, ptr noundef @__func__._Z21testViaPointSequence2iPPc, i32 noundef 3406, ptr noundef @.str.346) #6
  invoke void @print_trace()
          to label %141 unwind label %150

141:                                              ; preds = %138
  call void @abort() #7
  unreachable

142:                                              ; preds = %126, %125, %122, %119, %118, %115, %112, %111, %108, %105, %103, %100, %97, %94, %88, %83, %81
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %12, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %13, align 4
  br label %180

146:                                              ; preds = %132
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %12, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %13, align 4
  br label %179

150:                                              ; preds = %156, %138, %135
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %12, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %13, align 4
  br label %178

154:                                              ; preds = %137
  br label %155

155:                                              ; preds = %154
  br label %156

156:                                              ; preds = %155
  %157 = load ptr, ptr %19, align 8, !tbaa !9
  invoke void @MatNd_printCommentDigits(ptr noundef @.str.347, ptr noundef %157, i32 noundef 4)
          to label %158 unwind label %150

158:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %159 = load ptr, ptr %10, align 8, !tbaa !9
  %160 = invoke ptr @MatNd_clone(ptr noundef %159)
          to label %161 unwind label %174

161:                                              ; preds = %158
  store ptr %160, ptr %21, align 8, !tbaa !9
  %162 = load ptr, ptr %21, align 8, !tbaa !9
  %163 = load double, ptr %5, align 8, !tbaa !11
  invoke void @_ZNK3Rcs16ViaPointSequence17computeTrajectoryEP6_MatNdddd(ptr noundef nonnull align 8 dereferenceable(104) %20, ptr noundef %162, double noundef 0.000000e+00, double noundef 1.500000e+00, double noundef %163)
          to label %164 unwind label %174

164:                                              ; preds = %161
  %165 = load ptr, ptr %17, align 8, !tbaa !9
  %166 = load i32, ptr %18, align 4, !tbaa !5
  %167 = load ptr, ptr %21, align 8, !tbaa !9
  invoke void @MatNd_copyRow(ptr noundef %165, i32 noundef %166, ptr noundef %167, i32 noundef 1)
          to label %168 unwind label %174

168:                                              ; preds = %164
  %169 = load ptr, ptr %19, align 8, !tbaa !9
  invoke void @MatNd_destroy(ptr noundef %169)
          to label %170 unwind label %174

170:                                              ; preds = %168
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @_ZN3Rcs16ViaPointSequenceD1Ev(ptr noundef nonnull align 8 dereferenceable(104) %20) #6
  call void @llvm.lifetime.end.p0(i64 104, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %171

171:                                              ; preds = %170
  %172 = load i32, ptr %18, align 4, !tbaa !5
  %173 = add i32 %172, 1
  store i32 %173, ptr %18, align 4, !tbaa !5
  br label %72, !llvm.loop !16

174:                                              ; preds = %168, %164, %161, %158
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %12, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %178

178:                                              ; preds = %174, %150
  call void @_ZN3Rcs16ViaPointSequenceD1Ev(ptr noundef nonnull align 8 dereferenceable(104) %20) #6
  br label %179

179:                                              ; preds = %178, %146
  call void @llvm.lifetime.end.p0(i64 104, ptr %20) #6
  br label %180

180:                                              ; preds = %179, %142
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %191

181:                                              ; preds = %76
  %182 = load ptr, ptr %17, align 8, !tbaa !9
  invoke void @MatNd_transposeSelf(ptr noundef %182)
          to label %183 unwind label %77

183:                                              ; preds = %181
  %184 = load ptr, ptr %17, align 8, !tbaa !9
  %185 = invoke zeroext i1 @MatNd_gnuplot(ptr noundef @.str.348, ptr noundef %184)
          to label %186 unwind label %77

186:                                              ; preds = %183
  %187 = load ptr, ptr %9, align 8, !tbaa !9
  invoke void @MatNd_destroy(ptr noundef %187)
          to label %188 unwind label %77

188:                                              ; preds = %186
  %189 = load ptr, ptr %17, align 8, !tbaa !9
  invoke void @MatNd_destroy(ptr noundef %189)
          to label %190 unwind label %77

190:                                              ; preds = %188
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @_ZN3Rcs16ViaPointSequenceD1Ev(ptr noundef nonnull align 8 dereferenceable(104) %11) #6
  call void @llvm.lifetime.end.p0(i64 104, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  ret i1 true

191:                                              ; preds = %180, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %192

192:                                              ; preds = %191, %52
  call void @_ZN3Rcs16ViaPointSequenceD1Ev(ptr noundef nonnull align 8 dereferenceable(104) %11) #6
  call void @llvm.lifetime.end.p0(i64 104, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %193

193:                                              ; preds = %192
  %194 = load ptr, ptr %12, align 8
  %195 = load i32, ptr %13, align 4
  %196 = insertvalue { ptr, i32 } poison, ptr %194, 0
  %197 = insertvalue { ptr, i32 } %196, i32 %195, 1
  resume { ptr, i32 } %197
}

declare void @_ZNK3Rcs16ViaPointSequence17computeTrajectoryEP6_MatNdddd(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef, double noundef, double noundef, double noundef) #2

declare void @MatNd_copyRow(ptr noundef, i32 noundef, ptr noundef, i32 noundef) #2

declare void @_ZNK3Rcs16ViaPointSequence22computeTrajectoryPointERdS1_S1_d(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), double noundef) #2

declare zeroext i1 @MatNd_gnuplot(ptr noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "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 = { "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 = { noreturn nounwind "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { nounwind }
attributes #7 = { noreturn 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !6, i64 12}
!14 = !{!"_ZTS6_MatNd", !10, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !15, i64 20}
!15 = !{!"bool", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"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"

%"class.Rcs::CmdLineParser" = type { i8 }
%"class.Rcs::ViaPointSequence" = type { ptr, ptr, ptr, ptr, ptr, ptr, i8, i32, %"class.std::vector", %"class.std::vector.3" }
%"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.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = 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 }

@.str.3 = external hidden unnamed_addr constant [74 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.57 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.279 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.336 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.338 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.339 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.340 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.341 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.342 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.343 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.344 = external hidden unnamed_addr constant [50 x i8], align 1
@__func__._Z21testViaPointSequence2iPPc = external hidden unnamed_addr constant [22 x i8], align 1
@.str.345 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.346 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.347 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.348 = external hidden unnamed_addr constant [5 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

declare void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, ptr noundef) unnamed_addr #2

declare noundef zeroext i1 @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #2

declare ptr @MatNd_create(i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @MatNd_printCommentDigits(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @MatNd_destroy(ptr noundef) local_unnamed_addr #2

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

declare ptr @MatNd_clone(ptr noundef) local_unnamed_addr #2

declare void @print_trace() local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #3

; Function Attrs: nounwind
declare i64 @lround(double noundef) local_unnamed_addr #4

declare void @VecNd_copy(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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

declare void @MatNd_transposeSelf(ptr noundef) local_unnamed_addr #2

declare ptr @MatNd_getRowPtr(ptr noundef, i32 noundef) local_unnamed_addr #2

declare noundef zeroext i1 @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPjS2_z(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #2

declare ptr @MatNd_createFromString(ptr noundef) local_unnamed_addr #2

declare void @_ZN3Rcs16ViaPointSequenceC1EPK6_MatNdNS0_12ViaPointTypeE(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef, i32 noundef) unnamed_addr #2

declare noundef zeroext i1 @_ZNK3Rcs16ViaPointSequence5checkEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN3Rcs16ViaPointSequenceD1Ev(ptr noundef nonnull align 8 dereferenceable(104)) unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z21testViaPointSequence2iPPc(i32 noundef %0, ptr noundef %1) local_unnamed_addr #6 personality ptr @__gxx_personality_v0 {
  %3 = alloca double, align 8
  %4 = alloca i32, align 4
  %5 = alloca double, align 8
  %6 = alloca %"class.Rcs::CmdLineParser", align 1
  %7 = alloca %"class.Rcs::ViaPointSequence", align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca %"class.Rcs::ViaPointSequence", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  store double 1.000000e-02, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 4, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  store double 1.000000e-01, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  call void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1) %6, i32 noundef %0, ptr noundef %1)
  %12 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull @.str.279, ptr noundef nonnull %3, ptr noundef nonnull @.str.339)
  %13 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPjS2_z(ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull @.str.340, ptr noundef nonnull %4, ptr noundef nonnull @.str.341)
  %14 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull @.str.342, ptr noundef nonnull %5, ptr noundef nonnull @.str.343)
  %15 = call ptr @MatNd_createFromString(ptr noundef nonnull @.str.344)
  %.not = icmp eq ptr %15, null
  br i1 %.not, label %16, label %19

16:                                               ; preds = %2
  %17 = load ptr, ptr @stderr, align 8, !tbaa !11
  %18 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__._Z21testViaPointSequence2iPPc, i32 noundef 3354, ptr noundef nonnull @.str.336) #8
  call void @print_trace()
  call void @abort() #9
  unreachable

19:                                               ; preds = %2
  call void @MatNd_printCommentDigits(ptr noundef nonnull @.str.345, ptr noundef nonnull %15, i32 noundef 4)
  %20 = load double, ptr %3, align 8, !tbaa !5
  %21 = fdiv double 1.500000e+00, %20
  %22 = call i64 @lround(double noundef %21) #7
  %23 = trunc i64 %22 to i32
  %24 = add i32 %23, 1
  %25 = call ptr @MatNd_create(i32 noundef 4, i32 noundef %24)
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %7) #7
  call void @_ZN3Rcs16ViaPointSequenceC1EPK6_MatNdNS0_12ViaPointTypeE(ptr noundef nonnull align 8 dereferenceable(104) %7, ptr noundef nonnull %15, i32 noundef 0)
  %26 = invoke noundef zeroext i1 @_ZNK3Rcs16ViaPointSequence5checkEv(ptr noundef nonnull align 8 dereferenceable(104) %7)
          to label %27 unwind label %32

27:                                               ; preds = %19
  br i1 %26, label %34, label %28

28:                                               ; preds = %27
  %29 = load ptr, ptr @stderr, align 8, !tbaa !11
  %30 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__._Z21testViaPointSequence2iPPc, i32 noundef 3359, ptr noundef nonnull @.str.338) #8
  invoke void @print_trace()
          to label %31 unwind label %32

31:                                               ; preds = %28
  call void @abort() #9
  unreachable

32:                                               ; preds = %34, %28, %19
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %111

34:                                               ; preds = %27
  %35 = load double, ptr %3, align 8, !tbaa !5
  invoke void @_ZNK3Rcs16ViaPointSequence17computeTrajectoryEP6_MatNdddd(ptr noundef nonnull align 8 dereferenceable(104) %7, ptr noundef %25, double noundef 0.000000e+00, double noundef 1.500000e+00, double noundef %35)
          to label %36 unwind label %32

36:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %37 = load i32, ptr %4, align 4, !tbaa !9
  %38 = add i32 %37, 1
  %39 = getelementptr inbounds i8, ptr %25, i64 12
  %40 = load i32, ptr %39, align 4, !tbaa !13
  %41 = invoke ptr @MatNd_create(i32 noundef %38, i32 noundef %40)
          to label %42 unwind label %44

42:                                               ; preds = %36
  invoke void @MatNd_copyRow(ptr noundef %41, i32 noundef 0, ptr noundef nonnull %25, i32 noundef 1)
          to label %.preheader unwind label %44

.preheader:                                       ; preds = %42
  %43 = load i32, ptr %4, align 4, !tbaa !9
  %.not4652 = icmp eq i32 %43, 0
  br i1 %.not4652, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %98, %.preheader
  invoke void @MatNd_transposeSelf(ptr noundef %41)
          to label %105 unwind label %44

44:                                               ; preds = %108, %107, %105, %._crit_edge, %42, %36
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %110

.lr.ph:                                           ; preds = %.preheader, %98
  %.04453 = phi i32 [ %99, %98 ], [ 1, %.preheader ]
  %46 = invoke ptr @MatNd_create(i32 noundef 4, i32 noundef 5)
          to label %47 unwind label %87

47:                                               ; preds = %.lr.ph
  %48 = uitofp i32 %.04453 to double
  %49 = load double, ptr %5, align 8, !tbaa !5
  %50 = fmul double %49, %48
  invoke void @_ZNK3Rcs16ViaPointSequence22computeTrajectoryPointERdS1_S1_d(ptr noundef nonnull align 8 dereferenceable(104) %7, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10, double noundef %50)
          to label %51 unwind label %87

51:                                               ; preds = %47
  %52 = load double, ptr %5, align 8, !tbaa !5
  %53 = fmul double %52, %48
  invoke void @MatNd_set(ptr noundef %46, i32 noundef 0, i32 noundef 0, double noundef %53)
          to label %54 unwind label %87

54:                                               ; preds = %51
  %55 = load double, ptr %8, align 8, !tbaa !5
  invoke void @MatNd_set(ptr noundef %46, i32 noundef 0, i32 noundef 1, double noundef %55)
          to label %56 unwind label %87

56:                                               ; preds = %54
  %57 = load double, ptr %9, align 8, !tbaa !5
  invoke void @MatNd_set(ptr noundef %46, i32 noundef 0, i32 noundef 2, double noundef %57)
          to label %58 unwind label %87

58:                                               ; preds = %56
  %59 = load double, ptr %10, align 8, !tbaa !5
  invoke void @MatNd_set(ptr noundef %46, i32 noundef 0, i32 noundef 3, double noundef %59)
          to label %60 unwind label %87

60:                                               ; preds = %58
  invoke void @MatNd_set(ptr noundef %46, i32 noundef 0, i32 noundef 4, double noundef 7.000000e+00)
          to label %61 unwind label %87

61:                                               ; preds = %60
  %62 = invoke ptr @MatNd_getRowPtr(ptr noundef %46, i32 noundef 1)
          to label %63 unwind label %87

63:                                               ; preds = %61
  %64 = invoke ptr @MatNd_getRowPtr(ptr noundef nonnull %15, i32 noundef 1)
          to label %65 unwind label %87

65:                                               ; preds = %63
  invoke void @VecNd_copy(ptr noundef %62, ptr noundef %64, i32 noundef 5)
          to label %66 unwind label %87

66:                                               ; preds = %65
  %67 = invoke ptr @MatNd_getRowPtr(ptr noundef %46, i32 noundef 2)
          to label %68 unwind label %87

68:                                               ; preds = %66
  %69 = invoke ptr @MatNd_getRowPtr(ptr noundef nonnull %15, i32 noundef 2)
          to label %70 unwind label %87

70:                                               ; preds = %68
  invoke void @VecNd_copy(ptr noundef %67, ptr noundef %69, i32 noundef 5)
          to label %71 unwind label %87

71:                                               ; preds = %70
  %72 = invoke ptr @MatNd_getRowPtr(ptr noundef %46, i32 noundef 3)
          to label %73 unwind label %87

73:                                               ; preds = %71
  %74 = invoke ptr @MatNd_getRowPtr(ptr noundef nonnull %15, i32 noundef 2)
          to label %75 unwind label %87

75:                                               ; preds = %73
  invoke void @VecNd_copy(ptr noundef %72, ptr noundef %74, i32 noundef 5)
          to label %76 unwind label %87

76:                                               ; preds = %75
  %77 = load double, ptr %5, align 8, !tbaa !5
  %78 = call double @llvm.fmuladd.f64(double %48, double %77, double 1.000000e+00)
  invoke void @MatNd_set(ptr noundef %46, i32 noundef 3, i32 noundef 0, double noundef %78)
          to label %79 unwind label %87

79:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %11) #7
  invoke void @_ZN3Rcs16ViaPointSequenceC1EPK6_MatNdNS0_12ViaPointTypeE(ptr noundef nonnull align 8 dereferenceable(104) %11, ptr noundef %46, i32 noundef 0)
          to label %80 unwind label %89

80:                                               ; preds = %79
  %81 = invoke noundef zeroext i1 @_ZNK3Rcs16ViaPointSequence5checkEv(ptr noundef nonnull align 8 dereferenceable(104) %11)
          to label %82 unwind label %.loopexit

82:                                               ; preds = %80
  br i1 %81, label %91, label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr @stderr, align 8, !tbaa !11
  %85 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %84, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__._Z21testViaPointSequence2iPPc, i32 noundef 3406, ptr noundef nonnull @.str.346) #8
  invoke void @print_trace()
          to label %86 unwind label %.loopexit.split-lp

86:                                               ; preds = %83
  call void @abort() #9
  unreachable

87:                                               ; preds = %76, %75, %73, %71, %70, %68, %66, %65, %63, %61, %60, %58, %56, %54, %51, %47, %.lr.ph
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %110

89:                                               ; preds = %79
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %104

.loopexit:                                        ; preds = %80, %91
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %103

.loopexit.split-lp:                               ; preds = %83
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %103

91:                                               ; preds = %82
  invoke void @MatNd_printCommentDigits(ptr noundef nonnull @.str.347, ptr noundef %46, i32 noundef 4)
          to label %92 unwind label %.loopexit

92:                                               ; preds = %91
  %93 = invoke ptr @MatNd_clone(ptr noundef %25)
          to label %94 unwind label %101

94:                                               ; preds = %92
  %95 = load double, ptr %3, align 8, !tbaa !5
  invoke void @_ZNK3Rcs16ViaPointSequence17computeTrajectoryEP6_MatNdddd(ptr noundef nonnull align 8 dereferenceable(104) %11, ptr noundef %93, double noundef 0.000000e+00, double noundef 1.500000e+00, double noundef %95)
          to label %96 unwind label %101

96:                                               ; preds = %94
  invoke void @MatNd_copyRow(ptr noundef %41, i32 noundef %.04453, ptr noundef %93, i32 noundef 1)
          to label %97 unwind label %101

97:                                               ; preds = %96
  invoke void @MatNd_destroy(ptr noundef %46)
          to label %98 unwind label %101

98:                                               ; preds = %97
  call void @_ZN3Rcs16ViaPointSequenceD1Ev(ptr noundef nonnull align 8 dereferenceable(104) %11) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %11) #7
  %99 = add i32 %.04453, 1
  %100 = load i32, ptr %4, align 4, !tbaa !9
  %.not46 = icmp ugt i32 %99, %100
  br i1 %.not46, label %._crit_edge, label %.lr.ph, !llvm.loop !16

101:                                              ; preds = %97, %96, %94, %92
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %103

103:                                              ; preds = %.loopexit, %.loopexit.split-lp, %101
  %.pn = phi { ptr, i32 } [ %102, %101 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN3Rcs16ViaPointSequenceD1Ev(ptr noundef nonnull align 8 dereferenceable(104) %11) #7
  br label %104

104:                                              ; preds = %103, %89
  %.pn.pn = phi { ptr, i32 } [ %.pn, %103 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %11) #7
  br label %110

105:                                              ; preds = %._crit_edge
  %106 = invoke zeroext i1 @MatNd_gnuplot(ptr noundef nonnull @.str.348, ptr noundef %41)
          to label %107 unwind label %44

107:                                              ; preds = %105
  invoke void @MatNd_destroy(ptr noundef nonnull %15)
          to label %108 unwind label %44

108:                                              ; preds = %107
  invoke void @MatNd_destroy(ptr noundef %41)
          to label %109 unwind label %44

109:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @_ZN3Rcs16ViaPointSequenceD1Ev(ptr noundef nonnull align 8 dereferenceable(104) %7) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  ret i1 true

110:                                              ; preds = %87, %104, %44
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %45, %44 ], [ %.pn.pn, %104 ], [ %88, %87 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %111

111:                                              ; preds = %110, %32
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %110 ], [ %33, %32 ]
  call void @_ZN3Rcs16ViaPointSequenceD1Ev(ptr noundef nonnull align 8 dereferenceable(104) %7) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

declare void @_ZNK3Rcs16ViaPointSequence17computeTrajectoryEP6_MatNdddd(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef, double noundef, double noundef, double noundef) local_unnamed_addr #2

declare void @MatNd_copyRow(ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @_ZNK3Rcs16ViaPointSequence22computeTrajectoryPointERdS1_S1_d(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), double noundef) local_unnamed_addr #2

declare zeroext i1 @MatNd_gnuplot(ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nofree nounwind "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 = { "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 = { noreturn nounwind "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 "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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #7 = { nounwind }
attributes #8 = { cold nounwind }
attributes #9 = { noreturn 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !10, i64 12}
!14 = !{!"_ZTS6_MatNd", !12, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !15, i64 20}
!15 = !{!"bool", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


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