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

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

%struct._MatNd = type { ptr, i32, i32, i32, i8 }
%"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 }

@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [39 x i8], align 1
@__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [115 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Rcs16ViaPointSequence15computeB_linAccEP6_MatNdPKS1_(ptr noundef, ptr noundef) #0 align 2

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

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

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

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

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

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

declare void @print_trace() #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Rcs16ViaPointSequence14computeB_poly5EP6_MatNdPKS1_(ptr noundef, ptr noundef) #0 align 2

declare ptr @MatNd_realloc(ptr noundef, i32 noundef, i32 noundef) #3

declare void @MatNd_copy(ptr noundef, ptr noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3Rcs16ViaPointSequence18compressDescriptorEP6_MatNd(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3Rcs16ViaPointSequence4initEPK6_MatNd(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef %1) unnamed_addr #0 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %3, align 8
  br label %14

14:                                               ; preds = %2
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct._MatNd, ptr %15, i32 0, i32 1
  %17 = load i32, ptr %16, align 8, !tbaa !9
  %18 = icmp uge i32 %17, 2
  br i1 %18, label %29, label %19

19:                                               ; preds = %14
  %20 = load ptr, ptr @stderr, align 8, !tbaa !5
  %21 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef @.str.5, ptr noundef @.str.2, ptr noundef @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 659, ptr noundef @.str.6) #6
  %22 = load ptr, ptr @stderr, align 8, !tbaa !5
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct._MatNd, ptr %23, i32 0, i32 1
  %25 = load i32, ptr %24, align 8, !tbaa !9
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef @.str.7, i32 noundef %25) #6
  %27 = load ptr, ptr @stderr, align 8, !tbaa !5
  %28 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef @.str.4) #6
  call void @print_trace()
  call void @exit(i32 noundef 1) #7
  unreachable

29:                                               ; preds = %14
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct._MatNd, ptr %32, i32 0, i32 2
  %34 = load i32, ptr %33, align 4, !tbaa !13
  %35 = icmp uge i32 %34, 5
  br i1 %35, label %46, label %36

36:                                               ; preds = %31
  %37 = load ptr, ptr @stderr, align 8, !tbaa !5
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef @.str.5, ptr noundef @.str.2, ptr noundef @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 660, ptr noundef @.str.8) #6
  %39 = load ptr, ptr @stderr, align 8, !tbaa !5
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct._MatNd, ptr %40, i32 0, i32 2
  %42 = load i32, ptr %41, align 4, !tbaa !13
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef @.str.9, i32 noundef %42) #6
  %44 = load ptr, ptr @stderr, align 8, !tbaa !5
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef @.str.4) #6
  call void @print_trace()
  call void @exit(i32 noundef 1) #7
  unreachable

46:                                               ; preds = %31
  br label %47

47:                                               ; preds = %46
  %48 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %49 = load ptr, ptr %48, align 8, !tbaa !14
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = icmp ne ptr %49, %50
  br i1 %51, label %52, label %75

52:                                               ; preds = %47
  %53 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %54 = load ptr, ptr %53, align 8, !tbaa !14
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._MatNd, ptr %55, i32 0, i32 1
  %57 = load i32, ptr %56, align 8, !tbaa !9
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct._MatNd, ptr %58, i32 0, i32 2
  %60 = load i32, ptr %59, align 4, !tbaa !13
  %61 = call ptr @MatNd_realloc(ptr noundef %54, i32 noundef %57, i32 noundef %60)
  %62 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  store ptr %61, ptr %62, align 8, !tbaa !14
  br label %63

63:                                               ; preds = %52
  %64 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %65 = load ptr, ptr %64, align 8, !tbaa !14
  %66 = icmp ne ptr %65, null
  br i1 %66, label %70, label %67

67:                                               ; preds = %63
  %68 = load ptr, ptr @stderr, align 8, !tbaa !5
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef @.str.10, ptr noundef @.str.2, ptr noundef @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 666, ptr noundef @.str.11) #6
  call void @print_trace()
  call void @abort() #7
  unreachable

70:                                               ; preds = %63
  br label %71

71:                                               ; preds = %70
  %72 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %73 = load ptr, ptr %72, align 8, !tbaa !14
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  call void @MatNd_copy(ptr noundef %73, ptr noundef %74)
  br label %75

75:                                               ; preds = %71, %47
  %76 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %77 = load ptr, ptr %76, align 8, !tbaa !14
  %78 = call noundef i32 @_ZL17pruneZeroFlagRowsP6_MatNd(ptr noundef %77)
  %79 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %80 = load ptr, ptr %79, align 8, !tbaa !14
  call void @_ZNK3Rcs16ViaPointSequence4sortEP6_MatNd(ptr noundef nonnull align 8 dereferenceable(104) %13, ptr noundef %80)
  %81 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 6
  %82 = load i8, ptr %81, align 8, !tbaa !25, !range !26, !noundef !27
  %83 = trunc i8 %82 to i1
  %84 = zext i1 %83 to i32
  %85 = icmp eq i32 %84, 0
  br i1 %85, label %86, label %89

86:                                               ; preds = %75
  %87 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %88 = load ptr, ptr %87, align 8, !tbaa !14
  call void @_ZNK3Rcs16ViaPointSequence18compressDescriptorEP6_MatNd(ptr noundef nonnull align 8 dereferenceable(104) %13, ptr noundef %88)
  br label %89

89:                                               ; preds = %86, %75
  %90 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 9
  call void @_ZNSt6vectorIdSaIdEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %90) #6
  %91 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 8
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %91) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %92 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %93 = load ptr, ptr %92, align 8, !tbaa !14
  %94 = getelementptr inbounds %struct._MatNd, ptr %93, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !28
  %96 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %97 = load ptr, ptr %96, align 8, !tbaa !14
  %98 = getelementptr inbounds %struct._MatNd, ptr %97, i32 0, i32 2
  %99 = load i32, ptr %98, align 4, !tbaa !13
  %100 = mul i32 0, %99
  %101 = add i32 %100, 4
  %102 = zext i32 %101 to i64
  %103 = getelementptr inbounds double, ptr %95, i64 %102
  %104 = load double, ptr %103, align 8, !tbaa !29
  %105 = call i64 @lround(double noundef %104) #6
  %106 = trunc i64 %105 to i32
  store i32 %106, ptr %5, align 4, !tbaa !31
  %107 = load i32, ptr %5, align 4, !tbaa !31
  %108 = icmp ne i32 %107, 7
  br i1 %108, label %109, label %123

109:                                              ; preds = %89
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  call void @MatNd_printCommentDigits(ptr noundef @.str.12, ptr noundef %110, i32 noundef 3)
  %111 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %112 = load ptr, ptr %111, align 8, !tbaa !14
  call void @MatNd_printCommentDigits(ptr noundef @.str.11, ptr noundef %112, i32 noundef 3)
  br label %113

113:                                              ; preds = %109
  %114 = load ptr, ptr @stderr, align 8, !tbaa !5
  %115 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %114, ptr noundef @.str.1, ptr noundef @.str.2, ptr noundef @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 703) #6
  %116 = load ptr, ptr @stderr, align 8, !tbaa !5
  %117 = load i32, ptr %5, align 4, !tbaa !31
  %118 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %116, ptr noundef @.str.13, i32 noundef %117) #6
  %119 = load ptr, ptr @stderr, align 8, !tbaa !5
  %120 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %119, ptr noundef @.str.4) #6
  call void @print_trace()
  call void @exit(i32 noundef 1) #7
  unreachable

121:                                              ; No predecessors!
  br label %122

122:                                              ; preds = %121
  br label %123

123:                                              ; preds = %122, %89
  %124 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %125 = load ptr, ptr %124, align 8, !tbaa !14
  %126 = getelementptr inbounds %struct._MatNd, ptr %125, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8, !tbaa !28
  %128 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %129 = load ptr, ptr %128, align 8, !tbaa !14
  %130 = getelementptr inbounds %struct._MatNd, ptr %129, i32 0, i32 1
  %131 = load i32, ptr %130, align 8, !tbaa !9
  %132 = sub i32 %131, 1
  %133 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %134 = load ptr, ptr %133, align 8, !tbaa !14
  %135 = getelementptr inbounds %struct._MatNd, ptr %134, i32 0, i32 2
  %136 = load i32, ptr %135, align 4, !tbaa !13
  %137 = mul i32 %132, %136
  %138 = add i32 %137, 4
  %139 = zext i32 %138 to i64
  %140 = getelementptr inbounds double, ptr %127, i64 %139
  %141 = load double, ptr %140, align 8, !tbaa !29
  %142 = call i64 @lround(double noundef %141) #6
  %143 = trunc i64 %142 to i32
  store i32 %143, ptr %5, align 4, !tbaa !31
  %144 = load i32, ptr %5, align 4, !tbaa !31
  %145 = icmp ne i32 %144, 7
  br i1 %145, label %146, label %159

146:                                              ; preds = %123
  %147 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %148 = load ptr, ptr %147, align 8, !tbaa !14
  call void @MatNd_printCommentDigits(ptr noundef @.str.14, ptr noundef %148, i32 noundef 3)
  br label %149

149:                                              ; preds = %146
  %150 = load ptr, ptr @stderr, align 8, !tbaa !5
  %151 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %150, ptr noundef @.str.1, ptr noundef @.str.2, ptr noundef @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 712) #6
  %152 = load ptr, ptr @stderr, align 8, !tbaa !5
  %153 = load i32, ptr %5, align 4, !tbaa !31
  %154 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %152, ptr noundef @.str.15, i32 noundef %153) #6
  %155 = load ptr, ptr @stderr, align 8, !tbaa !5
  %156 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %155, ptr noundef @.str.4) #6
  call void @print_trace()
  call void @exit(i32 noundef 1) #7
  unreachable

157:                                              ; No predecessors!
  br label %158

158:                                              ; preds = %157
  br label %159

159:                                              ; preds = %158, %123
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %160 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %161 = load ptr, ptr %160, align 8, !tbaa !14
  %162 = call noundef i64 @_ZN3Rcs16ViaPointSequence26computeNumberOfConstraintsEPK6_MatNd(ptr noundef %161)
  store i64 %162, ptr %6, align 8, !tbaa !32
  %163 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 4
  %164 = load ptr, ptr %163, align 8, !tbaa !34
  %165 = load i64, ptr %6, align 8, !tbaa !32
  %166 = trunc i64 %165 to i32
  %167 = call ptr @MatNd_realloc(ptr noundef %164, i32 noundef %166, i32 noundef 1)
  %168 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 4
  store ptr %167, ptr %168, align 8, !tbaa !34
  br label %169

169:                                              ; preds = %159
  %170 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 4
  %171 = load ptr, ptr %170, align 8, !tbaa !34
  %172 = icmp ne ptr %171, null
  br i1 %172, label %176, label %173

173:                                              ; preds = %169
  %174 = load ptr, ptr @stderr, align 8, !tbaa !5
  %175 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %174, ptr noundef @.str.10, ptr noundef @.str.2, ptr noundef @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 719, ptr noundef @.str.16) #6
  call void @print_trace()
  call void @abort() #7
  unreachable

176:                                              ; preds = %169
  br label %177

177:                                              ; preds = %176
  br label %178

178:                                              ; preds = %177
  %179 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 4
  %180 = load ptr, ptr %179, align 8, !tbaa !34
  %181 = getelementptr inbounds %struct._MatNd, ptr %180, i32 0, i32 1
  store i32 0, ptr %181, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store i64 0, ptr %7, align 8, !tbaa !32
  br label %182

182:                                              ; preds = %340, %178
  %183 = load i64, ptr %7, align 8, !tbaa !32
  %184 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %185 = load ptr, ptr %184, align 8, !tbaa !14
  %186 = getelementptr inbounds %struct._MatNd, ptr %185, i32 0, i32 1
  %187 = load i32, ptr %186, align 8, !tbaa !9
  %188 = zext i32 %187 to i64
  %189 = icmp ult i64 %183, %188
  br i1 %189, label %191, label %190

190:                                              ; preds = %182
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %343

191:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %192 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %193 = load ptr, ptr %192, align 8, !tbaa !14
  %194 = getelementptr inbounds %struct._MatNd, ptr %193, i32 0, i32 0
  %195 = load ptr, ptr %194, align 8, !tbaa !28
  %196 = load i64, ptr %7, align 8, !tbaa !32
  %197 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %198 = load ptr, ptr %197, align 8, !tbaa !14
  %199 = getelementptr inbounds %struct._MatNd, ptr %198, i32 0, i32 2
  %200 = load i32, ptr %199, align 4, !tbaa !13
  %201 = zext i32 %200 to i64
  %202 = mul i64 %196, %201
  %203 = add i64 %202, 4
  %204 = getelementptr inbounds double, ptr %195, i64 %203
  %205 = load double, ptr %204, align 8, !tbaa !29
  %206 = call i64 @lround(double noundef %205) #6
  %207 = trunc i64 %206 to i32
  store i32 %207, ptr %8, align 4, !tbaa !31
  br label %208

208:                                              ; preds = %191
  %209 = load i32, ptr %8, align 4, !tbaa !31
  %210 = icmp ugt i32 %209, 0
  br i1 %210, label %220, label %211

211:                                              ; preds = %208
  %212 = load ptr, ptr @stderr, align 8, !tbaa !5
  %213 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %212, ptr noundef @.str.5, ptr noundef @.str.2, ptr noundef @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 727, ptr noundef @.str.17) #6
  %214 = load ptr, ptr @stderr, align 8, !tbaa !5
  %215 = load i64, ptr %7, align 8, !tbaa !32
  %216 = trunc i64 %215 to i32
  %217 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %214, ptr noundef @.str.18, i32 noundef %216) #6
  %218 = load ptr, ptr @stderr, align 8, !tbaa !5
  %219 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %218, ptr noundef @.str.4) #6
  call void @print_trace()
  call void @exit(i32 noundef 1) #7
  unreachable

220:                                              ; preds = %208
  br label %221

221:                                              ; preds = %220
  br label %222

222:                                              ; preds = %221
  %223 = load i32, ptr %8, align 4, !tbaa !31
  %224 = call zeroext i1 @Math_isBitSet(i32 noundef %223, i32 noundef 0)
  br i1 %224, label %225, label %261

225:                                              ; preds = %222
  %226 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !31
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %226, ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  %227 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 9
  %228 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %229 = load ptr, ptr %228, align 8, !tbaa !14
  %230 = getelementptr inbounds %struct._MatNd, ptr %229, i32 0, i32 0
  %231 = load ptr, ptr %230, align 8, !tbaa !28
  %232 = load i64, ptr %7, align 8, !tbaa !32
  %233 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %234 = load ptr, ptr %233, align 8, !tbaa !14
  %235 = getelementptr inbounds %struct._MatNd, ptr %234, i32 0, i32 2
  %236 = load i32, ptr %235, align 4, !tbaa !13
  %237 = zext i32 %236 to i64
  %238 = mul i64 %232, %237
  %239 = add i64 %238, 0
  %240 = getelementptr inbounds double, ptr %231, i64 %239
  call void @_ZNSt6vectorIdSaIdEE9push_backERKd(ptr noundef nonnull align 8 dereferenceable(24) %227, ptr noundef nonnull align 8 dereferenceable(8) %240)
  %241 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %242 = load ptr, ptr %241, align 8, !tbaa !14
  %243 = load i64, ptr %7, align 8, !tbaa !32
  %244 = trunc i64 %243 to i32
  %245 = call double @MatNd_get(ptr noundef %242, i32 noundef %244, i32 noundef 1)
  %246 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 4
  %247 = load ptr, ptr %246, align 8, !tbaa !34
  %248 = getelementptr inbounds %struct._MatNd, ptr %247, i32 0, i32 0
  %249 = load ptr, ptr %248, align 8, !tbaa !28
  %250 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 4
  %251 = load ptr, ptr %250, align 8, !tbaa !34
  %252 = getelementptr inbounds %struct._MatNd, ptr %251, i32 0, i32 1
  %253 = load i32, ptr %252, align 8, !tbaa !9
  %254 = zext i32 %253 to i64
  %255 = getelementptr inbounds double, ptr %249, i64 %254
  store double %245, ptr %255, align 8, !tbaa !29
  %256 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 4
  %257 = load ptr, ptr %256, align 8, !tbaa !34
  %258 = getelementptr inbounds %struct._MatNd, ptr %257, i32 0, i32 1
  %259 = load i32, ptr %258, align 8, !tbaa !9
  %260 = add i32 %259, 1
  store i32 %260, ptr %258, align 8, !tbaa !9
  br label %261

261:                                              ; preds = %225, %222
  %262 = load i32, ptr %8, align 4, !tbaa !31
  %263 = call zeroext i1 @Math_isBitSet(i32 noundef %262, i32 noundef 1)
  br i1 %263, label %264, label %300

264:                                              ; preds = %261
  %265 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 1, ptr %10, align 4, !tbaa !31
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %265, ptr noundef nonnull align 4 dereferenceable(4) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  %266 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 9
  %267 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %268 = load ptr, ptr %267, align 8, !tbaa !14
  %269 = getelementptr inbounds %struct._MatNd, ptr %268, i32 0, i32 0
  %270 = load ptr, ptr %269, align 8, !tbaa !28
  %271 = load i64, ptr %7, align 8, !tbaa !32
  %272 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %273 = load ptr, ptr %272, align 8, !tbaa !14
  %274 = getelementptr inbounds %struct._MatNd, ptr %273, i32 0, i32 2
  %275 = load i32, ptr %274, align 4, !tbaa !13
  %276 = zext i32 %275 to i64
  %277 = mul i64 %271, %276
  %278 = add i64 %277, 0
  %279 = getelementptr inbounds double, ptr %270, i64 %278
  call void @_ZNSt6vectorIdSaIdEE9push_backERKd(ptr noundef nonnull align 8 dereferenceable(24) %266, ptr noundef nonnull align 8 dereferenceable(8) %279)
  %280 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %281 = load ptr, ptr %280, align 8, !tbaa !14
  %282 = load i64, ptr %7, align 8, !tbaa !32
  %283 = trunc i64 %282 to i32
  %284 = call double @MatNd_get(ptr noundef %281, i32 noundef %283, i32 noundef 2)
  %285 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 4
  %286 = load ptr, ptr %285, align 8, !tbaa !34
  %287 = getelementptr inbounds %struct._MatNd, ptr %286, i32 0, i32 0
  %288 = load ptr, ptr %287, align 8, !tbaa !28
  %289 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 4
  %290 = load ptr, ptr %289, align 8, !tbaa !34
  %291 = getelementptr inbounds %struct._MatNd, ptr %290, i32 0, i32 1
  %292 = load i32, ptr %291, align 8, !tbaa !9
  %293 = zext i32 %292 to i64
  %294 = getelementptr inbounds double, ptr %288, i64 %293
  store double %284, ptr %294, align 8, !tbaa !29
  %295 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 4
  %296 = load ptr, ptr %295, align 8, !tbaa !34
  %297 = getelementptr inbounds %struct._MatNd, ptr %296, i32 0, i32 1
  %298 = load i32, ptr %297, align 8, !tbaa !9
  %299 = add i32 %298, 1
  store i32 %299, ptr %297, align 8, !tbaa !9
  br label %300

300:                                              ; preds = %264, %261
  %301 = load i32, ptr %8, align 4, !tbaa !31
  %302 = call zeroext i1 @Math_isBitSet(i32 noundef %301, i32 noundef 2)
  br i1 %302, label %303, label %339

303:                                              ; preds = %300
  %304 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 2, ptr %11, align 4, !tbaa !31
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %304, ptr noundef nonnull align 4 dereferenceable(4) %11)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  %305 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 9
  %306 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %307 = load ptr, ptr %306, align 8, !tbaa !14
  %308 = getelementptr inbounds %struct._MatNd, ptr %307, i32 0, i32 0
  %309 = load ptr, ptr %308, align 8, !tbaa !28
  %310 = load i64, ptr %7, align 8, !tbaa !32
  %311 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %312 = load ptr, ptr %311, align 8, !tbaa !14
  %313 = getelementptr inbounds %struct._MatNd, ptr %312, i32 0, i32 2
  %314 = load i32, ptr %313, align 4, !tbaa !13
  %315 = zext i32 %314 to i64
  %316 = mul i64 %310, %315
  %317 = add i64 %316, 0
  %318 = getelementptr inbounds double, ptr %309, i64 %317
  call void @_ZNSt6vectorIdSaIdEE9push_backERKd(ptr noundef nonnull align 8 dereferenceable(24) %305, ptr noundef nonnull align 8 dereferenceable(8) %318)
  %319 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %320 = load ptr, ptr %319, align 8, !tbaa !14
  %321 = load i64, ptr %7, align 8, !tbaa !32
  %322 = trunc i64 %321 to i32
  %323 = call double @MatNd_get(ptr noundef %320, i32 noundef %322, i32 noundef 3)
  %324 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 4
  %325 = load ptr, ptr %324, align 8, !tbaa !34
  %326 = getelementptr inbounds %struct._MatNd, ptr %325, i32 0, i32 0
  %327 = load ptr, ptr %326, align 8, !tbaa !28
  %328 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 4
  %329 = load ptr, ptr %328, align 8, !tbaa !34
  %330 = getelementptr inbounds %struct._MatNd, ptr %329, i32 0, i32 1
  %331 = load i32, ptr %330, align 8, !tbaa !9
  %332 = zext i32 %331 to i64
  %333 = getelementptr inbounds double, ptr %327, i64 %332
  store double %323, ptr %333, align 8, !tbaa !29
  %334 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 4
  %335 = load ptr, ptr %334, align 8, !tbaa !34
  %336 = getelementptr inbounds %struct._MatNd, ptr %335, i32 0, i32 1
  %337 = load i32, ptr %336, align 8, !tbaa !9
  %338 = add i32 %337, 1
  store i32 %338, ptr %336, align 8, !tbaa !9
  br label %339

339:                                              ; preds = %303, %300
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %340

340:                                              ; preds = %339
  %341 = load i64, ptr %7, align 8, !tbaa !32
  %342 = add i64 %341, 1
  store i64 %342, ptr %7, align 8, !tbaa !32
  br label %182, !llvm.loop !35

343:                                              ; preds = %190
  %344 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 2
  %345 = load ptr, ptr %344, align 8, !tbaa !37
  %346 = load i64, ptr %6, align 8, !tbaa !32
  %347 = trunc i64 %346 to i32
  %348 = load i64, ptr %6, align 8, !tbaa !32
  %349 = trunc i64 %348 to i32
  %350 = call ptr @MatNd_realloc(ptr noundef %345, i32 noundef %347, i32 noundef %349)
  %351 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 2
  store ptr %350, ptr %351, align 8, !tbaa !37
  br label %352

352:                                              ; preds = %343
  %353 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 2
  %354 = load ptr, ptr %353, align 8, !tbaa !37
  %355 = icmp ne ptr %354, null
  br i1 %355, label %359, label %356

356:                                              ; preds = %352
  %357 = load ptr, ptr @stderr, align 8, !tbaa !5
  %358 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %357, ptr noundef @.str.10, ptr noundef @.str.2, ptr noundef @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 759, ptr noundef @.str.19) #6
  call void @print_trace()
  call void @abort() #7
  unreachable

359:                                              ; preds = %352
  br label %360

360:                                              ; preds = %359
  br label %361

361:                                              ; preds = %360
  %362 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 2
  %363 = load ptr, ptr %362, align 8, !tbaa !37
  call void @MatNd_setZero(ptr noundef %363)
  %364 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 7
  %365 = load i32, ptr %364, align 4, !tbaa !38
  switch i32 %365, label %376 [
    i32 0, label %366
    i32 1, label %371
  ]

366:                                              ; preds = %361
  %367 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 2
  %368 = load ptr, ptr %367, align 8, !tbaa !37
  %369 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %370 = load ptr, ptr %369, align 8, !tbaa !14
  call void @_ZN3Rcs16ViaPointSequence14computeB_poly5EP6_MatNdPKS1_(ptr noundef %368, ptr noundef %370)
  br label %388

371:                                              ; preds = %361
  %372 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 2
  %373 = load ptr, ptr %372, align 8, !tbaa !37
  %374 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 1
  %375 = load ptr, ptr %374, align 8, !tbaa !14
  call void @_ZN3Rcs16ViaPointSequence15computeB_linAccEP6_MatNdPKS1_(ptr noundef %373, ptr noundef %375)
  br label %388

376:                                              ; preds = %361
  br label %377

377:                                              ; preds = %376
  %378 = load ptr, ptr @stderr, align 8, !tbaa !5
  %379 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %378, ptr noundef @.str.1, ptr noundef @.str.2, ptr noundef @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 773) #6
  %380 = load ptr, ptr @stderr, align 8, !tbaa !5
  %381 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 7
  %382 = load i32, ptr %381, align 4, !tbaa !38
  %383 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %380, ptr noundef @.str.20, i32 noundef %382) #6
  %384 = load ptr, ptr @stderr, align 8, !tbaa !5
  %385 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %384, ptr noundef @.str.4) #6
  call void @print_trace()
  call void @exit(i32 noundef 1) #7
  unreachable

386:                                              ; No predecessors!
  br label %387

387:                                              ; preds = %386
  br label %388

388:                                              ; preds = %387, %371, %366
  %389 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 3
  %390 = load ptr, ptr %389, align 8, !tbaa !39
  %391 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 2
  %392 = load ptr, ptr %391, align 8, !tbaa !37
  %393 = getelementptr inbounds %struct._MatNd, ptr %392, i32 0, i32 1
  %394 = load i32, ptr %393, align 8, !tbaa !9
  %395 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 2
  %396 = load ptr, ptr %395, align 8, !tbaa !37
  %397 = getelementptr inbounds %struct._MatNd, ptr %396, i32 0, i32 2
  %398 = load i32, ptr %397, align 4, !tbaa !13
  %399 = call ptr @MatNd_realloc(ptr noundef %390, i32 noundef %394, i32 noundef %398)
  %400 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 3
  store ptr %399, ptr %400, align 8, !tbaa !39
  br label %401

401:                                              ; preds = %388
  %402 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 3
  %403 = load ptr, ptr %402, align 8, !tbaa !39
  %404 = icmp ne ptr %403, null
  br i1 %404, label %408, label %405

405:                                              ; preds = %401
  %406 = load ptr, ptr @stderr, align 8, !tbaa !5
  %407 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %406, ptr noundef @.str.10, ptr noundef @.str.2, ptr noundef @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 779, ptr noundef @.str.21) #6
  call void @print_trace()
  call void @abort() #7
  unreachable

408:                                              ; preds = %401
  br label %409

409:                                              ; preds = %408
  br label %410

410:                                              ; preds = %409
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %411 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 3
  %412 = load ptr, ptr %411, align 8, !tbaa !39
  %413 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 2
  %414 = load ptr, ptr %413, align 8, !tbaa !37
  %415 = call double @MatNd_gaussInverse(ptr noundef %412, ptr noundef %414)
  store double %415, ptr %12, align 8, !tbaa !29
  %416 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 5
  %417 = load ptr, ptr %416, align 8, !tbaa !40
  %418 = load i64, ptr %6, align 8, !tbaa !32
  %419 = trunc i64 %418 to i32
  %420 = call ptr @MatNd_realloc(ptr noundef %417, i32 noundef %419, i32 noundef 1)
  %421 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 5
  store ptr %420, ptr %421, align 8, !tbaa !40
  br label %422

422:                                              ; preds = %410
  %423 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 5
  %424 = load ptr, ptr %423, align 8, !tbaa !40
  %425 = icmp ne ptr %424, null
  br i1 %425, label %429, label %426

426:                                              ; preds = %422
  %427 = load ptr, ptr @stderr, align 8, !tbaa !5
  %428 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %427, ptr noundef @.str.10, ptr noundef @.str.2, ptr noundef @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 789, ptr noundef @.str.22) #6
  call void @print_trace()
  call void @abort() #7
  unreachable

429:                                              ; preds = %422
  br label %430

430:                                              ; preds = %429
  br label %431

431:                                              ; preds = %430
  %432 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 5
  %433 = load ptr, ptr %432, align 8, !tbaa !40
  %434 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 3
  %435 = load ptr, ptr %434, align 8, !tbaa !39
  %436 = getelementptr inbounds %"class.Rcs::ViaPointSequence", ptr %13, i32 0, i32 4
  %437 = load ptr, ptr %436, align 8, !tbaa !34
  call void @MatNd_mul(ptr noundef %433, ptr noundef %435, ptr noundef %437)
  %438 = load double, ptr %12, align 8, !tbaa !29
  %439 = fcmp oeq double %438, 0.000000e+00
  %440 = zext i1 %439 to i64
  %441 = select i1 %439, i1 false, i1 true
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret i1 %441
}

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL17pruneZeroFlagRowsP6_MatNd(ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEE9push_backERKd(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

declare void @MatNd_setZero(ptr noundef) #3

declare double @MatNd_gaussInverse(ptr noundef, ptr noundef) #3

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"_ZTS6_MatNd", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !12, i64 20}
!11 = !{!"int", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!10, !11, i64 12}
!14 = !{!15, !6, i64 8}
!15 = !{!"_ZTSN3Rcs16ViaPointSequenceE", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !12, i64 48, !16, i64 52, !17, i64 56, !21, i64 80}
!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 = !{!15, !12, i64 48}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!10, !6, i64 0}
!29 = !{!30, !30, i64 0}
!30 = !{!"double", !7, i64 0}
!31 = !{!11, !11, i64 0}
!32 = !{!33, !33, i64 0}
!33 = !{!"long", !7, i64 0}
!34 = !{!15, !6, i64 32}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!15, !6, i64 16}
!38 = !{!15, !16, i64 52}
!39 = !{!15, !6, i64 24}
!40 = !{!15, !6, i64 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.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [39 x i8], align 1
@__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [93 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [115 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Rcs16ViaPointSequence15computeB_linAccEP6_MatNdPKS1_(ptr noundef, ptr noundef) local_unnamed_addr #0 align 2

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

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

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

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

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

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

declare void @print_trace() local_unnamed_addr #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Rcs16ViaPointSequence14computeB_poly5EP6_MatNdPKS1_(ptr noundef, ptr noundef) local_unnamed_addr #0 align 2

declare ptr @MatNd_realloc(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare void @MatNd_copy(ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3Rcs16ViaPointSequence18compressDescriptorEP6_MatNd(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3Rcs16ViaPointSequence4initEPK6_MatNd(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef %1) unnamed_addr #0 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = getelementptr inbounds i8, ptr %1, i64 8
  %7 = load i32, ptr %6, align 8, !tbaa !5
  %8 = icmp ugt i32 %7, 1
  br i1 %8, label %17, label %9

9:                                                ; preds = %2
  %10 = load ptr, ptr @stderr, align 8, !tbaa !12
  %11 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %10, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 659, ptr noundef nonnull @.str.6) #7
  %12 = load ptr, ptr @stderr, align 8, !tbaa !12
  %13 = load i32, ptr %6, align 8, !tbaa !5
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %12, ptr noundef nonnull @.str.7, i32 noundef %13) #7
  %15 = load ptr, ptr @stderr, align 8, !tbaa !12
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef nonnull @.str.4) #7
  tail call void @print_trace()
  tail call void @exit(i32 noundef 1) #8
  unreachable

17:                                               ; preds = %2
  %18 = getelementptr inbounds i8, ptr %1, i64 12
  %19 = load i32, ptr %18, align 4, !tbaa !13
  %20 = icmp ugt i32 %19, 4
  br i1 %20, label %29, label %21

21:                                               ; preds = %17
  %22 = load ptr, ptr @stderr, align 8, !tbaa !12
  %23 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 660, ptr noundef nonnull @.str.8) #7
  %24 = load ptr, ptr @stderr, align 8, !tbaa !12
  %25 = load i32, ptr %18, align 4, !tbaa !13
  %26 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef nonnull @.str.9, i32 noundef %25) #7
  %27 = load ptr, ptr @stderr, align 8, !tbaa !12
  %28 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef nonnull @.str.4) #7
  tail call void @print_trace()
  tail call void @exit(i32 noundef 1) #8
  unreachable

29:                                               ; preds = %17
  %30 = getelementptr inbounds i8, ptr %0, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !14
  %.not = icmp eq ptr %31, %1
  br i1 %.not, label %38, label %32

32:                                               ; preds = %29
  %33 = tail call ptr @MatNd_realloc(ptr noundef %31, i32 noundef %7, i32 noundef %19)
  store ptr %33, ptr %30, align 8, !tbaa !14
  %.not44 = icmp eq ptr %33, null
  br i1 %.not44, label %34, label %37

34:                                               ; preds = %32
  %35 = load ptr, ptr @stderr, align 8, !tbaa !12
  %36 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 666, ptr noundef nonnull @.str.11) #7
  tail call void @print_trace()
  tail call void @abort() #8
  unreachable

37:                                               ; preds = %32
  tail call void @MatNd_copy(ptr noundef nonnull %33, ptr noundef nonnull %1)
  %.pre = load ptr, ptr %30, align 8, !tbaa !14
  br label %38

38:                                               ; preds = %37, %29
  %39 = phi ptr [ %.pre, %37 ], [ %31, %29 ]
  %40 = tail call noundef i32 @_ZL17pruneZeroFlagRowsP6_MatNd(ptr noundef %39)
  %41 = load ptr, ptr %30, align 8, !tbaa !14
  tail call void @_ZNK3Rcs16ViaPointSequence4sortEP6_MatNd(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef %41)
  %42 = getelementptr inbounds i8, ptr %0, i64 48
  %43 = load i8, ptr %42, align 8, !tbaa !25, !range !26, !noundef !27
  %44 = icmp eq i8 %43, 0
  br i1 %44, label %45, label %47

45:                                               ; preds = %38
  %46 = load ptr, ptr %30, align 8, !tbaa !14
  tail call void @_ZNK3Rcs16ViaPointSequence18compressDescriptorEP6_MatNd(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef %46)
  br label %47

47:                                               ; preds = %45, %38
  %48 = getelementptr inbounds i8, ptr %0, i64 80
  tail call void @_ZNSt6vectorIdSaIdEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #9
  %49 = getelementptr inbounds i8, ptr %0, i64 56
  tail call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %49) #9
  %50 = load ptr, ptr %30, align 8, !tbaa !14
  %51 = load ptr, ptr %50, align 8, !tbaa !28
  %52 = getelementptr inbounds i8, ptr %51, i64 32
  %53 = load double, ptr %52, align 8, !tbaa !29
  %54 = tail call i64 @lround(double noundef %53) #9
  %55 = trunc i64 %54 to i32
  %.not45 = icmp eq i32 %55, 7
  br i1 %.not45, label %64, label %56

56:                                               ; preds = %47
  tail call void @MatNd_printCommentDigits(ptr noundef nonnull @.str.12, ptr noundef nonnull %1, i32 noundef 3)
  %57 = load ptr, ptr %30, align 8, !tbaa !14
  tail call void @MatNd_printCommentDigits(ptr noundef nonnull @.str.11, ptr noundef %57, i32 noundef 3)
  %58 = load ptr, ptr @stderr, align 8, !tbaa !12
  %59 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 703) #7
  %60 = load ptr, ptr @stderr, align 8, !tbaa !12
  %61 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef nonnull @.str.13, i32 noundef %55) #7
  %62 = load ptr, ptr @stderr, align 8, !tbaa !12
  %63 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef nonnull @.str.4) #7
  tail call void @print_trace()
  tail call void @exit(i32 noundef 1) #8
  unreachable

64:                                               ; preds = %47
  %65 = load ptr, ptr %30, align 8, !tbaa !14
  %66 = load ptr, ptr %65, align 8, !tbaa !28
  %67 = getelementptr inbounds i8, ptr %65, i64 8
  %68 = load i32, ptr %67, align 8, !tbaa !5
  %69 = add i32 %68, -1
  %70 = getelementptr inbounds i8, ptr %65, i64 12
  %71 = load i32, ptr %70, align 4, !tbaa !13
  %72 = mul i32 %69, %71
  %73 = add i32 %72, 4
  %74 = zext i32 %73 to i64
  %75 = getelementptr inbounds double, ptr %66, i64 %74
  %76 = load double, ptr %75, align 8, !tbaa !29
  %77 = tail call i64 @lround(double noundef %76) #9
  %78 = trunc i64 %77 to i32
  %.not46 = icmp eq i32 %78, 7
  %79 = load ptr, ptr %30, align 8, !tbaa !14
  br i1 %.not46, label %87, label %80

80:                                               ; preds = %64
  tail call void @MatNd_printCommentDigits(ptr noundef nonnull @.str.14, ptr noundef %79, i32 noundef 3)
  %81 = load ptr, ptr @stderr, align 8, !tbaa !12
  %82 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %81, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 712) #7
  %83 = load ptr, ptr @stderr, align 8, !tbaa !12
  %84 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef nonnull @.str.15, i32 noundef %78) #7
  %85 = load ptr, ptr @stderr, align 8, !tbaa !12
  %86 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef nonnull @.str.4) #7
  tail call void @print_trace()
  tail call void @exit(i32 noundef 1) #8
  unreachable

87:                                               ; preds = %64
  %88 = tail call noundef i64 @_ZN3Rcs16ViaPointSequence26computeNumberOfConstraintsEPK6_MatNd(ptr noundef %79)
  %89 = getelementptr inbounds i8, ptr %0, i64 32
  %90 = load ptr, ptr %89, align 8, !tbaa !31
  %91 = trunc i64 %88 to i32
  %92 = tail call ptr @MatNd_realloc(ptr noundef %90, i32 noundef %91, i32 noundef 1)
  store ptr %92, ptr %89, align 8, !tbaa !31
  %.not47 = icmp eq ptr %92, null
  br i1 %.not47, label %93, label %96

93:                                               ; preds = %87
  %94 = load ptr, ptr @stderr, align 8, !tbaa !12
  %95 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %94, ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 719, ptr noundef nonnull @.str.16) #7
  tail call void @print_trace()
  tail call void @abort() #8
  unreachable

96:                                               ; preds = %87
  %97 = getelementptr inbounds i8, ptr %92, i64 8
  store i32 0, ptr %97, align 8, !tbaa !5
  %98 = load ptr, ptr %30, align 8, !tbaa !14
  %99 = getelementptr inbounds i8, ptr %98, i64 8
  %100 = load i32, ptr %99, align 8, !tbaa !5
  %.not54 = icmp eq i32 %100, 0
  br i1 %.not54, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %183, %96
  %101 = getelementptr inbounds i8, ptr %0, i64 16
  %102 = load ptr, ptr %101, align 8, !tbaa !32
  %103 = call ptr @MatNd_realloc(ptr noundef %102, i32 noundef %91, i32 noundef %91)
  store ptr %103, ptr %101, align 8, !tbaa !32
  %.not48 = icmp eq ptr %103, null
  br i1 %.not48, label %190, label %193

.lr.ph:                                           ; preds = %96, %183
  %104 = phi ptr [ %185, %183 ], [ %98, %96 ]
  %.053 = phi i64 [ %184, %183 ], [ 0, %96 ]
  %105 = load ptr, ptr %104, align 8, !tbaa !28
  %106 = getelementptr inbounds i8, ptr %104, i64 12
  %107 = load i32, ptr %106, align 4, !tbaa !13
  %108 = zext i32 %107 to i64
  %109 = mul nuw i64 %.053, %108
  %110 = getelementptr double, ptr %105, i64 %109
  %111 = getelementptr i8, ptr %110, i64 32
  %112 = load double, ptr %111, align 8, !tbaa !29
  %113 = call i64 @lround(double noundef %112) #9
  %114 = trunc i64 %113 to i32
  %.not51 = icmp eq i32 %114, 0
  br i1 %.not51, label %115, label %123

115:                                              ; preds = %.lr.ph
  %116 = load ptr, ptr @stderr, align 8, !tbaa !12
  %117 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %116, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 727, ptr noundef nonnull @.str.17) #7
  %118 = load ptr, ptr @stderr, align 8, !tbaa !12
  %119 = trunc nuw i64 %.053 to i32
  %120 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %118, ptr noundef nonnull @.str.18, i32 noundef %119) #7
  %121 = load ptr, ptr @stderr, align 8, !tbaa !12
  %122 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %121, ptr noundef nonnull @.str.4) #7
  call void @print_trace()
  call void @exit(i32 noundef 1) #8
  unreachable

123:                                              ; preds = %.lr.ph
  %124 = call zeroext i1 @Math_isBitSet(i32 noundef %114, i32 noundef 0)
  br i1 %124, label %125, label %143

125:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  store i32 0, ptr %3, align 4, !tbaa !33
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %49, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  %126 = load ptr, ptr %30, align 8, !tbaa !14
  %127 = load ptr, ptr %126, align 8, !tbaa !28
  %128 = getelementptr inbounds i8, ptr %126, i64 12
  %129 = load i32, ptr %128, align 4, !tbaa !13
  %130 = zext i32 %129 to i64
  %131 = mul nuw i64 %.053, %130
  %132 = getelementptr inbounds double, ptr %127, i64 %131
  call void @_ZNSt6vectorIdSaIdEE9push_backERKd(ptr noundef nonnull align 8 dereferenceable(24) %48, ptr noundef nonnull align 8 dereferenceable(8) %132)
  %133 = load ptr, ptr %30, align 8, !tbaa !14
  %134 = trunc nuw i64 %.053 to i32
  %135 = call double @MatNd_get(ptr noundef %133, i32 noundef %134, i32 noundef 1)
  %136 = load ptr, ptr %89, align 8, !tbaa !31
  %137 = load ptr, ptr %136, align 8, !tbaa !28
  %138 = getelementptr inbounds i8, ptr %136, i64 8
  %139 = load i32, ptr %138, align 8, !tbaa !5
  %140 = zext i32 %139 to i64
  %141 = getelementptr inbounds double, ptr %137, i64 %140
  store double %135, ptr %141, align 8, !tbaa !29
  %142 = add i32 %139, 1
  store i32 %142, ptr %138, align 8, !tbaa !5
  br label %143

143:                                              ; preds = %125, %123
  %144 = call zeroext i1 @Math_isBitSet(i32 noundef %114, i32 noundef 1)
  br i1 %144, label %145, label %163

145:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  store i32 1, ptr %4, align 4, !tbaa !33
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %49, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  %146 = load ptr, ptr %30, align 8, !tbaa !14
  %147 = load ptr, ptr %146, align 8, !tbaa !28
  %148 = getelementptr inbounds i8, ptr %146, i64 12
  %149 = load i32, ptr %148, align 4, !tbaa !13
  %150 = zext i32 %149 to i64
  %151 = mul nuw i64 %.053, %150
  %152 = getelementptr inbounds double, ptr %147, i64 %151
  call void @_ZNSt6vectorIdSaIdEE9push_backERKd(ptr noundef nonnull align 8 dereferenceable(24) %48, ptr noundef nonnull align 8 dereferenceable(8) %152)
  %153 = load ptr, ptr %30, align 8, !tbaa !14
  %154 = trunc nuw i64 %.053 to i32
  %155 = call double @MatNd_get(ptr noundef %153, i32 noundef %154, i32 noundef 2)
  %156 = load ptr, ptr %89, align 8, !tbaa !31
  %157 = load ptr, ptr %156, align 8, !tbaa !28
  %158 = getelementptr inbounds i8, ptr %156, i64 8
  %159 = load i32, ptr %158, align 8, !tbaa !5
  %160 = zext i32 %159 to i64
  %161 = getelementptr inbounds double, ptr %157, i64 %160
  store double %155, ptr %161, align 8, !tbaa !29
  %162 = add i32 %159, 1
  store i32 %162, ptr %158, align 8, !tbaa !5
  br label %163

163:                                              ; preds = %145, %143
  %164 = call zeroext i1 @Math_isBitSet(i32 noundef %114, i32 noundef 2)
  br i1 %164, label %165, label %183

165:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  store i32 2, ptr %5, align 4, !tbaa !33
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %49, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  %166 = load ptr, ptr %30, align 8, !tbaa !14
  %167 = load ptr, ptr %166, align 8, !tbaa !28
  %168 = getelementptr inbounds i8, ptr %166, i64 12
  %169 = load i32, ptr %168, align 4, !tbaa !13
  %170 = zext i32 %169 to i64
  %171 = mul nuw i64 %.053, %170
  %172 = getelementptr inbounds double, ptr %167, i64 %171
  call void @_ZNSt6vectorIdSaIdEE9push_backERKd(ptr noundef nonnull align 8 dereferenceable(24) %48, ptr noundef nonnull align 8 dereferenceable(8) %172)
  %173 = load ptr, ptr %30, align 8, !tbaa !14
  %174 = trunc nuw i64 %.053 to i32
  %175 = call double @MatNd_get(ptr noundef %173, i32 noundef %174, i32 noundef 3)
  %176 = load ptr, ptr %89, align 8, !tbaa !31
  %177 = load ptr, ptr %176, align 8, !tbaa !28
  %178 = getelementptr inbounds i8, ptr %176, i64 8
  %179 = load i32, ptr %178, align 8, !tbaa !5
  %180 = zext i32 %179 to i64
  %181 = getelementptr inbounds double, ptr %177, i64 %180
  store double %175, ptr %181, align 8, !tbaa !29
  %182 = add i32 %179, 1
  store i32 %182, ptr %178, align 8, !tbaa !5
  br label %183

183:                                              ; preds = %165, %163
  %184 = add nuw nsw i64 %.053, 1
  %185 = load ptr, ptr %30, align 8, !tbaa !14
  %186 = getelementptr inbounds i8, ptr %185, i64 8
  %187 = load i32, ptr %186, align 8, !tbaa !5
  %188 = zext i32 %187 to i64
  %189 = icmp ult i64 %184, %188
  br i1 %189, label %.lr.ph, label %._crit_edge, !llvm.loop !34

190:                                              ; preds = %._crit_edge
  %191 = load ptr, ptr @stderr, align 8, !tbaa !12
  %192 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %191, ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 759, ptr noundef nonnull @.str.19) #7
  call void @print_trace()
  call void @abort() #8
  unreachable

193:                                              ; preds = %._crit_edge
  call void @MatNd_setZero(ptr noundef nonnull %103)
  %194 = getelementptr inbounds i8, ptr %0, i64 52
  %195 = load i32, ptr %194, align 4, !tbaa !36
  switch i32 %195, label %202 [
    i32 0, label %196
    i32 1, label %199
  ]

196:                                              ; preds = %193
  %197 = load ptr, ptr %101, align 8, !tbaa !32
  %198 = load ptr, ptr %30, align 8, !tbaa !14
  call void @_ZN3Rcs16ViaPointSequence14computeB_poly5EP6_MatNdPKS1_(ptr noundef %197, ptr noundef %198)
  br label %210

199:                                              ; preds = %193
  %200 = load ptr, ptr %101, align 8, !tbaa !32
  %201 = load ptr, ptr %30, align 8, !tbaa !14
  call void @_ZN3Rcs16ViaPointSequence15computeB_linAccEP6_MatNdPKS1_(ptr noundef %200, ptr noundef %201)
  br label %210

202:                                              ; preds = %193
  %203 = load ptr, ptr @stderr, align 8, !tbaa !12
  %204 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %203, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 773) #7
  %205 = load ptr, ptr @stderr, align 8, !tbaa !12
  %206 = load i32, ptr %194, align 4, !tbaa !36
  %207 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %205, ptr noundef nonnull @.str.20, i32 noundef %206) #7
  %208 = load ptr, ptr @stderr, align 8, !tbaa !12
  %209 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %208, ptr noundef nonnull @.str.4) #7
  call void @print_trace()
  call void @exit(i32 noundef 1) #8
  unreachable

210:                                              ; preds = %199, %196
  %211 = getelementptr inbounds i8, ptr %0, i64 24
  %212 = load ptr, ptr %211, align 8, !tbaa !37
  %213 = load ptr, ptr %101, align 8, !tbaa !32
  %214 = getelementptr inbounds i8, ptr %213, i64 8
  %215 = load i32, ptr %214, align 8, !tbaa !5
  %216 = getelementptr inbounds i8, ptr %213, i64 12
  %217 = load i32, ptr %216, align 4, !tbaa !13
  %218 = call ptr @MatNd_realloc(ptr noundef %212, i32 noundef %215, i32 noundef %217)
  store ptr %218, ptr %211, align 8, !tbaa !37
  %.not49 = icmp eq ptr %218, null
  br i1 %.not49, label %219, label %222

219:                                              ; preds = %210
  %220 = load ptr, ptr @stderr, align 8, !tbaa !12
  %221 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %220, ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 779, ptr noundef nonnull @.str.21) #7
  call void @print_trace()
  call void @abort() #8
  unreachable

222:                                              ; preds = %210
  %223 = load ptr, ptr %101, align 8, !tbaa !32
  %224 = call double @MatNd_gaussInverse(ptr noundef nonnull %218, ptr noundef %223)
  %225 = getelementptr inbounds i8, ptr %0, i64 40
  %226 = load ptr, ptr %225, align 8, !tbaa !38
  %227 = call ptr @MatNd_realloc(ptr noundef %226, i32 noundef %91, i32 noundef 1)
  store ptr %227, ptr %225, align 8, !tbaa !38
  %.not50 = icmp eq ptr %227, null
  br i1 %.not50, label %228, label %231

228:                                              ; preds = %222
  %229 = load ptr, ptr @stderr, align 8, !tbaa !12
  %230 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %229, ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__._ZN3Rcs16ViaPointSequence4initEPK6_MatNd, i32 noundef 789, ptr noundef nonnull @.str.22) #7
  call void @print_trace()
  call void @abort() #8
  unreachable

231:                                              ; preds = %222
  %232 = load ptr, ptr %211, align 8, !tbaa !37
  %233 = load ptr, ptr %89, align 8, !tbaa !31
  call void @MatNd_mul(ptr noundef nonnull %227, ptr noundef %232, ptr noundef %233)
  %234 = fcmp une double %224, 0.000000e+00
  ret i1 %234
}

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL17pruneZeroFlagRowsP6_MatNd(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEE9push_backERKd(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

declare void @MatNd_setZero(ptr noundef) local_unnamed_addr #3

declare double @MatNd_gaussInverse(ptr noundef, ptr noundef) local_unnamed_addr #3

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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 = { 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 #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { cold nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { 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, !10, i64 8}
!6 = !{!"_ZTS6_MatNd", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !11, i64 20}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!6, !10, i64 12}
!14 = !{!15, !7, i64 8}
!15 = !{!"_ZTSN3Rcs16ViaPointSequenceE", !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !11, i64 48, !16, i64 52, !17, i64 56, !21, i64 80}
!16 = !{!"_ZTSN3Rcs16ViaPointSequence12ViaPointTypeE", !8, 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", !7, i64 0, !7, i64 8, !7, 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", !7, i64 0, !7, i64 8, !7, i64 16}
!25 = !{!15, !11, i64 48}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!6, !7, i64 0}
!29 = !{!30, !30, i64 0}
!30 = !{!"double", !8, i64 0}
!31 = !{!15, !7, i64 32}
!32 = !{!15, !7, i64 16}
!33 = !{!10, !10, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!15, !16, i64 52}
!37 = !{!15, !7, i64 24}
!38 = !{!15, !7, i64 40}


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