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

; 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
@.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
@__func__._Z24testViaPointSequence_newiPPc = external hidden unnamed_addr constant [25 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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z24testViaPointSequence_newiPPc(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 double, align 8
  %21 = alloca %"class.Rcs::ViaPointSequence", align 8
  %22 = 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
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1) %8, i32 noundef %23, ptr noundef %24)
  %25 = 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)
  %26 = 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)
  %27 = 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
  %28 = call ptr @MatNd_createFromString(ptr noundef @.str.344)
  store ptr %28, ptr %9, align 8, !tbaa !9
  br label %29

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

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

35:                                               ; preds = %29
  br label %36

36:                                               ; preds = %35
  br label %37

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

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

48:                                               ; preds = %46
  br i1 %47, label %57, label %49

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

52:                                               ; preds = %49
  call void @abort() #7
  unreachable

53:                                               ; preds = %59, %49, %46
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %12, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %13, align 4
  br label %206

57:                                               ; preds = %48
  br label %58

58:                                               ; preds = %57
  br label %59

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

62:                                               ; preds = %59
  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
  %63 = load i32, ptr %6, align 4, !tbaa !5
  %64 = add i32 %63, 1
  %65 = load ptr, ptr %10, align 8, !tbaa !9
  %66 = getelementptr inbounds %struct._MatNd, ptr %65, i32 0, i32 2
  %67 = load i32, ptr %66, align 4, !tbaa !13
  %68 = invoke ptr @MatNd_create(i32 noundef %64, i32 noundef %67)
          to label %69 unwind label %78

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

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

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

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

78:                                               ; preds = %202, %200, %197, %195, %69, %62
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %12, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %13, align 4
  br label %205

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

84:                                               ; preds = %82
  store ptr %83, ptr %19, align 8, !tbaa !9
  %85 = load ptr, ptr %19, align 8, !tbaa !9
  %86 = load ptr, ptr %9, align 8, !tbaa !9
  invoke void @MatNd_copyRow(ptr noundef %85, i32 noundef 0, ptr noundef %86, i32 noundef 0)
          to label %87 unwind label %151

87:                                               ; preds = %84
  %88 = load i32, ptr %18, align 4, !tbaa !5
  %89 = uitofp i32 %88 to double
  %90 = load double, ptr %7, align 8, !tbaa !11
  %91 = fmul double %89, %90
  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 %91)
          to label %92 unwind label %151

92:                                               ; preds = %87
  %93 = load ptr, ptr %19, align 8, !tbaa !9
  %94 = load i32, ptr %18, align 4, !tbaa !5
  %95 = uitofp i32 %94 to double
  %96 = load double, ptr %7, align 8, !tbaa !11
  %97 = fmul double %95, %96
  invoke void @MatNd_set(ptr noundef %93, i32 noundef 1, i32 noundef 0, double noundef %97)
          to label %98 unwind label %151

98:                                               ; preds = %92
  %99 = load ptr, ptr %19, align 8, !tbaa !9
  %100 = load double, ptr %14, align 8, !tbaa !11
  invoke void @MatNd_set(ptr noundef %99, i32 noundef 1, i32 noundef 1, double noundef %100)
          to label %101 unwind label %151

101:                                              ; preds = %98
  %102 = load ptr, ptr %19, align 8, !tbaa !9
  %103 = load double, ptr %15, align 8, !tbaa !11
  invoke void @MatNd_set(ptr noundef %102, i32 noundef 1, i32 noundef 2, double noundef %103)
          to label %104 unwind label %151

104:                                              ; preds = %101
  %105 = load ptr, ptr %19, align 8, !tbaa !9
  %106 = load double, ptr %16, align 8, !tbaa !11
  invoke void @MatNd_set(ptr noundef %105, i32 noundef 1, i32 noundef 3, double noundef %106)
          to label %107 unwind label %151

107:                                              ; preds = %104
  %108 = load ptr, ptr %19, align 8, !tbaa !9
  invoke void @MatNd_set(ptr noundef %108, i32 noundef 1, i32 noundef 4, double noundef 7.000000e+00)
          to label %109 unwind label %151

109:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %110 = load i32, ptr %18, align 4, !tbaa !5
  %111 = uitofp i32 %110 to double
  %112 = load double, ptr %7, align 8, !tbaa !11
  %113 = call double @llvm.fmuladd.f64(double %111, double %112, double 5.000000e-01)
  store double %113, ptr %20, align 8, !tbaa !11
  %114 = load double, ptr %20, align 8, !tbaa !11
  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 %114)
          to label %115 unwind label %155

115:                                              ; preds = %109
  %116 = load ptr, ptr %19, align 8, !tbaa !9
  %117 = load double, ptr %20, align 8, !tbaa !11
  invoke void @MatNd_set(ptr noundef %116, i32 noundef 2, i32 noundef 0, double noundef %117)
          to label %118 unwind label %155

118:                                              ; preds = %115
  %119 = load ptr, ptr %19, align 8, !tbaa !9
  %120 = load double, ptr %14, align 8, !tbaa !11
  invoke void @MatNd_set(ptr noundef %119, i32 noundef 2, i32 noundef 1, double noundef %120)
          to label %121 unwind label %155

121:                                              ; preds = %118
  %122 = load ptr, ptr %19, align 8, !tbaa !9
  %123 = load double, ptr %15, align 8, !tbaa !11
  invoke void @MatNd_set(ptr noundef %122, i32 noundef 2, i32 noundef 2, double noundef %123)
          to label %124 unwind label %155

124:                                              ; preds = %121
  %125 = load ptr, ptr %19, align 8, !tbaa !9
  %126 = load double, ptr %16, align 8, !tbaa !11
  invoke void @MatNd_set(ptr noundef %125, i32 noundef 2, i32 noundef 3, double noundef %126)
          to label %127 unwind label %155

127:                                              ; preds = %124
  %128 = load ptr, ptr %19, align 8, !tbaa !9
  invoke void @MatNd_set(ptr noundef %128, i32 noundef 2, i32 noundef 4, double noundef 1.000000e+00)
          to label %129 unwind label %155

129:                                              ; preds = %127
  %130 = load ptr, ptr %19, align 8, !tbaa !9
  %131 = load ptr, ptr %9, align 8, !tbaa !9
  invoke void @MatNd_copyRow(ptr noundef %130, i32 noundef 3, ptr noundef %131, i32 noundef 2)
          to label %132 unwind label %155

132:                                              ; preds = %129
  %133 = load ptr, ptr %19, align 8, !tbaa !9
  %134 = load ptr, ptr %9, align 8, !tbaa !9
  invoke void @MatNd_copyRow(ptr noundef %133, i32 noundef 4, ptr noundef %134, i32 noundef 3)
          to label %135 unwind label %155

135:                                              ; preds = %132
  %136 = load ptr, ptr %19, align 8, !tbaa !9
  %137 = load i32, ptr %18, align 4, !tbaa !5
  %138 = uitofp i32 %137 to double
  %139 = load double, ptr %7, align 8, !tbaa !11
  %140 = call double @llvm.fmuladd.f64(double %138, double %139, double 1.000000e+00)
  invoke void @MatNd_set(ptr noundef %136, i32 noundef 4, i32 noundef 0, double noundef %140)
          to label %141 unwind label %155

141:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 104, ptr %21) #6
  %142 = load ptr, ptr %19, align 8, !tbaa !9
  invoke void @_ZN3Rcs16ViaPointSequenceC1EPK6_MatNdNS0_12ViaPointTypeE(ptr noundef nonnull align 8 dereferenceable(104) %21, ptr noundef %142, i32 noundef 0)
          to label %143 unwind label %159

143:                                              ; preds = %141
  br label %144

144:                                              ; preds = %143
  %145 = invoke noundef zeroext i1 @_ZNK3Rcs16ViaPointSequence5checkEv(ptr noundef nonnull align 8 dereferenceable(104) %21)
          to label %146 unwind label %163

146:                                              ; preds = %144
  br i1 %145, label %167, label %147

147:                                              ; preds = %146
  %148 = load ptr, ptr @stderr, align 8, !tbaa !9
  %149 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %148, ptr noundef @.str.57, ptr noundef @.str.3, ptr noundef @__func__._Z24testViaPointSequence_newiPPc, i32 noundef 3493, ptr noundef @.str.346) #6
  invoke void @print_trace()
          to label %150 unwind label %163

150:                                              ; preds = %147
  call void @abort() #7
  unreachable

151:                                              ; preds = %107, %104, %101, %98, %92, %87, %84, %82
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %12, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %13, align 4
  br label %194

155:                                              ; preds = %135, %132, %129, %127, %124, %121, %118, %115, %109
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %12, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %13, align 4
  br label %193

159:                                              ; preds = %141
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %12, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %13, align 4
  br label %192

163:                                              ; preds = %169, %147, %144
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %12, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %13, align 4
  br label %191

167:                                              ; preds = %146
  br label %168

168:                                              ; preds = %167
  br label %169

169:                                              ; preds = %168
  %170 = load ptr, ptr %19, align 8, !tbaa !9
  invoke void @MatNd_printCommentDigits(ptr noundef @.str.347, ptr noundef %170, i32 noundef 4)
          to label %171 unwind label %163

171:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %172 = load ptr, ptr %10, align 8, !tbaa !9
  %173 = invoke ptr @MatNd_clone(ptr noundef %172)
          to label %174 unwind label %187

174:                                              ; preds = %171
  store ptr %173, ptr %22, align 8, !tbaa !9
  %175 = load ptr, ptr %22, align 8, !tbaa !9
  %176 = load double, ptr %5, align 8, !tbaa !11
  invoke void @_ZNK3Rcs16ViaPointSequence17computeTrajectoryEP6_MatNdddd(ptr noundef nonnull align 8 dereferenceable(104) %21, ptr noundef %175, double noundef 0.000000e+00, double noundef 1.500000e+00, double noundef %176)
          to label %177 unwind label %187

177:                                              ; preds = %174
  %178 = load ptr, ptr %17, align 8, !tbaa !9
  %179 = load i32, ptr %18, align 4, !tbaa !5
  %180 = load ptr, ptr %22, align 8, !tbaa !9
  invoke void @MatNd_copyRow(ptr noundef %178, i32 noundef %179, ptr noundef %180, i32 noundef 1)
          to label %181 unwind label %187

181:                                              ; preds = %177
  %182 = load ptr, ptr %19, align 8, !tbaa !9
  invoke void @MatNd_destroy(ptr noundef %182)
          to label %183 unwind label %187

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

184:                                              ; preds = %183
  %185 = load i32, ptr %18, align 4, !tbaa !5
  %186 = add i32 %185, 1
  store i32 %186, ptr %18, align 4, !tbaa !5
  br label %73, !llvm.loop !16

187:                                              ; preds = %181, %177, %174, %171
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %12, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %191

191:                                              ; preds = %187, %163
  call void @_ZN3Rcs16ViaPointSequenceD1Ev(ptr noundef nonnull align 8 dereferenceable(104) %21) #6
  br label %192

192:                                              ; preds = %191, %159
  call void @llvm.lifetime.end.p0(i64 104, ptr %21) #6
  br label %193

193:                                              ; preds = %192, %155
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %194

194:                                              ; preds = %193, %151
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %205

195:                                              ; preds = %77
  %196 = load ptr, ptr %17, align 8, !tbaa !9
  invoke void @MatNd_transposeSelf(ptr noundef %196)
          to label %197 unwind label %78

197:                                              ; preds = %195
  %198 = load ptr, ptr %17, align 8, !tbaa !9
  %199 = invoke zeroext i1 @MatNd_gnuplot(ptr noundef @.str.348, ptr noundef %198)
          to label %200 unwind label %78

200:                                              ; preds = %197
  %201 = load ptr, ptr %9, align 8, !tbaa !9
  invoke void @MatNd_destroy(ptr noundef %201)
          to label %202 unwind label %78

202:                                              ; preds = %200
  %203 = load ptr, ptr %17, align 8, !tbaa !9
  invoke void @MatNd_destroy(ptr noundef %203)
          to label %204 unwind label %78

204:                                              ; preds = %202
  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

205:                                              ; preds = %194, %78
  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 %206

206:                                              ; preds = %205, %53
  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 %207

207:                                              ; preds = %206
  %208 = load ptr, ptr %12, align 8
  %209 = load i32, ptr %13, align 4
  %210 = insertvalue { ptr, i32 } poison, ptr %208, 0
  %211 = insertvalue { ptr, i32 } %210, i32 %209, 1
  resume { ptr, i32 } %211
}

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
@.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
@__func__._Z24testViaPointSequence_newiPPc = external hidden unnamed_addr constant [25 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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z24testViaPointSequence_newiPPc(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__._Z24testViaPointSequence_newiPPc, i32 noundef 3437, 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__._Z24testViaPointSequence_newiPPc, i32 noundef 3442, 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 %112

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
  %.not5562 = icmp eq i32 %43, 0
  br i1 %.not5562, label %._crit_edge, label %.lr.ph

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

44:                                               ; preds = %109, %108, %106, %._crit_edge, %42, %36
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %111

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

47:                                               ; preds = %.lr.ph
  invoke void @MatNd_copyRow(ptr noundef %46, i32 noundef 0, ptr noundef nonnull %15, i32 noundef 0)
          to label %48 unwind label %86

48:                                               ; preds = %47
  %49 = uitofp i32 %.05363 to double
  %50 = load double, ptr %5, align 8, !tbaa !5
  %51 = fmul double %50, %49
  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 %51)
          to label %52 unwind label %86

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

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

57:                                               ; preds = %55
  %58 = load double, ptr %9, align 8, !tbaa !5
  invoke void @MatNd_set(ptr noundef %46, i32 noundef 1, i32 noundef 2, double noundef %58)
          to label %59 unwind label %86

59:                                               ; preds = %57
  %60 = load double, ptr %10, align 8, !tbaa !5
  invoke void @MatNd_set(ptr noundef %46, i32 noundef 1, i32 noundef 3, double noundef %60)
          to label %61 unwind label %86

61:                                               ; preds = %59
  invoke void @MatNd_set(ptr noundef %46, i32 noundef 1, i32 noundef 4, double noundef 7.000000e+00)
          to label %62 unwind label %86

62:                                               ; preds = %61
  %63 = load double, ptr %5, align 8, !tbaa !5
  %64 = call double @llvm.fmuladd.f64(double %49, double %63, double 5.000000e-01)
  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 %64)
          to label %65 unwind label %88

65:                                               ; preds = %62
  invoke void @MatNd_set(ptr noundef %46, i32 noundef 2, i32 noundef 0, double noundef %64)
          to label %66 unwind label %88

66:                                               ; preds = %65
  %67 = load double, ptr %8, align 8, !tbaa !5
  invoke void @MatNd_set(ptr noundef %46, i32 noundef 2, i32 noundef 1, double noundef %67)
          to label %68 unwind label %88

68:                                               ; preds = %66
  %69 = load double, ptr %9, align 8, !tbaa !5
  invoke void @MatNd_set(ptr noundef %46, i32 noundef 2, i32 noundef 2, double noundef %69)
          to label %70 unwind label %88

70:                                               ; preds = %68
  %71 = load double, ptr %10, align 8, !tbaa !5
  invoke void @MatNd_set(ptr noundef %46, i32 noundef 2, i32 noundef 3, double noundef %71)
          to label %72 unwind label %88

72:                                               ; preds = %70
  invoke void @MatNd_set(ptr noundef %46, i32 noundef 2, i32 noundef 4, double noundef 1.000000e+00)
          to label %73 unwind label %88

73:                                               ; preds = %72
  invoke void @MatNd_copyRow(ptr noundef %46, i32 noundef 3, ptr noundef nonnull %15, i32 noundef 2)
          to label %74 unwind label %88

74:                                               ; preds = %73
  invoke void @MatNd_copyRow(ptr noundef %46, i32 noundef 4, ptr noundef nonnull %15, i32 noundef 3)
          to label %75 unwind label %88

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

78:                                               ; preds = %75
  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 %79 unwind label %90

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

81:                                               ; preds = %79
  br i1 %80, label %92, label %82

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

85:                                               ; preds = %82
  call void @abort() #9
  unreachable

86:                                               ; preds = %61, %59, %57, %55, %52, %48, %47, %.lr.ph
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %111

88:                                               ; preds = %75, %74, %73, %72, %70, %68, %66, %65, %62
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %111

90:                                               ; preds = %78
  %91 = landingpad { ptr, i32 }
          cleanup
  br label %105

.loopexit:                                        ; preds = %79, %92
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %104

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

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

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

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

97:                                               ; preds = %95
  invoke void @MatNd_copyRow(ptr noundef %41, i32 noundef %.05363, ptr noundef %94, i32 noundef 1)
          to label %98 unwind label %102

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

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

102:                                              ; preds = %98, %97, %95, %93
  %103 = landingpad { ptr, i32 }
          cleanup
  br label %104

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

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

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

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

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

110:                                              ; preds = %109
  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

111:                                              ; preds = %86, %105, %88, %44
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %45, %44 ], [ %87, %86 ], [ %.pn.pn, %105 ], [ %89, %88 ]
  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 %112

112:                                              ; preds = %111, %32
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %111 ], [ %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.pn
}

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