; LLVM IR from marcinlos/iga-ads :: src/ads/basis_data.ll (ZN3ads10basis_dataC2ENS_7bspline5basisEiii)

; 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::allocator.7" = type { i8 }
%"struct.ads::bspline::eval_ctx" = type { %"struct.ads::bspline::basis_eval_ctx", %"class.std::vector.5" }
%"struct.ads::bspline::basis_eval_ctx" = type { %"class.std::vector.5", i32, [4 x i8], %"struct.ads::bspline::basis_eval_array", %"struct.ads::bspline::basis_eval_array" }
%"struct.ads::bspline::basis_eval_array" = type <{ ptr, i32, [4 x i8] }>
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.ads::basis_data" = type { %"class.std::vector", %"class.std::vector.0", i32, i32, i32, i32, i32, i32, %"class.std::vector.5", %"struct.ads::bspline::basis", ptr, ptr, ptr, ptr }
%"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<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.ads::bspline::basis" = type { %"class.std::vector.5", i32, %"class.std::vector.5" }

@_ZN3ads4quad5gauss2WsE = external constant [65 x ptr], align 16
@_ZN3ads4quad5gauss2XsE = external constant [65 x ptr], align 16

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #3

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ads10basis_dataC2ENS_7bspline5basisEiii(ptr noundef nonnull align 8 dereferenceable(184) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::allocator.7", align 1
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"struct.ads::bspline::eval_ctx", align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca i32, align 4
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !9
  %31 = load ptr, ptr %6, align 8
  %32 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 0
  call void @_ZN3ads7bspline18first_nonzero_dofsERKNS0_5basisE(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %32, ptr noundef nonnull align 8 dereferenceable(56) %1)
  %33 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 1
  invoke void @_ZN3ads7bspline24elements_supporting_dofsERKNS0_5basisE(ptr dead_on_unwind writable sret(%"class.std::vector.0") align 8 %33, ptr noundef nonnull align 8 dereferenceable(56) %1)
          to label %34 unwind label %106

34:                                               ; preds = %5
  %35 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 2
  %36 = getelementptr inbounds %"struct.ads::bspline::basis", ptr %1, i32 0, i32 1
  %37 = load i32, ptr %36, align 8, !tbaa !11
  store i32 %37, ptr %35, align 8, !tbaa !17
  %38 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 3
  %39 = invoke noundef i32 @_ZNK3ads7bspline5basis8elementsEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
          to label %40 unwind label %110

40:                                               ; preds = %34
  %41 = load i32, ptr %10, align 4, !tbaa !9
  %42 = mul nsw i32 %39, %41
  store i32 %42, ptr %38, align 4, !tbaa !27
  %43 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 4
  %44 = invoke noundef i32 @_ZNK3ads7bspline5basis4dofsEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
          to label %45 unwind label %110

45:                                               ; preds = %40
  store i32 %44, ptr %43, align 8, !tbaa !28
  %46 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 5
  %47 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %47, ptr %46, align 4, !tbaa !29
  %48 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 6
  %49 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %49, ptr %48, align 8, !tbaa !30
  %50 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 7
  %51 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %51, ptr %50, align 4, !tbaa !31
  %52 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 8
  %53 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 3
  %54 = load i32, ptr %53, align 4, !tbaa !27
  %55 = add nsw i32 %54, 1
  %56 = sext i32 %55 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #7
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  invoke void @_ZNSt6vectorIdSaIdEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %56, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %57 unwind label %114

57:                                               ; preds = %45
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #7
  %58 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 9
  call void @_ZN3ads7bspline5basisC2EOS1_(ptr noundef nonnull align 8 dereferenceable(56) %58, ptr noundef nonnull align 8 dereferenceable(56) %1) #7
  %59 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 12
  %60 = load i32, ptr %9, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [65 x ptr], ptr @_ZN3ads4quad5gauss2WsE, i64 0, i64 %61
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  store ptr %63, ptr %59, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %64 = getelementptr inbounds %"struct.ads::bspline::basis", ptr %1, i32 0, i32 1
  %65 = load i32, ptr %64, align 8, !tbaa !11
  store i32 %65, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %66 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %66, ptr %15, align 4, !tbaa !9
  %67 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 3
  %68 = load i32, ptr %67, align 4, !tbaa !27
  %69 = sext i32 %68 to i64
  %70 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %69, i64 8)
  %71 = extractvalue { i64, i1 } %70, 1
  %72 = extractvalue { i64, i1 } %70, 0
  %73 = select i1 %71, i64 -1, i64 %72
  %74 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %73) #8
          to label %75 unwind label %118

75:                                               ; preds = %57
  %76 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 11
  store ptr %74, ptr %76, align 8, !tbaa !33
  %77 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 3
  %78 = load i32, ptr %77, align 4, !tbaa !27
  %79 = sext i32 %78 to i64
  %80 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %79, i64 8)
  %81 = extractvalue { i64, i1 } %80, 1
  %82 = extractvalue { i64, i1 } %80, 0
  %83 = select i1 %81, i64 -1, i64 %82
  %84 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %83) #8
          to label %85 unwind label %118

85:                                               ; preds = %75
  %86 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 13
  store ptr %84, ptr %86, align 8, !tbaa !34
  %87 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 3
  %88 = load i32, ptr %87, align 4, !tbaa !27
  %89 = sext i32 %88 to i64
  %90 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %89, i64 8)
  %91 = extractvalue { i64, i1 } %90, 1
  %92 = extractvalue { i64, i1 } %90, 0
  %93 = select i1 %91, i64 -1, i64 %92
  %94 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %93) #8
          to label %95 unwind label %118

95:                                               ; preds = %85
  %96 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 10
  store ptr %94, ptr %96, align 8, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 88, ptr %16) #7
  %97 = load i32, ptr %14, align 4, !tbaa !9
  invoke void @_ZN3ads7bspline8eval_ctxC2Ei(ptr noundef nonnull align 8 dereferenceable(88) %16, i32 noundef %97)
          to label %98 unwind label %122

98:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %99

99:                                               ; preds = %172, %98
  %100 = load i32, ptr %17, align 4, !tbaa !9
  %101 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 9
  %102 = invoke noundef i32 @_ZNK3ads7bspline5basis8elementsEv(ptr noundef nonnull align 8 dereferenceable(56) %101)
          to label %103 unwind label %126

103:                                              ; preds = %99
  %104 = icmp slt i32 %100, %102
  br i1 %104, label %130, label %105

105:                                              ; preds = %103
  store i32 2, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %176

106:                                              ; preds = %5
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %11, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %12, align 4
  br label %397

110:                                              ; preds = %40, %34
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %11, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %12, align 4
  br label %396

114:                                              ; preds = %45
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %11, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %12, align 4
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #7
  br label %396

118:                                              ; preds = %85, %75, %57
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %11, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %12, align 4
  br label %395

122:                                              ; preds = %95
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %11, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %12, align 4
  br label %394

126:                                              ; preds = %99
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %11, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %12, align 4
  br label %175

130:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %131 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 9
  %132 = getelementptr inbounds %"struct.ads::bspline::basis", ptr %131, i32 0, i32 2
  %133 = load i32, ptr %17, align 4, !tbaa !9
  %134 = sext i32 %133 to i64
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %132, i64 noundef %134) #7
  %136 = load double, ptr %135, align 8, !tbaa !36
  store double %136, ptr %19, align 8, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %137 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 9
  %138 = getelementptr inbounds %"struct.ads::bspline::basis", ptr %137, i32 0, i32 2
  %139 = load i32, ptr %17, align 4, !tbaa !9
  %140 = add nsw i32 %139, 1
  %141 = sext i32 %140 to i64
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %138, i64 noundef %141) #7
  %143 = load double, ptr %142, align 8, !tbaa !36
  store double %143, ptr %20, align 8, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %144

144:                                              ; preds = %164, %130
  %145 = load i32, ptr %21, align 4, !tbaa !9
  %146 = load i32, ptr %10, align 4, !tbaa !9
  %147 = icmp sle i32 %145, %146
  br i1 %147, label %149, label %148

148:                                              ; preds = %144
  store i32 5, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %171

149:                                              ; preds = %144
  %150 = load i32, ptr %21, align 4, !tbaa !9
  %151 = load i32, ptr %10, align 4, !tbaa !9
  %152 = load double, ptr %19, align 8, !tbaa !36
  %153 = load double, ptr %20, align 8, !tbaa !36
  %154 = invoke noundef double @_ZN3ads4lerpIiidEET1_T_T0_S1_S1_(i32 noundef %150, i32 noundef %151, double noundef %152, double noundef %153)
          to label %155 unwind label %167

155:                                              ; preds = %149
  %156 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 8
  %157 = load i32, ptr %17, align 4, !tbaa !9
  %158 = load i32, ptr %10, align 4, !tbaa !9
  %159 = mul nsw i32 %157, %158
  %160 = load i32, ptr %21, align 4, !tbaa !9
  %161 = add nsw i32 %159, %160
  %162 = sext i32 %161 to i64
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %156, i64 noundef %162) #7
  store double %154, ptr %163, align 8, !tbaa !36
  br label %164

164:                                              ; preds = %155
  %165 = load i32, ptr %21, align 4, !tbaa !9
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %21, align 4, !tbaa !9
  br label %144, !llvm.loop !38

167:                                              ; preds = %149
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %11, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %175

171:                                              ; preds = %148
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %172

172:                                              ; preds = %171
  %173 = load i32, ptr %17, align 4, !tbaa !9
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %17, align 4, !tbaa !9
  br label %99, !llvm.loop !40

175:                                              ; preds = %167, %126
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %393

176:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %177

177:                                              ; preds = %387, %176
  %178 = load i32, ptr %22, align 4, !tbaa !9
  %179 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 3
  %180 = load i32, ptr %179, align 4, !tbaa !27
  %181 = icmp slt i32 %178, %180
  br i1 %181, label %183, label %182

182:                                              ; preds = %177
  store i32 8, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %392

183:                                              ; preds = %177
  %184 = load i32, ptr %15, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %185, i64 8)
  %187 = extractvalue { i64, i1 } %186, 1
  %188 = extractvalue { i64, i1 } %186, 0
  %189 = select i1 %187, i64 -1, i64 %188
  %190 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %189) #8
          to label %191 unwind label %222

191:                                              ; preds = %183
  %192 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 11
  %193 = load ptr, ptr %192, align 8, !tbaa !33
  %194 = load i32, ptr %22, align 4, !tbaa !9
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds ptr, ptr %193, i64 %195
  store ptr %190, ptr %196, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %197 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 8
  %198 = load i32, ptr %22, align 4, !tbaa !9
  %199 = sext i32 %198 to i64
  %200 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %197, i64 noundef %199) #7
  %201 = load double, ptr %200, align 8, !tbaa !36
  store double %201, ptr %23, align 8, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %202 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 8
  %203 = load i32, ptr %22, align 4, !tbaa !9
  %204 = add nsw i32 %203, 1
  %205 = sext i32 %204 to i64
  %206 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %202, i64 noundef %205) #7
  %207 = load double, ptr %206, align 8, !tbaa !36
  store double %207, ptr %24, align 8, !tbaa !36
  %208 = load double, ptr %24, align 8, !tbaa !36
  %209 = load double, ptr %23, align 8, !tbaa !36
  %210 = fsub double %208, %209
  %211 = fmul double 5.000000e-01, %210
  %212 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 13
  %213 = load ptr, ptr %212, align 8, !tbaa !34
  %214 = load i32, ptr %22, align 4, !tbaa !9
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds double, ptr %213, i64 %215
  store double %211, ptr %216, align 8, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %217

217:                                              ; preds = %252, %191
  %218 = load i32, ptr %25, align 4, !tbaa !9
  %219 = load i32, ptr %15, align 4, !tbaa !9
  %220 = icmp slt i32 %218, %219
  br i1 %220, label %226, label %221

221:                                              ; preds = %217
  store i32 11, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %259

222:                                              ; preds = %183
  %223 = landingpad { ptr, i32 }
          cleanup
  %224 = extractvalue { ptr, i32 } %223, 0
  store ptr %224, ptr %11, align 8
  %225 = extractvalue { ptr, i32 } %223, 1
  store i32 %225, ptr %12, align 4
  br label %391

226:                                              ; preds = %217
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %227 = load i32, ptr %15, align 4, !tbaa !9
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [65 x ptr], ptr @_ZN3ads4quad5gauss2XsE, i64 0, i64 %228
  %230 = load ptr, ptr %229, align 8, !tbaa !5
  %231 = load i32, ptr %25, align 4, !tbaa !9
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds double, ptr %230, i64 %232
  %234 = load double, ptr %233, align 8, !tbaa !36
  store double %234, ptr %26, align 8, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %235 = load double, ptr %26, align 8, !tbaa !36
  %236 = fadd double %235, 1.000000e+00
  %237 = fmul double 5.000000e-01, %236
  store double %237, ptr %27, align 8, !tbaa !36
  %238 = load double, ptr %27, align 8, !tbaa !36
  %239 = load double, ptr %23, align 8, !tbaa !36
  %240 = load double, ptr %24, align 8, !tbaa !36
  %241 = invoke noundef double @_ZN3ads4lerpIddEET0_T_S1_S1_(double noundef %238, double noundef %239, double noundef %240)
          to label %242 unwind label %255

242:                                              ; preds = %226
  %243 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 11
  %244 = load ptr, ptr %243, align 8, !tbaa !33
  %245 = load i32, ptr %22, align 4, !tbaa !9
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds ptr, ptr %244, i64 %246
  %248 = load ptr, ptr %247, align 8, !tbaa !5
  %249 = load i32, ptr %25, align 4, !tbaa !9
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds double, ptr %248, i64 %250
  store double %241, ptr %251, align 8, !tbaa !36
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %252

252:                                              ; preds = %242
  %253 = load i32, ptr %25, align 4, !tbaa !9
  %254 = add nsw i32 %253, 1
  store i32 %254, ptr %25, align 4, !tbaa !9
  br label %217, !llvm.loop !41

255:                                              ; preds = %226
  %256 = landingpad { ptr, i32 }
          cleanup
  %257 = extractvalue { ptr, i32 } %256, 0
  store ptr %257, ptr %11, align 8
  %258 = extractvalue { ptr, i32 } %256, 1
  store i32 %258, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %390

259:                                              ; preds = %221
  %260 = load i32, ptr %9, align 4, !tbaa !9
  %261 = sext i32 %260 to i64
  %262 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %261, i64 8)
  %263 = extractvalue { i64, i1 } %262, 1
  %264 = extractvalue { i64, i1 } %262, 0
  %265 = select i1 %263, i64 -1, i64 %264
  %266 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %265) #8
          to label %267 unwind label %278

267:                                              ; preds = %259
  %268 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 10
  %269 = load ptr, ptr %268, align 8, !tbaa !35
  %270 = load i32, ptr %22, align 4, !tbaa !9
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds ptr, ptr %269, i64 %271
  store ptr %266, ptr %272, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  store i32 0, ptr %28, align 4, !tbaa !9
  br label %273

273:                                              ; preds = %378, %267
  %274 = load i32, ptr %28, align 4, !tbaa !9
  %275 = load i32, ptr %15, align 4, !tbaa !9
  %276 = icmp slt i32 %274, %275
  br i1 %276, label %282, label %277

277:                                              ; preds = %273
  store i32 14, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %386

278:                                              ; preds = %259
  %279 = landingpad { ptr, i32 }
          cleanup
  %280 = extractvalue { ptr, i32 } %279, 0
  store ptr %280, ptr %11, align 8
  %281 = extractvalue { ptr, i32 } %279, 1
  store i32 %281, ptr %12, align 4
  br label %390

282:                                              ; preds = %273
  %283 = load i32, ptr %8, align 4, !tbaa !9
  %284 = add nsw i32 %283, 1
  %285 = sext i32 %284 to i64
  %286 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %285, i64 8)
  %287 = extractvalue { i64, i1 } %286, 1
  %288 = extractvalue { i64, i1 } %286, 0
  %289 = select i1 %287, i64 -1, i64 %288
  %290 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %289) #8
          to label %291 unwind label %306

291:                                              ; preds = %282
  %292 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 10
  %293 = load ptr, ptr %292, align 8, !tbaa !35
  %294 = load i32, ptr %22, align 4, !tbaa !9
  %295 = sext i32 %294 to i64
  %296 = getelementptr inbounds ptr, ptr %293, i64 %295
  %297 = load ptr, ptr %296, align 8, !tbaa !5
  %298 = load i32, ptr %28, align 4, !tbaa !9
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds ptr, ptr %297, i64 %299
  store ptr %290, ptr %300, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  store i32 0, ptr %29, align 4, !tbaa !9
  br label %301

301:                                              ; preds = %333, %291
  %302 = load i32, ptr %29, align 4, !tbaa !9
  %303 = load i32, ptr %8, align 4, !tbaa !9
  %304 = icmp sle i32 %302, %303
  br i1 %304, label %310, label %305

305:                                              ; preds = %301
  store i32 17, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  br label %340

306:                                              ; preds = %282
  %307 = landingpad { ptr, i32 }
          cleanup
  %308 = extractvalue { ptr, i32 } %307, 0
  store ptr %308, ptr %11, align 8
  %309 = extractvalue { ptr, i32 } %307, 1
  store i32 %309, ptr %12, align 4
  br label %385

310:                                              ; preds = %301
  %311 = load i32, ptr %14, align 4, !tbaa !9
  %312 = add nsw i32 %311, 1
  %313 = sext i32 %312 to i64
  %314 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %313, i64 8)
  %315 = extractvalue { i64, i1 } %314, 1
  %316 = extractvalue { i64, i1 } %314, 0
  %317 = select i1 %315, i64 -1, i64 %316
  %318 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %317) #8
          to label %319 unwind label %336

319:                                              ; preds = %310
  %320 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 10
  %321 = load ptr, ptr %320, align 8, !tbaa !35
  %322 = load i32, ptr %22, align 4, !tbaa !9
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds ptr, ptr %321, i64 %323
  %325 = load ptr, ptr %324, align 8, !tbaa !5
  %326 = load i32, ptr %28, align 4, !tbaa !9
  %327 = sext i32 %326 to i64
  %328 = getelementptr inbounds ptr, ptr %325, i64 %327
  %329 = load ptr, ptr %328, align 8, !tbaa !5
  %330 = load i32, ptr %29, align 4, !tbaa !9
  %331 = sext i32 %330 to i64
  %332 = getelementptr inbounds ptr, ptr %329, i64 %331
  store ptr %318, ptr %332, align 8, !tbaa !5
  br label %333

333:                                              ; preds = %319
  %334 = load i32, ptr %29, align 4, !tbaa !9
  %335 = add nsw i32 %334, 1
  store i32 %335, ptr %29, align 4, !tbaa !9
  br label %301, !llvm.loop !42

336:                                              ; preds = %310
  %337 = landingpad { ptr, i32 }
          cleanup
  %338 = extractvalue { ptr, i32 } %337, 0
  store ptr %338, ptr %11, align 8
  %339 = extractvalue { ptr, i32 } %337, 1
  store i32 %339, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  br label %385

340:                                              ; preds = %305
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  %341 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 11
  %342 = load ptr, ptr %341, align 8, !tbaa !33
  %343 = load i32, ptr %22, align 4, !tbaa !9
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds ptr, ptr %342, i64 %344
  %346 = load ptr, ptr %345, align 8, !tbaa !5
  %347 = load i32, ptr %28, align 4, !tbaa !9
  %348 = sext i32 %347 to i64
  %349 = getelementptr inbounds double, ptr %346, i64 %348
  %350 = load double, ptr %349, align 8, !tbaa !36
  %351 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 9
  %352 = invoke noundef i32 @_ZN3ads7bspline9find_spanEdRKNS0_5basisE(double noundef %350, ptr noundef nonnull align 8 dereferenceable(56) %351)
          to label %353 unwind label %381

353:                                              ; preds = %340
  store i32 %352, ptr %30, align 4, !tbaa !9
  %354 = load i32, ptr %30, align 4, !tbaa !9
  %355 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 11
  %356 = load ptr, ptr %355, align 8, !tbaa !33
  %357 = load i32, ptr %22, align 4, !tbaa !9
  %358 = sext i32 %357 to i64
  %359 = getelementptr inbounds ptr, ptr %356, i64 %358
  %360 = load ptr, ptr %359, align 8, !tbaa !5
  %361 = load i32, ptr %28, align 4, !tbaa !9
  %362 = sext i32 %361 to i64
  %363 = getelementptr inbounds double, ptr %360, i64 %362
  %364 = load double, ptr %363, align 8, !tbaa !36
  %365 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 9
  %366 = getelementptr inbounds %"struct.ads::basis_data", ptr %31, i32 0, i32 10
  %367 = load ptr, ptr %366, align 8, !tbaa !35
  %368 = load i32, ptr %22, align 4, !tbaa !9
  %369 = sext i32 %368 to i64
  %370 = getelementptr inbounds ptr, ptr %367, i64 %369
  %371 = load ptr, ptr %370, align 8, !tbaa !5
  %372 = load i32, ptr %28, align 4, !tbaa !9
  %373 = sext i32 %372 to i64
  %374 = getelementptr inbounds ptr, ptr %371, i64 %373
  %375 = load ptr, ptr %374, align 8, !tbaa !5
  %376 = load i32, ptr %8, align 4, !tbaa !9
  invoke void @_ZN3ads7bspline27eval_basis_with_derivativesEidRKNS0_5basisEPPdiRNS0_14basis_eval_ctxE(i32 noundef %354, double noundef %364, ptr noundef nonnull align 8 dereferenceable(56) %365, ptr noundef %375, i32 noundef %376, ptr noundef nonnull align 8 dereferenceable(64) %16)
          to label %377 unwind label %381

377:                                              ; preds = %353
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  br label %378

378:                                              ; preds = %377
  %379 = load i32, ptr %28, align 4, !tbaa !9
  %380 = add nsw i32 %379, 1
  store i32 %380, ptr %28, align 4, !tbaa !9
  br label %273, !llvm.loop !43

381:                                              ; preds = %353, %340
  %382 = landingpad { ptr, i32 }
          cleanup
  %383 = extractvalue { ptr, i32 } %382, 0
  store ptr %383, ptr %11, align 8
  %384 = extractvalue { ptr, i32 } %382, 1
  store i32 %384, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  br label %385

385:                                              ; preds = %381, %336, %306
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %390

386:                                              ; preds = %277
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %387

387:                                              ; preds = %386
  %388 = load i32, ptr %22, align 4, !tbaa !9
  %389 = add nsw i32 %388, 1
  store i32 %389, ptr %22, align 4, !tbaa !9
  br label %177, !llvm.loop !44

390:                                              ; preds = %385, %278, %255
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %391

391:                                              ; preds = %390, %222
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %393

392:                                              ; preds = %182
  call void @_ZN3ads7bspline8eval_ctxD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %16) #7
  call void @llvm.lifetime.end.p0(i64 88, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  ret void

393:                                              ; preds = %391, %175
  call void @_ZN3ads7bspline8eval_ctxD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %16) #7
  br label %394

394:                                              ; preds = %393, %122
  call void @llvm.lifetime.end.p0(i64 88, ptr %16) #7
  br label %395

395:                                              ; preds = %394, %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @_ZN3ads7bspline5basisD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %58) #7
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %52) #7
  br label %396

396:                                              ; preds = %395, %114, %110
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #7
  br label %397

397:                                              ; preds = %396, %106
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %32) #7
  br label %398

398:                                              ; preds = %397
  %399 = load ptr, ptr %11, align 8
  %400 = load i32, ptr %12, align 4
  %401 = insertvalue { ptr, i32 } poison, ptr %399, 0
  %402 = insertvalue { ptr, i32 } %401, i32 %400, 1
  resume { ptr, i32 } %402
}

declare void @_ZN3ads7bspline18first_nonzero_dofsERKNS0_5basisE(ptr dead_on_unwind writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(56)) #6

declare void @_ZN3ads7bspline24elements_supporting_dofsERKNS0_5basisE(ptr dead_on_unwind writable sret(%"class.std::vector.0") align 8, ptr noundef nonnull align 8 dereferenceable(56)) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ads7bspline5basis8elementsEv(ptr noundef nonnull align 8 dereferenceable(56)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3ads7bspline5basis4dofsEv(ptr noundef nonnull align 8 dereferenceable(56)) #5 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3ads7bspline5basisC2EOS1_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3ads7bspline8eval_ctxC2Ei(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef) unnamed_addr #5 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) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN3ads4lerpIiidEET1_T_T0_S1_S1_(i32 noundef, i32 noundef, double noundef, double noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN3ads4lerpIddEET0_T_S1_S1_(double noundef, double noundef, double noundef) #2

declare noundef i32 @_ZN3ads7bspline9find_spanEdRKNS0_5basisE(double noundef, ptr noundef nonnull align 8 dereferenceable(56)) #6

declare void @_ZN3ads7bspline27eval_basis_with_derivativesEidRKNS0_5basisEPPdiRNS0_14basis_eval_ctxE(i32 noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(64)) #6

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

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

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

!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, !10, i64 24}
!12 = !{!"_ZTSN3ads7bspline5basisE", !13, i64 0, !10, i64 24, !13, i64 32}
!13 = !{!"_ZTSSt6vectorIdSaIdEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!18, !10, i64 48}
!18 = !{!"_ZTSN3ads10basis_dataE", !19, i64 0, !23, i64 24, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !13, i64 72, !12, i64 96, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176}
!19 = !{!"_ZTSSt6vectorIiSaIiEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSSt6vectorISt4pairIiiESaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseISt4pairIiiESaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseISt4pairIiiESaIS1_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseISt4pairIiiESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!18, !10, i64 52}
!28 = !{!18, !10, i64 56}
!29 = !{!18, !10, i64 60}
!30 = !{!18, !10, i64 64}
!31 = !{!18, !10, i64 68}
!32 = !{!18, !6, i64 168}
!33 = !{!18, !6, i64 160}
!34 = !{!18, !6, i64 176}
!35 = !{!18, !6, i64 152}
!36 = !{!37, !37, i64 0}
!37 = !{!"double", !7, i64 0}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = distinct !{!40, !39}
!41 = distinct !{!41, !39}
!42 = distinct !{!42, !39}
!43 = distinct !{!43, !39}
!44 = distinct !{!44, !39}


; 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::allocator.7" = type { i8 }
%"struct.ads::bspline::eval_ctx" = type { %"struct.ads::bspline::basis_eval_ctx", %"class.std::vector.5" }
%"struct.ads::bspline::basis_eval_ctx" = type { %"class.std::vector.5", i32, [4 x i8], %"struct.ads::bspline::basis_eval_array", %"struct.ads::bspline::basis_eval_array" }
%"struct.ads::bspline::basis_eval_array" = type <{ ptr, i32, [4 x i8] }>
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = 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::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<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZN3ads4quad5gauss2WsE = external local_unnamed_addr constant [65 x ptr], align 16
@_ZN3ads4quad5gauss2XsE = external local_unnamed_addr constant [65 x ptr], align 16

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ads10basis_dataC2ENS_7bspline5basisEiii(ptr noundef nonnull align 8 dereferenceable(184) %0, ptr noundef nonnull %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::allocator.7", align 1
  %7 = alloca %"struct.ads::bspline::eval_ctx", align 8
  tail call void @_ZN3ads7bspline18first_nonzero_dofsERKNS0_5basisE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(56) %1)
  %8 = getelementptr inbounds i8, ptr %0, i64 24
  invoke void @_ZN3ads7bspline24elements_supporting_dofsERKNS0_5basisE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.0") align 8 %8, ptr noundef nonnull align 8 dereferenceable(56) %1)
          to label %9 unwind label %143

9:                                                ; preds = %5
  %10 = getelementptr inbounds i8, ptr %0, i64 48
  %11 = getelementptr inbounds i8, ptr %1, i64 24
  %12 = load i32, ptr %11, align 8, !tbaa !5
  store i32 %12, ptr %10, align 8, !tbaa !15
  %13 = getelementptr inbounds i8, ptr %0, i64 52
  %14 = tail call noundef i32 @_ZNK3ads7bspline5basis8elementsEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %15 = mul nsw i32 %14, %4
  store i32 %15, ptr %13, align 4, !tbaa !25
  %16 = invoke noundef i32 @_ZNK3ads7bspline5basis4dofsEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
          to label %17 unwind label %145

17:                                               ; preds = %9
  %18 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 %16, ptr %18, align 8, !tbaa !26
  %19 = getelementptr inbounds i8, ptr %0, i64 60
  store i32 %2, ptr %19, align 4, !tbaa !27
  %20 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 %3, ptr %20, align 8, !tbaa !28
  %21 = getelementptr inbounds i8, ptr %0, i64 68
  store i32 %4, ptr %21, align 4, !tbaa !29
  %22 = getelementptr inbounds i8, ptr %0, i64 72
  %23 = load i32, ptr %13, align 4, !tbaa !25
  %24 = add nsw i32 %23, 1
  %25 = sext i32 %24 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt6vectorIdSaIdEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %25, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %26 unwind label %147

26:                                               ; preds = %17
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  %27 = getelementptr inbounds i8, ptr %0, i64 96
  call void @_ZN3ads7bspline5basisC2EOS1_(ptr noundef nonnull align 8 dereferenceable(56) %27, ptr noundef nonnull align 8 dereferenceable(56) %1) #6
  %28 = getelementptr inbounds i8, ptr %0, i64 168
  %29 = sext i32 %3 to i64
  %30 = getelementptr inbounds [65 x ptr], ptr @_ZN3ads4quad5gauss2WsE, i64 0, i64 %29
  %31 = load ptr, ptr %30, align 8, !tbaa !30
  store ptr %31, ptr %28, align 8, !tbaa !31
  %32 = load i32, ptr %11, align 8, !tbaa !5
  %33 = load i32, ptr %13, align 4, !tbaa !25
  %34 = sext i32 %33 to i64
  %35 = icmp slt i32 %33, 0
  %36 = shl nsw i64 %34, 3
  %37 = select i1 %35, i64 -1, i64 %36
  %38 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %37) #7
          to label %39 unwind label %149

39:                                               ; preds = %26
  %40 = getelementptr inbounds i8, ptr %0, i64 160
  store ptr %38, ptr %40, align 8, !tbaa !32
  %41 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %37) #7
          to label %42 unwind label %149

42:                                               ; preds = %39
  %43 = getelementptr inbounds i8, ptr %0, i64 176
  store ptr %41, ptr %43, align 8, !tbaa !33
  %44 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %37) #7
          to label %45 unwind label %149

45:                                               ; preds = %42
  %46 = getelementptr inbounds i8, ptr %0, i64 152
  store ptr %44, ptr %46, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %7) #6
  invoke void @_ZN3ads7bspline8eval_ctxC2Ei(ptr noundef nonnull align 8 dereferenceable(88) %7, i32 noundef %32)
          to label %.preheader94 unwind label %151

.preheader94:                                     ; preds = %45
  %47 = call noundef i32 @_ZNK3ads7bspline5basis8elementsEv(ptr noundef nonnull align 8 dereferenceable(56) %27)
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %.lr.ph98, label %.preheader

.lr.ph98:                                         ; preds = %.preheader94
  %49 = getelementptr inbounds i8, ptr %0, i64 128
  %.not8695 = icmp slt i32 %4, 0
  br i1 %.not8695, label %.loopexit93.us, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.lr.ph98
  %50 = add nuw i32 %4, 1
  %51 = zext nneg i32 %4 to i64
  %wide.trip.count = zext i32 %50 to i64
  br label %.lr.ph

.loopexit93.us:                                   ; preds = %.lr.ph98, %.loopexit93.us
  %indvars.iv130 = phi i64 [ %indvars.iv.next131, %.loopexit93.us ], [ 0, %.lr.ph98 ]
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %indvars.iv130) #6
  %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %indvars.iv.next131) #6
  %54 = call noundef i32 @_ZNK3ads7bspline5basis8elementsEv(ptr noundef nonnull align 8 dereferenceable(56) %27)
  %55 = sext i32 %54 to i64
  %56 = icmp slt i64 %indvars.iv.next131, %55
  br i1 %56, label %.loopexit93.us, label %.preheader, !llvm.loop !35

..loopexit93_crit_edge:                           ; preds = %161
  %57 = call noundef i32 @_ZNK3ads7bspline5basis8elementsEv(ptr noundef nonnull align 8 dereferenceable(56) %27)
  %58 = sext i32 %57 to i64
  %59 = icmp slt i64 %indvars.iv.next128, %58
  br i1 %59, label %.lr.ph, label %.preheader, !llvm.loop !35

.preheader:                                       ; preds = %..loopexit93_crit_edge, %.loopexit93.us, %.preheader94
  %60 = load i32, ptr %13, align 4, !tbaa !25
  %61 = icmp sgt i32 %60, 0
  br i1 %61, label %.lr.ph110, label %._crit_edge111

.lr.ph110:                                        ; preds = %.preheader
  %62 = icmp slt i32 %3, 0
  %63 = shl nsw i64 %29, 3
  %64 = select i1 %62, i64 -1, i64 %63
  %65 = icmp sgt i32 %3, 0
  %66 = getelementptr inbounds [65 x ptr], ptr @_ZN3ads4quad5gauss2XsE, i64 0, i64 %29
  %67 = add i32 %2, 1
  %68 = zext i32 %67 to i64
  %69 = icmp slt i32 %2, -1
  %70 = shl nuw nsw i64 %68, 3
  %71 = select i1 %69, i64 -1, i64 %70
  %.not101 = icmp slt i32 %2, 0
  %72 = add nsw i32 %32, 1
  %73 = sext i32 %72 to i64
  %74 = icmp slt i32 %32, -1
  %75 = shl nsw i64 %73, 3
  %76 = select i1 %74, i64 -1, i64 %75
  br i1 %65, label %.lr.ph110.split.us.preheader, label %.lr.ph110.split

.lr.ph110.split.us.preheader:                     ; preds = %.lr.ph110
  %wide.trip.count144 = zext nneg i32 %3 to i64
  %wide.trip.count154 = zext nneg i32 %3 to i64
  br label %.lr.ph110.split.us

.lr.ph110.split.us:                               ; preds = %.lr.ph110.split.us.preheader, %..loopexit_crit_edge.us
  %indvars.iv156 = phi i64 [ 0, %.lr.ph110.split.us.preheader ], [ %indvars.iv.next157, %..loopexit_crit_edge.us ]
  %77 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %64) #7
          to label %.lr.ph100.us unwind label %.split.us

._crit_edge.us:                                   ; preds = %114
  %78 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %64) #7
          to label %.lr.ph108.us unwind label %.split113.us

.lr.ph108.us:                                     ; preds = %._crit_edge.us
  %79 = load ptr, ptr %46, align 8, !tbaa !34
  %80 = getelementptr inbounds ptr, ptr %79, i64 %indvars.iv156
  store ptr %78, ptr %80, align 8, !tbaa !30
  br label %81

81:                                               ; preds = %.lr.ph108.us, %113
  %indvars.iv151 = phi i64 [ 0, %.lr.ph108.us ], [ %indvars.iv.next152, %113 ]
  %82 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %71) #7
          to label %83 unwind label %.split116.us

83:                                               ; preds = %81
  %84 = load ptr, ptr %46, align 8, !tbaa !34
  %85 = getelementptr inbounds ptr, ptr %84, i64 %indvars.iv156
  %86 = load ptr, ptr %85, align 8, !tbaa !30
  %87 = getelementptr inbounds ptr, ptr %86, i64 %indvars.iv151
  store ptr %82, ptr %87, align 8, !tbaa !30
  br i1 %.not101, label %._crit_edge105.us, label %.lr.ph104.us

.lr.ph104.us:                                     ; preds = %83, %89
  %indvars.iv146 = phi i64 [ %indvars.iv.next147, %89 ], [ 0, %83 ]
  %88 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %76) #7
          to label %89 unwind label %.split119.us

89:                                               ; preds = %.lr.ph104.us
  %90 = load ptr, ptr %46, align 8, !tbaa !34
  %91 = getelementptr inbounds ptr, ptr %90, i64 %indvars.iv156
  %92 = load ptr, ptr %91, align 8, !tbaa !30
  %93 = getelementptr inbounds ptr, ptr %92, i64 %indvars.iv151
  %94 = load ptr, ptr %93, align 8, !tbaa !30
  %95 = getelementptr inbounds ptr, ptr %94, i64 %indvars.iv146
  store ptr %88, ptr %95, align 8, !tbaa !30
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %exitcond150.not = icmp eq i64 %indvars.iv.next147, %68
  br i1 %exitcond150.not, label %._crit_edge105.us, label %.lr.ph104.us, !llvm.loop !37

._crit_edge105.us:                                ; preds = %89, %83
  %96 = load ptr, ptr %40, align 8, !tbaa !32
  %97 = getelementptr inbounds ptr, ptr %96, i64 %indvars.iv156
  %98 = load ptr, ptr %97, align 8, !tbaa !30
  %99 = getelementptr inbounds double, ptr %98, i64 %indvars.iv151
  %100 = load double, ptr %99, align 8, !tbaa !38
  %101 = invoke noundef i32 @_ZN3ads7bspline9find_spanEdRKNS0_5basisE(double noundef %100, ptr noundef nonnull align 8 dereferenceable(56) %27)
          to label %102 unwind label %.split122.us

102:                                              ; preds = %._crit_edge105.us
  %103 = load ptr, ptr %40, align 8, !tbaa !32
  %104 = getelementptr inbounds ptr, ptr %103, i64 %indvars.iv156
  %105 = load ptr, ptr %104, align 8, !tbaa !30
  %106 = getelementptr inbounds double, ptr %105, i64 %indvars.iv151
  %107 = load double, ptr %106, align 8, !tbaa !38
  %108 = load ptr, ptr %46, align 8, !tbaa !34
  %109 = getelementptr inbounds ptr, ptr %108, i64 %indvars.iv156
  %110 = load ptr, ptr %109, align 8, !tbaa !30
  %111 = getelementptr inbounds ptr, ptr %110, i64 %indvars.iv151
  %112 = load ptr, ptr %111, align 8, !tbaa !30
  invoke void @_ZN3ads7bspline27eval_basis_with_derivativesEidRKNS0_5basisEPPdiRNS0_14basis_eval_ctxE(i32 noundef %101, double noundef %107, ptr noundef nonnull align 8 dereferenceable(56) %27, ptr noundef %112, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(64) %7)
          to label %113 unwind label %.split122.us

113:                                              ; preds = %102
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %exitcond155.not = icmp eq i64 %indvars.iv.next152, %wide.trip.count154
  br i1 %exitcond155.not, label %..loopexit_crit_edge.us, label %81, !llvm.loop !40

114:                                              ; preds = %.lr.ph100.us, %114
  %indvars.iv141 = phi i64 [ 0, %.lr.ph100.us ], [ %indvars.iv.next142, %114 ]
  %115 = getelementptr inbounds double, ptr %134, i64 %indvars.iv141
  %116 = load double, ptr %115, align 8, !tbaa !38
  %117 = fadd double %116, 1.000000e+00
  %118 = fmul double %117, 5.000000e-01
  %119 = call noundef double @_ZN3ads4lerpIddEET0_T_S1_S1_(double noundef %118, double noundef %127, double noundef %129)
  %120 = load ptr, ptr %40, align 8, !tbaa !32
  %121 = getelementptr inbounds ptr, ptr %120, i64 %indvars.iv156
  %122 = load ptr, ptr %121, align 8, !tbaa !30
  %123 = getelementptr inbounds double, ptr %122, i64 %indvars.iv141
  store double %119, ptr %123, align 8, !tbaa !38
  %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1
  %exitcond145.not = icmp eq i64 %indvars.iv.next142, %wide.trip.count144
  br i1 %exitcond145.not, label %._crit_edge.us, label %114, !llvm.loop !41

.lr.ph100.us:                                     ; preds = %.lr.ph110.split.us
  %124 = load ptr, ptr %40, align 8, !tbaa !32
  %125 = getelementptr inbounds ptr, ptr %124, i64 %indvars.iv156
  store ptr %77, ptr %125, align 8, !tbaa !30
  %126 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %indvars.iv156) #6
  %127 = load double, ptr %126, align 8, !tbaa !38
  %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %indvars.iv.next157) #6
  %129 = load double, ptr %128, align 8, !tbaa !38
  %130 = fsub double %129, %127
  %131 = fmul double %130, 5.000000e-01
  %132 = load ptr, ptr %43, align 8, !tbaa !33
  %133 = getelementptr inbounds double, ptr %132, i64 %indvars.iv156
  store double %131, ptr %133, align 8, !tbaa !38
  %134 = load ptr, ptr %66, align 8, !tbaa !30
  br label %114

..loopexit_crit_edge.us:                          ; preds = %113
  %135 = load i32, ptr %13, align 4, !tbaa !25
  %136 = sext i32 %135 to i64
  %137 = icmp slt i64 %indvars.iv.next157, %136
  br i1 %137, label %.lr.ph110.split.us, label %._crit_edge111, !llvm.loop !42

.split.us:                                        ; preds = %.lr.ph110.split.us
  %138 = landingpad { ptr, i32 }
          cleanup
  br label %185

.split113.us:                                     ; preds = %._crit_edge.us
  %139 = landingpad { ptr, i32 }
          cleanup
  br label %185

.split116.us:                                     ; preds = %81
  %140 = landingpad { ptr, i32 }
          cleanup
  br label %185

.split119.us:                                     ; preds = %.lr.ph104.us
  %141 = landingpad { ptr, i32 }
          cleanup
  br label %185

.split122.us:                                     ; preds = %102, %._crit_edge105.us
  %142 = landingpad { ptr, i32 }
          cleanup
  br label %185

143:                                              ; preds = %5
  %144 = landingpad { ptr, i32 }
          cleanup
  br label %189

145:                                              ; preds = %9
  %146 = landingpad { ptr, i32 }
          cleanup
  br label %188

147:                                              ; preds = %17
  %148 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  br label %188

149:                                              ; preds = %42, %39, %26
  %150 = landingpad { ptr, i32 }
          cleanup
  br label %187

151:                                              ; preds = %45
  %152 = landingpad { ptr, i32 }
          cleanup
  br label %186

.lr.ph:                                           ; preds = %.lr.ph.preheader, %..loopexit93_crit_edge
  %indvars.iv127 = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next128, %..loopexit93_crit_edge ]
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %indvars.iv127) #6
  %154 = load double, ptr %153, align 8, !tbaa !38
  %indvars.iv.next128 = add nuw nsw i64 %indvars.iv127, 1
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %indvars.iv.next128) #6
  %156 = load double, ptr %155, align 8, !tbaa !38
  %157 = mul nuw nsw i64 %indvars.iv127, %51
  br label %158

158:                                              ; preds = %.lr.ph, %161
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %161 ]
  %159 = trunc nuw nsw i64 %indvars.iv to i32
  %160 = invoke noundef double @_ZN3ads4lerpIiidEET1_T_T0_S1_S1_(i32 noundef %159, i32 noundef %4, double noundef %154, double noundef %156)
          to label %161 unwind label %164

161:                                              ; preds = %158
  %162 = add nuw nsw i64 %indvars.iv, %157
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %162) #6
  store double %160, ptr %163, align 8, !tbaa !38
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %..loopexit93_crit_edge, label %158, !llvm.loop !43

164:                                              ; preds = %158
  %165 = landingpad { ptr, i32 }
          cleanup
  br label %185

._crit_edge111:                                   ; preds = %.loopexit, %..loopexit_crit_edge.us, %.preheader
  call void @_ZN3ads7bspline8eval_ctxD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %7) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %7) #6
  ret void

.lr.ph110.split:                                  ; preds = %.lr.ph110, %.loopexit
  %indvars.iv138 = phi i64 [ %indvars.iv.next139, %.loopexit ], [ 0, %.lr.ph110 ]
  %166 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %64) #7
          to label %._crit_edge unwind label %.split

._crit_edge:                                      ; preds = %.lr.ph110.split
  %167 = load ptr, ptr %40, align 8, !tbaa !32
  %168 = getelementptr inbounds ptr, ptr %167, i64 %indvars.iv138
  store ptr %166, ptr %168, align 8, !tbaa !30
  %169 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %indvars.iv138) #6
  %170 = load double, ptr %169, align 8, !tbaa !38
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %171 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %indvars.iv.next139) #6
  %172 = load double, ptr %171, align 8, !tbaa !38
  %173 = fsub double %172, %170
  %174 = fmul double %173, 5.000000e-01
  %175 = load ptr, ptr %43, align 8, !tbaa !33
  %176 = getelementptr inbounds double, ptr %175, i64 %indvars.iv138
  store double %174, ptr %176, align 8, !tbaa !38
  %177 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %64) #7
          to label %.loopexit unwind label %.split113

.split:                                           ; preds = %.lr.ph110.split
  %178 = landingpad { ptr, i32 }
          cleanup
  br label %185

.loopexit:                                        ; preds = %._crit_edge
  %179 = load ptr, ptr %46, align 8, !tbaa !34
  %180 = getelementptr inbounds ptr, ptr %179, i64 %indvars.iv138
  store ptr %177, ptr %180, align 8, !tbaa !30
  %181 = load i32, ptr %13, align 4, !tbaa !25
  %182 = sext i32 %181 to i64
  %183 = icmp slt i64 %indvars.iv.next139, %182
  br i1 %183, label %.lr.ph110.split, label %._crit_edge111, !llvm.loop !42

.split113:                                        ; preds = %._crit_edge
  %184 = landingpad { ptr, i32 }
          cleanup
  br label %185

185:                                              ; preds = %.split113, %.split113.us, %.split, %.split.us, %.split116.us, %.split119.us, %.split122.us, %164
  %.pn87 = phi { ptr, i32 } [ %165, %164 ], [ %141, %.split119.us ], [ %142, %.split122.us ], [ %140, %.split116.us ], [ %178, %.split ], [ %138, %.split.us ], [ %184, %.split113 ], [ %139, %.split113.us ]
  call void @_ZN3ads7bspline8eval_ctxD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %7) #6
  br label %186

186:                                              ; preds = %185, %151
  %.pn87.pn = phi { ptr, i32 } [ %.pn87, %185 ], [ %152, %151 ]
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %7) #6
  br label %187

187:                                              ; preds = %186, %149
  %.pn87.pn.pn = phi { ptr, i32 } [ %.pn87.pn, %186 ], [ %150, %149 ]
  call void @_ZN3ads7bspline5basisD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %27) #6
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  br label %188

188:                                              ; preds = %187, %147, %145
  %.pn87.pn.pn.pn = phi { ptr, i32 } [ %.pn87.pn.pn, %187 ], [ %148, %147 ], [ %146, %145 ]
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  br label %189

189:                                              ; preds = %188, %143
  %.pn87.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn87.pn.pn.pn, %188 ], [ %144, %143 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  resume { ptr, i32 } %.pn87.pn.pn.pn.pn
}

declare void @_ZN3ads7bspline18first_nonzero_dofsERKNS0_5basisE(ptr dead_on_unwind writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #5

declare void @_ZN3ads7bspline24elements_supporting_dofsERKNS0_5basisE(ptr dead_on_unwind writable sret(%"class.std::vector.0") align 8, ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ads7bspline5basis8elementsEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3ads7bspline5basis4dofsEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3ads7bspline5basisC2EOS1_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3ads7bspline8eval_ctxC2Ei(ptr noundef nonnull align 8 dereferenceable(88), i32 noundef) unnamed_addr #4 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 #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN3ads4lerpIiidEET1_T_T0_S1_S1_(i32 noundef, i32 noundef, double noundef, double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN3ads4lerpIddEET0_T_S1_S1_(double noundef, double noundef, double noundef) local_unnamed_addr #2

declare noundef i32 @_ZN3ads7bspline9find_spanEdRKNS0_5basisE(double noundef, ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #5

declare void @_ZN3ads7bspline27eval_basis_with_derivativesEidRKNS0_5basisEPPdiRNS0_14basis_eval_ctxE(i32 noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(56), ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #5

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

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

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

!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, !14, i64 24}
!6 = !{!"_ZTSN3ads7bspline5basisE", !7, i64 0, !14, i64 24, !7, i64 32}
!7 = !{!"_ZTSSt6vectorIdSaIdEE", !8, i64 0}
!8 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !9, i64 0}
!9 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"int", !12, i64 0}
!15 = !{!16, !14, i64 48}
!16 = !{!"_ZTSN3ads10basis_dataE", !17, i64 0, !21, i64 24, !14, i64 48, !14, i64 52, !14, i64 56, !14, i64 60, !14, i64 64, !14, i64 68, !7, i64 72, !6, i64 96, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176}
!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", !11, i64 0, !11, i64 8, !11, i64 16}
!21 = !{!"_ZTSSt6vectorISt4pairIiiESaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseISt4pairIiiESaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseISt4pairIiiESaIS1_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseISt4pairIiiESaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!25 = !{!16, !14, i64 52}
!26 = !{!16, !14, i64 56}
!27 = !{!16, !14, i64 60}
!28 = !{!16, !14, i64 64}
!29 = !{!16, !14, i64 68}
!30 = !{!11, !11, i64 0}
!31 = !{!16, !11, i64 168}
!32 = !{!16, !11, i64 160}
!33 = !{!16, !11, i64 176}
!34 = !{!16, !11, i64 152}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = distinct !{!37, !36}
!38 = !{!39, !39, i64 0}
!39 = !{!"double", !12, i64 0}
!40 = distinct !{!40, !36}
!41 = distinct !{!41, !36}
!42 = distinct !{!42, !36}
!43 = distinct !{!43, !36}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass