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

; 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::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 }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@_ZTIN6numath13IterExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZTIN6numath17IntervalExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8

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

42:                                               ; preds = %7
  %43 = load double, ptr %10, align 8, !tbaa !9
  store double %43, ptr %8, align 8
  store i32 1, ptr %23, align 4
  br label %202

44:                                               ; preds = %7
  %45 = load double, ptr %22, align 8, !tbaa !9
  %46 = fcmp oeq double %45, 0.000000e+00
  br i1 %46, label %47, label %49

47:                                               ; preds = %44
  %48 = load double, ptr %11, align 8, !tbaa !9
  store double %48, ptr %8, align 8
  store i32 1, ptr %23, align 4
  br label %202

49:                                               ; preds = %44
  %50 = load double, ptr %21, align 8, !tbaa !9
  %51 = load double, ptr %22, align 8, !tbaa !9
  %52 = fmul double %50, %51
  %53 = fcmp olt double %52, 0.000000e+00
  br i1 %53, label %54, label %198

54:                                               ; preds = %49
  %55 = load double, ptr %10, align 8, !tbaa !9
  %56 = load double, ptr %21, align 8, !tbaa !9
  %57 = load double, ptr %10, align 8, !tbaa !9
  %58 = load double, ptr %11, align 8, !tbaa !9
  %59 = fsub double %57, %58
  %60 = fmul double %56, %59
  %61 = load double, ptr %21, align 8, !tbaa !9
  %62 = load double, ptr %22, align 8, !tbaa !9
  %63 = fsub double %61, %62
  %64 = fdiv double %60, %63
  %65 = fsub double %55, %64
  store double %65, ptr %17, align 8, !tbaa !9
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = load double, ptr %17, align 8, !tbaa !9
  %68 = call noundef double %66(double noundef %67)
  store double %68, ptr %19, align 8, !tbaa !9
  store i32 1, ptr %16, align 4, !tbaa !11
  %69 = load double, ptr %13, align 8, !tbaa !9
  %70 = fadd double %69, 1.000000e+00
  store double %70, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %26) #8
  %71 = load i32, ptr %16, align 4, !tbaa !11
  %72 = sitofp i32 %71 to double
  store double %72, ptr %26, align 8, !tbaa !9
  %73 = getelementptr inbounds double, ptr %26, i64 1
  %74 = load double, ptr %17, align 8, !tbaa !9
  store double %74, ptr %73, align 8, !tbaa !9
  %75 = getelementptr inbounds double, ptr %26, i64 2
  %76 = load double, ptr %19, align 8, !tbaa !9
  store double %76, ptr %75, align 8, !tbaa !9
  %77 = getelementptr inbounds double, ptr %26, i64 3
  %78 = load double, ptr %20, align 8, !tbaa !9
  store double %78, ptr %77, align 8, !tbaa !9
  %79 = getelementptr inbounds %"class.std::initializer_list", ptr %25, i32 0, i32 0
  store ptr %26, ptr %79, align 8, !tbaa !13
  %80 = getelementptr inbounds %"class.std::initializer_list", ptr %25, i32 0, i32 1
  store i64 4, ptr %80, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #8
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #8
  %81 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8
  %83 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 1
  %84 = load i64, ptr %83, align 8
  invoke void @_ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr %82, i64 %84, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %85 unwind label %109

85:                                               ; preds = %54
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #8
  %86 = load ptr, ptr %15, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %86, ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %87 unwind label %113

87:                                               ; preds = %85
  br label %88

88:                                               ; preds = %172, %87
  %89 = load double, ptr %20, align 8, !tbaa !9
  %90 = load double, ptr %13, align 8, !tbaa !9
  %91 = fcmp ogt double %89, %90
  br i1 %91, label %92, label %99

92:                                               ; preds = %88
  %93 = load double, ptr %19, align 8, !tbaa !9
  %94 = fcmp une double %93, 0.000000e+00
  br i1 %94, label %95, label %99

95:                                               ; preds = %92
  %96 = load i32, ptr %16, align 4, !tbaa !11
  %97 = load i32, ptr %12, align 4, !tbaa !11
  %98 = icmp slt i32 %96, %97
  br label %99

99:                                               ; preds = %95, %92, %88
  %100 = phi i1 [ false, %92 ], [ false, %88 ], [ %98, %95 ]
  br i1 %100, label %101, label %182

101:                                              ; preds = %99
  %102 = load double, ptr %21, align 8, !tbaa !9
  %103 = load double, ptr %19, align 8, !tbaa !9
  %104 = fmul double %102, %103
  %105 = fcmp olt double %104, 0.000000e+00
  br i1 %105, label %106, label %117

106:                                              ; preds = %101
  %107 = load double, ptr %17, align 8, !tbaa !9
  store double %107, ptr %11, align 8, !tbaa !9
  %108 = load double, ptr %19, align 8, !tbaa !9
  store double %108, ptr %22, align 8, !tbaa !9
  br label %120

109:                                              ; preds = %54
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %28, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %29, align 4
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #8
  br label %197

113:                                              ; preds = %193, %120, %85
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %28, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %29, align 4
  br label %196

117:                                              ; preds = %101
  %118 = load double, ptr %17, align 8, !tbaa !9
  store double %118, ptr %10, align 8, !tbaa !9
  %119 = load double, ptr %19, align 8, !tbaa !9
  store double %119, ptr %21, align 8, !tbaa !9
  br label %120

120:                                              ; preds = %117, %106
  %121 = load double, ptr %17, align 8, !tbaa !9
  store double %121, ptr %18, align 8, !tbaa !9
  %122 = load double, ptr %10, align 8, !tbaa !9
  %123 = load double, ptr %21, align 8, !tbaa !9
  %124 = load double, ptr %10, align 8, !tbaa !9
  %125 = load double, ptr %11, align 8, !tbaa !9
  %126 = fsub double %124, %125
  %127 = fmul double %123, %126
  %128 = load double, ptr %21, align 8, !tbaa !9
  %129 = load double, ptr %22, align 8, !tbaa !9
  %130 = fsub double %128, %129
  %131 = fdiv double %127, %130
  %132 = fsub double %122, %131
  store double %132, ptr %17, align 8, !tbaa !9
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  %134 = load double, ptr %17, align 8, !tbaa !9
  %135 = invoke noundef double %133(double noundef %134)
          to label %136 unwind label %113

136:                                              ; preds = %120
  store double %135, ptr %19, align 8, !tbaa !9
  %137 = load ptr, ptr %14, align 8, !tbaa !5
  %138 = call i32 @strcmp(ptr noundef %137, ptr noundef @.str) #9
  %139 = icmp eq i32 %138, 0
  br i1 %139, label %140, label %145

140:                                              ; preds = %136
  %141 = load double, ptr %17, align 8, !tbaa !9
  %142 = load double, ptr %18, align 8, !tbaa !9
  %143 = fsub double %141, %142
  %144 = call double @llvm.fabs.f64(double %143)
  br label %152

145:                                              ; preds = %136
  %146 = load double, ptr %17, align 8, !tbaa !9
  %147 = load double, ptr %18, align 8, !tbaa !9
  %148 = fsub double %146, %147
  %149 = load double, ptr %17, align 8, !tbaa !9
  %150 = fdiv double %148, %149
  %151 = call double @llvm.fabs.f64(double %150)
  br label %152

152:                                              ; preds = %145, %140
  %153 = phi double [ %144, %140 ], [ %151, %145 ]
  store double %153, ptr %20, align 8, !tbaa !9
  %154 = load i32, ptr %16, align 4, !tbaa !11
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %32) #8
  %156 = load i32, ptr %16, align 4, !tbaa !11
  %157 = sitofp i32 %156 to double
  store double %157, ptr %32, align 8, !tbaa !9
  %158 = getelementptr inbounds double, ptr %32, i64 1
  %159 = load double, ptr %17, align 8, !tbaa !9
  store double %159, ptr %158, align 8, !tbaa !9
  %160 = getelementptr inbounds double, ptr %32, i64 2
  %161 = load double, ptr %19, align 8, !tbaa !9
  store double %161, ptr %160, align 8, !tbaa !9
  %162 = getelementptr inbounds double, ptr %32, i64 3
  %163 = load double, ptr %20, align 8, !tbaa !9
  store double %163, ptr %162, align 8, !tbaa !9
  %164 = getelementptr inbounds %"class.std::initializer_list", ptr %31, i32 0, i32 0
  store ptr %32, ptr %164, align 8, !tbaa !13
  %165 = getelementptr inbounds %"class.std::initializer_list", ptr %31, i32 0, i32 1
  store i64 4, ptr %165, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 1, ptr %33) #8
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #8
  %166 = getelementptr inbounds { ptr, i64 }, ptr %31, i32 0, i32 0
  %167 = load ptr, ptr %166, align 8
  %168 = getelementptr inbounds { ptr, i64 }, ptr %31, i32 0, i32 1
  %169 = load i64, ptr %168, align 8
  invoke void @_ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %30, ptr %167, i64 %169, ptr noundef nonnull align 1 dereferenceable(1) %33)
          to label %170 unwind label %173

170:                                              ; preds = %152
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %32) #8
  %171 = load ptr, ptr %15, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %171, ptr noundef nonnull align 8 dereferenceable(24) %30)
          to label %172 unwind label %177

172:                                              ; preds = %170
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #8
  br label %88, !llvm.loop !17

173:                                              ; preds = %152
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %28, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %29, align 4
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %32) #8
  br label %181

177:                                              ; preds = %170
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %28, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %29, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  br label %181

181:                                              ; preds = %177, %173
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #8
  br label %196

182:                                              ; preds = %99
  %183 = load double, ptr %19, align 8, !tbaa !9
  %184 = fcmp oeq double %183, 0.000000e+00
  br i1 %184, label %185, label %187

185:                                              ; preds = %182
  %186 = load double, ptr %17, align 8, !tbaa !9
  store double %186, ptr %8, align 8
  store i32 1, ptr %23, align 4
  br label %195

187:                                              ; preds = %182
  %188 = load double, ptr %20, align 8, !tbaa !9
  %189 = load double, ptr %13, align 8, !tbaa !9
  %190 = fcmp olt double %188, %189
  br i1 %190, label %191, label %193

191:                                              ; preds = %187
  %192 = load double, ptr %17, align 8, !tbaa !9
  store double %192, ptr %8, align 8
  store i32 1, ptr %23, align 4
  br label %195

193:                                              ; preds = %187
  %194 = call ptr @__cxa_allocate_exception(i64 8) #8
  call void @llvm.memset.p0.i64(ptr align 16 %194, i8 0, i64 8, i1 false)
  call void @_ZN6numath13IterExceptionC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %194) #8
  invoke void @__cxa_throw(ptr %194, ptr @_ZTIN6numath13IterExceptionE, ptr @_ZNSt9exceptionD2Ev) #10
          to label %209 unwind label %113

195:                                              ; preds = %191, %185
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #8
  br label %202

196:                                              ; preds = %181, %113
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  br label %197

197:                                              ; preds = %196, %109
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %204

198:                                              ; preds = %49
  br label %199

199:                                              ; preds = %198
  br label %200

200:                                              ; preds = %199
  %201 = call ptr @__cxa_allocate_exception(i64 8) #8
  call void @llvm.memset.p0.i64(ptr align 16 %201, i8 0, i64 8, i1 false)
  call void @_ZN6numath17IntervalExceptionC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %201) #8
  call void @__cxa_throw(ptr %201, ptr @_ZTIN6numath17IntervalExceptionE, ptr @_ZNSt9exceptionD2Ev) #10
  unreachable

202:                                              ; preds = %195, %47, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  %203 = load double, ptr %8, align 8
  ret double %203

204:                                              ; preds = %197
  %205 = load ptr, ptr %28, align 8
  %206 = load i32, ptr %29, align 4
  %207 = insertvalue { ptr, i32 } poison, ptr %205, 0
  %208 = insertvalue { ptr, i32 } %207, i32 %206, 1
  resume { ptr, i32 } %208

209:                                              ; preds = %193
  unreachable
}

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

; 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 @_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: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #3

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

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

declare ptr @__cxa_allocate_exception(i64)

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

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

declare void @__cxa_throw(ptr, ptr, ptr)

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

; Function Attrs: nounwind
declare void @_ZNSt9exceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #7

; 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 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 = { 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 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSSt16initializer_listIdE", !6, i64 0, !15, i64 8}
!15 = !{!"long", !7, i64 0}
!16 = !{!14, !15, i64 8}
!17 = distinct !{!17, !18}
!18 = !{!"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"

%"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 }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@_ZTIN6numath13IterExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZTIN6numath17IntervalExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN6numath23singleVariableEquations13falsePositionEPFddEddidPKcRSt6vectorIS5_IdSaIdEESaIS7_EE(ptr nocapture noundef readonly %0, double noundef %1, double noundef %2, i32 noundef %3, double noundef %4, ptr nocapture noundef readonly %5, ptr noundef nonnull align 8 dereferenceable(24) %6) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca [4 x double], align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca [4 x double], align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = tail call noundef double %0(double noundef %1)
  %15 = tail call noundef double %0(double noundef %2)
  %16 = fcmp oeq double %14, 0.000000e+00
  br i1 %16, label %78, label %17

17:                                               ; preds = %7
  %18 = fcmp oeq double %15, 0.000000e+00
  br i1 %18, label %78, label %19

19:                                               ; preds = %17
  %20 = fmul double %14, %15
  %21 = fcmp olt double %20, 0.000000e+00
  br i1 %21, label %22, label %76

22:                                               ; preds = %19
  %23 = fsub double %1, %2
  %24 = fmul double %23, %14
  %25 = fsub double %14, %15
  %26 = fdiv double %24, %25
  %27 = fsub double %1, %26
  %28 = tail call noundef double %0(double noundef %27)
  %29 = fadd double %4, 1.000000e+00
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #7
  store double 1.000000e+00, ptr %9, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %9, i64 8
  store double %27, ptr %30, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %9, i64 16
  store double %28, ptr %31, align 8, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %9, i64 24
  store double %29, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #7
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  invoke void @_ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr nonnull %9, i64 4, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %33 unwind label %49

33:                                               ; preds = %22
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  invoke void @_ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %33
  %34 = fcmp ogt double %29, %4
  %35 = fcmp une double %28, 0.000000e+00
  %or.cond98 = and i1 %35, %34
  %36 = icmp sgt i32 %3, 1
  %or.cond8799 = and i1 %or.cond98, %36
  br i1 %or.cond8799, label %.lr.ph, label %.critedge

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

40:                                               ; preds = %.lr.ph, %60
  %.066106 = phi double [ %1, %.lr.ph ], [ %.066..082, %60 ]
  %.073105 = phi double [ %2, %.lr.ph ], [ %.082..073, %60 ]
  %.075104 = phi i32 [ 1, %.lr.ph ], [ %57, %60 ]
  %.076103 = phi double [ %15, %.lr.ph ], [ %.081..076, %60 ]
  %.078102 = phi double [ %14, %.lr.ph ], [ %.078..081, %60 ]
  %.081101 = phi double [ %28, %.lr.ph ], [ %48, %60 ]
  %.082100 = phi double [ %27, %.lr.ph ], [ %47, %60 ]
  %41 = fmul double %.081101, %.078102
  %42 = fcmp olt double %41, 0.000000e+00
  %.078..081 = select i1 %42, double %.078102, double %.081101
  %.081..076 = select i1 %42, double %.081101, double %.076103
  %.082..073 = select i1 %42, double %.082100, double %.073105
  %.066..082 = select i1 %42, double %.066106, double %.082100
  %43 = fsub double %.066..082, %.082..073
  %44 = fmul double %.078..081, %43
  %45 = fsub double %.078..081, %.081..076
  %46 = fdiv double %44, %45
  %47 = fsub double %.066..082, %46
  %48 = invoke noundef double %0(double noundef %47)
          to label %51 unwind label %.loopexit

49:                                               ; preds = %22
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  br label %75

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

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

51:                                               ; preds = %40
  %52 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) @.str) #8
  %53 = icmp eq i32 %52, 0
  %54 = fsub double %47, %.082100
  %55 = fdiv double %54, %47
  %.sink = select i1 %53, double %54, double %55
  %56 = call double @llvm.fabs.f64(double %.sink)
  %57 = add nuw nsw i32 %.075104, 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #7
  %58 = uitofp nneg i32 %57 to double
  store double %58, ptr %12, align 8, !tbaa !5
  store double %47, ptr %37, align 8, !tbaa !5
  store double %48, ptr %38, align 8, !tbaa !5
  store double %56, ptr %39, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #7
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  invoke void @_ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr nonnull %12, i64 4, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %59 unwind label %64

59:                                               ; preds = %51
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  invoke void @_ZNSt6vectorIS_IdSaIdEESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %60 unwind label %66

60:                                               ; preds = %59
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #7
  %61 = fcmp ogt double %56, %4
  %62 = fcmp une double %48, 0.000000e+00
  %or.cond = and i1 %62, %61
  %63 = icmp slt i32 %57, %3
  %or.cond87 = select i1 %or.cond, i1 %63, i1 false
  br i1 %or.cond87, label %40, label %.critedge, !llvm.loop !9

64:                                               ; preds = %51
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  br label %68

66:                                               ; preds = %59
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  br label %68

68:                                               ; preds = %66, %64
  %.pn = phi { ptr, i32 } [ %67, %66 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #7
  br label %74

.critedge:                                        ; preds = %60, %.preheader
  %.082.lcssa = phi double [ %27, %.preheader ], [ %47, %60 ]
  %.081.lcssa = phi double [ %28, %.preheader ], [ %48, %60 ]
  %.080.lcssa = phi double [ %29, %.preheader ], [ %56, %60 ]
  %69 = fcmp oeq double %.081.lcssa, 0.000000e+00
  %70 = fcmp olt double %.080.lcssa, %4
  %or.cond88 = or i1 %69, %70
  br i1 %or.cond88, label %73, label %71

71:                                               ; preds = %.critedge
  %72 = call ptr @__cxa_allocate_exception(i64 8) #7
  store i64 0, ptr %72, align 16
  call void @_ZN6numath13IterExceptionC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %72) #7
  invoke void @__cxa_throw(ptr nonnull %72, ptr nonnull @_ZTIN6numath13IterExceptionE, ptr nonnull @_ZNSt9exceptionD2Ev) #9
          to label %79 unwind label %.loopexit.split-lp

73:                                               ; preds = %.critedge
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  br label %78

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

75:                                               ; preds = %74, %49
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %74 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  resume { ptr, i32 } %.pn.pn.pn

76:                                               ; preds = %19
  %77 = tail call ptr @__cxa_allocate_exception(i64 8) #7
  store i64 0, ptr %77, align 16
  tail call void @_ZN6numath17IntervalExceptionC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %77) #7
  tail call void @__cxa_throw(ptr nonnull %77, ptr nonnull @_ZTIN6numath17IntervalExceptionE, ptr nonnull @_ZNSt9exceptionD2Ev) #9
  unreachable

78:                                               ; preds = %17, %7, %73
  %.1 = phi double [ %.082.lcssa, %73 ], [ %1, %7 ], [ %2, %17 ]
  ret double %.1

79:                                               ; preds = %71
  unreachable
}

; 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 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 @_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 nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #3

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

; Function Attrs: nounwind
declare void @_ZNSt9exceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6

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

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

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


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