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

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

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

@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
@RcsLogLevel = external global i32, align 4
@.str.42 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [20 x i8], align 1
@__func__._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi = external hidden unnamed_addr constant [6 x i8], align 1
@__const._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi.trajFile = external hidden unnamed_addr constant [64 x i8], align 16
@__const._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi.viaPosFile = external hidden unnamed_addr constant [64 x i8], align 16
@__const._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi.viaVelFile = external hidden unnamed_addr constant [64 x i8], align 16
@__const._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi.viaAccFile = external hidden unnamed_addr constant [64 x i8], align 16
@.str.99 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [227 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.105 = external hidden unnamed_addr constant [84 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_set(ptr noundef, i32 noundef, i32 noundef, double 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 i32 @fflush(ptr noundef) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3Rcs16ViaPointSequence17computeTrajectoryEP6_MatNdddd(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef, double noundef, double noundef, double noundef) #3 align 2

declare void @MatNd_transposeSelf(ptr noundef) #2

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare double @Math_fmin3(double noundef, double noundef, double noundef) #2

declare double @Math_fmax3(double noundef, double noundef, double noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(104) %1, double noundef %2, double noundef %3, double noundef %4, i32 noundef %5) unnamed_addr #3 align 2 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca i32, align 4
  %13 = alloca [64 x i8], align 16
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  %21 = alloca double, align 8
  %22 = alloca [64 x i8], align 16
  %23 = alloca [64 x i8], align 16
  %24 = alloca [64 x i8], align 16
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store double %2, ptr %9, align 8, !tbaa !9
  store double %3, ptr %10, align 8, !tbaa !9
  store double %4, ptr %11, align 8, !tbaa !9
  store i32 %5, ptr %12, align 4, !tbaa !11
  %30 = load ptr, ptr %7, align 8
  %31 = load double, ptr %10, align 8, !tbaa !9
  %32 = load double, ptr %9, align 8, !tbaa !9
  %33 = fcmp ole double %31, %32
  br i1 %33, label %34, label %56

34:                                               ; preds = %6
  br label %35

35:                                               ; preds = %34
  %36 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %42

38:                                               ; preds = %35
  %39 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %40 = load double, ptr %10, align 8, !tbaa !9
  %41 = load double, ptr %9, align 8, !tbaa !9
  call void (i32, ptr, ptr, i32, ptr, ...) %39(i32 noundef 1, ptr noundef @.str.2, ptr noundef @__func__._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi, i32 noundef 2467, ptr noundef @.str.48, double noundef %40, double noundef %41)
  br label %42

42:                                               ; preds = %38, %35
  %43 = load i32, ptr @RcsLogLevel, align 4, !tbaa !11
  %44 = icmp sle i32 1, %43
  br i1 %44, label %45, label %54

45:                                               ; preds = %42
  %46 = load ptr, ptr @stderr, align 8, !tbaa !5
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef @.str.42, ptr noundef @.str.2, ptr noundef @__func__._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi, i32 noundef 2467) #5
  %48 = load ptr, ptr @stderr, align 8, !tbaa !5
  %49 = load double, ptr %10, align 8, !tbaa !9
  %50 = load double, ptr %9, align 8, !tbaa !9
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef @.str.48, double noundef %49, double noundef %50) #5
  %52 = load ptr, ptr @stderr, align 8, !tbaa !5
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef @.str.4) #5
  br label %54

54:                                               ; preds = %45, %42
  br label %55

55:                                               ; preds = %54
  br label %445

56:                                               ; preds = %6
  %57 = load double, ptr %11, align 8, !tbaa !9
  %58 = fcmp ole double %57, 0.000000e+00
  br i1 %58, label %59, label %79

59:                                               ; preds = %56
  br label %60

60:                                               ; preds = %59
  %61 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %62 = icmp ne ptr %61, null
  br i1 %62, label %63, label %66

63:                                               ; preds = %60
  %64 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %65 = load double, ptr %11, align 8, !tbaa !9
  call void (i32, ptr, ptr, i32, ptr, ...) %64(i32 noundef 1, ptr noundef @.str.2, ptr noundef @__func__._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi, i32 noundef 2473, ptr noundef @.str.49, double noundef %65)
  br label %66

66:                                               ; preds = %63, %60
  %67 = load i32, ptr @RcsLogLevel, align 4, !tbaa !11
  %68 = icmp sle i32 1, %67
  br i1 %68, label %69, label %77

69:                                               ; preds = %66
  %70 = load ptr, ptr @stderr, align 8, !tbaa !5
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %70, ptr noundef @.str.42, ptr noundef @.str.2, ptr noundef @__func__._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi, i32 noundef 2473) #5
  %72 = load ptr, ptr @stderr, align 8, !tbaa !5
  %73 = load double, ptr %11, align 8, !tbaa !9
  %74 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef @.str.49, double noundef %73) #5
  %75 = load ptr, ptr @stderr, align 8, !tbaa !5
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef @.str.4) #5
  br label %77

77:                                               ; preds = %69, %66
  br label %78

78:                                               ; preds = %77
  br label %445

79:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 64, ptr %13) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 @__const._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi.trajFile, i64 64, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %80 = load double, ptr %10, align 8, !tbaa !9
  %81 = load double, ptr %9, align 8, !tbaa !9
  %82 = fsub double %80, %81
  %83 = load double, ptr %11, align 8, !tbaa !9
  %84 = fdiv double %82, %83
  %85 = call i64 @lround(double noundef %84) #5
  %86 = mul nsw i64 4, %85
  %87 = trunc i64 %86 to i32
  %88 = call ptr @MatNd_create(i32 noundef 3, i32 noundef %87)
  store ptr %88, ptr %14, align 8, !tbaa !5
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = load ptr, ptr %14, align 8, !tbaa !5
  %91 = load double, ptr %9, align 8, !tbaa !9
  %92 = load double, ptr %10, align 8, !tbaa !9
  %93 = load double, ptr %11, align 8, !tbaa !9
  call void @_ZNK3Rcs16ViaPointSequence17computeTrajectoryEP6_MatNdddd(ptr noundef nonnull align 8 dereferenceable(104) %89, ptr noundef %90, double noundef %91, double noundef %92, double noundef %93)
  %94 = load ptr, ptr %14, align 8, !tbaa !5
  call void @MatNd_transposeSelf(ptr noundef %94)
  %95 = load ptr, ptr %14, align 8, !tbaa !5
  %96 = getelementptr inbounds [64 x i8], ptr %13, i64 0, i64 0
  %97 = call zeroext i1 @MatNd_toFile(ptr noundef %95, ptr noundef %96)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %98, i32 0, i32 1
  %100 = load ptr, ptr %99, align 8, !tbaa !13
  %101 = call noundef i64 @_ZN3Rcs16ViaPointSequence26computeNumberOfConstraintsEPK6_MatNd(ptr noundef %100)
  store i64 %101, ptr %15, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %102 = load i64, ptr %15, align 8, !tbaa !25
  %103 = trunc i64 %102 to i32
  %104 = call ptr @MatNd_create(i32 noundef %103, i32 noundef 2)
  store ptr %104, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %105 = load i64, ptr %15, align 8, !tbaa !25
  %106 = trunc i64 %105 to i32
  %107 = call ptr @MatNd_create(i32 noundef %106, i32 noundef 2)
  store ptr %107, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %108 = load i64, ptr %15, align 8, !tbaa !25
  %109 = trunc i64 %108 to i32
  %110 = call ptr @MatNd_create(i32 noundef %109, i32 noundef 2)
  store ptr %110, ptr %18, align 8, !tbaa !5
  %111 = load ptr, ptr %16, align 8, !tbaa !5
  call void @MatNd_reshape(ptr noundef %111, i32 noundef 0, i32 noundef 2)
  %112 = load ptr, ptr %17, align 8, !tbaa !5
  call void @MatNd_reshape(ptr noundef %112, i32 noundef 0, i32 noundef 2)
  %113 = load ptr, ptr %18, align 8, !tbaa !5
  call void @MatNd_reshape(ptr noundef %113, i32 noundef 0, i32 noundef 2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  store i64 0, ptr %19, align 8, !tbaa !25
  br label %114

114:                                              ; preds = %214, %79
  %115 = load i64, ptr %19, align 8, !tbaa !25
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %116, i32 0, i32 1
  %118 = load ptr, ptr %117, align 8, !tbaa !13
  %119 = getelementptr inbounds %struct._MatNd, ptr %118, i32 0, i32 1
  %120 = load i32, ptr %119, align 8, !tbaa !27
  %121 = zext i32 %120 to i64
  %122 = icmp ult i64 %115, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %217

124:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %125, i32 0, i32 1
  %127 = load ptr, ptr %126, align 8, !tbaa !13
  %128 = load i64, ptr %19, align 8, !tbaa !25
  %129 = trunc i64 %128 to i32
  %130 = call double @MatNd_get(ptr noundef %127, i32 noundef %129, i32 noundef 4)
  %131 = call i64 @lround(double noundef %130) #5
  %132 = trunc i64 %131 to i32
  store i32 %132, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %133, i32 0, i32 1
  %135 = load ptr, ptr %134, align 8, !tbaa !13
  %136 = load i64, ptr %19, align 8, !tbaa !25
  %137 = trunc i64 %136 to i32
  %138 = call double @MatNd_get(ptr noundef %135, i32 noundef %137, i32 noundef 0)
  store double %138, ptr %21, align 8, !tbaa !9
  %139 = load i32, ptr %20, align 4, !tbaa !11
  %140 = call zeroext i1 @Math_isBitSet(i32 noundef %139, i32 noundef 0)
  br i1 %140, label %141, label %163

141:                                              ; preds = %124
  %142 = load ptr, ptr %16, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct._MatNd, ptr %142, i32 0, i32 1
  %144 = load i32, ptr %143, align 8, !tbaa !27
  %145 = add i32 %144, 1
  store i32 %145, ptr %143, align 8, !tbaa !27
  %146 = load ptr, ptr %16, align 8, !tbaa !5
  %147 = load ptr, ptr %16, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct._MatNd, ptr %147, i32 0, i32 1
  %149 = load i32, ptr %148, align 8, !tbaa !27
  %150 = sub i32 %149, 1
  %151 = load double, ptr %21, align 8, !tbaa !9
  call void @MatNd_set(ptr noundef %146, i32 noundef %150, i32 noundef 0, double noundef %151)
  %152 = load ptr, ptr %16, align 8, !tbaa !5
  %153 = load ptr, ptr %16, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct._MatNd, ptr %153, i32 0, i32 1
  %155 = load i32, ptr %154, align 8, !tbaa !27
  %156 = sub i32 %155, 1
  %157 = load ptr, ptr %8, align 8, !tbaa !5
  %158 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %157, i32 0, i32 1
  %159 = load ptr, ptr %158, align 8, !tbaa !13
  %160 = load i64, ptr %19, align 8, !tbaa !25
  %161 = trunc i64 %160 to i32
  %162 = call double @MatNd_get(ptr noundef %159, i32 noundef %161, i32 noundef 1)
  call void @MatNd_set(ptr noundef %152, i32 noundef %156, i32 noundef 1, double noundef %162)
  br label %163

163:                                              ; preds = %141, %124
  %164 = load i32, ptr %20, align 4, !tbaa !11
  %165 = call zeroext i1 @Math_isBitSet(i32 noundef %164, i32 noundef 1)
  br i1 %165, label %166, label %188

166:                                              ; preds = %163
  %167 = load ptr, ptr %17, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct._MatNd, ptr %167, i32 0, i32 1
  %169 = load i32, ptr %168, align 8, !tbaa !27
  %170 = add i32 %169, 1
  store i32 %170, ptr %168, align 8, !tbaa !27
  %171 = load ptr, ptr %17, align 8, !tbaa !5
  %172 = load ptr, ptr %17, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct._MatNd, ptr %172, i32 0, i32 1
  %174 = load i32, ptr %173, align 8, !tbaa !27
  %175 = sub i32 %174, 1
  %176 = load double, ptr %21, align 8, !tbaa !9
  call void @MatNd_set(ptr noundef %171, i32 noundef %175, i32 noundef 0, double noundef %176)
  %177 = load ptr, ptr %17, align 8, !tbaa !5
  %178 = load ptr, ptr %17, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct._MatNd, ptr %178, i32 0, i32 1
  %180 = load i32, ptr %179, align 8, !tbaa !27
  %181 = sub i32 %180, 1
  %182 = load ptr, ptr %8, align 8, !tbaa !5
  %183 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %182, i32 0, i32 1
  %184 = load ptr, ptr %183, align 8, !tbaa !13
  %185 = load i64, ptr %19, align 8, !tbaa !25
  %186 = trunc i64 %185 to i32
  %187 = call double @MatNd_get(ptr noundef %184, i32 noundef %186, i32 noundef 2)
  call void @MatNd_set(ptr noundef %177, i32 noundef %181, i32 noundef 1, double noundef %187)
  br label %188

188:                                              ; preds = %166, %163
  %189 = load i32, ptr %20, align 4, !tbaa !11
  %190 = call zeroext i1 @Math_isBitSet(i32 noundef %189, i32 noundef 2)
  br i1 %190, label %191, label %213

191:                                              ; preds = %188
  %192 = load ptr, ptr %18, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct._MatNd, ptr %192, i32 0, i32 1
  %194 = load i32, ptr %193, align 8, !tbaa !27
  %195 = add i32 %194, 1
  store i32 %195, ptr %193, align 8, !tbaa !27
  %196 = load ptr, ptr %18, align 8, !tbaa !5
  %197 = load ptr, ptr %18, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct._MatNd, ptr %197, i32 0, i32 1
  %199 = load i32, ptr %198, align 8, !tbaa !27
  %200 = sub i32 %199, 1
  %201 = load double, ptr %21, align 8, !tbaa !9
  call void @MatNd_set(ptr noundef %196, i32 noundef %200, i32 noundef 0, double noundef %201)
  %202 = load ptr, ptr %18, align 8, !tbaa !5
  %203 = load ptr, ptr %18, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct._MatNd, ptr %203, i32 0, i32 1
  %205 = load i32, ptr %204, align 8, !tbaa !27
  %206 = sub i32 %205, 1
  %207 = load ptr, ptr %8, align 8, !tbaa !5
  %208 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %207, i32 0, i32 1
  %209 = load ptr, ptr %208, align 8, !tbaa !13
  %210 = load i64, ptr %19, align 8, !tbaa !25
  %211 = trunc i64 %210 to i32
  %212 = call double @MatNd_get(ptr noundef %209, i32 noundef %211, i32 noundef 3)
  call void @MatNd_set(ptr noundef %202, i32 noundef %206, i32 noundef 1, double noundef %212)
  br label %213

213:                                              ; preds = %191, %188
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %214

214:                                              ; preds = %213
  %215 = load i64, ptr %19, align 8, !tbaa !25
  %216 = add i64 %215, 1
  store i64 %216, ptr %19, align 8, !tbaa !25
  br label %114, !llvm.loop !29

217:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 64, ptr %22) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %22, ptr align 16 @__const._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi.viaPosFile, i64 64, i1 false)
  call void @llvm.lifetime.start.p0(i64 64, ptr %23) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %23, ptr align 16 @__const._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi.viaVelFile, i64 64, i1 false)
  call void @llvm.lifetime.start.p0(i64 64, ptr %24) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %24, ptr align 16 @__const._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi.viaAccFile, i64 64, i1 false)
  %218 = load ptr, ptr %16, align 8, !tbaa !5
  %219 = getelementptr inbounds [64 x i8], ptr %22, i64 0, i64 0
  %220 = call zeroext i1 @MatNd_toFile(ptr noundef %218, ptr noundef %219)
  %221 = load ptr, ptr %17, align 8, !tbaa !5
  %222 = getelementptr inbounds [64 x i8], ptr %23, i64 0, i64 0
  %223 = call zeroext i1 @MatNd_toFile(ptr noundef %221, ptr noundef %222)
  %224 = load ptr, ptr %18, align 8, !tbaa !5
  %225 = getelementptr inbounds [64 x i8], ptr %24, i64 0, i64 0
  %226 = call zeroext i1 @MatNd_toFile(ptr noundef %224, ptr noundef %225)
  %227 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 2
  %228 = load i8, ptr %227, align 8, !tbaa !31, !range !33, !noundef !34
  %229 = trunc i8 %228 to i1
  %230 = zext i1 %229 to i32
  %231 = icmp eq i32 %230, 1
  br i1 %231, label %232, label %240

232:                                              ; preds = %217
  %233 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 1
  %234 = load ptr, ptr %233, align 8, !tbaa !35
  %235 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 5
  %236 = load double, ptr %235, align 8, !tbaa !36
  %237 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 6
  %238 = load double, ptr %237, align 8, !tbaa !37
  %239 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %234, ptr noundef @.str.92, double noundef %236, double noundef %238) #5
  br label %241

240:                                              ; preds = %217
  br label %241

241:                                              ; preds = %240, %232
  %242 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 1
  %243 = load ptr, ptr %242, align 8, !tbaa !35
  %244 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %243, ptr noundef @.str.99) #5
  %245 = load i32, ptr %12, align 4, !tbaa !11
  %246 = icmp eq i32 %245, 7
  br i1 %246, label %247, label %289

247:                                              ; preds = %241
  %248 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 2
  %249 = load i8, ptr %248, align 8, !tbaa !31, !range !33, !noundef !34
  %250 = trunc i8 %249 to i1
  %251 = zext i1 %250 to i32
  %252 = icmp eq i32 %251, 1
  br i1 %252, label %253, label %279

253:                                              ; preds = %247
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %254 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 3
  %255 = getelementptr inbounds [3 x double], ptr %254, i64 0, i64 0
  %256 = load double, ptr %255, align 8, !tbaa !9
  %257 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 3
  %258 = getelementptr inbounds [3 x double], ptr %257, i64 0, i64 1
  %259 = load double, ptr %258, align 8, !tbaa !9
  %260 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 3
  %261 = getelementptr inbounds [3 x double], ptr %260, i64 0, i64 2
  %262 = load double, ptr %261, align 8, !tbaa !9
  %263 = call double @Math_fmin3(double noundef %256, double noundef %259, double noundef %262)
  store double %263, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %264 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 4
  %265 = getelementptr inbounds [3 x double], ptr %264, i64 0, i64 0
  %266 = load double, ptr %265, align 8, !tbaa !9
  %267 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 4
  %268 = getelementptr inbounds [3 x double], ptr %267, i64 0, i64 1
  %269 = load double, ptr %268, align 8, !tbaa !9
  %270 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 4
  %271 = getelementptr inbounds [3 x double], ptr %270, i64 0, i64 2
  %272 = load double, ptr %271, align 8, !tbaa !9
  %273 = call double @Math_fmax3(double noundef %266, double noundef %269, double noundef %272)
  store double %273, ptr %26, align 8, !tbaa !9
  %274 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 1
  %275 = load ptr, ptr %274, align 8, !tbaa !35
  %276 = load double, ptr %25, align 8, !tbaa !9
  %277 = load double, ptr %26, align 8, !tbaa !9
  %278 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %275, ptr noundef @.str.94, double noundef %276, double noundef %277) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  br label %279

279:                                              ; preds = %253, %247
  %280 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 1
  %281 = load ptr, ptr %280, align 8, !tbaa !35
  %282 = getelementptr inbounds [64 x i8], ptr %13, i64 0, i64 0
  %283 = getelementptr inbounds [64 x i8], ptr %13, i64 0, i64 0
  %284 = getelementptr inbounds [64 x i8], ptr %13, i64 0, i64 0
  %285 = getelementptr inbounds [64 x i8], ptr %22, i64 0, i64 0
  %286 = getelementptr inbounds [64 x i8], ptr %23, i64 0, i64 0
  %287 = getelementptr inbounds [64 x i8], ptr %24, i64 0, i64 0
  %288 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %281, ptr noundef @.str.100, ptr noundef %282, ptr noundef %283, ptr noundef %284, ptr noundef %285, ptr noundef %286, ptr noundef %287) #5
  br label %435

289:                                              ; preds = %241
  %290 = load i32, ptr %12, align 4, !tbaa !11
  %291 = call zeroext i1 @Math_isBitSet(i32 noundef %290, i32 noundef 0)
  br i1 %291, label %292, label %384

292:                                              ; preds = %289
  %293 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 2
  %294 = load i8, ptr %293, align 8, !tbaa !31, !range !33, !noundef !34
  %295 = trunc i8 %294 to i1
  %296 = zext i1 %295 to i32
  %297 = icmp eq i32 %296, 1
  br i1 %297, label %298, label %322

298:                                              ; preds = %292
  %299 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 6
  %300 = load double, ptr %299, align 8, !tbaa !37
  %301 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 5
  %302 = load double, ptr %301, align 8, !tbaa !36
  %303 = fsub double %300, %302
  %304 = fcmp ogt double %303, 0.000000e+00
  br i1 %304, label %305, label %322

305:                                              ; preds = %298
  %306 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 1
  %307 = load ptr, ptr %306, align 8, !tbaa !35
  %308 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 5
  %309 = load double, ptr %308, align 8, !tbaa !36
  %310 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 6
  %311 = load double, ptr %310, align 8, !tbaa !37
  %312 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %307, ptr noundef @.str.92, double noundef %309, double noundef %311) #5
  %313 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 1
  %314 = load ptr, ptr %313, align 8, !tbaa !35
  %315 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 3
  %316 = getelementptr inbounds [3 x double], ptr %315, i64 0, i64 0
  %317 = load double, ptr %316, align 8, !tbaa !9
  %318 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 4
  %319 = getelementptr inbounds [3 x double], ptr %318, i64 0, i64 0
  %320 = load double, ptr %319, align 8, !tbaa !9
  %321 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %314, ptr noundef @.str.94, double noundef %317, double noundef %320) #5
  br label %323

322:                                              ; preds = %298, %292
  br label %323

323:                                              ; preds = %322, %305
  %324 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 1
  %325 = load ptr, ptr %324, align 8, !tbaa !35
  %326 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %325, ptr noundef @.str.101) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  store i32 0, ptr %27, align 4, !tbaa !11
  br label %327

327:                                              ; preds = %344, %323
  %328 = load i32, ptr %27, align 4, !tbaa !11
  %329 = load ptr, ptr %14, align 8, !tbaa !5
  %330 = getelementptr inbounds %struct._MatNd, ptr %329, i32 0, i32 1
  %331 = load i32, ptr %330, align 8, !tbaa !27
  %332 = icmp ult i32 %328, %331
  br i1 %332, label %334, label %333

333:                                              ; preds = %327
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %347

334:                                              ; preds = %327
  %335 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 1
  %336 = load ptr, ptr %335, align 8, !tbaa !35
  %337 = load ptr, ptr %14, align 8, !tbaa !5
  %338 = load i32, ptr %27, align 4, !tbaa !11
  %339 = call double @MatNd_get(ptr noundef %337, i32 noundef %338, i32 noundef 0)
  %340 = load ptr, ptr %14, align 8, !tbaa !5
  %341 = load i32, ptr %27, align 4, !tbaa !11
  %342 = call double @MatNd_get(ptr noundef %340, i32 noundef %341, i32 noundef 1)
  %343 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %336, ptr noundef @.str.102, double noundef %339, double noundef %342) #5
  br label %344

344:                                              ; preds = %334
  %345 = load i32, ptr %27, align 4, !tbaa !11
  %346 = add i32 %345, 1
  store i32 %346, ptr %27, align 4, !tbaa !11
  br label %327, !llvm.loop !38

347:                                              ; preds = %333
  %348 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 1
  %349 = load ptr, ptr %348, align 8, !tbaa !35
  %350 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %349, ptr noundef @.str.103) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  store i32 0, ptr %28, align 4, !tbaa !11
  br label %351

351:                                              ; preds = %374, %347
  %352 = load i32, ptr %28, align 4, !tbaa !11
  %353 = load ptr, ptr %14, align 8, !tbaa !5
  %354 = getelementptr inbounds %struct._MatNd, ptr %353, i32 0, i32 1
  %355 = load i32, ptr %354, align 8, !tbaa !27
  %356 = icmp ult i32 %352, %355
  br i1 %356, label %358, label %357

357:                                              ; preds = %351
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  br label %377

358:                                              ; preds = %351
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %359 = load i32, ptr %28, align 4, !tbaa !11
  %360 = load ptr, ptr %16, align 8, !tbaa !5
  %361 = getelementptr inbounds %struct._MatNd, ptr %360, i32 0, i32 1
  %362 = load i32, ptr %361, align 8, !tbaa !27
  %363 = sub i32 %362, 1
  %364 = call i32 @Math_iClip(i32 noundef %359, i32 noundef 0, i32 noundef %363)
  store i32 %364, ptr %29, align 4, !tbaa !11
  %365 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 1
  %366 = load ptr, ptr %365, align 8, !tbaa !35
  %367 = load ptr, ptr %16, align 8, !tbaa !5
  %368 = load i32, ptr %29, align 4, !tbaa !11
  %369 = call double @MatNd_get(ptr noundef %367, i32 noundef %368, i32 noundef 0)
  %370 = load ptr, ptr %16, align 8, !tbaa !5
  %371 = load i32, ptr %29, align 4, !tbaa !11
  %372 = call double @MatNd_get(ptr noundef %370, i32 noundef %371, i32 noundef 1)
  %373 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %366, ptr noundef @.str.102, double noundef %369, double noundef %372) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  br label %374

374:                                              ; preds = %358
  %375 = load i32, ptr %28, align 4, !tbaa !11
  %376 = add i32 %375, 1
  store i32 %376, ptr %28, align 4, !tbaa !11
  br label %351, !llvm.loop !39

377:                                              ; preds = %357
  %378 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 1
  %379 = load ptr, ptr %378, align 8, !tbaa !35
  %380 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %379, ptr noundef @.str.103) #5
  %381 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 1
  %382 = load ptr, ptr %381, align 8, !tbaa !35
  %383 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %382, ptr noundef @.str.4) #5
  br label %384

384:                                              ; preds = %377, %289
  %385 = load i32, ptr %12, align 4, !tbaa !11
  %386 = call zeroext i1 @Math_isBitSet(i32 noundef %385, i32 noundef 1)
  br i1 %386, label %387, label %409

387:                                              ; preds = %384
  %388 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 2
  %389 = load i8, ptr %388, align 8, !tbaa !31, !range !33, !noundef !34
  %390 = trunc i8 %389 to i1
  %391 = zext i1 %390 to i32
  %392 = icmp eq i32 %391, 1
  br i1 %392, label %393, label %403

393:                                              ; preds = %387
  %394 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 1
  %395 = load ptr, ptr %394, align 8, !tbaa !35
  %396 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 3
  %397 = getelementptr inbounds [3 x double], ptr %396, i64 0, i64 1
  %398 = load double, ptr %397, align 8, !tbaa !9
  %399 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 4
  %400 = getelementptr inbounds [3 x double], ptr %399, i64 0, i64 1
  %401 = load double, ptr %400, align 8, !tbaa !9
  %402 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %395, ptr noundef @.str.94, double noundef %398, double noundef %401) #5
  br label %403

403:                                              ; preds = %393, %387
  %404 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 1
  %405 = load ptr, ptr %404, align 8, !tbaa !35
  %406 = getelementptr inbounds [64 x i8], ptr %13, i64 0, i64 0
  %407 = getelementptr inbounds [64 x i8], ptr %23, i64 0, i64 0
  %408 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %405, ptr noundef @.str.104, ptr noundef %406, ptr noundef %407) #5
  br label %409

409:                                              ; preds = %403, %384
  %410 = load i32, ptr %12, align 4, !tbaa !11
  %411 = call zeroext i1 @Math_isBitSet(i32 noundef %410, i32 noundef 2)
  br i1 %411, label %412, label %434

412:                                              ; preds = %409
  %413 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 2
  %414 = load i8, ptr %413, align 8, !tbaa !31, !range !33, !noundef !34
  %415 = trunc i8 %414 to i1
  %416 = zext i1 %415 to i32
  %417 = icmp eq i32 %416, 1
  br i1 %417, label %418, label %428

418:                                              ; preds = %412
  %419 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 1
  %420 = load ptr, ptr %419, align 8, !tbaa !35
  %421 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 3
  %422 = getelementptr inbounds [3 x double], ptr %421, i64 0, i64 2
  %423 = load double, ptr %422, align 8, !tbaa !9
  %424 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 4
  %425 = getelementptr inbounds [3 x double], ptr %424, i64 0, i64 2
  %426 = load double, ptr %425, align 8, !tbaa !9
  %427 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %420, ptr noundef @.str.94, double noundef %423, double noundef %426) #5
  br label %428

428:                                              ; preds = %418, %412
  %429 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 1
  %430 = load ptr, ptr %429, align 8, !tbaa !35
  %431 = getelementptr inbounds [64 x i8], ptr %13, i64 0, i64 0
  %432 = getelementptr inbounds [64 x i8], ptr %24, i64 0, i64 0
  %433 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %430, ptr noundef @.str.105, ptr noundef %431, ptr noundef %432) #5
  br label %434

434:                                              ; preds = %428, %409
  br label %435

435:                                              ; preds = %434, %279
  %436 = load ptr, ptr %16, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %436)
  %437 = load ptr, ptr %17, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %437)
  %438 = load ptr, ptr %18, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %438)
  %439 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 1
  %440 = load ptr, ptr %439, align 8, !tbaa !35
  %441 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %440, ptr noundef @.str.4) #5
  %442 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %30, i32 0, i32 1
  %443 = load ptr, ptr %442, align 8, !tbaa !35
  %444 = call i32 @fflush(ptr noundef %443)
  call void @llvm.lifetime.end.p0(i64 64, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #5
  br label %445

445:                                              ; preds = %435, %78, %55
  ret void
}

declare i32 @Math_iClip(i32 noundef, i32 noundef, i32 noundef) #2

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

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

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


; 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
@RcsLogLevel = external local_unnamed_addr global i32, align 4
@.str.42 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [20 x i8], align 1
@__func__._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi = external hidden unnamed_addr constant [6 x i8], align 1
@__const._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi.trajFile = external hidden unnamed_addr constant [64 x i8], align 16
@__const._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi.viaPosFile = external hidden unnamed_addr constant [64 x i8], align 16
@__const._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi.viaVelFile = external hidden unnamed_addr constant [64 x i8], align 16
@__const._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi.viaAccFile = external hidden unnamed_addr constant [64 x i8], align 16
@.str.99 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [227 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.105 = external hidden unnamed_addr constant [84 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_set(ptr noundef, i32 noundef, i32 noundef, double 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

; 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3Rcs16ViaPointSequence17computeTrajectoryEP6_MatNdddd(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef, double noundef, double noundef, double noundef) local_unnamed_addr #4 align 2

declare void @MatNd_transposeSelf(ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

declare double @Math_fmin3(double noundef, double noundef, double noundef) local_unnamed_addr #2

declare double @Math_fmax3(double noundef, double noundef, double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi(ptr nocapture noundef nonnull readonly align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(104) %1, double noundef %2, double noundef %3, double noundef %4, i32 noundef %5) unnamed_addr #4 align 2 {
  %7 = alloca [64 x i8], align 16
  %8 = alloca [64 x i8], align 16
  %9 = alloca [64 x i8], align 16
  %10 = alloca [64 x i8], align 16
  %11 = fcmp ugt double %3, %2
  br i1 %11, label %25, label %12

12:                                               ; preds = %6
  %13 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not98 = icmp eq ptr %13, null
  br i1 %.not98, label %15, label %14

14:                                               ; preds = %12
  tail call void (i32, ptr, ptr, i32, ptr, ...) %13(i32 noundef 1, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi, i32 noundef 2467, ptr noundef nonnull @.str.48, double noundef %3, double noundef %2)
  br label %15

15:                                               ; preds = %14, %12
  %16 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %18, label %229

18:                                               ; preds = %15
  %19 = load ptr, ptr @stderr, align 8, !tbaa !5
  %20 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi, i32 noundef 2467) #6
  %21 = load ptr, ptr @stderr, align 8, !tbaa !5
  %22 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.48, double noundef %3, double noundef %2) #6
  %23 = load ptr, ptr @stderr, align 8, !tbaa !5
  %24 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef nonnull @.str.4) #6
  br label %229

25:                                               ; preds = %6
  %26 = fcmp ugt double %4, 0.000000e+00
  br i1 %26, label %40, label %27

27:                                               ; preds = %25
  %28 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not = icmp eq ptr %28, null
  br i1 %.not, label %30, label %29

29:                                               ; preds = %27
  tail call void (i32, ptr, ptr, i32, ptr, ...) %28(i32 noundef 1, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi, i32 noundef 2473, ptr noundef nonnull @.str.49, double noundef %4)
  br label %30

30:                                               ; preds = %29, %27
  %31 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %33, label %229

33:                                               ; preds = %30
  %34 = load ptr, ptr @stderr, align 8, !tbaa !5
  %35 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str.42, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi, i32 noundef 2473) #6
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef nonnull @.str.49, double noundef %4) #6
  %38 = load ptr, ptr @stderr, align 8, !tbaa !5
  %39 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef nonnull @.str.4) #6
  br label %229

40:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %7, ptr noundef nonnull align 16 dereferenceable(64) @__const._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi.trajFile, i64 64, i1 false)
  %41 = fsub double %3, %2
  %42 = fdiv double %41, %4
  %43 = tail call i64 @lround(double noundef %42) #7
  %.tr = trunc i64 %43 to i32
  %44 = shl i32 %.tr, 2
  %45 = tail call ptr @MatNd_create(i32 noundef 3, i32 noundef %44)
  tail call void @_ZNK3Rcs16ViaPointSequence17computeTrajectoryEP6_MatNdddd(ptr noundef nonnull align 8 dereferenceable(104) %1, ptr noundef %45, double noundef %2, double noundef %3, double noundef %4)
  tail call void @MatNd_transposeSelf(ptr noundef %45)
  %46 = call zeroext i1 @MatNd_toFile(ptr noundef %45, ptr noundef nonnull %7)
  %47 = getelementptr inbounds i8, ptr %1, i64 8
  %48 = load ptr, ptr %47, align 8, !tbaa !11
  %49 = call noundef i64 @_ZN3Rcs16ViaPointSequence26computeNumberOfConstraintsEPK6_MatNd(ptr noundef %48)
  %50 = trunc i64 %49 to i32
  %51 = call ptr @MatNd_create(i32 noundef %50, i32 noundef 2)
  %52 = call ptr @MatNd_create(i32 noundef %50, i32 noundef 2)
  %53 = call ptr @MatNd_create(i32 noundef %50, i32 noundef 2)
  call void @MatNd_reshape(ptr noundef %51, i32 noundef 0, i32 noundef 2)
  call void @MatNd_reshape(ptr noundef %52, i32 noundef 0, i32 noundef 2)
  call void @MatNd_reshape(ptr noundef %53, i32 noundef 0, i32 noundef 2)
  %54 = load ptr, ptr %47, align 8, !tbaa !11
  %55 = getelementptr inbounds i8, ptr %54, i64 8
  %56 = load i32, ptr %55, align 8, !tbaa !23
  %.not108 = icmp eq i32 %56, 0
  br i1 %.not108, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %40
  %57 = getelementptr inbounds i8, ptr %51, i64 8
  %58 = getelementptr inbounds i8, ptr %52, i64 8
  %59 = getelementptr inbounds i8, ptr %53, i64 8
  br label %66

._crit_edge:                                      ; preds = %100, %40
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %8, ptr noundef nonnull align 16 dereferenceable(64) @__const._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi.viaPosFile, i64 64, i1 false)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %9, ptr noundef nonnull align 16 dereferenceable(64) @__const._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi.viaVelFile, i64 64, i1 false)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %10, ptr noundef nonnull align 16 dereferenceable(64) @__const._ZN3Rcs23ViaPointSequencePlotter5plot2ERKNS_16ViaPointSequenceEdddi.viaAccFile, i64 64, i1 false)
  %60 = call zeroext i1 @MatNd_toFile(ptr noundef %51, ptr noundef nonnull %8)
  %61 = call zeroext i1 @MatNd_toFile(ptr noundef %52, ptr noundef nonnull %9)
  %62 = call zeroext i1 @MatNd_toFile(ptr noundef %53, ptr noundef nonnull %10)
  %63 = getelementptr inbounds i8, ptr %0, i64 16
  %64 = load i8, ptr %63, align 8, !tbaa !25, !range !28, !noundef !29
  %65 = trunc nuw i8 %64 to i1
  br i1 %65, label %107, label %115

66:                                               ; preds = %.lr.ph, %100
  %67 = phi ptr [ %54, %.lr.ph ], [ %102, %100 ]
  %.099 = phi i64 [ 0, %.lr.ph ], [ %101, %100 ]
  %68 = trunc nuw i64 %.099 to i32
  %69 = call double @MatNd_get(ptr noundef nonnull %67, i32 noundef %68, i32 noundef 4)
  %70 = call i64 @lround(double noundef %69) #7
  %71 = trunc i64 %70 to i32
  %72 = load ptr, ptr %47, align 8, !tbaa !11
  %73 = call double @MatNd_get(ptr noundef %72, i32 noundef %68, i32 noundef 0)
  %74 = call zeroext i1 @Math_isBitSet(i32 noundef %71, i32 noundef 0)
  br i1 %74, label %75, label %82

75:                                               ; preds = %66
  %76 = load i32, ptr %57, align 8, !tbaa !23
  %77 = add i32 %76, 1
  store i32 %77, ptr %57, align 8, !tbaa !23
  call void @MatNd_set(ptr noundef %51, i32 noundef %76, i32 noundef 0, double noundef %73)
  %78 = load i32, ptr %57, align 8, !tbaa !23
  %79 = add i32 %78, -1
  %80 = load ptr, ptr %47, align 8, !tbaa !11
  %81 = call double @MatNd_get(ptr noundef %80, i32 noundef %68, i32 noundef 1)
  call void @MatNd_set(ptr noundef %51, i32 noundef %79, i32 noundef 1, double noundef %81)
  br label %82

82:                                               ; preds = %75, %66
  %83 = call zeroext i1 @Math_isBitSet(i32 noundef %71, i32 noundef 1)
  br i1 %83, label %84, label %91

84:                                               ; preds = %82
  %85 = load i32, ptr %58, align 8, !tbaa !23
  %86 = add i32 %85, 1
  store i32 %86, ptr %58, align 8, !tbaa !23
  call void @MatNd_set(ptr noundef %52, i32 noundef %85, i32 noundef 0, double noundef %73)
  %87 = load i32, ptr %58, align 8, !tbaa !23
  %88 = add i32 %87, -1
  %89 = load ptr, ptr %47, align 8, !tbaa !11
  %90 = call double @MatNd_get(ptr noundef %89, i32 noundef %68, i32 noundef 2)
  call void @MatNd_set(ptr noundef %52, i32 noundef %88, i32 noundef 1, double noundef %90)
  br label %91

91:                                               ; preds = %84, %82
  %92 = call zeroext i1 @Math_isBitSet(i32 noundef %71, i32 noundef 2)
  br i1 %92, label %93, label %100

93:                                               ; preds = %91
  %94 = load i32, ptr %59, align 8, !tbaa !23
  %95 = add i32 %94, 1
  store i32 %95, ptr %59, align 8, !tbaa !23
  call void @MatNd_set(ptr noundef %53, i32 noundef %94, i32 noundef 0, double noundef %73)
  %96 = load i32, ptr %59, align 8, !tbaa !23
  %97 = add i32 %96, -1
  %98 = load ptr, ptr %47, align 8, !tbaa !11
  %99 = call double @MatNd_get(ptr noundef %98, i32 noundef %68, i32 noundef 3)
  call void @MatNd_set(ptr noundef %53, i32 noundef %97, i32 noundef 1, double noundef %99)
  br label %100

100:                                              ; preds = %93, %91
  %101 = add nuw nsw i64 %.099, 1
  %102 = load ptr, ptr %47, align 8, !tbaa !11
  %103 = getelementptr inbounds i8, ptr %102, i64 8
  %104 = load i32, ptr %103, align 8, !tbaa !23
  %105 = zext i32 %104 to i64
  %106 = icmp ult i64 %101, %105
  br i1 %106, label %66, label %._crit_edge, !llvm.loop !30

107:                                              ; preds = %._crit_edge
  %108 = getelementptr inbounds i8, ptr %0, i64 8
  %109 = load ptr, ptr %108, align 8, !tbaa !32
  %110 = getelementptr inbounds i8, ptr %0, i64 72
  %111 = load double, ptr %110, align 8, !tbaa !33
  %112 = getelementptr inbounds i8, ptr %0, i64 80
  %113 = load double, ptr %112, align 8, !tbaa !34
  %114 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %109, ptr noundef nonnull @.str.92, double noundef %111, double noundef %113) #7
  br label %115

115:                                              ; preds = %._crit_edge, %107
  %116 = getelementptr inbounds i8, ptr %0, i64 8
  %117 = load ptr, ptr %116, align 8, !tbaa !32
  %118 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %117, ptr noundef nonnull @.str.99) #7
  %119 = icmp eq i32 %5, 7
  br i1 %119, label %120, label %143

120:                                              ; preds = %115
  %121 = load i8, ptr %63, align 8, !tbaa !25, !range !28, !noundef !29
  %122 = trunc nuw i8 %121 to i1
  br i1 %122, label %123, label %140

123:                                              ; preds = %120
  %124 = getelementptr inbounds i8, ptr %0, i64 24
  %125 = load double, ptr %124, align 8, !tbaa !35
  %126 = getelementptr inbounds i8, ptr %0, i64 32
  %127 = load double, ptr %126, align 8, !tbaa !35
  %128 = getelementptr inbounds i8, ptr %0, i64 40
  %129 = load double, ptr %128, align 8, !tbaa !35
  %130 = call double @Math_fmin3(double noundef %125, double noundef %127, double noundef %129)
  %131 = getelementptr inbounds i8, ptr %0, i64 48
  %132 = load double, ptr %131, align 8, !tbaa !35
  %133 = getelementptr inbounds i8, ptr %0, i64 56
  %134 = load double, ptr %133, align 8, !tbaa !35
  %135 = getelementptr inbounds i8, ptr %0, i64 64
  %136 = load double, ptr %135, align 8, !tbaa !35
  %137 = call double @Math_fmax3(double noundef %132, double noundef %134, double noundef %136)
  %138 = load ptr, ptr %116, align 8, !tbaa !32
  %139 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %138, ptr noundef nonnull @.str.94, double noundef %130, double noundef %137) #7
  br label %140

140:                                              ; preds = %123, %120
  %141 = load ptr, ptr %116, align 8, !tbaa !32
  %142 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %141, ptr noundef nonnull @.str.100, ptr noundef nonnull %7, ptr noundef nonnull %7, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10) #7
  br label %224

143:                                              ; preds = %115
  %144 = call zeroext i1 @Math_isBitSet(i32 noundef %5, i32 noundef 0)
  br i1 %144, label %145, label %194

145:                                              ; preds = %143
  %146 = load i8, ptr %63, align 8, !tbaa !25, !range !28, !noundef !29
  %147 = trunc nuw i8 %146 to i1
  br i1 %147, label %148, label %163

148:                                              ; preds = %145
  %149 = getelementptr inbounds i8, ptr %0, i64 80
  %150 = load double, ptr %149, align 8, !tbaa !34
  %151 = getelementptr inbounds i8, ptr %0, i64 72
  %152 = load double, ptr %151, align 8, !tbaa !33
  %153 = fcmp ogt double %150, %152
  br i1 %153, label %154, label %163

154:                                              ; preds = %148
  %155 = load ptr, ptr %116, align 8, !tbaa !32
  %156 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %155, ptr noundef nonnull @.str.92, double noundef %152, double noundef %150) #7
  %157 = load ptr, ptr %116, align 8, !tbaa !32
  %158 = getelementptr inbounds i8, ptr %0, i64 24
  %159 = load double, ptr %158, align 8, !tbaa !35
  %160 = getelementptr inbounds i8, ptr %0, i64 48
  %161 = load double, ptr %160, align 8, !tbaa !35
  %162 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %157, ptr noundef nonnull @.str.94, double noundef %159, double noundef %161) #7
  br label %163

163:                                              ; preds = %145, %148, %154
  %164 = load ptr, ptr %116, align 8, !tbaa !32
  %165 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %164, ptr noundef nonnull @.str.101) #7
  %166 = getelementptr inbounds i8, ptr %45, i64 8
  %167 = load i32, ptr %166, align 8, !tbaa !23
  %.not109 = icmp eq i32 %167, 0
  br i1 %.not109, label %._crit_edge103, label %.lr.ph102

._crit_edge103:                                   ; preds = %.lr.ph102, %163
  %168 = load ptr, ptr %116, align 8, !tbaa !32
  %169 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %168, ptr noundef nonnull @.str.103) #7
  %170 = load i32, ptr %166, align 8, !tbaa !23
  %.not110 = icmp eq i32 %170, 0
  br i1 %.not110, label %._crit_edge107, label %.lr.ph106

.lr.ph106:                                        ; preds = %._crit_edge103
  %171 = getelementptr inbounds i8, ptr %51, i64 8
  br label %183

.lr.ph102:                                        ; preds = %163, %.lr.ph102
  %.089100 = phi i32 [ %176, %.lr.ph102 ], [ 0, %163 ]
  %172 = load ptr, ptr %116, align 8, !tbaa !32
  %173 = call double @MatNd_get(ptr noundef nonnull %45, i32 noundef %.089100, i32 noundef 0)
  %174 = call double @MatNd_get(ptr noundef nonnull %45, i32 noundef %.089100, i32 noundef 1)
  %175 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %172, ptr noundef nonnull @.str.102, double noundef %173, double noundef %174) #7
  %176 = add nuw i32 %.089100, 1
  %177 = load i32, ptr %166, align 8, !tbaa !23
  %178 = icmp ult i32 %176, %177
  br i1 %178, label %.lr.ph102, label %._crit_edge103, !llvm.loop !36

._crit_edge107:                                   ; preds = %183, %._crit_edge103
  %179 = load ptr, ptr %116, align 8, !tbaa !32
  %180 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %179, ptr noundef nonnull @.str.103) #7
  %181 = load ptr, ptr %116, align 8, !tbaa !32
  %182 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %181, ptr noundef nonnull @.str.4) #7
  br label %194

183:                                              ; preds = %.lr.ph106, %183
  %.088104 = phi i32 [ 0, %.lr.ph106 ], [ %191, %183 ]
  %184 = load i32, ptr %171, align 8, !tbaa !23
  %185 = add i32 %184, -1
  %186 = call i32 @Math_iClip(i32 noundef %.088104, i32 noundef 0, i32 noundef %185)
  %187 = load ptr, ptr %116, align 8, !tbaa !32
  %188 = call double @MatNd_get(ptr noundef %51, i32 noundef %186, i32 noundef 0)
  %189 = call double @MatNd_get(ptr noundef %51, i32 noundef %186, i32 noundef 1)
  %190 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %187, ptr noundef nonnull @.str.102, double noundef %188, double noundef %189) #7
  %191 = add nuw i32 %.088104, 1
  %192 = load i32, ptr %166, align 8, !tbaa !23
  %193 = icmp ult i32 %191, %192
  br i1 %193, label %183, label %._crit_edge107, !llvm.loop !37

194:                                              ; preds = %._crit_edge107, %143
  %195 = call zeroext i1 @Math_isBitSet(i32 noundef %5, i32 noundef 1)
  br i1 %195, label %196, label %209

196:                                              ; preds = %194
  %197 = load i8, ptr %63, align 8, !tbaa !25, !range !28, !noundef !29
  %198 = trunc nuw i8 %197 to i1
  br i1 %198, label %199, label %206

199:                                              ; preds = %196
  %200 = load ptr, ptr %116, align 8, !tbaa !32
  %201 = getelementptr inbounds i8, ptr %0, i64 32
  %202 = load double, ptr %201, align 8, !tbaa !35
  %203 = getelementptr inbounds i8, ptr %0, i64 56
  %204 = load double, ptr %203, align 8, !tbaa !35
  %205 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %200, ptr noundef nonnull @.str.94, double noundef %202, double noundef %204) #7
  br label %206

206:                                              ; preds = %199, %196
  %207 = load ptr, ptr %116, align 8, !tbaa !32
  %208 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %207, ptr noundef nonnull @.str.104, ptr noundef nonnull %7, ptr noundef nonnull %9) #7
  br label %209

209:                                              ; preds = %206, %194
  %210 = call zeroext i1 @Math_isBitSet(i32 noundef %5, i32 noundef 2)
  br i1 %210, label %211, label %224

211:                                              ; preds = %209
  %212 = load i8, ptr %63, align 8, !tbaa !25, !range !28, !noundef !29
  %213 = trunc nuw i8 %212 to i1
  br i1 %213, label %214, label %221

214:                                              ; preds = %211
  %215 = load ptr, ptr %116, align 8, !tbaa !32
  %216 = getelementptr inbounds i8, ptr %0, i64 40
  %217 = load double, ptr %216, align 8, !tbaa !35
  %218 = getelementptr inbounds i8, ptr %0, i64 64
  %219 = load double, ptr %218, align 8, !tbaa !35
  %220 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %215, ptr noundef nonnull @.str.94, double noundef %217, double noundef %219) #7
  br label %221

221:                                              ; preds = %214, %211
  %222 = load ptr, ptr %116, align 8, !tbaa !32
  %223 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %222, ptr noundef nonnull @.str.105, ptr noundef nonnull %7, ptr noundef nonnull %10) #7
  br label %224

224:                                              ; preds = %209, %221, %140
  call void @MatNd_destroy(ptr noundef %51)
  call void @MatNd_destroy(ptr noundef %52)
  call void @MatNd_destroy(ptr noundef %53)
  %225 = load ptr, ptr %116, align 8, !tbaa !32
  %226 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %225, ptr noundef nonnull @.str.4) #7
  %227 = load ptr, ptr %116, align 8, !tbaa !32
  %228 = call i32 @fflush(ptr noundef %227)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #7
  br label %229

229:                                              ; preds = %33, %30, %18, %15, %224
  ret void
}

declare i32 @Math_iClip(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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 nounwind willreturn memory(argmem: readwrite) }
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, !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 = !{!"int", !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, !13, i64 48, !14, i64 52, !15, i64 56, !19, i64 80}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN3Rcs16ViaPointSequence12ViaPointTypeE", !7, i64 0}
!15 = !{!"_ZTSSt6vectorIiSaIiEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt6vectorIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!24, !10, i64 8}
!24 = !{!"_ZTS6_MatNd", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !13, i64 20}
!25 = !{!26, !13, i64 16}
!26 = !{!"_ZTSN3Rcs23ViaPointSequencePlotterE", !6, i64 8, !13, i64 16, !7, i64 24, !7, i64 48, !27, i64 72, !27, i64 80}
!27 = !{!"double", !7, i64 0}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!26, !6, i64 8}
!33 = !{!26, !27, i64 72}
!34 = !{!26, !27, i64 80}
!35 = !{!27, !27, i64 0}
!36 = distinct !{!36, !31}
!37 = distinct !{!37, !31}


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