; LLVM IR from rvillegasm/NuMath :: src/singleVariableEquations (incrementalSearch)

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

%"struct.numath::Interval" = type { double, double, i8, i8 }
%"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::initializer_list" = type { ptr, i64 }
%"class.std::allocator" = type { i8 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6numath23singleVariableEquations17incrementalSearchEPFddEddiRSt6vectorIS3_IdSaIdEESaIS5_EE(ptr dead_on_unwind noalias writable sret(%"struct.numath::Interval") align 8 %0, ptr noundef %1, double noundef %2, double noundef %3, i32 noundef %4, ptr noundef nonnull align 8 dereferenceable(24) %5) #0 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::vector", align 8
  %18 = alloca %"class.std::initializer_list", align 8
  %19 = alloca [3 x double], align 8
  %20 = alloca %"class.std::allocator", align 1
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca %"class.std::vector", align 8
  %24 = alloca %"class.std::initializer_list", align 8
  %25 = alloca [3 x double], align 8
  %26 = alloca %"class.std::allocator", align 1
  %27 = alloca %"class.std::vector", align 8
  %28 = alloca %"class.std::initializer_list", align 8
  %29 = alloca [3 x double], align 8
  %30 = alloca %"class.std::allocator", align 1
  store ptr %1, ptr %7, align 8, !tbaa !5
  store double %2, ptr %8, align 8, !tbaa !9
  store double %3, ptr %9, align 8, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !11
  store ptr %5, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.memset.p0.i64(ptr align 8 %0, i8 0, i64 24, i1 false)
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = load double, ptr %8, align 8, !tbaa !9
  %33 = call noundef double %31(double noundef %32)
  store double %33, ptr %12, align 8, !tbaa !9
  %34 = load double, ptr %12, align 8, !tbaa !9
  %35 = fcmp oeq double %34, 0.000000e+00
  br i1 %35, label %36, label %43

36:                                               ; preds = %6
  %37 = load double, ptr %8, align 8, !tbaa !9
  %38 = getelementptr inbounds %"struct.numath::Interval", ptr %0, i32 0, i32 0
  store double %37, ptr %38, align 8, !tbaa !13
  %39 = load double, ptr %8, align 8, !tbaa !9
  %40 = getelementptr inbounds %"struct.numath::Interval", ptr %0, i32 0, i32 1
  store double %39, ptr %40, align 8, !tbaa !16
  %41 = getelementptr inbounds %"struct.numath::Interval", ptr %0, i32 0, i32 2
  store i8 1, ptr %41, align 8, !tbaa !17
  %42 = getelementptr inbounds %"struct.numath::Interval", ptr %0, i32 0, i32 3
  store i8 1, ptr %42, align 1, !tbaa !18
  store i32 1, ptr %16, align 4
  br label %174

43:                                               ; preds = %6
  store i32 0, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #4
  %44 = load i32, ptr %15, align 4, !tbaa !11
  %45 = sitofp i32 %44 to double
  store double %45, ptr %19, align 8, !tbaa !9
  %46 = getelementptr inbounds double, ptr %19, i64 1
  %47 = load double, ptr %8, align 8, !tbaa !9
  store double %47, ptr %46, align 8, !tbaa !9
  %48 = getelementptr inbounds double, ptr %19, i64 2
  %49 = load double, ptr %12, align 8, !tbaa !9
  store double %49, ptr %48, align 8, !tbaa !9
  %50 = getelementptr inbounds %"class.std::initializer_list", ptr %18, i32 0, i32 0
  store ptr %19, ptr %50, align 8, !tbaa !19
  %51 = getelementptr inbounds %"class.std::initializer_list", ptr %18, i32 0, i32 1
  store i64 3, ptr %51, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #4
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #4
  %52 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8
  %54 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 1
  %55 = load i64, ptr %54, align 8
  invoke void @_ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr %53, i64 %55, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %56 unwind label %121

56:                                               ; preds = %43
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #4
  %57 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %57, ptr noundef nonnull align 8 dereferenceable(24) %17)
          to label %58 unwind label %125

58:                                               ; preds = %56
  %59 = load double, ptr %8, align 8, !tbaa !9
  %60 = load double, ptr %9, align 8, !tbaa !9
  %61 = fadd double %59, %60
  store double %61, ptr %13, align 8, !tbaa !9
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = load double, ptr %13, align 8, !tbaa !9
  %64 = invoke noundef double %62(double noundef %63)
          to label %65 unwind label %125

65:                                               ; preds = %58
  store double %64, ptr %14, align 8, !tbaa !9
  %66 = load i32, ptr %15, align 4, !tbaa !11
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #4
  %68 = load i32, ptr %15, align 4, !tbaa !11
  %69 = sitofp i32 %68 to double
  store double %69, ptr %25, align 8, !tbaa !9
  %70 = getelementptr inbounds double, ptr %25, i64 1
  %71 = load double, ptr %13, align 8, !tbaa !9
  store double %71, ptr %70, align 8, !tbaa !9
  %72 = getelementptr inbounds double, ptr %25, i64 2
  %73 = load double, ptr %14, align 8, !tbaa !9
  store double %73, ptr %72, align 8, !tbaa !9
  %74 = getelementptr inbounds %"class.std::initializer_list", ptr %24, i32 0, i32 0
  store ptr %25, ptr %74, align 8, !tbaa !19
  %75 = getelementptr inbounds %"class.std::initializer_list", ptr %24, i32 0, i32 1
  store i64 3, ptr %75, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #4
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #4
  %76 = getelementptr inbounds { ptr, i64 }, ptr %24, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8
  %78 = getelementptr inbounds { ptr, i64 }, ptr %24, i32 0, i32 1
  %79 = load i64, ptr %78, align 8
  invoke void @_ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr %77, i64 %79, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %80 unwind label %129

80:                                               ; preds = %65
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #4
  %81 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %81, ptr noundef nonnull align 8 dereferenceable(24) %23)
          to label %82 unwind label %133

82:                                               ; preds = %80
  br label %83

83:                                               ; preds = %120, %82
  %84 = load double, ptr %12, align 8, !tbaa !9
  %85 = load double, ptr %14, align 8, !tbaa !9
  %86 = fmul double %84, %85
  %87 = fcmp ogt double %86, 0.000000e+00
  br i1 %87, label %88, label %92

88:                                               ; preds = %83
  %89 = load i32, ptr %15, align 4, !tbaa !11
  %90 = load i32, ptr %10, align 4, !tbaa !11
  %91 = icmp slt i32 %89, %90
  br label %92

92:                                               ; preds = %88, %83
  %93 = phi i1 [ false, %83 ], [ %91, %88 ]
  br i1 %93, label %94, label %146

94:                                               ; preds = %92
  %95 = load double, ptr %13, align 8, !tbaa !9
  store double %95, ptr %8, align 8, !tbaa !9
  %96 = load double, ptr %14, align 8, !tbaa !9
  store double %96, ptr %12, align 8, !tbaa !9
  %97 = load double, ptr %8, align 8, !tbaa !9
  %98 = load double, ptr %9, align 8, !tbaa !9
  %99 = fadd double %97, %98
  store double %99, ptr %13, align 8, !tbaa !9
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = load double, ptr %13, align 8, !tbaa !9
  %102 = invoke noundef double %100(double noundef %101)
          to label %103 unwind label %133

103:                                              ; preds = %94
  store double %102, ptr %14, align 8, !tbaa !9
  %104 = load i32, ptr %15, align 4, !tbaa !11
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %29) #4
  %106 = load i32, ptr %15, align 4, !tbaa !11
  %107 = sitofp i32 %106 to double
  store double %107, ptr %29, align 8, !tbaa !9
  %108 = getelementptr inbounds double, ptr %29, i64 1
  %109 = load double, ptr %13, align 8, !tbaa !9
  store double %109, ptr %108, align 8, !tbaa !9
  %110 = getelementptr inbounds double, ptr %29, i64 2
  %111 = load double, ptr %14, align 8, !tbaa !9
  store double %111, ptr %110, align 8, !tbaa !9
  %112 = getelementptr inbounds %"class.std::initializer_list", ptr %28, i32 0, i32 0
  store ptr %29, ptr %112, align 8, !tbaa !19
  %113 = getelementptr inbounds %"class.std::initializer_list", ptr %28, i32 0, i32 1
  store i64 3, ptr %113, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #4
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #4
  %114 = getelementptr inbounds { ptr, i64 }, ptr %28, i32 0, i32 0
  %115 = load ptr, ptr %114, align 8
  %116 = getelementptr inbounds { ptr, i64 }, ptr %28, i32 0, i32 1
  %117 = load i64, ptr %116, align 8
  invoke void @_ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr %115, i64 %117, ptr noundef nonnull align 1 dereferenceable(1) %30)
          to label %118 unwind label %137

118:                                              ; preds = %103
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #4
  %119 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %119, ptr noundef nonnull align 8 dereferenceable(24) %27)
          to label %120 unwind label %141

120:                                              ; preds = %118
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #4
  br label %83, !llvm.loop !23

121:                                              ; preds = %43
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %21, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %22, align 4
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #4
  br label %173

125:                                              ; preds = %58, %56
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %21, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %22, align 4
  br label %172

129:                                              ; preds = %65
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %21, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %22, align 4
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #4
  br label %171

133:                                              ; preds = %94, %80
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %21, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %22, align 4
  br label %170

137:                                              ; preds = %103
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %21, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %22, align 4
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #4
  br label %145

141:                                              ; preds = %118
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %21, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %22, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #4
  br label %145

145:                                              ; preds = %141, %137
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #4
  br label %170

146:                                              ; preds = %92
  %147 = load double, ptr %14, align 8, !tbaa !9
  %148 = fcmp oeq double %147, 0.000000e+00
  br i1 %148, label %149, label %156

149:                                              ; preds = %146
  %150 = load double, ptr %13, align 8, !tbaa !9
  %151 = getelementptr inbounds %"struct.numath::Interval", ptr %0, i32 0, i32 0
  store double %150, ptr %151, align 8, !tbaa !13
  %152 = load double, ptr %13, align 8, !tbaa !9
  %153 = getelementptr inbounds %"struct.numath::Interval", ptr %0, i32 0, i32 1
  store double %152, ptr %153, align 8, !tbaa !16
  %154 = getelementptr inbounds %"struct.numath::Interval", ptr %0, i32 0, i32 2
  store i8 1, ptr %154, align 8, !tbaa !17
  %155 = getelementptr inbounds %"struct.numath::Interval", ptr %0, i32 0, i32 3
  store i8 1, ptr %155, align 1, !tbaa !18
  store i32 1, ptr %16, align 4
  br label %169

156:                                              ; preds = %146
  %157 = load double, ptr %12, align 8, !tbaa !9
  %158 = load double, ptr %14, align 8, !tbaa !9
  %159 = fmul double %157, %158
  %160 = fcmp olt double %159, 0.000000e+00
  br i1 %160, label %161, label %167

161:                                              ; preds = %156
  %162 = load double, ptr %8, align 8, !tbaa !9
  %163 = getelementptr inbounds %"struct.numath::Interval", ptr %0, i32 0, i32 0
  store double %162, ptr %163, align 8, !tbaa !13
  %164 = load double, ptr %13, align 8, !tbaa !9
  %165 = getelementptr inbounds %"struct.numath::Interval", ptr %0, i32 0, i32 1
  store double %164, ptr %165, align 8, !tbaa !16
  %166 = getelementptr inbounds %"struct.numath::Interval", ptr %0, i32 0, i32 2
  store i8 1, ptr %166, align 8, !tbaa !17
  store i32 1, ptr %16, align 4
  br label %169

167:                                              ; preds = %156
  br label %168

168:                                              ; preds = %167
  store i32 1, ptr %16, align 4
  br label %169

169:                                              ; preds = %168, %161, %149
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #4
  br label %174

170:                                              ; preds = %145, %133
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #4
  br label %171

171:                                              ; preds = %170, %129
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #4
  br label %172

172:                                              ; preds = %171, %125
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  br label %173

173:                                              ; preds = %172, %121
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %175

174:                                              ; preds = %169, %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  ret void

175:                                              ; preds = %173
  %176 = load ptr, ptr %21, align 8
  %177 = load i32, ptr %22, align 4
  %178 = insertvalue { ptr, i32 } poison, ptr %176, 0
  %179 = insertvalue { ptr, i32 } %178, i32 %177, 1
  resume { ptr, i32 } %179
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

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) #1

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

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

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

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

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

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


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

%"struct.numath::Interval" = type { double, double, i8, i8 }
%"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 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6numath23singleVariableEquations17incrementalSearchEPFddEddiRSt6vectorIS3_IdSaIdEESaIS5_EE(ptr dead_on_unwind noalias nocapture writable writeonly sret(%"struct.numath::Interval") align 8 %0, ptr nocapture noundef readonly %1, double noundef %2, double noundef %3, i32 noundef %4, ptr noundef nonnull align 8 dereferenceable(24) %5) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca [3 x double], align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca [3 x double], align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca [3 x double], align 8
  %15 = alloca %"class.std::allocator", align 1
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, i8 0, i64 24, i1 false)
  %16 = tail call noundef double %1(double noundef %2)
  %17 = fcmp oeq double %16, 0.000000e+00
  br i1 %17, label %18, label %22

18:                                               ; preds = %6
  store double %2, ptr %0, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %0, i64 8
  store double %2, ptr %19, align 8, !tbaa !11
  %20 = getelementptr inbounds i8, ptr %0, i64 16
  store i8 1, ptr %20, align 8, !tbaa !12
  %21 = getelementptr inbounds i8, ptr %0, i64 17
  store i8 1, ptr %21, align 1, !tbaa !13
  br label %77

22:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  store double 0.000000e+00, ptr %8, align 8, !tbaa !14
  %23 = getelementptr inbounds i8, ptr %8, i64 8
  store double %2, ptr %23, align 8, !tbaa !14
  %24 = getelementptr inbounds i8, ptr %8, i64 16
  store double %16, ptr %24, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #4
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #4
  invoke void @_ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr nonnull %8, i64 3, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %25 unwind label %51

25:                                               ; preds = %22
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  invoke void @_ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %26 unwind label %53

26:                                               ; preds = %25
  %27 = fadd double %2, %3
  %28 = invoke noundef double %1(double noundef %27)
          to label %29 unwind label %53

29:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #4
  store double 1.000000e+00, ptr %11, align 8, !tbaa !14
  %30 = getelementptr inbounds i8, ptr %11, i64 8
  store double %27, ptr %30, align 8, !tbaa !14
  %31 = getelementptr inbounds i8, ptr %11, i64 16
  store double %28, ptr %31, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #4
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  invoke void @_ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr nonnull %11, i64 3, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %32 unwind label %55

32:                                               ; preds = %29
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  invoke void @_ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %32
  %33 = fmul double %28, %16
  %34 = fcmp ogt double %33, 0.000000e+00
  %35 = icmp sgt i32 %4, 1
  %36 = and i1 %34, %35
  br i1 %36, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %37 = getelementptr inbounds i8, ptr %14, i64 8
  %38 = getelementptr inbounds i8, ptr %14, i64 16
  br label %39

39:                                               ; preds = %.lr.ph, %46
  %.04675 = phi double [ %27, %.lr.ph ], [ %40, %46 ]
  %.04774 = phi double [ %28, %.lr.ph ], [ %41, %46 ]
  %.05473 = phi i32 [ 1, %.lr.ph ], [ %43, %46 ]
  %40 = fadd double %.04675, %3
  %41 = invoke noundef double %1(double noundef %40)
          to label %42 unwind label %.loopexit

42:                                               ; preds = %39
  %43 = add nuw nsw i32 %.05473, 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #4
  %44 = uitofp nneg i32 %43 to double
  store double %44, ptr %14, align 8, !tbaa !14
  store double %40, ptr %37, align 8, !tbaa !14
  store double %41, ptr %38, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #4
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  invoke void @_ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr nonnull %14, i64 3, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %45 unwind label %57

45:                                               ; preds = %42
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #4
  invoke void @_ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %46 unwind label %59

46:                                               ; preds = %45
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #4
  %47 = fmul double %41, %.04774
  %48 = fcmp ogt double %47, 0.000000e+00
  %49 = icmp slt i32 %43, %4
  %50 = select i1 %48, i1 %49, i1 false
  br i1 %50, label %39, label %._crit_edge, !llvm.loop !15

51:                                               ; preds = %22
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  br label %76

53:                                               ; preds = %26, %25
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %75

55:                                               ; preds = %29
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  br label %74

.loopexit:                                        ; preds = %39
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %73

.loopexit.split-lp:                               ; preds = %32
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %73

57:                                               ; preds = %42
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #4
  br label %61

59:                                               ; preds = %45
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  br label %61

61:                                               ; preds = %59, %57
  %.pn = phi { ptr, i32 } [ %60, %59 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #4
  br label %73

._crit_edge:                                      ; preds = %46, %.preheader
  %.047.lcssa = phi double [ %28, %.preheader ], [ %41, %46 ]
  %.046.lcssa = phi double [ %27, %.preheader ], [ %40, %46 ]
  %.0.lcssa = phi double [ %2, %.preheader ], [ %.04675, %46 ]
  %.lcssa = phi double [ %33, %.preheader ], [ %47, %46 ]
  %62 = fcmp oeq double %.047.lcssa, 0.000000e+00
  br i1 %62, label %63, label %67

63:                                               ; preds = %._crit_edge
  store double %.046.lcssa, ptr %0, align 8, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %0, i64 8
  store double %.046.lcssa, ptr %64, align 8, !tbaa !11
  %65 = getelementptr inbounds i8, ptr %0, i64 16
  store i8 1, ptr %65, align 8, !tbaa !12
  %66 = getelementptr inbounds i8, ptr %0, i64 17
  store i8 1, ptr %66, align 1, !tbaa !13
  br label %72

67:                                               ; preds = %._crit_edge
  %68 = fcmp olt double %.lcssa, 0.000000e+00
  br i1 %68, label %69, label %72

69:                                               ; preds = %67
  store double %.0.lcssa, ptr %0, align 8, !tbaa !5
  %70 = getelementptr inbounds i8, ptr %0, i64 8
  store double %.046.lcssa, ptr %70, align 8, !tbaa !11
  %71 = getelementptr inbounds i8, ptr %0, i64 16
  store i8 1, ptr %71, align 8, !tbaa !12
  br label %72

72:                                               ; preds = %67, %69, %63
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  br label %77

73:                                               ; preds = %.loopexit, %.loopexit.split-lp, %61
  %.pn.pn = phi { ptr, i32 } [ %.pn, %61 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  br label %74

74:                                               ; preds = %73, %55
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %73 ], [ %56, %55 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  br label %75

75:                                               ; preds = %74, %53
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %74 ], [ %54, %53 ]
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  br label %76

76:                                               ; preds = %75, %51
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %75 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  resume { ptr, i32 } %.pn.pn.pn.pn.pn

77:                                               ; preds = %72, %18
  ret void
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

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) #1

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

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

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

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

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

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


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