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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@RCS_GLOBAL_RLOG_CB = external global ptr, align 8
@.str.23 = external hidden unnamed_addr constant [1 x i8], align 1
@__func__._ZNK3Rcs16ViaPointSequence5checkEv = external hidden unnamed_addr constant [6 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [23 x i8], align 1
@RcsLogLevel = external global i32, align 4
@.str.25 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [27 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: nounwind
declare i64 @lround(double noundef) #1

declare double @MatNd_get(ptr noundef, i32 noundef, i32 noundef) #2

declare zeroext i1 @Math_isBitSet(i32 noundef, i32 noundef) #2

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

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

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

declare void @MatNd_destroy(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN3Rcs16ViaPointSequence26computeNumberOfConstraintsEPK6_MatNd(ptr noundef) #3 align 2

declare void @MatNd_mul(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK3Rcs16ViaPointSequence5checkEv(ptr noundef nonnull align 8 dereferenceable(104) %0) #3 align 2 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca double, align 8
  %14 = alloca i32, align 4
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %18 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #5
  store i8 1, ptr %4, align 1, !tbaa !9
  %19 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %41

22:                                               ; preds = %1
  br label %23

23:                                               ; preds = %22
  %24 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %28

26:                                               ; preds = %23
  %27 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %27(i32 noundef 1, ptr noundef @.str.23, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 807, ptr noundef @.str.24)
  br label %28

28:                                               ; preds = %26, %23
  %29 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %30 = icmp sle i32 1, %29
  br i1 %30, label %31, label %38

31:                                               ; preds = %28
  %32 = load ptr, ptr @stderr, align 8, !tbaa !5
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef @.str.25, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 807) #5
  %34 = load ptr, ptr @stderr, align 8, !tbaa !5
  %35 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef @.str.24) #5
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef @.str.4) #5
  br label %38

38:                                               ; preds = %31, %28
  br label %39

39:                                               ; preds = %38
  br label %40

40:                                               ; preds = %39
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %786

41:                                               ; preds = %1
  %42 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %43 = load ptr, ptr %42, align 8, !tbaa !11
  %44 = getelementptr inbounds %struct._MatNd, ptr %43, i32 0, i32 2
  %45 = load i32, ptr %44, align 4, !tbaa !24
  %46 = icmp ult i32 %45, 5
  br i1 %46, label %47, label %74

47:                                               ; preds = %41
  br label %48

48:                                               ; preds = %47
  %49 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %57

51:                                               ; preds = %48
  %52 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %53 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %54 = load ptr, ptr %53, align 8, !tbaa !11
  %55 = getelementptr inbounds %struct._MatNd, ptr %54, i32 0, i32 2
  %56 = load i32, ptr %55, align 4, !tbaa !24
  call void (i32, ptr, ptr, i32, ptr, ...) %52(i32 noundef 1, ptr noundef @.str.23, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 816, ptr noundef @.str.26, i32 noundef %56)
  br label %57

57:                                               ; preds = %51, %48
  %58 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %59 = icmp sle i32 1, %58
  br i1 %59, label %60, label %71

60:                                               ; preds = %57
  %61 = load ptr, ptr @stderr, align 8, !tbaa !5
  %62 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef @.str.25, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 816) #5
  %63 = load ptr, ptr @stderr, align 8, !tbaa !5
  %64 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %65 = load ptr, ptr %64, align 8, !tbaa !11
  %66 = getelementptr inbounds %struct._MatNd, ptr %65, i32 0, i32 2
  %67 = load i32, ptr %66, align 4, !tbaa !24
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef @.str.26, i32 noundef %67) #5
  %69 = load ptr, ptr @stderr, align 8, !tbaa !5
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef @.str.4) #5
  br label %71

71:                                               ; preds = %60, %57
  br label %72

72:                                               ; preds = %71
  br label %73

73:                                               ; preds = %72
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %786

74:                                               ; preds = %41
  %75 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %76 = load ptr, ptr %75, align 8, !tbaa !11
  %77 = getelementptr inbounds %struct._MatNd, ptr %76, i32 0, i32 1
  %78 = load i32, ptr %77, align 8, !tbaa !26
  %79 = icmp ult i32 %78, 2
  br i1 %79, label %80, label %107

80:                                               ; preds = %74
  br label %81

81:                                               ; preds = %80
  %82 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %83 = icmp ne ptr %82, null
  br i1 %83, label %84, label %90

84:                                               ; preds = %81
  %85 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %86 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %87 = load ptr, ptr %86, align 8, !tbaa !11
  %88 = getelementptr inbounds %struct._MatNd, ptr %87, i32 0, i32 1
  %89 = load i32, ptr %88, align 8, !tbaa !26
  call void (i32, ptr, ptr, i32, ptr, ...) %85(i32 noundef 1, ptr noundef @.str.23, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 824, ptr noundef @.str.27, i32 noundef %89)
  br label %90

90:                                               ; preds = %84, %81
  %91 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %92 = icmp sle i32 1, %91
  br i1 %92, label %93, label %104

93:                                               ; preds = %90
  %94 = load ptr, ptr @stderr, align 8, !tbaa !5
  %95 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %94, ptr noundef @.str.25, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 824) #5
  %96 = load ptr, ptr @stderr, align 8, !tbaa !5
  %97 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %98 = load ptr, ptr %97, align 8, !tbaa !11
  %99 = getelementptr inbounds %struct._MatNd, ptr %98, i32 0, i32 1
  %100 = load i32, ptr %99, align 8, !tbaa !26
  %101 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %96, ptr noundef @.str.27, i32 noundef %100) #5
  %102 = load ptr, ptr @stderr, align 8, !tbaa !5
  %103 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %102, ptr noundef @.str.4) #5
  br label %104

104:                                              ; preds = %93, %90
  br label %105

105:                                              ; preds = %104
  br label %106

106:                                              ; preds = %105
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %786

107:                                              ; preds = %74
  %108 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %109 = load ptr, ptr %108, align 8, !tbaa !11
  %110 = getelementptr inbounds %struct._MatNd, ptr %109, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8, !tbaa !27
  %112 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %113 = load ptr, ptr %112, align 8, !tbaa !11
  %114 = getelementptr inbounds %struct._MatNd, ptr %113, i32 0, i32 2
  %115 = load i32, ptr %114, align 4, !tbaa !24
  %116 = mul i32 0, %115
  %117 = add i32 %116, 4
  %118 = zext i32 %117 to i64
  %119 = getelementptr inbounds double, ptr %111, i64 %118
  %120 = load double, ptr %119, align 8, !tbaa !28
  %121 = fcmp une double %120, 7.000000e+00
  br i1 %121, label %122, label %147

122:                                              ; preds = %107
  br label %123

123:                                              ; preds = %122
  %124 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %125 = icmp ne ptr %124, null
  br i1 %125, label %126, label %131

126:                                              ; preds = %123
  %127 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %128 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %129 = load ptr, ptr %128, align 8, !tbaa !11
  %130 = call double @MatNd_get(ptr noundef %129, i32 noundef 0, i32 noundef 4)
  call void (i32, ptr, ptr, i32, ptr, ...) %127(i32 noundef 1, ptr noundef @.str.23, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 832, ptr noundef @.str.28, double noundef %130)
  br label %131

131:                                              ; preds = %126, %123
  %132 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %133 = icmp sle i32 1, %132
  br i1 %133, label %134, label %144

134:                                              ; preds = %131
  %135 = load ptr, ptr @stderr, align 8, !tbaa !5
  %136 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %135, ptr noundef @.str.25, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 832) #5
  %137 = load ptr, ptr @stderr, align 8, !tbaa !5
  %138 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %139 = load ptr, ptr %138, align 8, !tbaa !11
  %140 = call double @MatNd_get(ptr noundef %139, i32 noundef 0, i32 noundef 4)
  %141 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %137, ptr noundef @.str.28, double noundef %140) #5
  %142 = load ptr, ptr @stderr, align 8, !tbaa !5
  %143 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %142, ptr noundef @.str.4) #5
  br label %144

144:                                              ; preds = %134, %131
  br label %145

145:                                              ; preds = %144
  br label %146

146:                                              ; preds = %145
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %786

147:                                              ; preds = %107
  %148 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %149 = load ptr, ptr %148, align 8, !tbaa !11
  %150 = getelementptr inbounds %struct._MatNd, ptr %149, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8, !tbaa !27
  %152 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %153 = load ptr, ptr %152, align 8, !tbaa !11
  %154 = getelementptr inbounds %struct._MatNd, ptr %153, i32 0, i32 1
  %155 = load i32, ptr %154, align 8, !tbaa !26
  %156 = sub i32 %155, 1
  %157 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %158 = load ptr, ptr %157, align 8, !tbaa !11
  %159 = getelementptr inbounds %struct._MatNd, ptr %158, i32 0, i32 2
  %160 = load i32, ptr %159, align 4, !tbaa !24
  %161 = mul i32 %156, %160
  %162 = add i32 %161, 4
  %163 = zext i32 %162 to i64
  %164 = getelementptr inbounds double, ptr %151, i64 %163
  %165 = load double, ptr %164, align 8, !tbaa !28
  %166 = fcmp une double %165, 7.000000e+00
  br i1 %166, label %167, label %192

167:                                              ; preds = %147
  br label %168

168:                                              ; preds = %167
  %169 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %170 = icmp ne ptr %169, null
  br i1 %170, label %171, label %176

171:                                              ; preds = %168
  %172 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %173 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %174 = load ptr, ptr %173, align 8, !tbaa !11
  %175 = call double @MatNd_get(ptr noundef %174, i32 noundef 0, i32 noundef 4)
  call void (i32, ptr, ptr, i32, ptr, ...) %172(i32 noundef 1, ptr noundef @.str.23, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 840, ptr noundef @.str.28, double noundef %175)
  br label %176

176:                                              ; preds = %171, %168
  %177 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %178 = icmp sle i32 1, %177
  br i1 %178, label %179, label %189

179:                                              ; preds = %176
  %180 = load ptr, ptr @stderr, align 8, !tbaa !5
  %181 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %180, ptr noundef @.str.25, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 840) #5
  %182 = load ptr, ptr @stderr, align 8, !tbaa !5
  %183 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %184 = load ptr, ptr %183, align 8, !tbaa !11
  %185 = call double @MatNd_get(ptr noundef %184, i32 noundef 0, i32 noundef 4)
  %186 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %182, ptr noundef @.str.28, double noundef %185) #5
  %187 = load ptr, ptr @stderr, align 8, !tbaa !5
  %188 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %187, ptr noundef @.str.4) #5
  br label %189

189:                                              ; preds = %179, %176
  br label %190

190:                                              ; preds = %189
  br label %191

191:                                              ; preds = %190
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %786

192:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %193 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %194 = load ptr, ptr %193, align 8, !tbaa !11
  %195 = call noundef i64 @_ZN3Rcs16ViaPointSequence26computeNumberOfConstraintsEPK6_MatNd(ptr noundef %194)
  %196 = trunc i64 %195 to i32
  store i32 %196, ptr %6, align 4, !tbaa !22
  %197 = load i32, ptr %6, align 4, !tbaa !22
  %198 = icmp ult i32 %197, 6
  br i1 %198, label %199, label %220

199:                                              ; preds = %192
  br label %200

200:                                              ; preds = %199
  %201 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %202 = icmp ne ptr %201, null
  br i1 %202, label %203, label %206

203:                                              ; preds = %200
  %204 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %205 = load i32, ptr %6, align 4, !tbaa !22
  call void (i32, ptr, ptr, i32, ptr, ...) %204(i32 noundef 1, ptr noundef @.str.23, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 848, ptr noundef @.str.29, i32 noundef %205)
  br label %206

206:                                              ; preds = %203, %200
  %207 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %208 = icmp sle i32 1, %207
  br i1 %208, label %209, label %217

209:                                              ; preds = %206
  %210 = load ptr, ptr @stderr, align 8, !tbaa !5
  %211 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %210, ptr noundef @.str.25, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 848) #5
  %212 = load ptr, ptr @stderr, align 8, !tbaa !5
  %213 = load i32, ptr %6, align 4, !tbaa !22
  %214 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %212, ptr noundef @.str.29, i32 noundef %213) #5
  %215 = load ptr, ptr @stderr, align 8, !tbaa !5
  %216 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %215, ptr noundef @.str.4) #5
  br label %217

217:                                              ; preds = %209, %206
  br label %218

218:                                              ; preds = %217
  br label %219

219:                                              ; preds = %218
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %785

220:                                              ; preds = %192
  %221 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 5
  %222 = load ptr, ptr %221, align 8, !tbaa !30
  %223 = icmp eq ptr %222, null
  br i1 %223, label %224, label %243

224:                                              ; preds = %220
  br label %225

225:                                              ; preds = %224
  %226 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %227 = icmp ne ptr %226, null
  br i1 %227, label %228, label %230

228:                                              ; preds = %225
  %229 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %229(i32 noundef 1, ptr noundef @.str.23, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 855, ptr noundef @.str.30)
  br label %230

230:                                              ; preds = %228, %225
  %231 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %232 = icmp sle i32 1, %231
  br i1 %232, label %233, label %240

233:                                              ; preds = %230
  %234 = load ptr, ptr @stderr, align 8, !tbaa !5
  %235 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %234, ptr noundef @.str.25, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 855) #5
  %236 = load ptr, ptr @stderr, align 8, !tbaa !5
  %237 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %236, ptr noundef @.str.30) #5
  %238 = load ptr, ptr @stderr, align 8, !tbaa !5
  %239 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %238, ptr noundef @.str.4) #5
  br label %240

240:                                              ; preds = %233, %230
  br label %241

241:                                              ; preds = %240
  br label %242

242:                                              ; preds = %241
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %785

243:                                              ; preds = %220
  %244 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 5
  %245 = load ptr, ptr %244, align 8, !tbaa !30
  %246 = getelementptr inbounds %struct._MatNd, ptr %245, i32 0, i32 1
  %247 = load i32, ptr %246, align 8, !tbaa !26
  %248 = load i32, ptr %6, align 4, !tbaa !22
  %249 = icmp ne i32 %247, %248
  br i1 %249, label %250, label %279

250:                                              ; preds = %243
  br label %251

251:                                              ; preds = %250
  %252 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %253 = icmp ne ptr %252, null
  br i1 %253, label %254, label %261

254:                                              ; preds = %251
  %255 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %256 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 5
  %257 = load ptr, ptr %256, align 8, !tbaa !30
  %258 = getelementptr inbounds %struct._MatNd, ptr %257, i32 0, i32 1
  %259 = load i32, ptr %258, align 8, !tbaa !26
  %260 = load i32, ptr %6, align 4, !tbaa !22
  call void (i32, ptr, ptr, i32, ptr, ...) %255(i32 noundef 1, ptr noundef @.str.23, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 863, ptr noundef @.str.31, i32 noundef %259, i32 noundef %260)
  br label %261

261:                                              ; preds = %254, %251
  %262 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %263 = icmp sle i32 1, %262
  br i1 %263, label %264, label %276

264:                                              ; preds = %261
  %265 = load ptr, ptr @stderr, align 8, !tbaa !5
  %266 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %265, ptr noundef @.str.25, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 863) #5
  %267 = load ptr, ptr @stderr, align 8, !tbaa !5
  %268 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 5
  %269 = load ptr, ptr %268, align 8, !tbaa !30
  %270 = getelementptr inbounds %struct._MatNd, ptr %269, i32 0, i32 1
  %271 = load i32, ptr %270, align 8, !tbaa !26
  %272 = load i32, ptr %6, align 4, !tbaa !22
  %273 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %267, ptr noundef @.str.31, i32 noundef %271, i32 noundef %272) #5
  %274 = load ptr, ptr @stderr, align 8, !tbaa !5
  %275 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %274, ptr noundef @.str.4) #5
  br label %276

276:                                              ; preds = %264, %261
  br label %277

277:                                              ; preds = %276
  br label %278

278:                                              ; preds = %277
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %785

279:                                              ; preds = %243
  %280 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 5
  %281 = load ptr, ptr %280, align 8, !tbaa !30
  %282 = getelementptr inbounds %struct._MatNd, ptr %281, i32 0, i32 2
  %283 = load i32, ptr %282, align 4, !tbaa !24
  %284 = icmp ne i32 %283, 1
  br i1 %284, label %285, label %312

285:                                              ; preds = %279
  br label %286

286:                                              ; preds = %285
  %287 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %288 = icmp ne ptr %287, null
  br i1 %288, label %289, label %295

289:                                              ; preds = %286
  %290 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %291 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 5
  %292 = load ptr, ptr %291, align 8, !tbaa !30
  %293 = getelementptr inbounds %struct._MatNd, ptr %292, i32 0, i32 2
  %294 = load i32, ptr %293, align 4, !tbaa !24
  call void (i32, ptr, ptr, i32, ptr, ...) %290(i32 noundef 1, ptr noundef @.str.23, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 870, ptr noundef @.str.32, i32 noundef %294)
  br label %295

295:                                              ; preds = %289, %286
  %296 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %297 = icmp sle i32 1, %296
  br i1 %297, label %298, label %309

298:                                              ; preds = %295
  %299 = load ptr, ptr @stderr, align 8, !tbaa !5
  %300 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %299, ptr noundef @.str.25, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 870) #5
  %301 = load ptr, ptr @stderr, align 8, !tbaa !5
  %302 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 5
  %303 = load ptr, ptr %302, align 8, !tbaa !30
  %304 = getelementptr inbounds %struct._MatNd, ptr %303, i32 0, i32 2
  %305 = load i32, ptr %304, align 4, !tbaa !24
  %306 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %301, ptr noundef @.str.32, i32 noundef %305) #5
  %307 = load ptr, ptr @stderr, align 8, !tbaa !5
  %308 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %307, ptr noundef @.str.4) #5
  br label %309

309:                                              ; preds = %298, %295
  br label %310

310:                                              ; preds = %309
  br label %311

311:                                              ; preds = %310
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %785

312:                                              ; preds = %279
  %313 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 4
  %314 = load ptr, ptr %313, align 8, !tbaa !31
  %315 = icmp eq ptr %314, null
  br i1 %315, label %316, label %335

316:                                              ; preds = %312
  br label %317

317:                                              ; preds = %316
  %318 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %319 = icmp ne ptr %318, null
  br i1 %319, label %320, label %322

320:                                              ; preds = %317
  %321 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %321(i32 noundef 1, ptr noundef @.str.23, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 877, ptr noundef @.str.33)
  br label %322

322:                                              ; preds = %320, %317
  %323 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %324 = icmp sle i32 1, %323
  br i1 %324, label %325, label %332

325:                                              ; preds = %322
  %326 = load ptr, ptr @stderr, align 8, !tbaa !5
  %327 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %326, ptr noundef @.str.25, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 877) #5
  %328 = load ptr, ptr @stderr, align 8, !tbaa !5
  %329 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %328, ptr noundef @.str.33) #5
  %330 = load ptr, ptr @stderr, align 8, !tbaa !5
  %331 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %330, ptr noundef @.str.4) #5
  br label %332

332:                                              ; preds = %325, %322
  br label %333

333:                                              ; preds = %332
  br label %334

334:                                              ; preds = %333
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %785

335:                                              ; preds = %312
  %336 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 4
  %337 = load ptr, ptr %336, align 8, !tbaa !31
  %338 = getelementptr inbounds %struct._MatNd, ptr %337, i32 0, i32 1
  %339 = load i32, ptr %338, align 8, !tbaa !26
  %340 = load i32, ptr %6, align 4, !tbaa !22
  %341 = icmp ne i32 %339, %340
  br i1 %341, label %342, label %371

342:                                              ; preds = %335
  br label %343

343:                                              ; preds = %342
  %344 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %345 = icmp ne ptr %344, null
  br i1 %345, label %346, label %353

346:                                              ; preds = %343
  %347 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %348 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 4
  %349 = load ptr, ptr %348, align 8, !tbaa !31
  %350 = getelementptr inbounds %struct._MatNd, ptr %349, i32 0, i32 1
  %351 = load i32, ptr %350, align 8, !tbaa !26
  %352 = load i32, ptr %6, align 4, !tbaa !22
  call void (i32, ptr, ptr, i32, ptr, ...) %347(i32 noundef 1, ptr noundef @.str.23, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 885, ptr noundef @.str.34, i32 noundef %351, i32 noundef %352)
  br label %353

353:                                              ; preds = %346, %343
  %354 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %355 = icmp sle i32 1, %354
  br i1 %355, label %356, label %368

356:                                              ; preds = %353
  %357 = load ptr, ptr @stderr, align 8, !tbaa !5
  %358 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %357, ptr noundef @.str.25, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 885) #5
  %359 = load ptr, ptr @stderr, align 8, !tbaa !5
  %360 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 4
  %361 = load ptr, ptr %360, align 8, !tbaa !31
  %362 = getelementptr inbounds %struct._MatNd, ptr %361, i32 0, i32 1
  %363 = load i32, ptr %362, align 8, !tbaa !26
  %364 = load i32, ptr %6, align 4, !tbaa !22
  %365 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %359, ptr noundef @.str.34, i32 noundef %363, i32 noundef %364) #5
  %366 = load ptr, ptr @stderr, align 8, !tbaa !5
  %367 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %366, ptr noundef @.str.4) #5
  br label %368

368:                                              ; preds = %356, %353
  br label %369

369:                                              ; preds = %368
  br label %370

370:                                              ; preds = %369
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %785

371:                                              ; preds = %335
  %372 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 4
  %373 = load ptr, ptr %372, align 8, !tbaa !31
  %374 = getelementptr inbounds %struct._MatNd, ptr %373, i32 0, i32 2
  %375 = load i32, ptr %374, align 4, !tbaa !24
  %376 = icmp ne i32 %375, 1
  br i1 %376, label %377, label %404

377:                                              ; preds = %371
  br label %378

378:                                              ; preds = %377
  %379 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %380 = icmp ne ptr %379, null
  br i1 %380, label %381, label %387

381:                                              ; preds = %378
  %382 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %383 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 4
  %384 = load ptr, ptr %383, align 8, !tbaa !31
  %385 = getelementptr inbounds %struct._MatNd, ptr %384, i32 0, i32 2
  %386 = load i32, ptr %385, align 4, !tbaa !24
  call void (i32, ptr, ptr, i32, ptr, ...) %382(i32 noundef 1, ptr noundef @.str.23, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 892, ptr noundef @.str.35, i32 noundef %386)
  br label %387

387:                                              ; preds = %381, %378
  %388 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %389 = icmp sle i32 1, %388
  br i1 %389, label %390, label %401

390:                                              ; preds = %387
  %391 = load ptr, ptr @stderr, align 8, !tbaa !5
  %392 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %391, ptr noundef @.str.25, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 892) #5
  %393 = load ptr, ptr @stderr, align 8, !tbaa !5
  %394 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 4
  %395 = load ptr, ptr %394, align 8, !tbaa !31
  %396 = getelementptr inbounds %struct._MatNd, ptr %395, i32 0, i32 2
  %397 = load i32, ptr %396, align 4, !tbaa !24
  %398 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %393, ptr noundef @.str.35, i32 noundef %397) #5
  %399 = load ptr, ptr @stderr, align 8, !tbaa !5
  %400 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %399, ptr noundef @.str.4) #5
  br label %401

401:                                              ; preds = %390, %387
  br label %402

402:                                              ; preds = %401
  br label %403

403:                                              ; preds = %402
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %785

404:                                              ; preds = %371
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 1, ptr %7, align 4, !tbaa !22
  br label %405

405:                                              ; preds = %461, %404
  %406 = load i32, ptr %7, align 4, !tbaa !22
  %407 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %408 = load ptr, ptr %407, align 8, !tbaa !11
  %409 = getelementptr inbounds %struct._MatNd, ptr %408, i32 0, i32 1
  %410 = load i32, ptr %409, align 8, !tbaa !26
  %411 = icmp ult i32 %406, %410
  br i1 %411, label %413, label %412

412:                                              ; preds = %405
  store i32 26, ptr %5, align 4
  br label %464

413:                                              ; preds = %405
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %414 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %415 = load ptr, ptr %414, align 8, !tbaa !11
  %416 = load i32, ptr %7, align 4, !tbaa !22
  %417 = call double @MatNd_get(ptr noundef %415, i32 noundef %416, i32 noundef 0)
  store double %417, ptr %8, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %418 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %419 = load ptr, ptr %418, align 8, !tbaa !11
  %420 = load i32, ptr %7, align 4, !tbaa !22
  %421 = sub i32 %420, 1
  %422 = call double @MatNd_get(ptr noundef %419, i32 noundef %421, i32 noundef 0)
  store double %422, ptr %9, align 8, !tbaa !28
  %423 = load double, ptr %8, align 8, !tbaa !28
  %424 = load double, ptr %9, align 8, !tbaa !28
  %425 = fcmp ole double %423, %424
  br i1 %425, label %426, label %457

426:                                              ; preds = %413
  br label %427

427:                                              ; preds = %426
  %428 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %429 = icmp ne ptr %428, null
  br i1 %429, label %430, label %435

430:                                              ; preds = %427
  %431 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %432 = load i32, ptr %7, align 4, !tbaa !22
  %433 = load double, ptr %8, align 8, !tbaa !28
  %434 = load double, ptr %9, align 8, !tbaa !28
  call void (i32, ptr, ptr, i32, ptr, ...) %431(i32 noundef 1, ptr noundef @.str.23, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 903, ptr noundef @.str.36, i32 noundef %432, double noundef %433, double noundef %434)
  br label %435

435:                                              ; preds = %430, %427
  %436 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %437 = icmp sle i32 1, %436
  br i1 %437, label %438, label %448

438:                                              ; preds = %435
  %439 = load ptr, ptr @stderr, align 8, !tbaa !5
  %440 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %439, ptr noundef @.str.25, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 903) #5
  %441 = load ptr, ptr @stderr, align 8, !tbaa !5
  %442 = load i32, ptr %7, align 4, !tbaa !22
  %443 = load double, ptr %8, align 8, !tbaa !28
  %444 = load double, ptr %9, align 8, !tbaa !28
  %445 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %441, ptr noundef @.str.36, i32 noundef %442, double noundef %443, double noundef %444) #5
  %446 = load ptr, ptr @stderr, align 8, !tbaa !5
  %447 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %446, ptr noundef @.str.4) #5
  br label %448

448:                                              ; preds = %438, %435
  br label %449

449:                                              ; preds = %448
  br label %450

450:                                              ; preds = %449
  %451 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %452 = icmp sle i32 2, %451
  br i1 %452, label %453, label %456

453:                                              ; preds = %450
  %454 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %455 = load ptr, ptr %454, align 8, !tbaa !11
  call void @MatNd_printCommentDigits(ptr noundef @.str.37, ptr noundef %455, i32 noundef 6)
  br label %456

456:                                              ; preds = %453, %450
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %458

457:                                              ; preds = %413
  store i32 0, ptr %5, align 4
  br label %458

458:                                              ; preds = %457, %456
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %459 = load i32, ptr %5, align 4
  switch i32 %459, label %464 [
    i32 0, label %460
  ]

460:                                              ; preds = %458
  br label %461

461:                                              ; preds = %460
  %462 = load i32, ptr %7, align 4, !tbaa !22
  %463 = add i32 %462, 1
  store i32 %463, ptr %7, align 4, !tbaa !22
  br label %405, !llvm.loop !32

464:                                              ; preds = %458, %412
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  %465 = load i32, ptr %5, align 4
  switch i32 %465, label %785 [
    i32 26, label %466
  ]

466:                                              ; preds = %464
  %467 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 2
  %468 = load ptr, ptr %467, align 8, !tbaa !34
  %469 = call zeroext i1 @MatNd_isFinite(ptr noundef %468)
  %470 = zext i1 %469 to i32
  %471 = icmp eq i32 %470, 0
  br i1 %471, label %472, label %490

472:                                              ; preds = %466
  %473 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %474 = icmp sle i32 1, %473
  br i1 %474, label %475, label %489

475:                                              ; preds = %472
  br label %476

476:                                              ; preds = %475
  %477 = load ptr, ptr @stderr, align 8, !tbaa !5
  %478 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %477, ptr noundef @.str.38, ptr noundef @.str.2, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 917) #5
  %479 = load ptr, ptr @stderr, align 8, !tbaa !5
  %480 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %479, ptr noundef @.str.39) #5
  %481 = load ptr, ptr @stderr, align 8, !tbaa !5
  %482 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %481, ptr noundef @.str.4) #5
  %483 = load ptr, ptr @stderr, align 8, !tbaa !5
  %484 = call i32 @fflush(ptr noundef %483)
  br label %485

485:                                              ; preds = %476
  br label %486

486:                                              ; preds = %485
  %487 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 2
  %488 = load ptr, ptr %487, align 8, !tbaa !34
  call void @MatNd_printCommentDigits(ptr noundef @.str.40, ptr noundef %488, i32 noundef 4)
  br label %489

489:                                              ; preds = %486, %472
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %785

490:                                              ; preds = %466
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %491 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 2
  %492 = load ptr, ptr %491, align 8, !tbaa !34
  %493 = getelementptr inbounds %struct._MatNd, ptr %492, i32 0, i32 1
  %494 = load i32, ptr %493, align 8, !tbaa !26
  %495 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 2
  %496 = load ptr, ptr %495, align 8, !tbaa !34
  %497 = getelementptr inbounds %struct._MatNd, ptr %496, i32 0, i32 1
  %498 = load i32, ptr %497, align 8, !tbaa !26
  %499 = call ptr @MatNd_create(i32 noundef %494, i32 noundef %498)
  store ptr %499, ptr %10, align 8, !tbaa !5
  %500 = load ptr, ptr %10, align 8, !tbaa !5
  %501 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 2
  %502 = load ptr, ptr %501, align 8, !tbaa !34
  %503 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 3
  %504 = load ptr, ptr %503, align 8, !tbaa !35
  call void @MatNd_mul(ptr noundef %500, ptr noundef %502, ptr noundef %504)
  %505 = load ptr, ptr %10, align 8, !tbaa !5
  %506 = call zeroext i1 @MatNd_isIdentity(ptr noundef %505, double noundef 1.000000e-03)
  %507 = zext i1 %506 to i32
  %508 = icmp eq i32 %507, 0
  br i1 %508, label %509, label %534

509:                                              ; preds = %490
  br label %510

510:                                              ; preds = %509
  %511 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %512 = icmp ne ptr %511, null
  br i1 %512, label %513, label %515

513:                                              ; preds = %510
  %514 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %514(i32 noundef 1, ptr noundef @.str.2, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 929, ptr noundef @.str.41, double noundef 1.000000e-03)
  br label %515

515:                                              ; preds = %513, %510
  %516 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %517 = icmp sle i32 1, %516
  br i1 %517, label %518, label %525

518:                                              ; preds = %515
  %519 = load ptr, ptr @stderr, align 8, !tbaa !5
  %520 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %519, ptr noundef @.str.42, ptr noundef @.str.2, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 929) #5
  %521 = load ptr, ptr @stderr, align 8, !tbaa !5
  %522 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %521, ptr noundef @.str.41, double noundef 1.000000e-03) #5
  %523 = load ptr, ptr @stderr, align 8, !tbaa !5
  %524 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %523, ptr noundef @.str.4) #5
  br label %525

525:                                              ; preds = %518, %515
  br label %526

526:                                              ; preds = %525
  br label %527

527:                                              ; preds = %526
  %528 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %529 = icmp sle i32 2, %528
  br i1 %529, label %530, label %532

530:                                              ; preds = %527
  %531 = load ptr, ptr %10, align 8, !tbaa !5
  call void @MatNd_printCommentDigits(ptr noundef @.str.43, ptr noundef %531, i32 noundef 12)
  br label %532

532:                                              ; preds = %530, %527
  %533 = load ptr, ptr %10, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %533)
  store i1 false, ptr %2, align 1
  store i32 1, ptr %5, align 4
  br label %784

534:                                              ; preds = %490
  %535 = load ptr, ptr %10, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %535)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store i64 0, ptr %12, align 8, !tbaa !36
  br label %536

536:                                              ; preds = %754, %534
  %537 = load i64, ptr %12, align 8, !tbaa !36
  %538 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %539 = load ptr, ptr %538, align 8, !tbaa !11
  %540 = getelementptr inbounds %struct._MatNd, ptr %539, i32 0, i32 1
  %541 = load i32, ptr %540, align 8, !tbaa !26
  %542 = zext i32 %541 to i64
  %543 = icmp ult i64 %537, %542
  br i1 %543, label %545, label %544

544:                                              ; preds = %536
  store i32 35, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %757

545:                                              ; preds = %536
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %546 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %547 = load ptr, ptr %546, align 8, !tbaa !11
  %548 = load i64, ptr %12, align 8, !tbaa !36
  %549 = trunc i64 %548 to i32
  %550 = call double @MatNd_get(ptr noundef %547, i32 noundef %549, i32 noundef 0)
  store double %550, ptr %13, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %551 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %552 = load ptr, ptr %551, align 8, !tbaa !11
  %553 = load i64, ptr %12, align 8, !tbaa !36
  %554 = trunc i64 %553 to i32
  %555 = call double @MatNd_get(ptr noundef %552, i32 noundef %554, i32 noundef 4)
  %556 = call i64 @lround(double noundef %555) #5
  %557 = trunc i64 %556 to i32
  store i32 %557, ptr %14, align 4, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %558 = load double, ptr %13, align 8, !tbaa !28
  call void @_ZNK3Rcs16ViaPointSequence22computeTrajectoryPointERdS1_S1_d(ptr noundef nonnull align 8 dereferenceable(104) %18, ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17, double noundef %558)
  %559 = load i32, ptr %14, align 4, !tbaa !22
  %560 = call zeroext i1 @Math_isBitSet(i32 noundef %559, i32 noundef 0)
  br i1 %560, label %561, label %623

561:                                              ; preds = %545
  %562 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %563 = load ptr, ptr %562, align 8, !tbaa !11
  %564 = load i64, ptr %12, align 8, !tbaa !36
  %565 = trunc i64 %564 to i32
  %566 = call double @MatNd_get(ptr noundef %563, i32 noundef %565, i32 noundef 1)
  %567 = load double, ptr %15, align 8, !tbaa !28
  %568 = fsub double %566, %567
  %569 = call double @llvm.fabs.f64(double %568)
  %570 = fcmp ogt double %569, 1.000000e-05
  br i1 %570, label %571, label %622

571:                                              ; preds = %561
  br label %572

572:                                              ; preds = %571
  %573 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %574 = icmp ne ptr %573, null
  br i1 %574, label %575, label %592

575:                                              ; preds = %572
  %576 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %577 = load double, ptr %13, align 8, !tbaa !28
  %578 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %579 = load ptr, ptr %578, align 8, !tbaa !11
  %580 = load i64, ptr %12, align 8, !tbaa !36
  %581 = trunc i64 %580 to i32
  %582 = call double @MatNd_get(ptr noundef %579, i32 noundef %581, i32 noundef 1)
  %583 = load double, ptr %15, align 8, !tbaa !28
  %584 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %585 = load ptr, ptr %584, align 8, !tbaa !11
  %586 = load i64, ptr %12, align 8, !tbaa !36
  %587 = trunc i64 %586 to i32
  %588 = call double @MatNd_get(ptr noundef %585, i32 noundef %587, i32 noundef 1)
  %589 = load double, ptr %15, align 8, !tbaa !28
  %590 = fsub double %588, %589
  %591 = call double @llvm.fabs.f64(double %590)
  call void (i32, ptr, ptr, i32, ptr, ...) %576(i32 noundef 2, ptr noundef @.str.2, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 960, ptr noundef @.str.44, double noundef %577, double noundef %582, double noundef %583, double noundef %591)
  br label %592

592:                                              ; preds = %575, %572
  %593 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %594 = icmp sle i32 2, %593
  br i1 %594, label %595, label %617

595:                                              ; preds = %592
  %596 = load ptr, ptr @stderr, align 8, !tbaa !5
  %597 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %596, ptr noundef @.str.42, ptr noundef @.str.2, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 960) #5
  %598 = load ptr, ptr @stderr, align 8, !tbaa !5
  %599 = load double, ptr %13, align 8, !tbaa !28
  %600 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %601 = load ptr, ptr %600, align 8, !tbaa !11
  %602 = load i64, ptr %12, align 8, !tbaa !36
  %603 = trunc i64 %602 to i32
  %604 = call double @MatNd_get(ptr noundef %601, i32 noundef %603, i32 noundef 1)
  %605 = load double, ptr %15, align 8, !tbaa !28
  %606 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %607 = load ptr, ptr %606, align 8, !tbaa !11
  %608 = load i64, ptr %12, align 8, !tbaa !36
  %609 = trunc i64 %608 to i32
  %610 = call double @MatNd_get(ptr noundef %607, i32 noundef %609, i32 noundef 1)
  %611 = load double, ptr %15, align 8, !tbaa !28
  %612 = fsub double %610, %611
  %613 = call double @llvm.fabs.f64(double %612)
  %614 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %598, ptr noundef @.str.44, double noundef %599, double noundef %604, double noundef %605, double noundef %613) #5
  %615 = load ptr, ptr @stderr, align 8, !tbaa !5
  %616 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %615, ptr noundef @.str.4) #5
  br label %617

617:                                              ; preds = %595, %592
  br label %618

618:                                              ; preds = %617
  br label %619

619:                                              ; preds = %618
  %620 = load i32, ptr %11, align 4, !tbaa !22
  %621 = add i32 %620, 1
  store i32 %621, ptr %11, align 4, !tbaa !22
  br label %622

622:                                              ; preds = %619, %561
  br label %623

623:                                              ; preds = %622, %545
  %624 = load i32, ptr %14, align 4, !tbaa !22
  %625 = call zeroext i1 @Math_isBitSet(i32 noundef %624, i32 noundef 1)
  br i1 %625, label %626, label %688

626:                                              ; preds = %623
  %627 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %628 = load ptr, ptr %627, align 8, !tbaa !11
  %629 = load i64, ptr %12, align 8, !tbaa !36
  %630 = trunc i64 %629 to i32
  %631 = call double @MatNd_get(ptr noundef %628, i32 noundef %630, i32 noundef 2)
  %632 = load double, ptr %16, align 8, !tbaa !28
  %633 = fsub double %631, %632
  %634 = call double @llvm.fabs.f64(double %633)
  %635 = fcmp ogt double %634, 1.000000e-04
  br i1 %635, label %636, label %687

636:                                              ; preds = %626
  br label %637

637:                                              ; preds = %636
  %638 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %639 = icmp ne ptr %638, null
  br i1 %639, label %640, label %657

640:                                              ; preds = %637
  %641 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %642 = load double, ptr %13, align 8, !tbaa !28
  %643 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %644 = load ptr, ptr %643, align 8, !tbaa !11
  %645 = load i64, ptr %12, align 8, !tbaa !36
  %646 = trunc i64 %645 to i32
  %647 = call double @MatNd_get(ptr noundef %644, i32 noundef %646, i32 noundef 2)
  %648 = load double, ptr %16, align 8, !tbaa !28
  %649 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %650 = load ptr, ptr %649, align 8, !tbaa !11
  %651 = load i64, ptr %12, align 8, !tbaa !36
  %652 = trunc i64 %651 to i32
  %653 = call double @MatNd_get(ptr noundef %650, i32 noundef %652, i32 noundef 2)
  %654 = load double, ptr %16, align 8, !tbaa !28
  %655 = fsub double %653, %654
  %656 = call double @llvm.fabs.f64(double %655)
  call void (i32, ptr, ptr, i32, ptr, ...) %641(i32 noundef 2, ptr noundef @.str.2, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 973, ptr noundef @.str.45, double noundef %642, double noundef %647, double noundef %648, double noundef %656)
  br label %657

657:                                              ; preds = %640, %637
  %658 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %659 = icmp sle i32 2, %658
  br i1 %659, label %660, label %682

660:                                              ; preds = %657
  %661 = load ptr, ptr @stderr, align 8, !tbaa !5
  %662 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %661, ptr noundef @.str.42, ptr noundef @.str.2, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 973) #5
  %663 = load ptr, ptr @stderr, align 8, !tbaa !5
  %664 = load double, ptr %13, align 8, !tbaa !28
  %665 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %666 = load ptr, ptr %665, align 8, !tbaa !11
  %667 = load i64, ptr %12, align 8, !tbaa !36
  %668 = trunc i64 %667 to i32
  %669 = call double @MatNd_get(ptr noundef %666, i32 noundef %668, i32 noundef 2)
  %670 = load double, ptr %16, align 8, !tbaa !28
  %671 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %672 = load ptr, ptr %671, align 8, !tbaa !11
  %673 = load i64, ptr %12, align 8, !tbaa !36
  %674 = trunc i64 %673 to i32
  %675 = call double @MatNd_get(ptr noundef %672, i32 noundef %674, i32 noundef 2)
  %676 = load double, ptr %16, align 8, !tbaa !28
  %677 = fsub double %675, %676
  %678 = call double @llvm.fabs.f64(double %677)
  %679 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %663, ptr noundef @.str.45, double noundef %664, double noundef %669, double noundef %670, double noundef %678) #5
  %680 = load ptr, ptr @stderr, align 8, !tbaa !5
  %681 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %680, ptr noundef @.str.4) #5
  br label %682

682:                                              ; preds = %660, %657
  br label %683

683:                                              ; preds = %682
  br label %684

684:                                              ; preds = %683
  %685 = load i32, ptr %11, align 4, !tbaa !22
  %686 = add i32 %685, 1
  store i32 %686, ptr %11, align 4, !tbaa !22
  br label %687

687:                                              ; preds = %684, %626
  br label %688

688:                                              ; preds = %687, %623
  %689 = load i32, ptr %14, align 4, !tbaa !22
  %690 = call zeroext i1 @Math_isBitSet(i32 noundef %689, i32 noundef 2)
  br i1 %690, label %691, label %753

691:                                              ; preds = %688
  %692 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %693 = load ptr, ptr %692, align 8, !tbaa !11
  %694 = load i64, ptr %12, align 8, !tbaa !36
  %695 = trunc i64 %694 to i32
  %696 = call double @MatNd_get(ptr noundef %693, i32 noundef %695, i32 noundef 3)
  %697 = load double, ptr %17, align 8, !tbaa !28
  %698 = fsub double %696, %697
  %699 = call double @llvm.fabs.f64(double %698)
  %700 = fcmp ogt double %699, 1.000000e-04
  br i1 %700, label %701, label %752

701:                                              ; preds = %691
  br label %702

702:                                              ; preds = %701
  %703 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %704 = icmp ne ptr %703, null
  br i1 %704, label %705, label %722

705:                                              ; preds = %702
  %706 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %707 = load double, ptr %13, align 8, !tbaa !28
  %708 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %709 = load ptr, ptr %708, align 8, !tbaa !11
  %710 = load i64, ptr %12, align 8, !tbaa !36
  %711 = trunc i64 %710 to i32
  %712 = call double @MatNd_get(ptr noundef %709, i32 noundef %711, i32 noundef 3)
  %713 = load double, ptr %17, align 8, !tbaa !28
  %714 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %715 = load ptr, ptr %714, align 8, !tbaa !11
  %716 = load i64, ptr %12, align 8, !tbaa !36
  %717 = trunc i64 %716 to i32
  %718 = call double @MatNd_get(ptr noundef %715, i32 noundef %717, i32 noundef 3)
  %719 = load double, ptr %17, align 8, !tbaa !28
  %720 = fsub double %718, %719
  %721 = call double @llvm.fabs.f64(double %720)
  call void (i32, ptr, ptr, i32, ptr, ...) %706(i32 noundef 2, ptr noundef @.str.2, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 986, ptr noundef @.str.46, double noundef %707, double noundef %712, double noundef %713, double noundef %721)
  br label %722

722:                                              ; preds = %705, %702
  %723 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %724 = icmp sle i32 2, %723
  br i1 %724, label %725, label %747

725:                                              ; preds = %722
  %726 = load ptr, ptr @stderr, align 8, !tbaa !5
  %727 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %726, ptr noundef @.str.42, ptr noundef @.str.2, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 986) #5
  %728 = load ptr, ptr @stderr, align 8, !tbaa !5
  %729 = load double, ptr %13, align 8, !tbaa !28
  %730 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %731 = load ptr, ptr %730, align 8, !tbaa !11
  %732 = load i64, ptr %12, align 8, !tbaa !36
  %733 = trunc i64 %732 to i32
  %734 = call double @MatNd_get(ptr noundef %731, i32 noundef %733, i32 noundef 3)
  %735 = load double, ptr %17, align 8, !tbaa !28
  %736 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %18, i32 0, i32 1
  %737 = load ptr, ptr %736, align 8, !tbaa !11
  %738 = load i64, ptr %12, align 8, !tbaa !36
  %739 = trunc i64 %738 to i32
  %740 = call double @MatNd_get(ptr noundef %737, i32 noundef %739, i32 noundef 3)
  %741 = load double, ptr %17, align 8, !tbaa !28
  %742 = fsub double %740, %741
  %743 = call double @llvm.fabs.f64(double %742)
  %744 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %728, ptr noundef @.str.46, double noundef %729, double noundef %734, double noundef %735, double noundef %743) #5
  %745 = load ptr, ptr @stderr, align 8, !tbaa !5
  %746 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %745, ptr noundef @.str.4) #5
  br label %747

747:                                              ; preds = %725, %722
  br label %748

748:                                              ; preds = %747
  br label %749

749:                                              ; preds = %748
  %750 = load i32, ptr %11, align 4, !tbaa !22
  %751 = add i32 %750, 1
  store i32 %751, ptr %11, align 4, !tbaa !22
  br label %752

752:                                              ; preds = %749, %691
  br label %753

753:                                              ; preds = %752, %688
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %754

754:                                              ; preds = %753
  %755 = load i64, ptr %12, align 8, !tbaa !36
  %756 = add i64 %755, 1
  store i64 %756, ptr %12, align 8, !tbaa !36
  br label %536, !llvm.loop !38

757:                                              ; preds = %544
  %758 = load i32, ptr %11, align 4, !tbaa !22
  %759 = icmp ugt i32 %758, 0
  br i1 %759, label %760, label %781

760:                                              ; preds = %757
  br label %761

761:                                              ; preds = %760
  %762 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %763 = icmp ne ptr %762, null
  br i1 %763, label %764, label %767

764:                                              ; preds = %761
  %765 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %766 = load i32, ptr %11, align 4, !tbaa !22
  call void (i32, ptr, ptr, i32, ptr, ...) %765(i32 noundef 1, ptr noundef @.str.23, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 995, ptr noundef @.str.47, i32 noundef %766)
  br label %767

767:                                              ; preds = %764, %761
  %768 = load i32, ptr @RcsLogLevel, align 4, !tbaa !22
  %769 = icmp sle i32 1, %768
  br i1 %769, label %770, label %778

770:                                              ; preds = %767
  %771 = load ptr, ptr @stderr, align 8, !tbaa !5
  %772 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %771, ptr noundef @.str.25, ptr noundef @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 995) #5
  %773 = load ptr, ptr @stderr, align 8, !tbaa !5
  %774 = load i32, ptr %11, align 4, !tbaa !22
  %775 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %773, ptr noundef @.str.47, i32 noundef %774) #5
  %776 = load ptr, ptr @stderr, align 8, !tbaa !5
  %777 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %776, ptr noundef @.str.4) #5
  br label %778

778:                                              ; preds = %770, %767
  br label %779

779:                                              ; preds = %778
  br label %780

780:                                              ; preds = %779
  store i8 0, ptr %4, align 1, !tbaa !9
  br label %781

781:                                              ; preds = %780, %757
  %782 = load i8, ptr %4, align 1, !tbaa !9, !range !39, !noundef !40
  %783 = trunc i8 %782 to i1
  store i1 %783, ptr %2, align 1
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %784

784:                                              ; preds = %781, %532
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %785

785:                                              ; preds = %784, %489, %464, %403, %370, %334, %311, %278, %242, %219
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %786

786:                                              ; preds = %785, %191, %146, %106, %73, %40
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #5
  %787 = load i1, ptr %2, align 1
  ret i1 %787
}

declare zeroext i1 @MatNd_isFinite(ptr noundef) #2

declare i32 @fflush(ptr noundef) #2

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

declare zeroext i1 @MatNd_isIdentity(ptr noundef, double noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local 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) #3 align 2

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

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

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

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


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@RCS_GLOBAL_RLOG_CB = external local_unnamed_addr global ptr, align 8
@.str.23 = external hidden unnamed_addr constant [1 x i8], align 1
@__func__._ZNK3Rcs16ViaPointSequence5checkEv = external hidden unnamed_addr constant [6 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [23 x i8], align 1
@RcsLogLevel = external local_unnamed_addr global i32, align 4
@.str.25 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [27 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: nounwind
declare i64 @lround(double noundef) local_unnamed_addr #1

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

declare zeroext i1 @Math_isBitSet(i32 noundef, i32 noundef) local_unnamed_addr #2

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

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

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

declare void @MatNd_destroy(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN3Rcs16ViaPointSequence26computeNumberOfConstraintsEPK6_MatNd(ptr noundef) local_unnamed_addr #4 align 2

declare void @MatNd_mul(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK3Rcs16ViaPointSequence5checkEv(ptr noundef nonnull align 8 dereferenceable(104) %0) local_unnamed_addr #4 align 2 {
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = icmp eq ptr %6, null
  br i1 %7, label %8, label %21

8:                                                ; preds = %1
  %9 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !20
  %.not130 = icmp eq ptr %9, null
  br i1 %.not130, label %11, label %10

10:                                               ; preds = %8
  tail call void (i32, ptr, ptr, i32, ptr, ...) %9(i32 noundef 1, ptr noundef nonnull @.str.23, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 807, ptr noundef nonnull @.str.24)
  br label %11

11:                                               ; preds = %10, %8
  %12 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %14, label %.thread

14:                                               ; preds = %11
  %15 = load ptr, ptr @stderr, align 8, !tbaa !20
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef nonnull @.str.25, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 807) #6
  %17 = load ptr, ptr @stderr, align 8, !tbaa !20
  %18 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull @.str.24) #6
  %19 = load ptr, ptr @stderr, align 8, !tbaa !20
  %20 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef nonnull @.str.4) #6
  br label %.thread

21:                                               ; preds = %1
  %22 = getelementptr inbounds i8, ptr %6, i64 12
  %23 = load i32, ptr %22, align 4, !tbaa !23
  %24 = icmp ult i32 %23, 5
  br i1 %24, label %25, label %41

25:                                               ; preds = %21
  %26 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !20
  %.not129 = icmp eq ptr %26, null
  br i1 %.not129, label %28, label %27

27:                                               ; preds = %25
  tail call void (i32, ptr, ptr, i32, ptr, ...) %26(i32 noundef 1, ptr noundef nonnull @.str.23, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 816, ptr noundef nonnull @.str.26, i32 noundef %23)
  br label %28

28:                                               ; preds = %27, %25
  %29 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %31, label %.thread

31:                                               ; preds = %28
  %32 = load ptr, ptr @stderr, align 8, !tbaa !20
  %33 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.25, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 816) #6
  %34 = load ptr, ptr @stderr, align 8, !tbaa !20
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %35, i64 12
  %37 = load i32, ptr %36, align 4, !tbaa !23
  %38 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.26, i32 noundef %37) #6
  %39 = load ptr, ptr @stderr, align 8, !tbaa !20
  %40 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.4) #6
  br label %.thread

41:                                               ; preds = %21
  %42 = getelementptr inbounds i8, ptr %6, i64 8
  %43 = load i32, ptr %42, align 8, !tbaa !25
  %44 = icmp ult i32 %43, 2
  br i1 %44, label %45, label %61

45:                                               ; preds = %41
  %46 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !20
  %.not128 = icmp eq ptr %46, null
  br i1 %.not128, label %48, label %47

47:                                               ; preds = %45
  tail call void (i32, ptr, ptr, i32, ptr, ...) %46(i32 noundef 1, ptr noundef nonnull @.str.23, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 824, ptr noundef nonnull @.str.27, i32 noundef %43)
  br label %48

48:                                               ; preds = %47, %45
  %49 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %50 = icmp sgt i32 %49, 0
  br i1 %50, label %51, label %.thread

51:                                               ; preds = %48
  %52 = load ptr, ptr @stderr, align 8, !tbaa !20
  %53 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef nonnull @.str.25, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 824) #6
  %54 = load ptr, ptr @stderr, align 8, !tbaa !20
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %55, i64 8
  %57 = load i32, ptr %56, align 8, !tbaa !25
  %58 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef nonnull @.str.27, i32 noundef %57) #6
  %59 = load ptr, ptr @stderr, align 8, !tbaa !20
  %60 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %59, ptr noundef nonnull @.str.4) #6
  br label %.thread

61:                                               ; preds = %41
  %62 = load ptr, ptr %6, align 8, !tbaa !26
  %63 = getelementptr inbounds i8, ptr %62, i64 32
  %64 = load double, ptr %63, align 8, !tbaa !27
  %65 = fcmp une double %64, 7.000000e+00
  br i1 %65, label %66, label %82

66:                                               ; preds = %61
  %67 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !20
  %.not127 = icmp eq ptr %67, null
  br i1 %.not127, label %70, label %68

68:                                               ; preds = %66
  %69 = tail call double @MatNd_get(ptr noundef nonnull %6, i32 noundef 0, i32 noundef 4)
  tail call void (i32, ptr, ptr, i32, ptr, ...) %67(i32 noundef 1, ptr noundef nonnull @.str.23, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 832, ptr noundef nonnull @.str.28, double noundef %69)
  br label %70

70:                                               ; preds = %68, %66
  %71 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %72 = icmp sgt i32 %71, 0
  br i1 %72, label %73, label %.thread

73:                                               ; preds = %70
  %74 = load ptr, ptr @stderr, align 8, !tbaa !20
  %75 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %74, ptr noundef nonnull @.str.25, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 832) #6
  %76 = load ptr, ptr @stderr, align 8, !tbaa !20
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = tail call double @MatNd_get(ptr noundef %77, i32 noundef 0, i32 noundef 4)
  %79 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef nonnull @.str.28, double noundef %78) #6
  %80 = load ptr, ptr @stderr, align 8, !tbaa !20
  %81 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %80, ptr noundef nonnull @.str.4) #6
  br label %.thread

82:                                               ; preds = %61
  %83 = add i32 %43, -1
  %84 = mul i32 %83, %23
  %85 = add i32 %84, 4
  %86 = zext i32 %85 to i64
  %87 = getelementptr inbounds double, ptr %62, i64 %86
  %88 = load double, ptr %87, align 8, !tbaa !27
  %89 = fcmp une double %88, 7.000000e+00
  br i1 %89, label %90, label %106

90:                                               ; preds = %82
  %91 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !20
  %.not126 = icmp eq ptr %91, null
  br i1 %.not126, label %94, label %92

92:                                               ; preds = %90
  %93 = tail call double @MatNd_get(ptr noundef nonnull %6, i32 noundef 0, i32 noundef 4)
  tail call void (i32, ptr, ptr, i32, ptr, ...) %91(i32 noundef 1, ptr noundef nonnull @.str.23, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 840, ptr noundef nonnull @.str.28, double noundef %93)
  br label %94

94:                                               ; preds = %92, %90
  %95 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %96 = icmp sgt i32 %95, 0
  br i1 %96, label %97, label %.thread

97:                                               ; preds = %94
  %98 = load ptr, ptr @stderr, align 8, !tbaa !20
  %99 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %98, ptr noundef nonnull @.str.25, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 840) #6
  %100 = load ptr, ptr @stderr, align 8, !tbaa !20
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = tail call double @MatNd_get(ptr noundef %101, i32 noundef 0, i32 noundef 4)
  %103 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %100, ptr noundef nonnull @.str.28, double noundef %102) #6
  %104 = load ptr, ptr @stderr, align 8, !tbaa !20
  %105 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %104, ptr noundef nonnull @.str.4) #6
  br label %.thread

106:                                              ; preds = %82
  %107 = tail call noundef i64 @_ZN3Rcs16ViaPointSequence26computeNumberOfConstraintsEPK6_MatNd(ptr noundef nonnull %6)
  %108 = trunc i64 %107 to i32
  %109 = icmp ult i32 %108, 6
  br i1 %109, label %110, label %123

110:                                              ; preds = %106
  %111 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !20
  %.not125 = icmp eq ptr %111, null
  br i1 %.not125, label %113, label %112

112:                                              ; preds = %110
  tail call void (i32, ptr, ptr, i32, ptr, ...) %111(i32 noundef 1, ptr noundef nonnull @.str.23, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 848, ptr noundef nonnull @.str.29, i32 noundef %108)
  br label %113

113:                                              ; preds = %112, %110
  %114 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %115 = icmp sgt i32 %114, 0
  br i1 %115, label %116, label %.thread

116:                                              ; preds = %113
  %117 = load ptr, ptr @stderr, align 8, !tbaa !20
  %118 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %117, ptr noundef nonnull @.str.25, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 848) #6
  %119 = load ptr, ptr @stderr, align 8, !tbaa !20
  %120 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %119, ptr noundef nonnull @.str.29, i32 noundef %108) #6
  %121 = load ptr, ptr @stderr, align 8, !tbaa !20
  %122 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %121, ptr noundef nonnull @.str.4) #6
  br label %.thread

123:                                              ; preds = %106
  %124 = getelementptr inbounds i8, ptr %0, i64 40
  %125 = load ptr, ptr %124, align 8, !tbaa !29
  %126 = icmp eq ptr %125, null
  br i1 %126, label %127, label %140

127:                                              ; preds = %123
  %128 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !20
  %.not124 = icmp eq ptr %128, null
  br i1 %.not124, label %130, label %129

129:                                              ; preds = %127
  tail call void (i32, ptr, ptr, i32, ptr, ...) %128(i32 noundef 1, ptr noundef nonnull @.str.23, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 855, ptr noundef nonnull @.str.30)
  br label %130

130:                                              ; preds = %129, %127
  %131 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %132 = icmp sgt i32 %131, 0
  br i1 %132, label %133, label %.thread

133:                                              ; preds = %130
  %134 = load ptr, ptr @stderr, align 8, !tbaa !20
  %135 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %134, ptr noundef nonnull @.str.25, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 855) #6
  %136 = load ptr, ptr @stderr, align 8, !tbaa !20
  %137 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %136, ptr noundef nonnull @.str.30) #6
  %138 = load ptr, ptr @stderr, align 8, !tbaa !20
  %139 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %138, ptr noundef nonnull @.str.4) #6
  br label %.thread

140:                                              ; preds = %123
  %141 = getelementptr inbounds i8, ptr %125, i64 8
  %142 = load i32, ptr %141, align 8, !tbaa !25
  %.not = icmp eq i32 %142, %108
  br i1 %.not, label %159, label %143

143:                                              ; preds = %140
  %144 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !20
  %.not123 = icmp eq ptr %144, null
  br i1 %.not123, label %146, label %145

145:                                              ; preds = %143
  tail call void (i32, ptr, ptr, i32, ptr, ...) %144(i32 noundef 1, ptr noundef nonnull @.str.23, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 863, ptr noundef nonnull @.str.31, i32 noundef %142, i32 noundef %108)
  br label %146

146:                                              ; preds = %145, %143
  %147 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %148 = icmp sgt i32 %147, 0
  br i1 %148, label %149, label %.thread

149:                                              ; preds = %146
  %150 = load ptr, ptr @stderr, align 8, !tbaa !20
  %151 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %150, ptr noundef nonnull @.str.25, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 863) #6
  %152 = load ptr, ptr @stderr, align 8, !tbaa !20
  %153 = load ptr, ptr %124, align 8, !tbaa !29
  %154 = getelementptr inbounds i8, ptr %153, i64 8
  %155 = load i32, ptr %154, align 8, !tbaa !25
  %156 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %152, ptr noundef nonnull @.str.31, i32 noundef %155, i32 noundef %108) #6
  %157 = load ptr, ptr @stderr, align 8, !tbaa !20
  %158 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %157, ptr noundef nonnull @.str.4) #6
  br label %.thread

159:                                              ; preds = %140
  %160 = getelementptr inbounds i8, ptr %125, i64 12
  %161 = load i32, ptr %160, align 4, !tbaa !23
  %.not108 = icmp eq i32 %161, 1
  br i1 %.not108, label %178, label %162

162:                                              ; preds = %159
  %163 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !20
  %.not122 = icmp eq ptr %163, null
  br i1 %.not122, label %165, label %164

164:                                              ; preds = %162
  tail call void (i32, ptr, ptr, i32, ptr, ...) %163(i32 noundef 1, ptr noundef nonnull @.str.23, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 870, ptr noundef nonnull @.str.32, i32 noundef %161)
  br label %165

165:                                              ; preds = %164, %162
  %166 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %167 = icmp sgt i32 %166, 0
  br i1 %167, label %168, label %.thread

168:                                              ; preds = %165
  %169 = load ptr, ptr @stderr, align 8, !tbaa !20
  %170 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %169, ptr noundef nonnull @.str.25, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 870) #6
  %171 = load ptr, ptr @stderr, align 8, !tbaa !20
  %172 = load ptr, ptr %124, align 8, !tbaa !29
  %173 = getelementptr inbounds i8, ptr %172, i64 12
  %174 = load i32, ptr %173, align 4, !tbaa !23
  %175 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %171, ptr noundef nonnull @.str.32, i32 noundef %174) #6
  %176 = load ptr, ptr @stderr, align 8, !tbaa !20
  %177 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %176, ptr noundef nonnull @.str.4) #6
  br label %.thread

178:                                              ; preds = %159
  %179 = getelementptr inbounds i8, ptr %0, i64 32
  %180 = load ptr, ptr %179, align 8, !tbaa !30
  %181 = icmp eq ptr %180, null
  br i1 %181, label %182, label %195

182:                                              ; preds = %178
  %183 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !20
  %.not121 = icmp eq ptr %183, null
  br i1 %.not121, label %185, label %184

184:                                              ; preds = %182
  tail call void (i32, ptr, ptr, i32, ptr, ...) %183(i32 noundef 1, ptr noundef nonnull @.str.23, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 877, ptr noundef nonnull @.str.33)
  br label %185

185:                                              ; preds = %184, %182
  %186 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %187 = icmp sgt i32 %186, 0
  br i1 %187, label %188, label %.thread

188:                                              ; preds = %185
  %189 = load ptr, ptr @stderr, align 8, !tbaa !20
  %190 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %189, ptr noundef nonnull @.str.25, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 877) #6
  %191 = load ptr, ptr @stderr, align 8, !tbaa !20
  %192 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %191, ptr noundef nonnull @.str.33) #6
  %193 = load ptr, ptr @stderr, align 8, !tbaa !20
  %194 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %193, ptr noundef nonnull @.str.4) #6
  br label %.thread

195:                                              ; preds = %178
  %196 = getelementptr inbounds i8, ptr %180, i64 8
  %197 = load i32, ptr %196, align 8, !tbaa !25
  %.not109 = icmp eq i32 %197, %108
  br i1 %.not109, label %214, label %198

198:                                              ; preds = %195
  %199 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !20
  %.not120 = icmp eq ptr %199, null
  br i1 %.not120, label %201, label %200

200:                                              ; preds = %198
  tail call void (i32, ptr, ptr, i32, ptr, ...) %199(i32 noundef 1, ptr noundef nonnull @.str.23, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 885, ptr noundef nonnull @.str.34, i32 noundef %197, i32 noundef %108)
  br label %201

201:                                              ; preds = %200, %198
  %202 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %203 = icmp sgt i32 %202, 0
  br i1 %203, label %204, label %.thread

204:                                              ; preds = %201
  %205 = load ptr, ptr @stderr, align 8, !tbaa !20
  %206 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %205, ptr noundef nonnull @.str.25, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 885) #6
  %207 = load ptr, ptr @stderr, align 8, !tbaa !20
  %208 = load ptr, ptr %179, align 8, !tbaa !30
  %209 = getelementptr inbounds i8, ptr %208, i64 8
  %210 = load i32, ptr %209, align 8, !tbaa !25
  %211 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %207, ptr noundef nonnull @.str.34, i32 noundef %210, i32 noundef %108) #6
  %212 = load ptr, ptr @stderr, align 8, !tbaa !20
  %213 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %212, ptr noundef nonnull @.str.4) #6
  br label %.thread

214:                                              ; preds = %195
  %215 = getelementptr inbounds i8, ptr %180, i64 12
  %216 = load i32, ptr %215, align 4, !tbaa !23
  %.not110 = icmp eq i32 %216, 1
  br i1 %.not110, label %.preheader, label %220

.preheader:                                       ; preds = %214
  %217 = load ptr, ptr %5, align 8, !tbaa !5
  %218 = getelementptr inbounds i8, ptr %217, i64 8
  %219 = load i32, ptr %218, align 8, !tbaa !25
  %.not112137 = icmp ugt i32 %219, 1
  br i1 %.not112137, label %.lr.ph, label %.critedge132

220:                                              ; preds = %214
  %221 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !20
  %.not119 = icmp eq ptr %221, null
  br i1 %.not119, label %223, label %222

222:                                              ; preds = %220
  tail call void (i32, ptr, ptr, i32, ptr, ...) %221(i32 noundef 1, ptr noundef nonnull @.str.23, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 892, ptr noundef nonnull @.str.35, i32 noundef %216)
  br label %223

223:                                              ; preds = %222, %220
  %224 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %225 = icmp sgt i32 %224, 0
  br i1 %225, label %226, label %.thread

226:                                              ; preds = %223
  %227 = load ptr, ptr @stderr, align 8, !tbaa !20
  %228 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %227, ptr noundef nonnull @.str.25, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 892) #6
  %229 = load ptr, ptr @stderr, align 8, !tbaa !20
  %230 = load ptr, ptr %179, align 8, !tbaa !30
  %231 = getelementptr inbounds i8, ptr %230, i64 12
  %232 = load i32, ptr %231, align 4, !tbaa !23
  %233 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %229, ptr noundef nonnull @.str.35, i32 noundef %232) #6
  %234 = load ptr, ptr @stderr, align 8, !tbaa !20
  %235 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %234, ptr noundef nonnull @.str.4) #6
  br label %.thread

.lr.ph:                                           ; preds = %.preheader, %.critedge
  %236 = phi ptr [ %259, %.critedge ], [ %217, %.preheader ]
  %.074138 = phi i32 [ %258, %.critedge ], [ 1, %.preheader ]
  %237 = tail call double @MatNd_get(ptr noundef nonnull %236, i32 noundef %.074138, i32 noundef 0)
  %238 = load ptr, ptr %5, align 8, !tbaa !5
  %239 = add i32 %.074138, -1
  %240 = tail call double @MatNd_get(ptr noundef %238, i32 noundef %239, i32 noundef 0)
  %241 = fcmp ugt double %237, %240
  br i1 %241, label %.critedge, label %242

242:                                              ; preds = %.lr.ph
  %243 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !20
  %.not111 = icmp eq ptr %243, null
  br i1 %.not111, label %245, label %244

244:                                              ; preds = %242
  tail call void (i32, ptr, ptr, i32, ptr, ...) %243(i32 noundef 1, ptr noundef nonnull @.str.23, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 903, ptr noundef nonnull @.str.36, i32 noundef %.074138, double noundef %237, double noundef %240)
  br label %245

245:                                              ; preds = %244, %242
  %246 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %247 = icmp sgt i32 %246, 0
  br i1 %247, label %248, label %.thread

248:                                              ; preds = %245
  %249 = load ptr, ptr @stderr, align 8, !tbaa !20
  %250 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %249, ptr noundef nonnull @.str.25, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 903) #6
  %251 = load ptr, ptr @stderr, align 8, !tbaa !20
  %252 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %251, ptr noundef nonnull @.str.36, i32 noundef %.074138, double noundef %237, double noundef %240) #6
  %253 = load ptr, ptr @stderr, align 8, !tbaa !20
  %254 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %253, ptr noundef nonnull @.str.4) #6
  %.pr = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %255 = icmp sgt i32 %.pr, 1
  br i1 %255, label %256, label %.thread

256:                                              ; preds = %248
  %257 = load ptr, ptr %5, align 8, !tbaa !5
  tail call void @MatNd_printCommentDigits(ptr noundef nonnull @.str.37, ptr noundef %257, i32 noundef 6)
  br label %.thread

.critedge:                                        ; preds = %.lr.ph
  %258 = add nuw i32 %.074138, 1
  %259 = load ptr, ptr %5, align 8, !tbaa !5
  %260 = getelementptr inbounds i8, ptr %259, i64 8
  %261 = load i32, ptr %260, align 8, !tbaa !25
  %.not112 = icmp ult i32 %258, %261
  br i1 %.not112, label %.lr.ph, label %.critedge132, !llvm.loop !31

.critedge132:                                     ; preds = %.critedge, %.preheader
  %262 = getelementptr inbounds i8, ptr %0, i64 16
  %263 = load ptr, ptr %262, align 8, !tbaa !33
  %264 = tail call zeroext i1 @MatNd_isFinite(ptr noundef %263)
  br i1 %264, label %278, label %265

265:                                              ; preds = %.critedge132
  %266 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %267 = icmp sgt i32 %266, 0
  br i1 %267, label %268, label %.thread

268:                                              ; preds = %265
  %269 = load ptr, ptr @stderr, align 8, !tbaa !20
  %270 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %269, ptr noundef nonnull @.str.38, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 917) #6
  %271 = load ptr, ptr @stderr, align 8, !tbaa !20
  %272 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %271, ptr noundef nonnull @.str.39) #6
  %273 = load ptr, ptr @stderr, align 8, !tbaa !20
  %274 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %273, ptr noundef nonnull @.str.4) #6
  %275 = load ptr, ptr @stderr, align 8, !tbaa !20
  %276 = tail call i32 @fflush(ptr noundef %275)
  %277 = load ptr, ptr %262, align 8, !tbaa !33
  tail call void @MatNd_printCommentDigits(ptr noundef nonnull @.str.40, ptr noundef %277, i32 noundef 4)
  br label %.thread

278:                                              ; preds = %.critedge132
  %279 = load ptr, ptr %262, align 8, !tbaa !33
  %280 = getelementptr inbounds i8, ptr %279, i64 8
  %281 = load i32, ptr %280, align 8, !tbaa !25
  %282 = tail call ptr @MatNd_create(i32 noundef %281, i32 noundef %281)
  %283 = load ptr, ptr %262, align 8, !tbaa !33
  %284 = getelementptr inbounds i8, ptr %0, i64 24
  %285 = load ptr, ptr %284, align 8, !tbaa !34
  tail call void @MatNd_mul(ptr noundef %282, ptr noundef %283, ptr noundef %285)
  %286 = tail call zeroext i1 @MatNd_isIdentity(ptr noundef %282, double noundef 1.000000e-03)
  br i1 %286, label %302, label %287

287:                                              ; preds = %278
  %288 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !20
  %.not118 = icmp eq ptr %288, null
  br i1 %.not118, label %290, label %289

289:                                              ; preds = %287
  tail call void (i32, ptr, ptr, i32, ptr, ...) %288(i32 noundef 1, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 929, ptr noundef nonnull @.str.41, double noundef 1.000000e-03)
  br label %290

290:                                              ; preds = %289, %287
  %291 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %292 = icmp sgt i32 %291, 0
  br i1 %292, label %293, label %.thread134

293:                                              ; preds = %290
  %294 = load ptr, ptr @stderr, align 8, !tbaa !20
  %295 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %294, ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 929) #6
  %296 = load ptr, ptr @stderr, align 8, !tbaa !20
  %297 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %296, ptr noundef nonnull @.str.41, double noundef 1.000000e-03) #6
  %298 = load ptr, ptr @stderr, align 8, !tbaa !20
  %299 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %298, ptr noundef nonnull @.str.4) #6
  %.pr133 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %300 = icmp sgt i32 %.pr133, 1
  br i1 %300, label %301, label %.thread134

301:                                              ; preds = %293
  tail call void @MatNd_printCommentDigits(ptr noundef nonnull @.str.43, ptr noundef %282, i32 noundef 12)
  br label %.thread134

.thread134:                                       ; preds = %290, %301, %293
  tail call void @MatNd_destroy(ptr noundef %282)
  br label %.thread

302:                                              ; preds = %278
  tail call void @MatNd_destroy(ptr noundef %282)
  %303 = load ptr, ptr %5, align 8, !tbaa !5
  %304 = getelementptr inbounds i8, ptr %303, i64 8
  %305 = load i32, ptr %304, align 8, !tbaa !25
  %.not142 = icmp eq i32 %305, 0
  br i1 %.not142, label %.thread, label %.lr.ph141

._crit_edge:                                      ; preds = %432
  %.not113 = icmp eq i32 %.371, 0
  br i1 %.not113, label %.thread, label %439

.lr.ph141:                                        ; preds = %302, %432
  %306 = phi ptr [ %434, %432 ], [ %303, %302 ]
  %.067140 = phi i64 [ %433, %432 ], [ 0, %302 ]
  %.068139 = phi i32 [ %.371, %432 ], [ 0, %302 ]
  %307 = trunc nuw i64 %.067140 to i32
  %308 = call double @MatNd_get(ptr noundef nonnull %306, i32 noundef %307, i32 noundef 0)
  %309 = load ptr, ptr %5, align 8, !tbaa !5
  %310 = call double @MatNd_get(ptr noundef %309, i32 noundef %307, i32 noundef 4)
  %311 = call i64 @lround(double noundef %310) #7
  %312 = trunc i64 %311 to i32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  call void @_ZNK3Rcs16ViaPointSequence22computeTrajectoryPointERdS1_S1_d(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4, double noundef %308)
  %313 = call zeroext i1 @Math_isBitSet(i32 noundef %312, i32 noundef 0)
  br i1 %313, label %314, label %352

314:                                              ; preds = %.lr.ph141
  %315 = load ptr, ptr %5, align 8, !tbaa !5
  %316 = call double @MatNd_get(ptr noundef %315, i32 noundef %307, i32 noundef 1)
  %317 = load double, ptr %2, align 8, !tbaa !27
  %318 = fsub double %316, %317
  %319 = call double @llvm.fabs.f64(double %318)
  %320 = fcmp ogt double %319, 1.000000e-05
  br i1 %320, label %321, label %352

321:                                              ; preds = %314
  %322 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !20
  %.not115 = icmp eq ptr %322, null
  br i1 %.not115, label %332, label %323

323:                                              ; preds = %321
  %324 = load ptr, ptr %5, align 8, !tbaa !5
  %325 = call double @MatNd_get(ptr noundef %324, i32 noundef %307, i32 noundef 1)
  %326 = load double, ptr %2, align 8, !tbaa !27
  %327 = load ptr, ptr %5, align 8, !tbaa !5
  %328 = call double @MatNd_get(ptr noundef %327, i32 noundef %307, i32 noundef 1)
  %329 = load double, ptr %2, align 8, !tbaa !27
  %330 = fsub double %328, %329
  %331 = call double @llvm.fabs.f64(double %330)
  call void (i32, ptr, ptr, i32, ptr, ...) %322(i32 noundef 2, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 960, ptr noundef nonnull @.str.44, double noundef %308, double noundef %325, double noundef %326, double noundef %331)
  br label %332

332:                                              ; preds = %323, %321
  %333 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %334 = icmp sgt i32 %333, 1
  br i1 %334, label %335, label %350

335:                                              ; preds = %332
  %336 = load ptr, ptr @stderr, align 8, !tbaa !20
  %337 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %336, ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 960) #6
  %338 = load ptr, ptr @stderr, align 8, !tbaa !20
  %339 = load ptr, ptr %5, align 8, !tbaa !5
  %340 = call double @MatNd_get(ptr noundef %339, i32 noundef %307, i32 noundef 1)
  %341 = load double, ptr %2, align 8, !tbaa !27
  %342 = load ptr, ptr %5, align 8, !tbaa !5
  %343 = call double @MatNd_get(ptr noundef %342, i32 noundef %307, i32 noundef 1)
  %344 = load double, ptr %2, align 8, !tbaa !27
  %345 = fsub double %343, %344
  %346 = call double @llvm.fabs.f64(double %345)
  %347 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %338, ptr noundef nonnull @.str.44, double noundef %308, double noundef %340, double noundef %341, double noundef %346) #6
  %348 = load ptr, ptr @stderr, align 8, !tbaa !20
  %349 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %348, ptr noundef nonnull @.str.4) #6
  br label %350

350:                                              ; preds = %335, %332
  %351 = add i32 %.068139, 1
  br label %352

352:                                              ; preds = %314, %350, %.lr.ph141
  %.169 = phi i32 [ %351, %350 ], [ %.068139, %314 ], [ %.068139, %.lr.ph141 ]
  %353 = call zeroext i1 @Math_isBitSet(i32 noundef %312, i32 noundef 1)
  br i1 %353, label %354, label %392

354:                                              ; preds = %352
  %355 = load ptr, ptr %5, align 8, !tbaa !5
  %356 = call double @MatNd_get(ptr noundef %355, i32 noundef %307, i32 noundef 2)
  %357 = load double, ptr %3, align 8, !tbaa !27
  %358 = fsub double %356, %357
  %359 = call double @llvm.fabs.f64(double %358)
  %360 = fcmp ogt double %359, 1.000000e-04
  br i1 %360, label %361, label %392

361:                                              ; preds = %354
  %362 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !20
  %.not116 = icmp eq ptr %362, null
  br i1 %.not116, label %372, label %363

363:                                              ; preds = %361
  %364 = load ptr, ptr %5, align 8, !tbaa !5
  %365 = call double @MatNd_get(ptr noundef %364, i32 noundef %307, i32 noundef 2)
  %366 = load double, ptr %3, align 8, !tbaa !27
  %367 = load ptr, ptr %5, align 8, !tbaa !5
  %368 = call double @MatNd_get(ptr noundef %367, i32 noundef %307, i32 noundef 2)
  %369 = load double, ptr %3, align 8, !tbaa !27
  %370 = fsub double %368, %369
  %371 = call double @llvm.fabs.f64(double %370)
  call void (i32, ptr, ptr, i32, ptr, ...) %362(i32 noundef 2, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 973, ptr noundef nonnull @.str.45, double noundef %308, double noundef %365, double noundef %366, double noundef %371)
  br label %372

372:                                              ; preds = %363, %361
  %373 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %374 = icmp sgt i32 %373, 1
  br i1 %374, label %375, label %390

375:                                              ; preds = %372
  %376 = load ptr, ptr @stderr, align 8, !tbaa !20
  %377 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %376, ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 973) #6
  %378 = load ptr, ptr @stderr, align 8, !tbaa !20
  %379 = load ptr, ptr %5, align 8, !tbaa !5
  %380 = call double @MatNd_get(ptr noundef %379, i32 noundef %307, i32 noundef 2)
  %381 = load double, ptr %3, align 8, !tbaa !27
  %382 = load ptr, ptr %5, align 8, !tbaa !5
  %383 = call double @MatNd_get(ptr noundef %382, i32 noundef %307, i32 noundef 2)
  %384 = load double, ptr %3, align 8, !tbaa !27
  %385 = fsub double %383, %384
  %386 = call double @llvm.fabs.f64(double %385)
  %387 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %378, ptr noundef nonnull @.str.45, double noundef %308, double noundef %380, double noundef %381, double noundef %386) #6
  %388 = load ptr, ptr @stderr, align 8, !tbaa !20
  %389 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %388, ptr noundef nonnull @.str.4) #6
  br label %390

390:                                              ; preds = %375, %372
  %391 = add i32 %.169, 1
  br label %392

392:                                              ; preds = %354, %390, %352
  %.270 = phi i32 [ %391, %390 ], [ %.169, %354 ], [ %.169, %352 ]
  %393 = call zeroext i1 @Math_isBitSet(i32 noundef %312, i32 noundef 2)
  br i1 %393, label %394, label %432

394:                                              ; preds = %392
  %395 = load ptr, ptr %5, align 8, !tbaa !5
  %396 = call double @MatNd_get(ptr noundef %395, i32 noundef %307, i32 noundef 3)
  %397 = load double, ptr %4, align 8, !tbaa !27
  %398 = fsub double %396, %397
  %399 = call double @llvm.fabs.f64(double %398)
  %400 = fcmp ogt double %399, 1.000000e-04
  br i1 %400, label %401, label %432

401:                                              ; preds = %394
  %402 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !20
  %.not117 = icmp eq ptr %402, null
  br i1 %.not117, label %412, label %403

403:                                              ; preds = %401
  %404 = load ptr, ptr %5, align 8, !tbaa !5
  %405 = call double @MatNd_get(ptr noundef %404, i32 noundef %307, i32 noundef 3)
  %406 = load double, ptr %4, align 8, !tbaa !27
  %407 = load ptr, ptr %5, align 8, !tbaa !5
  %408 = call double @MatNd_get(ptr noundef %407, i32 noundef %307, i32 noundef 3)
  %409 = load double, ptr %4, align 8, !tbaa !27
  %410 = fsub double %408, %409
  %411 = call double @llvm.fabs.f64(double %410)
  call void (i32, ptr, ptr, i32, ptr, ...) %402(i32 noundef 2, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 986, ptr noundef nonnull @.str.46, double noundef %308, double noundef %405, double noundef %406, double noundef %411)
  br label %412

412:                                              ; preds = %403, %401
  %413 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %414 = icmp sgt i32 %413, 1
  br i1 %414, label %415, label %430

415:                                              ; preds = %412
  %416 = load ptr, ptr @stderr, align 8, !tbaa !20
  %417 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %416, ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 986) #6
  %418 = load ptr, ptr @stderr, align 8, !tbaa !20
  %419 = load ptr, ptr %5, align 8, !tbaa !5
  %420 = call double @MatNd_get(ptr noundef %419, i32 noundef %307, i32 noundef 3)
  %421 = load double, ptr %4, align 8, !tbaa !27
  %422 = load ptr, ptr %5, align 8, !tbaa !5
  %423 = call double @MatNd_get(ptr noundef %422, i32 noundef %307, i32 noundef 3)
  %424 = load double, ptr %4, align 8, !tbaa !27
  %425 = fsub double %423, %424
  %426 = call double @llvm.fabs.f64(double %425)
  %427 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %418, ptr noundef nonnull @.str.46, double noundef %308, double noundef %420, double noundef %421, double noundef %426) #6
  %428 = load ptr, ptr @stderr, align 8, !tbaa !20
  %429 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %428, ptr noundef nonnull @.str.4) #6
  br label %430

430:                                              ; preds = %415, %412
  %431 = add i32 %.270, 1
  br label %432

432:                                              ; preds = %394, %430, %392
  %.371 = phi i32 [ %431, %430 ], [ %.270, %394 ], [ %.270, %392 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %433 = add nuw nsw i64 %.067140, 1
  %434 = load ptr, ptr %5, align 8, !tbaa !5
  %435 = getelementptr inbounds i8, ptr %434, i64 8
  %436 = load i32, ptr %435, align 8, !tbaa !25
  %437 = zext i32 %436 to i64
  %438 = icmp ult i64 %433, %437
  br i1 %438, label %.lr.ph141, label %._crit_edge, !llvm.loop !35

439:                                              ; preds = %._crit_edge
  %440 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !20
  %.not114 = icmp eq ptr %440, null
  br i1 %.not114, label %442, label %441

441:                                              ; preds = %439
  call void (i32, ptr, ptr, i32, ptr, ...) %440(i32 noundef 1, ptr noundef nonnull @.str.23, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 995, ptr noundef nonnull @.str.47, i32 noundef %.371)
  br label %442

442:                                              ; preds = %441, %439
  %443 = load i32, ptr @RcsLogLevel, align 4, !tbaa !21
  %444 = icmp sgt i32 %443, 0
  br i1 %444, label %445, label %.thread

445:                                              ; preds = %442
  %446 = load ptr, ptr @stderr, align 8, !tbaa !20
  %447 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %446, ptr noundef nonnull @.str.25, ptr noundef nonnull @__func__._ZNK3Rcs16ViaPointSequence5checkEv, i32 noundef 995) #6
  %448 = load ptr, ptr @stderr, align 8, !tbaa !20
  %449 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %448, ptr noundef nonnull @.str.47, i32 noundef %.371) #6
  %450 = load ptr, ptr @stderr, align 8, !tbaa !20
  %451 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %450, ptr noundef nonnull @.str.4) #6
  br label %.thread

.thread:                                          ; preds = %302, %245, %248, %256, %116, %113, %133, %130, %149, %146, %168, %165, %188, %185, %204, %201, %226, %223, %268, %265, %._crit_edge, %445, %442, %.thread134, %94, %97, %70, %73, %48, %51, %28, %31, %11, %14
  %.5 = phi i1 [ false, %14 ], [ false, %11 ], [ false, %31 ], [ false, %28 ], [ false, %51 ], [ false, %48 ], [ false, %73 ], [ false, %70 ], [ false, %97 ], [ false, %94 ], [ false, %116 ], [ false, %113 ], [ false, %133 ], [ false, %130 ], [ false, %149 ], [ false, %146 ], [ false, %168 ], [ false, %165 ], [ false, %188 ], [ false, %185 ], [ false, %204 ], [ false, %201 ], [ false, %226 ], [ false, %223 ], [ false, %268 ], [ false, %265 ], [ false, %.thread134 ], [ false, %442 ], [ false, %445 ], [ true, %._crit_edge ], [ false, %256 ], [ false, %248 ], [ false, %245 ], [ true, %302 ]
  ret i1 %.5
}

declare zeroext i1 @MatNd_isFinite(ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local 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 #4 align 2

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

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

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass