; LLVM IR from CMU-CBML/NeuronTransportIGA :: spline_src/BSplineBasis.ll (ZN12BSplineBasis13BasisFunctionEidiRSt6vectorIdSaIdEE)

; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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 }
%"class.std::allocator" = type { i8 }
%class.BSplineBasis = type { i32, i32, %"class.std::vector" }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.8 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [48 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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12BSplineBasis13BasisFunctionEidiRSt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef %1, double noundef %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %4) #3 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca double, align 8
  %12 = alloca %"class.std::vector", align 8
  %13 = alloca double, align 8
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store double %2, ptr %8, align 8, !tbaa !11
  store i32 %3, ptr %9, align 4, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  %26 = load ptr, ptr %6, align 8
  %27 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZNSt6vectorIdSaIdEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #5
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  %29 = load i32, ptr %9, align 4, !tbaa !9
  %30 = add nsw i32 %29, 1
  %31 = sext i32 %30 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store double 0.000000e+00, ptr %11, align 8, !tbaa !11
  call void @_ZNSt6vectorIdSaIdEE6resizeEmRKd(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %31, ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = icmp slt i32 %32, 0
  br i1 %33, label %39, label %34

34:                                               ; preds = %5
  %35 = load i32, ptr %7, align 4, !tbaa !9
  %36 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 1
  %37 = load i32, ptr %36, align 4, !tbaa !13
  %38 = icmp sge i32 %35, %37
  br i1 %38, label %39, label %41

39:                                               ; preds = %34, %5
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.8)
  br label %382

41:                                               ; preds = %34
  %42 = load double, ptr %8, align 8, !tbaa !11
  %43 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #5
  %45 = load double, ptr %44, align 8, !tbaa !11
  %46 = fcmp olt double %42, %45
  br i1 %46, label %53, label %47

47:                                               ; preds = %41
  %48 = load double, ptr %8, align 8, !tbaa !11
  %49 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %49) #5
  %51 = load double, ptr %50, align 8, !tbaa !11
  %52 = fcmp ogt double %48, %51
  br i1 %52, label %53, label %54

53:                                               ; preds = %47, %41
  br label %382

54:                                               ; preds = %47
  %55 = load i32, ptr %9, align 4, !tbaa !9
  %56 = icmp sgt i32 %55, 1
  br i1 %56, label %57, label %59

57:                                               ; preds = %54
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.9)
  br label %382

59:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #5
  %60 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 0
  %61 = load i32, ptr %60, align 8, !tbaa !19
  %62 = add nsw i32 %61, 1
  %63 = sext i32 %62 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store double 0.000000e+00, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  invoke void @_ZNSt6vectorIdSaIdEEC2EmRKdRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %63, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %64 unwind label %119

64:                                               ; preds = %59
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  store double 0.000000e+00, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %65 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %65, ptr %20, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %124, %64
  %67 = load i32, ptr %20, align 4, !tbaa !9
  %68 = load i32, ptr %7, align 4, !tbaa !9
  %69 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 0
  %70 = load i32, ptr %69, align 8, !tbaa !19
  %71 = add nsw i32 %68, %70
  %72 = icmp sle i32 %67, %71
  br i1 %72, label %73, label %127

73:                                               ; preds = %66
  %74 = load double, ptr %8, align 8, !tbaa !11
  %75 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %76 = load i32, ptr %20, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %77) #5
  %79 = load double, ptr %78, align 8, !tbaa !11
  %80 = fcmp oge double %74, %79
  br i1 %80, label %81, label %90

81:                                               ; preds = %73
  %82 = load double, ptr %8, align 8, !tbaa !11
  %83 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %84 = load i32, ptr %20, align 4, !tbaa !9
  %85 = add nsw i32 %84, 1
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %86) #5
  %88 = load double, ptr %87, align 8, !tbaa !11
  %89 = fcmp olt double %82, %88
  br i1 %89, label %113, label %90

90:                                               ; preds = %81, %73
  %91 = load double, ptr %8, align 8, !tbaa !11
  %92 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %93 = load i32, ptr %20, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %92, i64 noundef %94) #5
  %96 = load double, ptr %95, align 8, !tbaa !11
  %97 = fcmp ogt double %91, %96
  br i1 %97, label %98, label %123

98:                                               ; preds = %90
  %99 = load double, ptr %8, align 8, !tbaa !11
  %100 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %101 = load i32, ptr %20, align 4, !tbaa !9
  %102 = add nsw i32 %101, 1
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef %103) #5
  %105 = load double, ptr %104, align 8, !tbaa !11
  %106 = fcmp oeq double %99, %105
  br i1 %106, label %107, label %123

107:                                              ; preds = %98
  %108 = load double, ptr %8, align 8, !tbaa !11
  %109 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %109) #5
  %111 = load double, ptr %110, align 8, !tbaa !11
  %112 = fcmp oeq double %108, %111
  br i1 %112, label %113, label %123

113:                                              ; preds = %107, %81
  %114 = load i32, ptr %20, align 4, !tbaa !9
  %115 = load i32, ptr %7, align 4, !tbaa !9
  %116 = sub nsw i32 %114, %115
  %117 = sext i32 %116 to i64
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %117) #5
  store double 1.000000e+00, ptr %118, align 8, !tbaa !11
  br label %127

119:                                              ; preds = %59
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %15, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %16, align 4
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  br label %383

123:                                              ; preds = %107, %98, %90
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %20, align 4, !tbaa !9
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %20, align 4, !tbaa !9
  br label %66, !llvm.loop !20

127:                                              ; preds = %113, %66
  store i32 1, ptr %22, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %367, %127
  %129 = load i32, ptr %22, align 4, !tbaa !9
  %130 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 0
  %131 = load i32, ptr %130, align 8, !tbaa !19
  %132 = icmp sle i32 %129, %131
  br i1 %132, label %133, label %370

133:                                              ; preds = %128
  %134 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 0
  %135 = load i32, ptr %134, align 8, !tbaa !19
  %136 = add nsw i32 %135, 1
  %137 = load i32, ptr %22, align 4, !tbaa !9
  %138 = sub nsw i32 %136, %137
  store i32 %138, ptr %21, align 4, !tbaa !9
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %139

139:                                              ; preds = %363, %133
  %140 = load i32, ptr %20, align 4, !tbaa !9
  %141 = load i32, ptr %21, align 4, !tbaa !9
  %142 = icmp slt i32 %140, %141
  br i1 %142, label %143, label %366

143:                                              ; preds = %139
  %144 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %145 = load i32, ptr %7, align 4, !tbaa !9
  %146 = load i32, ptr %20, align 4, !tbaa !9
  %147 = add nsw i32 %145, %146
  %148 = load i32, ptr %22, align 4, !tbaa !9
  %149 = add nsw i32 %147, %148
  %150 = sext i32 %149 to i64
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %144, i64 noundef %150) #5
  %152 = load double, ptr %151, align 8, !tbaa !11
  %153 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %154 = load i32, ptr %7, align 4, !tbaa !9
  %155 = load i32, ptr %20, align 4, !tbaa !9
  %156 = add nsw i32 %154, %155
  %157 = sext i32 %156 to i64
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %153, i64 noundef %157) #5
  %159 = load double, ptr %158, align 8, !tbaa !11
  %160 = fcmp oeq double %152, %159
  br i1 %160, label %161, label %162

161:                                              ; preds = %143
  store double 0.000000e+00, ptr %17, align 8, !tbaa !11
  br label %190

162:                                              ; preds = %143
  %163 = load double, ptr %8, align 8, !tbaa !11
  %164 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %165 = load i32, ptr %7, align 4, !tbaa !9
  %166 = load i32, ptr %20, align 4, !tbaa !9
  %167 = add nsw i32 %165, %166
  %168 = sext i32 %167 to i64
  %169 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %164, i64 noundef %168) #5
  %170 = load double, ptr %169, align 8, !tbaa !11
  %171 = fsub double %163, %170
  %172 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %173 = load i32, ptr %7, align 4, !tbaa !9
  %174 = load i32, ptr %20, align 4, !tbaa !9
  %175 = add nsw i32 %173, %174
  %176 = load i32, ptr %22, align 4, !tbaa !9
  %177 = add nsw i32 %175, %176
  %178 = sext i32 %177 to i64
  %179 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %172, i64 noundef %178) #5
  %180 = load double, ptr %179, align 8, !tbaa !11
  %181 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %182 = load i32, ptr %7, align 4, !tbaa !9
  %183 = load i32, ptr %20, align 4, !tbaa !9
  %184 = add nsw i32 %182, %183
  %185 = sext i32 %184 to i64
  %186 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %181, i64 noundef %185) #5
  %187 = load double, ptr %186, align 8, !tbaa !11
  %188 = fsub double %180, %187
  %189 = fdiv double %171, %188
  store double %189, ptr %17, align 8, !tbaa !11
  br label %190

190:                                              ; preds = %162, %161
  %191 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %192 = load i32, ptr %7, align 4, !tbaa !9
  %193 = load i32, ptr %20, align 4, !tbaa !9
  %194 = add nsw i32 %192, %193
  %195 = load i32, ptr %22, align 4, !tbaa !9
  %196 = add nsw i32 %194, %195
  %197 = add nsw i32 %196, 1
  %198 = sext i32 %197 to i64
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %191, i64 noundef %198) #5
  %200 = load double, ptr %199, align 8, !tbaa !11
  %201 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %202 = load i32, ptr %7, align 4, !tbaa !9
  %203 = load i32, ptr %20, align 4, !tbaa !9
  %204 = add nsw i32 %202, %203
  %205 = add nsw i32 %204, 1
  %206 = sext i32 %205 to i64
  %207 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %201, i64 noundef %206) #5
  %208 = load double, ptr %207, align 8, !tbaa !11
  %209 = fcmp oeq double %200, %208
  br i1 %209, label %210, label %211

210:                                              ; preds = %190
  store double 0.000000e+00, ptr %18, align 8, !tbaa !11
  br label %244

211:                                              ; preds = %190
  %212 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %213 = load i32, ptr %7, align 4, !tbaa !9
  %214 = load i32, ptr %20, align 4, !tbaa !9
  %215 = add nsw i32 %213, %214
  %216 = load i32, ptr %22, align 4, !tbaa !9
  %217 = add nsw i32 %215, %216
  %218 = add nsw i32 %217, 1
  %219 = sext i32 %218 to i64
  %220 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %212, i64 noundef %219) #5
  %221 = load double, ptr %220, align 8, !tbaa !11
  %222 = load double, ptr %8, align 8, !tbaa !11
  %223 = fsub double %221, %222
  %224 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %225 = load i32, ptr %7, align 4, !tbaa !9
  %226 = load i32, ptr %20, align 4, !tbaa !9
  %227 = add nsw i32 %225, %226
  %228 = load i32, ptr %22, align 4, !tbaa !9
  %229 = add nsw i32 %227, %228
  %230 = add nsw i32 %229, 1
  %231 = sext i32 %230 to i64
  %232 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %224, i64 noundef %231) #5
  %233 = load double, ptr %232, align 8, !tbaa !11
  %234 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %235 = load i32, ptr %7, align 4, !tbaa !9
  %236 = load i32, ptr %20, align 4, !tbaa !9
  %237 = add nsw i32 %235, %236
  %238 = add nsw i32 %237, 1
  %239 = sext i32 %238 to i64
  %240 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %234, i64 noundef %239) #5
  %241 = load double, ptr %240, align 8, !tbaa !11
  %242 = fsub double %233, %241
  %243 = fdiv double %223, %242
  store double %243, ptr %18, align 8, !tbaa !11
  br label %244

244:                                              ; preds = %211, %210
  %245 = load i32, ptr %9, align 4, !tbaa !9
  %246 = icmp eq i32 %245, 1
  br i1 %246, label %247, label %346

247:                                              ; preds = %244
  %248 = load i32, ptr %22, align 4, !tbaa !9
  %249 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 0
  %250 = load i32, ptr %249, align 8, !tbaa !19
  %251 = icmp eq i32 %248, %250
  br i1 %251, label %252, label %346

252:                                              ; preds = %247
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %253 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %254 = load i32, ptr %7, align 4, !tbaa !9
  %255 = load i32, ptr %20, align 4, !tbaa !9
  %256 = add nsw i32 %254, %255
  %257 = load i32, ptr %22, align 4, !tbaa !9
  %258 = add nsw i32 %256, %257
  %259 = sext i32 %258 to i64
  %260 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %253, i64 noundef %259) #5
  %261 = load double, ptr %260, align 8, !tbaa !11
  %262 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %263 = load i32, ptr %7, align 4, !tbaa !9
  %264 = load i32, ptr %20, align 4, !tbaa !9
  %265 = add nsw i32 %263, %264
  %266 = sext i32 %265 to i64
  %267 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %262, i64 noundef %266) #5
  %268 = load double, ptr %267, align 8, !tbaa !11
  %269 = fcmp oeq double %261, %268
  br i1 %269, label %270, label %271

270:                                              ; preds = %252
  store double 0.000000e+00, ptr %24, align 8, !tbaa !11
  br label %292

271:                                              ; preds = %252
  %272 = load i32, ptr %22, align 4, !tbaa !9
  %273 = sitofp i32 %272 to double
  %274 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %275 = load i32, ptr %7, align 4, !tbaa !9
  %276 = load i32, ptr %20, align 4, !tbaa !9
  %277 = add nsw i32 %275, %276
  %278 = load i32, ptr %22, align 4, !tbaa !9
  %279 = add nsw i32 %277, %278
  %280 = sext i32 %279 to i64
  %281 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %274, i64 noundef %280) #5
  %282 = load double, ptr %281, align 8, !tbaa !11
  %283 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %284 = load i32, ptr %7, align 4, !tbaa !9
  %285 = load i32, ptr %20, align 4, !tbaa !9
  %286 = add nsw i32 %284, %285
  %287 = sext i32 %286 to i64
  %288 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %283, i64 noundef %287) #5
  %289 = load double, ptr %288, align 8, !tbaa !11
  %290 = fsub double %282, %289
  %291 = fdiv double %273, %290
  store double %291, ptr %24, align 8, !tbaa !11
  br label %292

292:                                              ; preds = %271, %270
  %293 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %294 = load i32, ptr %7, align 4, !tbaa !9
  %295 = load i32, ptr %20, align 4, !tbaa !9
  %296 = add nsw i32 %294, %295
  %297 = load i32, ptr %22, align 4, !tbaa !9
  %298 = add nsw i32 %296, %297
  %299 = add nsw i32 %298, 1
  %300 = sext i32 %299 to i64
  %301 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %293, i64 noundef %300) #5
  %302 = load double, ptr %301, align 8, !tbaa !11
  %303 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %304 = load i32, ptr %7, align 4, !tbaa !9
  %305 = load i32, ptr %20, align 4, !tbaa !9
  %306 = add nsw i32 %304, %305
  %307 = add nsw i32 %306, 1
  %308 = sext i32 %307 to i64
  %309 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %303, i64 noundef %308) #5
  %310 = load double, ptr %309, align 8, !tbaa !11
  %311 = fcmp oeq double %302, %310
  br i1 %311, label %312, label %313

312:                                              ; preds = %292
  store double 0.000000e+00, ptr %25, align 8, !tbaa !11
  br label %336

313:                                              ; preds = %292
  %314 = load i32, ptr %22, align 4, !tbaa !9
  %315 = sitofp i32 %314 to double
  %316 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %317 = load i32, ptr %7, align 4, !tbaa !9
  %318 = load i32, ptr %20, align 4, !tbaa !9
  %319 = add nsw i32 %317, %318
  %320 = load i32, ptr %22, align 4, !tbaa !9
  %321 = add nsw i32 %319, %320
  %322 = add nsw i32 %321, 1
  %323 = sext i32 %322 to i64
  %324 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %316, i64 noundef %323) #5
  %325 = load double, ptr %324, align 8, !tbaa !11
  %326 = getelementptr inbounds %class.BSplineBasis, ptr %26, i32 0, i32 2
  %327 = load i32, ptr %7, align 4, !tbaa !9
  %328 = load i32, ptr %20, align 4, !tbaa !9
  %329 = add nsw i32 %327, %328
  %330 = add nsw i32 %329, 1
  %331 = sext i32 %330 to i64
  %332 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %326, i64 noundef %331) #5
  %333 = load double, ptr %332, align 8, !tbaa !11
  %334 = fsub double %325, %333
  %335 = fdiv double %315, %334
  store double %335, ptr %25, align 8, !tbaa !11
  br label %336

336:                                              ; preds = %313, %312
  %337 = load double, ptr %24, align 8, !tbaa !11
  %338 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 0) #5
  %339 = load double, ptr %338, align 8, !tbaa !11
  %340 = load double, ptr %25, align 8, !tbaa !11
  %341 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 1) #5
  %342 = load double, ptr %341, align 8, !tbaa !11
  %343 = fmul double %340, %342
  %344 = fneg double %343
  %345 = call double @llvm.fmuladd.f64(double %337, double %339, double %344)
  store double %345, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %346

346:                                              ; preds = %336, %247, %244
  %347 = load double, ptr %17, align 8, !tbaa !11
  %348 = load i32, ptr %20, align 4, !tbaa !9
  %349 = sext i32 %348 to i64
  %350 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %349) #5
  %351 = load double, ptr %350, align 8, !tbaa !11
  %352 = load double, ptr %18, align 8, !tbaa !11
  %353 = load i32, ptr %20, align 4, !tbaa !9
  %354 = add nsw i32 %353, 1
  %355 = sext i32 %354 to i64
  %356 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %355) #5
  %357 = load double, ptr %356, align 8, !tbaa !11
  %358 = fmul double %352, %357
  %359 = call double @llvm.fmuladd.f64(double %347, double %351, double %358)
  %360 = load i32, ptr %20, align 4, !tbaa !9
  %361 = sext i32 %360 to i64
  %362 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %361) #5
  store double %359, ptr %362, align 8, !tbaa !11
  br label %363

363:                                              ; preds = %346
  %364 = load i32, ptr %20, align 4, !tbaa !9
  %365 = add nsw i32 %364, 1
  store i32 %365, ptr %20, align 4, !tbaa !9
  br label %139, !llvm.loop !22

366:                                              ; preds = %139
  br label %367

367:                                              ; preds = %366
  %368 = load i32, ptr %22, align 4, !tbaa !9
  %369 = add nsw i32 %368, 1
  store i32 %369, ptr %22, align 4, !tbaa !9
  br label %128, !llvm.loop !23

370:                                              ; preds = %128
  %371 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 0) #5
  %372 = load double, ptr %371, align 8, !tbaa !11
  %373 = load ptr, ptr %10, align 8, !tbaa !5
  %374 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %373, i64 noundef 0) #5
  store double %372, ptr %374, align 8, !tbaa !11
  %375 = load i32, ptr %9, align 4, !tbaa !9
  %376 = icmp eq i32 %375, 1
  br i1 %376, label %377, label %381

377:                                              ; preds = %370
  %378 = load double, ptr %19, align 8, !tbaa !11
  %379 = load ptr, ptr %10, align 8, !tbaa !5
  %380 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %379, i64 noundef 1) #5
  store double %378, ptr %380, align 8, !tbaa !11
  br label %381

381:                                              ; preds = %377, %370
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #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 @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  br label %382

382:                                              ; preds = %381, %57, %53, %39
  ret void

383:                                              ; preds = %119
  %384 = load ptr, ptr %15, align 8
  %385 = load i32, ptr %16, align 4
  %386 = insertvalue { ptr, i32 } poison, ptr %384, 0
  %387 = insertvalue { ptr, i32 } %386, i32 %385, 1
  resume { ptr, i32 } %387
}

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEEC2EmRKdRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 4}
!14 = !{!"_ZTS12BSplineBasis", !10, i64 0, !10, i64 4, !15, i64 8}
!15 = !{!"_ZTSSt6vectorIdSaIdEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!14, !10, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !21}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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 }
%"class.std::allocator" = type { i8 }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.8 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [48 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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12BSplineBasis13BasisFunctionEidiRSt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef %1, double noundef %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %4) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca double, align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca double, align 8
  %9 = alloca %"class.std::allocator", align 1
  tail call void @_ZNSt6vectorIdSaIdEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %10 = add nsw i32 %3, 1
  %11 = sext i32 %10 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  store double 0.000000e+00, ptr %6, align 8, !tbaa !5
  call void @_ZNSt6vectorIdSaIdEE6resizeEmRKd(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %11, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  %12 = icmp sgt i32 %1, -1
  %13 = getelementptr inbounds i8, ptr %0, i64 4
  %14 = load i32, ptr %13, align 4
  %.not = icmp sgt i32 %14, %1
  %or.cond = select i1 %12, i1 %.not, i1 false
  br i1 %or.cond, label %17, label %15

15:                                               ; preds = %5
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.8)
  br label %169

17:                                               ; preds = %5
  %18 = getelementptr inbounds i8, ptr %0, i64 8
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  %20 = load double, ptr %19, align 8, !tbaa !5
  %21 = fcmp ogt double %20, %2
  br i1 %21, label %169, label %22

22:                                               ; preds = %17
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  %24 = load double, ptr %23, align 8, !tbaa !5
  %25 = fcmp olt double %24, %2
  br i1 %25, label %169, label %26

26:                                               ; preds = %22
  %27 = icmp sgt i32 %3, 1
  br i1 %27, label %28, label %30

28:                                               ; preds = %26
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.9)
  br label %169

30:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  %31 = load i32, ptr %0, align 8, !tbaa !9
  %32 = add nsw i32 %31, 1
  %33 = sext i32 %32 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  store double 0.000000e+00, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt6vectorIdSaIdEEC2EmRKdRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %33, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %34 unwind label %63

34:                                               ; preds = %30
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  %35 = load i32, ptr %0, align 8, !tbaa !9
  %.not104110 = icmp slt i32 %35, 0
  br i1 %.not104110, label %._crit_edge120, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %34
  %36 = zext nneg i32 %1 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %._crit_edge131
  %indvars.iv = phi i64 [ %36, %.lr.ph.preheader ], [ %50, %._crit_edge131 ]
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv) #5
  %38 = load double, ptr %37, align 8, !tbaa !5
  %39 = fcmp ugt double %38, %2
  %40 = trunc nuw i64 %indvars.iv to i32
  br i1 %39, label %46, label %41

41:                                               ; preds = %.lr.ph
  %42 = add nuw nsw i64 %indvars.iv, 1
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %42) #5
  %44 = load double, ptr %43, align 8, !tbaa !5
  %45 = fcmp ogt double %44, %2
  br i1 %45, label %59, label %46

46:                                               ; preds = %41, %.lr.ph
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv) #5
  %48 = load double, ptr %47, align 8, !tbaa !5
  %49 = fcmp olt double %48, %2
  %50 = add nuw nsw i64 %indvars.iv, 1
  br i1 %49, label %51, label %._crit_edge131

51:                                               ; preds = %46
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %50) #5
  %53 = load double, ptr %52, align 8, !tbaa !5
  %54 = fcmp oeq double %53, %2
  br i1 %54, label %55, label %._crit_edge131

55:                                               ; preds = %51
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  %57 = load double, ptr %56, align 8, !tbaa !5
  %58 = fcmp oeq double %57, %2
  br i1 %58, label %59, label %._crit_edge131

59:                                               ; preds = %55, %41
  %60 = sub nsw i32 %40, %1
  %61 = sext i32 %60 to i64
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %61) #5
  store double 1.000000e+00, ptr %62, align 8, !tbaa !5
  %.pre = load i32, ptr %0, align 8, !tbaa !9
  br label %.loopexit

63:                                               ; preds = %30
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  resume { ptr, i32 } %64

._crit_edge131:                                   ; preds = %46, %51, %55
  %65 = load i32, ptr %0, align 8, !tbaa !9
  %66 = add nsw i32 %65, %1
  %.not104.not = icmp sgt i32 %66, %40
  br i1 %.not104.not, label %.lr.ph, label %.loopexit, !llvm.loop !17

.loopexit:                                        ; preds = %._crit_edge131, %59
  %67 = phi i32 [ %.pre, %59 ], [ %65, %._crit_edge131 ]
  %.not105115 = icmp slt i32 %67, 1
  br i1 %.not105115, label %._crit_edge120, label %.lr.ph119

.lr.ph119:                                        ; preds = %.loopexit
  %68 = icmp eq i32 %3, 1
  %69 = zext nneg i32 %1 to i64
  br label %70

70:                                               ; preds = %.lr.ph119, %._crit_edge
  %71 = phi i32 [ %67, %.lr.ph119 ], [ %160, %._crit_edge ]
  %indvars.iv127 = phi i64 [ 1, %.lr.ph119 ], [ %indvars.iv.next128, %._crit_edge ]
  %.098116 = phi double [ 0.000000e+00, %.lr.ph119 ], [ %.199.lcssa, %._crit_edge ]
  %72 = trunc nuw nsw i64 %indvars.iv127 to i32
  %reass.sub = sub i32 %71, %72
  %73 = icmp ult i32 %reass.sub, 2147483647
  br i1 %73, label %.lr.ph114, label %._crit_edge

.lr.ph114:                                        ; preds = %70
  %74 = add nuw nsw i32 %reass.sub, 1
  %75 = uitofp nneg i32 %72 to double
  %76 = zext nneg i32 %74 to i64
  br label %77

77:                                               ; preds = %.lr.ph114, %151
  %indvars.iv124 = phi i64 [ 0, %.lr.ph114 ], [ %indvars.iv.next125, %151 ]
  %.199112 = phi double [ %.098116, %.lr.ph114 ], [ %.2, %151 ]
  %78 = add nuw nsw i64 %indvars.iv124, %69
  %79 = add nuw nsw i64 %78, %indvars.iv127
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %79) #5
  %81 = load double, ptr %80, align 8, !tbaa !5
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %78) #5
  %83 = load double, ptr %82, align 8, !tbaa !5
  %84 = fcmp oeq double %81, %83
  br i1 %84, label %95, label %85

85:                                               ; preds = %77
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %78) #5
  %87 = load double, ptr %86, align 8, !tbaa !5
  %88 = fsub double %2, %87
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %79) #5
  %90 = load double, ptr %89, align 8, !tbaa !5
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %78) #5
  %92 = load double, ptr %91, align 8, !tbaa !5
  %93 = fsub double %90, %92
  %94 = fdiv double %88, %93
  br label %95

95:                                               ; preds = %77, %85
  %.094 = phi double [ %94, %85 ], [ 0.000000e+00, %77 ]
  %96 = add nuw nsw i64 %79, 1
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %96) #5
  %98 = load double, ptr %97, align 8, !tbaa !5
  %99 = add nuw nsw i64 %78, 1
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %99) #5
  %101 = load double, ptr %100, align 8, !tbaa !5
  %102 = fcmp oeq double %98, %101
  br i1 %102, label %113, label %103

103:                                              ; preds = %95
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %96) #5
  %105 = load double, ptr %104, align 8, !tbaa !5
  %106 = fsub double %105, %2
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %96) #5
  %108 = load double, ptr %107, align 8, !tbaa !5
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %99) #5
  %110 = load double, ptr %109, align 8, !tbaa !5
  %111 = fsub double %108, %110
  %112 = fdiv double %106, %111
  br label %113

113:                                              ; preds = %95, %103
  %.096 = phi double [ %112, %103 ], [ 0.000000e+00, %95 ]
  %114 = load i32, ptr %0, align 8
  %115 = zext i32 %114 to i64
  %116 = icmp eq i64 %indvars.iv127, %115
  %or.cond108 = select i1 %68, i1 %116, i1 false
  br i1 %or.cond108, label %117, label %151

117:                                              ; preds = %113
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %79) #5
  %119 = load double, ptr %118, align 8, !tbaa !5
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %78) #5
  %121 = load double, ptr %120, align 8, !tbaa !5
  %122 = fcmp oeq double %119, %121
  br i1 %122, label %130, label %123

123:                                              ; preds = %117
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %79) #5
  %125 = load double, ptr %124, align 8, !tbaa !5
  %126 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %78) #5
  %127 = load double, ptr %126, align 8, !tbaa !5
  %128 = fsub double %125, %127
  %129 = fdiv double %75, %128
  br label %130

130:                                              ; preds = %117, %123
  %.093 = phi double [ %129, %123 ], [ 0.000000e+00, %117 ]
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %96) #5
  %132 = load double, ptr %131, align 8, !tbaa !5
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %99) #5
  %134 = load double, ptr %133, align 8, !tbaa !5
  %135 = fcmp oeq double %132, %134
  br i1 %135, label %143, label %136

136:                                              ; preds = %130
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %96) #5
  %138 = load double, ptr %137, align 8, !tbaa !5
  %139 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %99) #5
  %140 = load double, ptr %139, align 8, !tbaa !5
  %141 = fsub double %138, %140
  %142 = fdiv double %75, %141
  br label %143

143:                                              ; preds = %130, %136
  %.0 = phi double [ %142, %136 ], [ 0.000000e+00, %130 ]
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 0) #5
  %145 = load double, ptr %144, align 8, !tbaa !5
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 1) #5
  %147 = load double, ptr %146, align 8, !tbaa !5
  %148 = fneg double %.0
  %149 = fmul double %147, %148
  %150 = call double @llvm.fmuladd.f64(double %.093, double %145, double %149)
  br label %151

151:                                              ; preds = %143, %113
  %.2 = phi double [ %150, %143 ], [ %.199112, %113 ]
  %152 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv124) #5
  %153 = load double, ptr %152, align 8, !tbaa !5
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 1
  %154 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv.next125) #5
  %155 = load double, ptr %154, align 8, !tbaa !5
  %156 = fmul double %.096, %155
  %157 = call double @llvm.fmuladd.f64(double %.094, double %153, double %156)
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv124) #5
  store double %157, ptr %158, align 8, !tbaa !5
  %159 = icmp ult i64 %indvars.iv.next125, %76
  br i1 %159, label %77, label %._crit_edge.loopexit, !llvm.loop !19

._crit_edge.loopexit:                             ; preds = %151
  %.pre130 = load i32, ptr %0, align 8, !tbaa !9
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %70
  %160 = phi i32 [ %71, %70 ], [ %.pre130, %._crit_edge.loopexit ]
  %.199.lcssa = phi double [ %.098116, %70 ], [ %.2, %._crit_edge.loopexit ]
  %indvars.iv.next128 = add nuw nsw i64 %indvars.iv127, 1
  %161 = sext i32 %160 to i64
  %.not105.not = icmp slt i64 %indvars.iv127, %161
  br i1 %.not105.not, label %70, label %._crit_edge120, !llvm.loop !20

._crit_edge120:                                   ; preds = %._crit_edge, %34, %.loopexit
  %.098.lcssa = phi double [ 0.000000e+00, %.loopexit ], [ 0.000000e+00, %34 ], [ %.199.lcssa, %._crit_edge ]
  %162 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 0) #5
  %163 = load double, ptr %162, align 8, !tbaa !5
  %164 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 0) #5
  store double %163, ptr %164, align 8, !tbaa !5
  %165 = icmp eq i32 %3, 1
  br i1 %165, label %166, label %168

166:                                              ; preds = %._crit_edge120
  %167 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 1) #5
  store double %.098.lcssa, ptr %167, align 8, !tbaa !5
  br label %168

168:                                              ; preds = %166, %._crit_edge120
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  br label %169

169:                                              ; preds = %17, %22, %168, %28, %15
  ret void
}

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEEC2EmRKdRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint 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 #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS12BSplineBasis", !11, i64 0, !11, i64 4, !12, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIdSaIdEE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"any pointer", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}


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