; LLVM IR from TheAlgorithms/C-Plus-Plus :: numerical_methods/brent_method_extrema.ll (Z10get_minimaRKSt8functionIFddEEdd)

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [35 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z10get_minimaRKSt8functionIFddEEdd(ptr noundef nonnull align 8 dereferenceable(32) %0, double noundef %1, double noundef %2) #0 {
  %4 = alloca double, align 8
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %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 double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store double %1, ptr %6, align 8, !tbaa !9
  store double %2, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !11
  %27 = load double, ptr %6, align 8, !tbaa !9
  %28 = load double, ptr %7, align 8, !tbaa !9
  %29 = fcmp ogt double %27, %28
  br i1 %29, label %30, label %31

30:                                               ; preds = %3
  call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br label %47

31:                                               ; preds = %3
  %32 = load double, ptr %6, align 8, !tbaa !9
  %33 = load double, ptr %7, align 8, !tbaa !9
  %34 = fsub double %32, %33
  %35 = call noundef double @_ZSt3absd(double noundef %34)
  %36 = call noundef double @_ZNSt14numeric_limitsIdE7epsilonEv() #7
  %37 = call double @sqrt(double noundef %36) #7
  %38 = fcmp ole double %35, %37
  br i1 %38, label %39, label %46

39:                                               ; preds = %31
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
  %41 = call noundef double @_ZNSt14numeric_limitsIdE7epsilonEv() #7
  %42 = call double @sqrt(double noundef %41) #7
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %40, double noundef %42)
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef @.str.1)
  %45 = load double, ptr %6, align 8, !tbaa !9
  store double %45, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %288

46:                                               ; preds = %31
  br label %47

47:                                               ; preds = %46, %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %48 = call noundef float @_ZSt4sqrtf(float noundef 5.000000e+00)
  %49 = fsub float 3.000000e+00, %48
  %50 = fdiv float %49, 2.000000e+00
  %51 = fpext float %50 to double
  store double %51, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %52 = load double, ptr %6, align 8, !tbaa !9
  %53 = load double, ptr %10, align 8, !tbaa !9
  %54 = load double, ptr %7, align 8, !tbaa !9
  %55 = load double, ptr %6, align 8, !tbaa !9
  %56 = fsub double %54, %55
  %57 = call double @llvm.fmuladd.f64(double %53, double %56, double %52)
  store double %57, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %58 = load double, ptr %11, align 8, !tbaa !9
  store double %58, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %59 = load double, ptr %11, align 8, !tbaa !9
  store double %59, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = load double, ptr %11, align 8, !tbaa !9
  %62 = call noundef double @_ZNKSt8functionIFddEEclEd(ptr noundef nonnull align 8 dereferenceable(32) %60, double noundef %61)
  store double %62, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %63 = load double, ptr %16, align 8, !tbaa !9
  store double %63, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %64 = load double, ptr %16, align 8, !tbaa !9
  store double %64, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %65 = load double, ptr %6, align 8, !tbaa !9
  %66 = load double, ptr %7, align 8, !tbaa !9
  %67 = fadd double %65, %66
  %68 = fdiv double %67, 2.000000e+00
  store double %68, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store double 0.000000e+00, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  store double 0.000000e+00, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  store double 0.000000e+00, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  store double 0.000000e+00, ptr %24, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  br label %69

69:                                               ; preds = %270, %47
  %70 = load double, ptr %6, align 8, !tbaa !9
  %71 = load double, ptr %7, align 8, !tbaa !9
  %72 = fadd double %70, %71
  %73 = fdiv double %72, 2.000000e+00
  store double %73, ptr %19, align 8, !tbaa !9
  %74 = call noundef double @_ZNSt14numeric_limitsIdE7epsilonEv() #7
  %75 = call double @sqrt(double noundef %74) #7
  %76 = load double, ptr %14, align 8, !tbaa !9
  %77 = call noundef double @_ZSt3absd(double noundef %76)
  %78 = fmul double %75, %77
  store double %78, ptr %25, align 8, !tbaa !9
  %79 = load double, ptr %25, align 8, !tbaa !9
  %80 = fmul double 2.000000e+00, %79
  store double %80, ptr %26, align 8, !tbaa !9
  %81 = load double, ptr %24, align 8, !tbaa !9
  %82 = call noundef double @_ZSt3absd(double noundef %81)
  %83 = load double, ptr %26, align 8, !tbaa !9
  %84 = fcmp ogt double %82, %83
  br i1 %84, label %85, label %126

85:                                               ; preds = %69
  %86 = load double, ptr %14, align 8, !tbaa !9
  %87 = load double, ptr %13, align 8, !tbaa !9
  %88 = fsub double %86, %87
  %89 = load double, ptr %18, align 8, !tbaa !9
  %90 = load double, ptr %16, align 8, !tbaa !9
  %91 = fsub double %89, %90
  %92 = fmul double %88, %91
  store double %92, ptr %22, align 8, !tbaa !9
  %93 = load double, ptr %14, align 8, !tbaa !9
  %94 = load double, ptr %11, align 8, !tbaa !9
  %95 = fsub double %93, %94
  %96 = load double, ptr %18, align 8, !tbaa !9
  %97 = load double, ptr %17, align 8, !tbaa !9
  %98 = fsub double %96, %97
  %99 = fmul double %95, %98
  store double %99, ptr %21, align 8, !tbaa !9
  %100 = load double, ptr %14, align 8, !tbaa !9
  %101 = load double, ptr %11, align 8, !tbaa !9
  %102 = fsub double %100, %101
  %103 = load double, ptr %21, align 8, !tbaa !9
  %104 = load double, ptr %14, align 8, !tbaa !9
  %105 = load double, ptr %13, align 8, !tbaa !9
  %106 = fsub double %104, %105
  %107 = load double, ptr %22, align 8, !tbaa !9
  %108 = fmul double %106, %107
  %109 = fneg double %108
  %110 = call double @llvm.fmuladd.f64(double %102, double %103, double %109)
  store double %110, ptr %20, align 8, !tbaa !9
  %111 = load double, ptr %21, align 8, !tbaa !9
  %112 = load double, ptr %22, align 8, !tbaa !9
  %113 = fsub double %111, %112
  %114 = fmul double 2.000000e+00, %113
  store double %114, ptr %21, align 8, !tbaa !9
  %115 = load double, ptr %21, align 8, !tbaa !9
  %116 = fcmp ogt double %115, 0.000000e+00
  br i1 %116, label %117, label %120

117:                                              ; preds = %85
  %118 = load double, ptr %20, align 8, !tbaa !9
  %119 = fneg double %118
  store double %119, ptr %20, align 8, !tbaa !9
  br label %123

120:                                              ; preds = %85
  %121 = load double, ptr %21, align 8, !tbaa !9
  %122 = fneg double %121
  store double %122, ptr %21, align 8, !tbaa !9
  br label %123

123:                                              ; preds = %120, %117
  %124 = load double, ptr %24, align 8, !tbaa !9
  store double %124, ptr %22, align 8, !tbaa !9
  %125 = load double, ptr %23, align 8, !tbaa !9
  store double %125, ptr %24, align 8, !tbaa !9
  br label %126

126:                                              ; preds = %123, %69
  %127 = load double, ptr %20, align 8, !tbaa !9
  %128 = call noundef double @_ZSt3absd(double noundef %127)
  %129 = load double, ptr %21, align 8, !tbaa !9
  %130 = fmul double 5.000000e-01, %129
  %131 = load double, ptr %22, align 8, !tbaa !9
  %132 = fmul double %130, %131
  %133 = call noundef double @_ZSt3absd(double noundef %132)
  %134 = fcmp olt double %128, %133
  br i1 %134, label %135, label %173

135:                                              ; preds = %126
  %136 = load double, ptr %20, align 8, !tbaa !9
  %137 = load double, ptr %21, align 8, !tbaa !9
  %138 = load double, ptr %7, align 8, !tbaa !9
  %139 = load double, ptr %14, align 8, !tbaa !9
  %140 = fsub double %138, %139
  %141 = fmul double %137, %140
  %142 = fcmp olt double %136, %141
  br i1 %142, label %143, label %173

143:                                              ; preds = %135
  %144 = load double, ptr %20, align 8, !tbaa !9
  %145 = load double, ptr %21, align 8, !tbaa !9
  %146 = fdiv double %144, %145
  store double %146, ptr %23, align 8, !tbaa !9
  %147 = load double, ptr %14, align 8, !tbaa !9
  %148 = load double, ptr %23, align 8, !tbaa !9
  %149 = fadd double %147, %148
  store double %149, ptr %12, align 8, !tbaa !9
  %150 = load double, ptr %12, align 8, !tbaa !9
  %151 = load double, ptr %6, align 8, !tbaa !9
  %152 = fsub double %150, %151
  %153 = load double, ptr %26, align 8, !tbaa !9
  %154 = fcmp olt double %152, %153
  br i1 %154, label %161, label %155

155:                                              ; preds = %143
  %156 = load double, ptr %7, align 8, !tbaa !9
  %157 = load double, ptr %12, align 8, !tbaa !9
  %158 = fsub double %156, %157
  %159 = load double, ptr %26, align 8, !tbaa !9
  %160 = fcmp olt double %158, %159
  br i1 %160, label %161, label %172

161:                                              ; preds = %155, %143
  %162 = load double, ptr %14, align 8, !tbaa !9
  %163 = load double, ptr %19, align 8, !tbaa !9
  %164 = fcmp olt double %162, %163
  br i1 %164, label %165, label %167

165:                                              ; preds = %161
  %166 = load double, ptr %25, align 8, !tbaa !9
  br label %170

167:                                              ; preds = %161
  %168 = load double, ptr %25, align 8, !tbaa !9
  %169 = fneg double %168
  br label %170

170:                                              ; preds = %167, %165
  %171 = phi double [ %166, %165 ], [ %169, %167 ]
  store double %171, ptr %23, align 8, !tbaa !9
  br label %172

172:                                              ; preds = %170, %155
  br label %188

173:                                              ; preds = %135, %126
  %174 = load double, ptr %14, align 8, !tbaa !9
  %175 = load double, ptr %19, align 8, !tbaa !9
  %176 = fcmp olt double %174, %175
  br i1 %176, label %177, label %179

177:                                              ; preds = %173
  %178 = load double, ptr %7, align 8, !tbaa !9
  br label %181

179:                                              ; preds = %173
  %180 = load double, ptr %6, align 8, !tbaa !9
  br label %181

181:                                              ; preds = %179, %177
  %182 = phi double [ %178, %177 ], [ %180, %179 ]
  %183 = load double, ptr %14, align 8, !tbaa !9
  %184 = fsub double %182, %183
  store double %184, ptr %24, align 8, !tbaa !9
  %185 = load double, ptr %10, align 8, !tbaa !9
  %186 = load double, ptr %24, align 8, !tbaa !9
  %187 = fmul double %185, %186
  store double %187, ptr %23, align 8, !tbaa !9
  br label %188

188:                                              ; preds = %181, %172
  %189 = load double, ptr %23, align 8, !tbaa !9
  %190 = call noundef double @_ZSt3absd(double noundef %189)
  %191 = load double, ptr %25, align 8, !tbaa !9
  %192 = fcmp oge double %190, %191
  br i1 %192, label %193, label %195

193:                                              ; preds = %188
  %194 = load double, ptr %23, align 8, !tbaa !9
  store double %194, ptr %12, align 8, !tbaa !9
  br label %204

195:                                              ; preds = %188
  %196 = load double, ptr %23, align 8, !tbaa !9
  %197 = fcmp ogt double %196, 0.000000e+00
  br i1 %197, label %198, label %200

198:                                              ; preds = %195
  %199 = load double, ptr %25, align 8, !tbaa !9
  store double %199, ptr %12, align 8, !tbaa !9
  br label %203

200:                                              ; preds = %195
  %201 = load double, ptr %25, align 8, !tbaa !9
  %202 = fneg double %201
  store double %202, ptr %12, align 8, !tbaa !9
  br label %203

203:                                              ; preds = %200, %198
  br label %204

204:                                              ; preds = %203, %193
  %205 = load double, ptr %14, align 8, !tbaa !9
  %206 = load double, ptr %12, align 8, !tbaa !9
  %207 = fadd double %206, %205
  store double %207, ptr %12, align 8, !tbaa !9
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = load double, ptr %12, align 8, !tbaa !9
  %210 = call noundef double @_ZNKSt8functionIFddEEclEd(ptr noundef nonnull align 8 dereferenceable(32) %208, double noundef %209)
  store double %210, ptr %15, align 8, !tbaa !9
  %211 = load double, ptr %15, align 8, !tbaa !9
  %212 = load double, ptr %18, align 8, !tbaa !9
  %213 = fcmp ole double %211, %212
  br i1 %213, label %214, label %229

214:                                              ; preds = %204
  %215 = load double, ptr %12, align 8, !tbaa !9
  %216 = load double, ptr %14, align 8, !tbaa !9
  %217 = fcmp olt double %215, %216
  br i1 %217, label %218, label %220

218:                                              ; preds = %214
  %219 = load double, ptr %14, align 8, !tbaa !9
  store double %219, ptr %7, align 8, !tbaa !9
  br label %222

220:                                              ; preds = %214
  %221 = load double, ptr %14, align 8, !tbaa !9
  store double %221, ptr %6, align 8, !tbaa !9
  br label %222

222:                                              ; preds = %220, %218
  %223 = load double, ptr %13, align 8, !tbaa !9
  store double %223, ptr %11, align 8, !tbaa !9
  %224 = load double, ptr %17, align 8, !tbaa !9
  store double %224, ptr %16, align 8, !tbaa !9
  %225 = load double, ptr %14, align 8, !tbaa !9
  store double %225, ptr %13, align 8, !tbaa !9
  %226 = load double, ptr %18, align 8, !tbaa !9
  store double %226, ptr %17, align 8, !tbaa !9
  %227 = load double, ptr %12, align 8, !tbaa !9
  store double %227, ptr %14, align 8, !tbaa !9
  %228 = load double, ptr %15, align 8, !tbaa !9
  store double %228, ptr %18, align 8, !tbaa !9
  br label %267

229:                                              ; preds = %204
  %230 = load double, ptr %12, align 8, !tbaa !9
  %231 = load double, ptr %14, align 8, !tbaa !9
  %232 = fcmp olt double %230, %231
  br i1 %232, label %233, label %235

233:                                              ; preds = %229
  %234 = load double, ptr %12, align 8, !tbaa !9
  store double %234, ptr %6, align 8, !tbaa !9
  br label %237

235:                                              ; preds = %229
  %236 = load double, ptr %12, align 8, !tbaa !9
  store double %236, ptr %7, align 8, !tbaa !9
  br label %237

237:                                              ; preds = %235, %233
  %238 = load double, ptr %15, align 8, !tbaa !9
  %239 = load double, ptr %17, align 8, !tbaa !9
  %240 = fcmp ole double %238, %239
  br i1 %240, label %245, label %241

241:                                              ; preds = %237
  %242 = load double, ptr %14, align 8, !tbaa !9
  %243 = load double, ptr %13, align 8, !tbaa !9
  %244 = fcmp oeq double %242, %243
  br i1 %244, label %245, label %250

245:                                              ; preds = %241, %237
  %246 = load double, ptr %13, align 8, !tbaa !9
  store double %246, ptr %11, align 8, !tbaa !9
  %247 = load double, ptr %17, align 8, !tbaa !9
  store double %247, ptr %16, align 8, !tbaa !9
  %248 = load double, ptr %12, align 8, !tbaa !9
  store double %248, ptr %13, align 8, !tbaa !9
  %249 = load double, ptr %15, align 8, !tbaa !9
  store double %249, ptr %17, align 8, !tbaa !9
  br label %266

250:                                              ; preds = %241
  %251 = load double, ptr %15, align 8, !tbaa !9
  %252 = load double, ptr %16, align 8, !tbaa !9
  %253 = fcmp ole double %251, %252
  br i1 %253, label %262, label %254

254:                                              ; preds = %250
  %255 = load double, ptr %11, align 8, !tbaa !9
  %256 = load double, ptr %14, align 8, !tbaa !9
  %257 = fcmp oeq double %255, %256
  br i1 %257, label %262, label %258

258:                                              ; preds = %254
  %259 = load double, ptr %11, align 8, !tbaa !9
  %260 = load double, ptr %13, align 8, !tbaa !9
  %261 = fcmp oeq double %259, %260
  br i1 %261, label %262, label %265

262:                                              ; preds = %258, %254, %250
  %263 = load double, ptr %12, align 8, !tbaa !9
  store double %263, ptr %11, align 8, !tbaa !9
  %264 = load double, ptr %15, align 8, !tbaa !9
  store double %264, ptr %16, align 8, !tbaa !9
  br label %265

265:                                              ; preds = %262, %258
  br label %266

266:                                              ; preds = %265, %245
  br label %267

267:                                              ; preds = %266, %222
  %268 = load i32, ptr %8, align 4, !tbaa !11
  %269 = add i32 %268, 1
  store i32 %269, ptr %8, align 4, !tbaa !11
  br label %270

270:                                              ; preds = %267
  %271 = load double, ptr %14, align 8, !tbaa !9
  %272 = load double, ptr %19, align 8, !tbaa !9
  %273 = fsub double %271, %272
  %274 = call noundef double @_ZSt3absd(double noundef %273)
  %275 = load double, ptr %25, align 8, !tbaa !9
  %276 = load double, ptr %7, align 8, !tbaa !9
  %277 = load double, ptr %6, align 8, !tbaa !9
  %278 = fsub double %276, %277
  %279 = fdiv double %278, 2.000000e+00
  %280 = fsub double %275, %279
  %281 = fcmp ogt double %274, %280
  br i1 %281, label %69, label %282, !llvm.loop !13

282:                                              ; preds = %270
  %283 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  %284 = load i32, ptr %8, align 4, !tbaa !11
  %285 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %283, i32 noundef %284)
  %286 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %285, ptr noundef @.str.3)
  %287 = load double, ptr %14, align 8, !tbaa !9
  store double %287, ptr %4, align 8
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %288

288:                                              ; preds = %282, %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  %289 = load double, ptr %4, align 8
  ret double %289
}

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

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

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNSt14numeric_limitsIdE7epsilonEv() #4 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNKSt8functionIFddEEclEd(ptr noundef nonnull align 8 dereferenceable(32), double noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #0 align 2

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

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 = { 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 #3 = { 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 #4 = { 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 #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 = distinct !{!13, !14}
!14 = !{!"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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [35 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z10get_minimaRKSt8functionIFddEEdd(ptr noundef nonnull align 8 dereferenceable(32) %0, double noundef %1, double noundef %2) local_unnamed_addr #0 {
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  store double %1, ptr %4, align 8, !tbaa !5
  store double %2, ptr %5, align 8, !tbaa !5
  %6 = fcmp ogt double %1, %2
  br i1 %6, label %7, label %8

7:                                                ; preds = %3
  call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  br label %20

8:                                                ; preds = %3
  %9 = fsub double %1, %2
  %10 = tail call noundef double @_ZSt3absd(double noundef %9)
  %11 = tail call noundef double @_ZNSt14numeric_limitsIdE7epsilonEv() #6
  %12 = tail call double @sqrt(double noundef %11) #6
  %13 = fcmp ugt double %10, %12
  br i1 %13, label %20, label %14

14:                                               ; preds = %8
  %15 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
  %16 = tail call noundef double @_ZNSt14numeric_limitsIdE7epsilonEv() #6
  %17 = tail call double @sqrt(double noundef %16) #6
  %18 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %15, double noundef %17)
  %19 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull @.str.1)
  br label %125

20:                                               ; preds = %8, %7
  %21 = call noundef float @_ZSt4sqrtf(float noundef 5.000000e+00)
  %22 = fsub float 3.000000e+00, %21
  %23 = fmul float %22, 5.000000e-01
  %24 = fpext float %23 to double
  %25 = load double, ptr %4, align 8, !tbaa !5
  %26 = load double, ptr %5, align 8, !tbaa !5
  %27 = fsub double %26, %25
  %28 = call double @llvm.fmuladd.f64(double %24, double %27, double %25)
  %29 = call noundef double @_ZNKSt8functionIFddEEclEd(ptr noundef nonnull align 8 dereferenceable(32) %0, double noundef %28)
  %.pre = load double, ptr %4, align 8, !tbaa !5
  %.pre142 = load double, ptr %5, align 8, !tbaa !5
  br label %30

30:                                               ; preds = %111, %20
  %31 = phi double [ %.pre142, %20 ], [ %115, %111 ]
  %32 = phi double [ %.pre, %20 ], [ %116, %111 ]
  %.0126 = phi double [ %28, %20 ], [ %.1127, %111 ]
  %.0123 = phi double [ %28, %20 ], [ %.1124, %111 ]
  %.0121 = phi double [ %28, %20 ], [ %.1122, %111 ]
  %.0119 = phi double [ %29, %20 ], [ %.1120, %111 ]
  %.0117 = phi double [ %29, %20 ], [ %.1118, %111 ]
  %.0115 = phi double [ %29, %20 ], [ %.1116, %111 ]
  %.0112 = phi double [ 0.000000e+00, %20 ], [ %.2114, %111 ]
  %.0109 = phi double [ 0.000000e+00, %20 ], [ %.2111, %111 ]
  %.0107 = phi double [ 0.000000e+00, %20 ], [ %.1108, %111 ]
  %.0105 = phi double [ undef, %20 ], [ %.1106, %111 ]
  %.0104 = phi double [ 0.000000e+00, %20 ], [ %.2, %111 ]
  %.0103 = phi i32 [ 0, %20 ], [ %112, %111 ]
  %33 = fadd double %32, %31
  %34 = fmul double %33, 5.000000e-01
  %35 = call noundef double @_ZNSt14numeric_limitsIdE7epsilonEv() #6
  %36 = call double @sqrt(double noundef %35) #6
  %37 = call noundef double @_ZSt3absd(double noundef %.0121)
  %38 = fmul double %36, %37
  %39 = fmul double %38, 2.000000e+00
  %40 = call noundef double @_ZSt3absd(double noundef %.0104)
  %41 = fcmp ogt double %40, %39
  br i1 %41, label %42, label %57

42:                                               ; preds = %30
  %43 = fsub double %.0121, %.0123
  %44 = fsub double %.0115, %.0119
  %45 = fmul double %43, %44
  %46 = fsub double %.0121, %.0126
  %47 = fsub double %.0115, %.0117
  %48 = fmul double %46, %47
  %49 = fneg double %43
  %50 = fmul double %45, %49
  %51 = call double @llvm.fmuladd.f64(double %46, double %48, double %50)
  %52 = fsub double %48, %45
  %53 = fmul double %52, 2.000000e+00
  %54 = fcmp ogt double %53, 0.000000e+00
  %55 = fneg double %51
  %56 = fneg double %53
  %.1113 = select i1 %54, double %55, double %51
  %.1110 = select i1 %54, double %53, double %56
  br label %57

57:                                               ; preds = %42, %30
  %.2114 = phi double [ %.1113, %42 ], [ %.0112, %30 ]
  %.2111 = phi double [ %.1110, %42 ], [ %.0109, %30 ]
  %.1108 = phi double [ %.0104, %42 ], [ %.0107, %30 ]
  %.1 = phi double [ %.0105, %42 ], [ %.0104, %30 ]
  %58 = call noundef double @_ZSt3absd(double noundef %.2114)
  %59 = fmul double %.2111, 5.000000e-01
  %60 = fmul double %59, %.1108
  %61 = call noundef double @_ZSt3absd(double noundef %60)
  %62 = fcmp olt double %58, %61
  %.pre143 = load double, ptr %5, align 8
  br i1 %62, label %63, label %79

63:                                               ; preds = %57
  %64 = fsub double %.pre143, %.0121
  %65 = fmul double %.2111, %64
  %66 = fcmp olt double %.2114, %65
  br i1 %66, label %67, label %79

67:                                               ; preds = %63
  %68 = fdiv double %.2114, %.2111
  %69 = fadd double %.0121, %68
  %70 = load double, ptr %4, align 8, !tbaa !5
  %71 = fsub double %69, %70
  %72 = fcmp olt double %71, %39
  %73 = fsub double %.pre143, %69
  %74 = fcmp olt double %73, %39
  %or.cond = or i1 %74, %72
  br i1 %or.cond, label %75, label %85

75:                                               ; preds = %67
  %76 = fcmp olt double %.0121, %34
  %77 = fneg double %38
  %78 = select i1 %76, double %38, double %77
  br label %85

79:                                               ; preds = %63, %57
  %80 = fcmp olt double %.0121, %34
  %81 = load double, ptr %4, align 8
  %82 = select i1 %80, double %.pre143, double %81
  %83 = fsub double %82, %.0121
  %84 = fmul double %83, %24
  br label %85

85:                                               ; preds = %67, %75, %79
  %.1106 = phi double [ %78, %75 ], [ %84, %79 ], [ %68, %67 ]
  %.2 = phi double [ %.1, %75 ], [ %83, %79 ], [ %.1, %67 ]
  %86 = call noundef double @_ZSt3absd(double noundef %.1106)
  %87 = fcmp ult double %86, %38
  br i1 %87, label %88, label %92

88:                                               ; preds = %85
  %89 = fcmp ogt double %.1106, 0.000000e+00
  br i1 %89, label %92, label %90

90:                                               ; preds = %88
  %91 = fneg double %38
  br label %92

92:                                               ; preds = %88, %85, %90
  %.0125 = phi double [ %91, %90 ], [ %.1106, %85 ], [ %38, %88 ]
  %93 = fadd double %.0121, %.0125
  %94 = call noundef double @_ZNKSt8functionIFddEEclEd(ptr noundef nonnull align 8 dereferenceable(32) %0, double noundef %93)
  %95 = fcmp ugt double %94, %.0115
  %96 = fcmp olt double %93, %.0121
  br i1 %95, label %100, label %97

97:                                               ; preds = %92
  br i1 %96, label %98, label %99

98:                                               ; preds = %97
  store double %.0121, ptr %5, align 8, !tbaa !5
  br label %111

99:                                               ; preds = %97
  store double %.0121, ptr %4, align 8, !tbaa !5
  br label %111

100:                                              ; preds = %92
  br i1 %96, label %101, label %102

101:                                              ; preds = %100
  store double %93, ptr %4, align 8, !tbaa !5
  br label %103

102:                                              ; preds = %100
  store double %93, ptr %5, align 8, !tbaa !5
  br label %103

103:                                              ; preds = %102, %101
  %104 = fcmp ole double %94, %.0117
  %105 = fcmp oeq double %.0121, %.0123
  %or.cond139 = select i1 %104, i1 true, i1 %105
  br i1 %or.cond139, label %111, label %106

106:                                              ; preds = %103
  %107 = fcmp ole double %94, %.0119
  %108 = fcmp oeq double %.0126, %.0121
  %or.cond140 = select i1 %107, i1 true, i1 %108
  %109 = fcmp oeq double %.0126, %.0123
  %or.cond141 = select i1 %or.cond140, i1 true, i1 %109
  br i1 %or.cond141, label %110, label %111

110:                                              ; preds = %106
  br label %111

111:                                              ; preds = %106, %103, %98, %99, %110
  %.1127 = phi double [ %93, %110 ], [ %.0123, %99 ], [ %.0123, %98 ], [ %.0123, %103 ], [ %.0126, %106 ]
  %.1124 = phi double [ %.0123, %110 ], [ %.0121, %99 ], [ %.0121, %98 ], [ %93, %103 ], [ %.0123, %106 ]
  %.1122 = phi double [ %.0121, %110 ], [ %93, %99 ], [ %93, %98 ], [ %.0121, %103 ], [ %.0121, %106 ]
  %.1120 = phi double [ %94, %110 ], [ %.0117, %99 ], [ %.0117, %98 ], [ %.0117, %103 ], [ %.0119, %106 ]
  %.1118 = phi double [ %.0117, %110 ], [ %.0115, %99 ], [ %.0115, %98 ], [ %94, %103 ], [ %.0117, %106 ]
  %.1116 = phi double [ %.0115, %110 ], [ %94, %99 ], [ %94, %98 ], [ %.0115, %103 ], [ %.0115, %106 ]
  %112 = add i32 %.0103, 1
  %113 = fsub double %.1122, %34
  %114 = call noundef double @_ZSt3absd(double noundef %113)
  %115 = load double, ptr %5, align 8, !tbaa !5
  %116 = load double, ptr %4, align 8, !tbaa !5
  %117 = fsub double %115, %116
  %118 = fmul double %117, 5.000000e-01
  %119 = fsub double %38, %118
  %120 = fcmp ogt double %114, %119
  br i1 %120, label %30, label %121, !llvm.loop !9

121:                                              ; preds = %111
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %122, i32 noundef %112)
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %123, ptr noundef nonnull @.str.3)
  br label %125

125:                                              ; preds = %121, %14
  %.0 = phi double [ %.1122, %121 ], [ %1, %14 ]
  ret double %.0
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNSt14numeric_limitsIdE7epsilonEv() local_unnamed_addr #3 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNKSt8functionIFddEEclEd(ptr noundef nonnull align 8 dereferenceable(32), double noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #0 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 = { 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 nofree nounwind willreturn memory(write) "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 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass