; LLVM IR from robotic-vision-lab/Cloud-Object-Recognition-Engine :: 3rdparty/libsvm/svm.ll (ZN6Solver18select_working_setERiS0_)

; 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.Solver = type <{ ptr, i32, [4 x i8], ptr, ptr, ptr, ptr, ptr, ptr, double, double, double, ptr, ptr, ptr, i32, i8, [3 x i8] }>

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6Solver14is_lower_boundEi(ptr noundef nonnull align 8 dereferenceable(117), i32 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6Solver14is_upper_boundEi(ptr noundef nonnull align 8 dereferenceable(117), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN6Solver18select_working_setERiS0_(ptr noundef nonnull align 8 dereferenceable(117) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2) unnamed_addr #3 align 2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca double, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %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
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %24 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store double 0xFFF0000000000000, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store double 0xFFF0000000000000, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 -1, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 -1, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store double 0x7FF0000000000000, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !11
  br label %25

25:                                               ; preds = %87, %3
  %26 = load i32, ptr %13, align 4, !tbaa !11
  %27 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 1
  %28 = load i32, ptr %27, align 8, !tbaa !13
  %29 = icmp slt i32 %26, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %90

31:                                               ; preds = %25
  %32 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 3
  %33 = load ptr, ptr %32, align 8, !tbaa !16
  %34 = load i32, ptr %13, align 4, !tbaa !11
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i8, ptr %33, i64 %35
  %37 = load i8, ptr %36, align 1, !tbaa !17
  %38 = sext i8 %37 to i32
  %39 = icmp eq i32 %38, 1
  br i1 %39, label %40, label %64

40:                                               ; preds = %31
  %41 = load i32, ptr %13, align 4, !tbaa !11
  %42 = call noundef zeroext i1 @_ZN6Solver14is_upper_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %24, i32 noundef %41)
  br i1 %42, label %63, label %43

43:                                               ; preds = %40
  %44 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 4
  %45 = load ptr, ptr %44, align 8, !tbaa !18
  %46 = load i32, ptr %13, align 4, !tbaa !11
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds double, ptr %45, i64 %47
  %49 = load double, ptr %48, align 8, !tbaa !9
  %50 = fneg double %49
  %51 = load double, ptr %8, align 8, !tbaa !9
  %52 = fcmp oge double %50, %51
  br i1 %52, label %53, label %62

53:                                               ; preds = %43
  %54 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 4
  %55 = load ptr, ptr %54, align 8, !tbaa !18
  %56 = load i32, ptr %13, align 4, !tbaa !11
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds double, ptr %55, i64 %57
  %59 = load double, ptr %58, align 8, !tbaa !9
  %60 = fneg double %59
  store double %60, ptr %8, align 8, !tbaa !9
  %61 = load i32, ptr %13, align 4, !tbaa !11
  store i32 %61, ptr %10, align 4, !tbaa !11
  br label %62

62:                                               ; preds = %53, %43
  br label %63

63:                                               ; preds = %62, %40
  br label %86

64:                                               ; preds = %31
  %65 = load i32, ptr %13, align 4, !tbaa !11
  %66 = call noundef zeroext i1 @_ZN6Solver14is_lower_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %24, i32 noundef %65)
  br i1 %66, label %85, label %67

67:                                               ; preds = %64
  %68 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 4
  %69 = load ptr, ptr %68, align 8, !tbaa !18
  %70 = load i32, ptr %13, align 4, !tbaa !11
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds double, ptr %69, i64 %71
  %73 = load double, ptr %72, align 8, !tbaa !9
  %74 = load double, ptr %8, align 8, !tbaa !9
  %75 = fcmp oge double %73, %74
  br i1 %75, label %76, label %84

76:                                               ; preds = %67
  %77 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 4
  %78 = load ptr, ptr %77, align 8, !tbaa !18
  %79 = load i32, ptr %13, align 4, !tbaa !11
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds double, ptr %78, i64 %80
  %82 = load double, ptr %81, align 8, !tbaa !9
  store double %82, ptr %8, align 8, !tbaa !9
  %83 = load i32, ptr %13, align 4, !tbaa !11
  store i32 %83, ptr %10, align 4, !tbaa !11
  br label %84

84:                                               ; preds = %76, %67
  br label %85

85:                                               ; preds = %84, %64
  br label %86

86:                                               ; preds = %85, %63
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %13, align 4, !tbaa !11
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %13, align 4, !tbaa !11
  br label %25, !llvm.loop !19

90:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %91 = load i32, ptr %10, align 4, !tbaa !11
  store i32 %91, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store ptr null, ptr %15, align 8, !tbaa !5
  %92 = load i32, ptr %14, align 4, !tbaa !11
  %93 = icmp ne i32 %92, -1
  br i1 %93, label %94, label %104

94:                                               ; preds = %90
  %95 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 7
  %96 = load ptr, ptr %95, align 8, !tbaa !21
  %97 = load i32, ptr %14, align 4, !tbaa !11
  %98 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 1
  %99 = load i32, ptr %98, align 8, !tbaa !13
  %100 = load ptr, ptr %96, align 8, !tbaa !22
  %101 = getelementptr inbounds ptr, ptr %100, i64 0
  %102 = load ptr, ptr %101, align 8
  %103 = call noundef ptr %102(ptr noundef nonnull align 8 dereferenceable(8) %96, i32 noundef %97, i32 noundef %99)
  store ptr %103, ptr %15, align 8, !tbaa !5
  br label %104

104:                                              ; preds = %94, %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !11
  br label %105

105:                                              ; preds = %294, %104
  %106 = load i32, ptr %16, align 4, !tbaa !11
  %107 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 1
  %108 = load i32, ptr %107, align 8, !tbaa !13
  %109 = icmp slt i32 %106, %108
  br i1 %109, label %111, label %110

110:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %297

111:                                              ; preds = %105
  %112 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 3
  %113 = load ptr, ptr %112, align 8, !tbaa !16
  %114 = load i32, ptr %16, align 4, !tbaa !11
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds i8, ptr %113, i64 %115
  %117 = load i8, ptr %116, align 1, !tbaa !17
  %118 = sext i8 %117 to i32
  %119 = icmp eq i32 %118, 1
  br i1 %119, label %120, label %206

120:                                              ; preds = %111
  %121 = load i32, ptr %16, align 4, !tbaa !11
  %122 = call noundef zeroext i1 @_ZN6Solver14is_lower_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %24, i32 noundef %121)
  br i1 %122, label %205, label %123

123:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %124 = load double, ptr %8, align 8, !tbaa !9
  %125 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 4
  %126 = load ptr, ptr %125, align 8, !tbaa !18
  %127 = load i32, ptr %16, align 4, !tbaa !11
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds double, ptr %126, i64 %128
  %130 = load double, ptr %129, align 8, !tbaa !9
  %131 = fadd double %124, %130
  store double %131, ptr %17, align 8, !tbaa !9
  %132 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 4
  %133 = load ptr, ptr %132, align 8, !tbaa !18
  %134 = load i32, ptr %16, align 4, !tbaa !11
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds double, ptr %133, i64 %135
  %137 = load double, ptr %136, align 8, !tbaa !9
  %138 = load double, ptr %9, align 8, !tbaa !9
  %139 = fcmp oge double %137, %138
  br i1 %139, label %140, label %147

140:                                              ; preds = %123
  %141 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 4
  %142 = load ptr, ptr %141, align 8, !tbaa !18
  %143 = load i32, ptr %16, align 4, !tbaa !11
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds double, ptr %142, i64 %144
  %146 = load double, ptr %145, align 8, !tbaa !9
  store double %146, ptr %9, align 8, !tbaa !9
  br label %147

147:                                              ; preds = %140, %123
  %148 = load double, ptr %17, align 8, !tbaa !9
  %149 = fcmp ogt double %148, 0.000000e+00
  br i1 %149, label %150, label %204

150:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %151 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 8
  %152 = load ptr, ptr %151, align 8, !tbaa !24
  %153 = load i32, ptr %14, align 4, !tbaa !11
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds double, ptr %152, i64 %154
  %156 = load double, ptr %155, align 8, !tbaa !9
  %157 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 8
  %158 = load ptr, ptr %157, align 8, !tbaa !24
  %159 = load i32, ptr %16, align 4, !tbaa !11
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds double, ptr %158, i64 %160
  %162 = load double, ptr %161, align 8, !tbaa !9
  %163 = fadd double %156, %162
  %164 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 3
  %165 = load ptr, ptr %164, align 8, !tbaa !16
  %166 = load i32, ptr %14, align 4, !tbaa !11
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds i8, ptr %165, i64 %167
  %169 = load i8, ptr %168, align 1, !tbaa !17
  %170 = sext i8 %169 to i32
  %171 = sitofp i32 %170 to double
  %172 = fmul double 2.000000e+00, %171
  %173 = load ptr, ptr %15, align 8, !tbaa !5
  %174 = load i32, ptr %16, align 4, !tbaa !11
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds float, ptr %173, i64 %175
  %177 = load float, ptr %176, align 4, !tbaa !25
  %178 = fpext float %177 to double
  %179 = fneg double %172
  %180 = call double @llvm.fmuladd.f64(double %179, double %178, double %163)
  store double %180, ptr %19, align 8, !tbaa !9
  %181 = load double, ptr %19, align 8, !tbaa !9
  %182 = fcmp ogt double %181, 0.000000e+00
  br i1 %182, label %183, label %190

183:                                              ; preds = %150
  %184 = load double, ptr %17, align 8, !tbaa !9
  %185 = load double, ptr %17, align 8, !tbaa !9
  %186 = fmul double %184, %185
  %187 = fneg double %186
  %188 = load double, ptr %19, align 8, !tbaa !9
  %189 = fdiv double %187, %188
  store double %189, ptr %18, align 8, !tbaa !9
  br label %196

190:                                              ; preds = %150
  %191 = load double, ptr %17, align 8, !tbaa !9
  %192 = load double, ptr %17, align 8, !tbaa !9
  %193 = fmul double %191, %192
  %194 = fneg double %193
  %195 = fdiv double %194, 0x3D719799812DEA11
  store double %195, ptr %18, align 8, !tbaa !9
  br label %196

196:                                              ; preds = %190, %183
  %197 = load double, ptr %18, align 8, !tbaa !9
  %198 = load double, ptr %12, align 8, !tbaa !9
  %199 = fcmp ole double %197, %198
  br i1 %199, label %200, label %203

200:                                              ; preds = %196
  %201 = load i32, ptr %16, align 4, !tbaa !11
  store i32 %201, ptr %11, align 4, !tbaa !11
  %202 = load double, ptr %18, align 8, !tbaa !9
  store double %202, ptr %12, align 8, !tbaa !9
  br label %203

203:                                              ; preds = %200, %196
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %204

204:                                              ; preds = %203, %147
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %205

205:                                              ; preds = %204, %120
  br label %293

206:                                              ; preds = %111
  %207 = load i32, ptr %16, align 4, !tbaa !11
  %208 = call noundef zeroext i1 @_ZN6Solver14is_upper_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %24, i32 noundef %207)
  br i1 %208, label %292, label %209

209:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %210 = load double, ptr %8, align 8, !tbaa !9
  %211 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 4
  %212 = load ptr, ptr %211, align 8, !tbaa !18
  %213 = load i32, ptr %16, align 4, !tbaa !11
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds double, ptr %212, i64 %214
  %216 = load double, ptr %215, align 8, !tbaa !9
  %217 = fsub double %210, %216
  store double %217, ptr %20, align 8, !tbaa !9
  %218 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 4
  %219 = load ptr, ptr %218, align 8, !tbaa !18
  %220 = load i32, ptr %16, align 4, !tbaa !11
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds double, ptr %219, i64 %221
  %223 = load double, ptr %222, align 8, !tbaa !9
  %224 = fneg double %223
  %225 = load double, ptr %9, align 8, !tbaa !9
  %226 = fcmp oge double %224, %225
  br i1 %226, label %227, label %235

227:                                              ; preds = %209
  %228 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 4
  %229 = load ptr, ptr %228, align 8, !tbaa !18
  %230 = load i32, ptr %16, align 4, !tbaa !11
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds double, ptr %229, i64 %231
  %233 = load double, ptr %232, align 8, !tbaa !9
  %234 = fneg double %233
  store double %234, ptr %9, align 8, !tbaa !9
  br label %235

235:                                              ; preds = %227, %209
  %236 = load double, ptr %20, align 8, !tbaa !9
  %237 = fcmp ogt double %236, 0.000000e+00
  br i1 %237, label %238, label %291

238:                                              ; preds = %235
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %239 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 8
  %240 = load ptr, ptr %239, align 8, !tbaa !24
  %241 = load i32, ptr %14, align 4, !tbaa !11
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds double, ptr %240, i64 %242
  %244 = load double, ptr %243, align 8, !tbaa !9
  %245 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 8
  %246 = load ptr, ptr %245, align 8, !tbaa !24
  %247 = load i32, ptr %16, align 4, !tbaa !11
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds double, ptr %246, i64 %248
  %250 = load double, ptr %249, align 8, !tbaa !9
  %251 = fadd double %244, %250
  %252 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 3
  %253 = load ptr, ptr %252, align 8, !tbaa !16
  %254 = load i32, ptr %14, align 4, !tbaa !11
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds i8, ptr %253, i64 %255
  %257 = load i8, ptr %256, align 1, !tbaa !17
  %258 = sext i8 %257 to i32
  %259 = sitofp i32 %258 to double
  %260 = fmul double 2.000000e+00, %259
  %261 = load ptr, ptr %15, align 8, !tbaa !5
  %262 = load i32, ptr %16, align 4, !tbaa !11
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds float, ptr %261, i64 %263
  %265 = load float, ptr %264, align 4, !tbaa !25
  %266 = fpext float %265 to double
  %267 = call double @llvm.fmuladd.f64(double %260, double %266, double %251)
  store double %267, ptr %22, align 8, !tbaa !9
  %268 = load double, ptr %22, align 8, !tbaa !9
  %269 = fcmp ogt double %268, 0.000000e+00
  br i1 %269, label %270, label %277

270:                                              ; preds = %238
  %271 = load double, ptr %20, align 8, !tbaa !9
  %272 = load double, ptr %20, align 8, !tbaa !9
  %273 = fmul double %271, %272
  %274 = fneg double %273
  %275 = load double, ptr %22, align 8, !tbaa !9
  %276 = fdiv double %274, %275
  store double %276, ptr %21, align 8, !tbaa !9
  br label %283

277:                                              ; preds = %238
  %278 = load double, ptr %20, align 8, !tbaa !9
  %279 = load double, ptr %20, align 8, !tbaa !9
  %280 = fmul double %278, %279
  %281 = fneg double %280
  %282 = fdiv double %281, 0x3D719799812DEA11
  store double %282, ptr %21, align 8, !tbaa !9
  br label %283

283:                                              ; preds = %277, %270
  %284 = load double, ptr %21, align 8, !tbaa !9
  %285 = load double, ptr %12, align 8, !tbaa !9
  %286 = fcmp ole double %284, %285
  br i1 %286, label %287, label %290

287:                                              ; preds = %283
  %288 = load i32, ptr %16, align 4, !tbaa !11
  store i32 %288, ptr %11, align 4, !tbaa !11
  %289 = load double, ptr %21, align 8, !tbaa !9
  store double %289, ptr %12, align 8, !tbaa !9
  br label %290

290:                                              ; preds = %287, %283
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  br label %291

291:                                              ; preds = %290, %235
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  br label %292

292:                                              ; preds = %291, %206
  br label %293

293:                                              ; preds = %292, %205
  br label %294

294:                                              ; preds = %293
  %295 = load i32, ptr %16, align 4, !tbaa !11
  %296 = add nsw i32 %295, 1
  store i32 %296, ptr %16, align 4, !tbaa !11
  br label %105, !llvm.loop !27

297:                                              ; preds = %110
  %298 = load double, ptr %8, align 8, !tbaa !9
  %299 = load double, ptr %9, align 8, !tbaa !9
  %300 = fadd double %298, %299
  %301 = getelementptr inbounds %class.Solver, ptr %24, i32 0, i32 9
  %302 = load double, ptr %301, align 8, !tbaa !28
  %303 = fcmp olt double %300, %302
  br i1 %303, label %304, label %305

304:                                              ; preds = %297
  store i32 1, ptr %4, align 4
  store i32 1, ptr %23, align 4
  br label %310

305:                                              ; preds = %297
  %306 = load i32, ptr %10, align 4, !tbaa !11
  %307 = load ptr, ptr %6, align 8, !tbaa !5
  store i32 %306, ptr %307, align 4, !tbaa !11
  %308 = load i32, ptr %11, align 4, !tbaa !11
  %309 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 %308, ptr %309, align 4, !tbaa !11
  store i32 0, ptr %4, align 4
  store i32 1, ptr %23, align 4
  br label %310

310:                                              ; preds = %305, %304
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %311 = load i32, ptr %4, align 4
  ret i32 %311
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 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, !12, i64 8}
!14 = !{!"_ZTS6Solver", !12, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !12, i64 112, !15, i64 116}
!15 = !{!"bool", !7, i64 0}
!16 = !{!14, !6, i64 16}
!17 = !{!7, !7, i64 0}
!18 = !{!14, !6, i64 24}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!14, !6, i64 48}
!22 = !{!23, !23, i64 0}
!23 = !{!"vtable pointer", !8, i64 0}
!24 = !{!14, !6, i64 56}
!25 = !{!26, !26, i64 0}
!26 = !{!"float", !7, i64 0}
!27 = distinct !{!27, !20}
!28 = !{!14, !10, i64 64}


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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6Solver14is_lower_boundEi(ptr noundef nonnull align 8 dereferenceable(117), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6Solver14is_upper_boundEi(ptr noundef nonnull align 8 dereferenceable(117), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN6Solver18select_working_setERiS0_(ptr noundef nonnull align 8 dereferenceable(117) %0, ptr nocapture noundef nonnull writeonly align 4 dereferenceable(4) %1, ptr nocapture noundef nonnull writeonly align 4 dereferenceable(4) %2) unnamed_addr #2 align 2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %._crit_edge112

.lr.ph:                                           ; preds = %3
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = getelementptr inbounds i8, ptr %0, i64 24
  br label %9

._crit_edge:                                      ; preds = %32
  %.not = icmp eq i32 %.176, -1
  br i1 %.not, label %42, label %36

9:                                                ; preds = %.lr.ph, %32
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %32 ]
  %.071103 = phi double [ 0xFFF0000000000000, %.lr.ph ], [ %.1, %32 ]
  %.075102 = phi i32 [ -1, %.lr.ph ], [ %.176, %32 ]
  %10 = load ptr, ptr %7, align 8, !tbaa !13
  %11 = getelementptr inbounds i8, ptr %10, i64 %indvars.iv
  %12 = load i8, ptr %11, align 1, !tbaa !14
  %13 = icmp eq i8 %12, 1
  %14 = trunc nuw nsw i64 %indvars.iv to i32
  br i1 %13, label %15, label %24

15:                                               ; preds = %9
  %16 = tail call noundef zeroext i1 @_ZN6Solver14is_upper_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %0, i32 noundef %14)
  br i1 %16, label %32, label %17

17:                                               ; preds = %15
  %18 = load ptr, ptr %8, align 8, !tbaa !15
  %19 = getelementptr inbounds double, ptr %18, i64 %indvars.iv
  %20 = load double, ptr %19, align 8, !tbaa !16
  %21 = fneg double %20
  %22 = fcmp ugt double %.071103, %21
  br i1 %22, label %32, label %23

23:                                               ; preds = %17
  br label %32

24:                                               ; preds = %9
  %25 = tail call noundef zeroext i1 @_ZN6Solver14is_lower_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %0, i32 noundef %14)
  br i1 %25, label %32, label %26

26:                                               ; preds = %24
  %27 = load ptr, ptr %8, align 8, !tbaa !15
  %28 = getelementptr inbounds double, ptr %27, i64 %indvars.iv
  %29 = load double, ptr %28, align 8, !tbaa !16
  %30 = fcmp ult double %29, %.071103
  br i1 %30, label %32, label %31

31:                                               ; preds = %26
  br label %32

32:                                               ; preds = %17, %23, %15, %26, %31, %24
  %.176 = phi i32 [ %.075102, %15 ], [ %14, %23 ], [ %.075102, %17 ], [ %.075102, %24 ], [ %14, %31 ], [ %.075102, %26 ]
  %.1 = phi double [ %.071103, %15 ], [ %21, %23 ], [ %.071103, %17 ], [ %.071103, %24 ], [ %29, %31 ], [ %.071103, %26 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %33 = load i32, ptr %4, align 8, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = icmp slt i64 %indvars.iv.next, %34
  br i1 %35, label %9, label %._crit_edge, !llvm.loop !17

36:                                               ; preds = %._crit_edge
  %37 = getelementptr inbounds i8, ptr %0, i64 48
  %38 = load ptr, ptr %37, align 8, !tbaa !19
  %39 = load ptr, ptr %38, align 8, !tbaa !20
  %40 = load ptr, ptr %39, align 8
  %41 = tail call noundef ptr %40(ptr noundef nonnull align 8 dereferenceable(8) %38, i32 noundef %.176, i32 noundef %33)
  %.pre = load i32, ptr %4, align 8, !tbaa !5
  br label %42

42:                                               ; preds = %36, %._crit_edge
  %.075.lcssa124 = phi i32 [ %.176, %36 ], [ -1, %._crit_edge ]
  %43 = phi i32 [ %.pre, %36 ], [ %33, %._crit_edge ]
  %.078 = phi ptr [ %41, %36 ], [ null, %._crit_edge ]
  %44 = icmp sgt i32 %43, 0
  br i1 %44, label %.lr.ph111, label %._crit_edge112

.lr.ph111:                                        ; preds = %42
  %45 = getelementptr inbounds i8, ptr %0, i64 16
  %46 = getelementptr inbounds i8, ptr %0, i64 24
  %47 = getelementptr inbounds i8, ptr %0, i64 56
  %48 = sext i32 %.075.lcssa124 to i64
  br label %53

._crit_edge112:                                   ; preds = %118, %3, %42
  %.075.lcssa124130 = phi i32 [ %.075.lcssa124, %42 ], [ -1, %3 ], [ %.075.lcssa124, %118 ]
  %.071.lcssa125129 = phi double [ %.1, %42 ], [ 0xFFF0000000000000, %3 ], [ %.1, %118 ]
  %.079.lcssa = phi i32 [ -1, %42 ], [ -1, %3 ], [ %.5, %118 ]
  %.072.lcssa = phi double [ 0xFFF0000000000000, %42 ], [ 0xFFF0000000000000, %3 ], [ %.3, %118 ]
  %49 = fadd double %.071.lcssa125129, %.072.lcssa
  %50 = getelementptr inbounds i8, ptr %0, i64 64
  %51 = load double, ptr %50, align 8, !tbaa !22
  %52 = fcmp olt double %49, %51
  br i1 %52, label %123, label %122

53:                                               ; preds = %.lr.ph111, %118
  %indvars.iv117 = phi i64 [ 0, %.lr.ph111 ], [ %indvars.iv.next118, %118 ]
  %.072109 = phi double [ 0xFFF0000000000000, %.lr.ph111 ], [ %.3, %118 ]
  %.079107 = phi i32 [ -1, %.lr.ph111 ], [ %.5, %118 ]
  %.084106 = phi double [ 0x7FF0000000000000, %.lr.ph111 ], [ %.589, %118 ]
  %54 = load ptr, ptr %45, align 8, !tbaa !13
  %55 = getelementptr inbounds i8, ptr %54, i64 %indvars.iv117
  %56 = load i8, ptr %55, align 1, !tbaa !14
  %57 = icmp eq i8 %56, 1
  %58 = trunc nuw nsw i64 %indvars.iv117 to i32
  br i1 %57, label %59, label %88

59:                                               ; preds = %53
  %60 = tail call noundef zeroext i1 @_ZN6Solver14is_lower_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %0, i32 noundef %58)
  br i1 %60, label %118, label %61

61:                                               ; preds = %59
  %62 = load ptr, ptr %46, align 8, !tbaa !15
  %63 = getelementptr inbounds double, ptr %62, i64 %indvars.iv117
  %64 = load double, ptr %63, align 8, !tbaa !16
  %65 = fadd double %.1, %64
  %.inv99 = fcmp oge double %64, %.072109
  %.173 = select i1 %.inv99, double %64, double %.072109
  %66 = fcmp ogt double %65, 0.000000e+00
  br i1 %66, label %67, label %118

67:                                               ; preds = %61
  %68 = load ptr, ptr %47, align 8, !tbaa !23
  %69 = getelementptr inbounds double, ptr %68, i64 %48
  %70 = load double, ptr %69, align 8, !tbaa !16
  %71 = getelementptr inbounds double, ptr %68, i64 %indvars.iv117
  %72 = load double, ptr %71, align 8, !tbaa !16
  %73 = fadd double %70, %72
  %74 = load ptr, ptr %45, align 8, !tbaa !13
  %75 = getelementptr inbounds i8, ptr %74, i64 %48
  %76 = load i8, ptr %75, align 1, !tbaa !14
  %77 = sitofp i8 %76 to double
  %78 = getelementptr inbounds float, ptr %.078, i64 %indvars.iv117
  %79 = load float, ptr %78, align 4, !tbaa !24
  %80 = fpext float %79 to double
  %81 = fmul double %77, -2.000000e+00
  %82 = tail call double @llvm.fmuladd.f64(double %81, double %80, double %73)
  %83 = fcmp ogt double %82, 0.000000e+00
  %84 = fneg double %65
  %85 = fmul double %65, %84
  %. = select i1 %83, double %82, double 0x3D719799812DEA11
  %86 = fdiv double %85, %.
  %87 = fcmp ugt double %86, %.084106
  %.185 = select i1 %87, double %.084106, double %86
  %.180 = select i1 %87, i32 %.079107, i32 %58
  br label %118

88:                                               ; preds = %53
  %89 = tail call noundef zeroext i1 @_ZN6Solver14is_upper_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %0, i32 noundef %58)
  br i1 %89, label %118, label %90

90:                                               ; preds = %88
  %91 = load ptr, ptr %46, align 8, !tbaa !15
  %92 = getelementptr inbounds double, ptr %91, i64 %indvars.iv117
  %93 = load double, ptr %92, align 8, !tbaa !16
  %94 = fsub double %.1, %93
  %95 = fneg double %93
  %.inv = fcmp ole double %.072109, %95
  %.2 = select i1 %.inv, double %95, double %.072109
  %96 = fcmp ogt double %94, 0.000000e+00
  br i1 %96, label %97, label %118

97:                                               ; preds = %90
  %98 = load ptr, ptr %47, align 8, !tbaa !23
  %99 = getelementptr inbounds double, ptr %98, i64 %48
  %100 = load double, ptr %99, align 8, !tbaa !16
  %101 = getelementptr inbounds double, ptr %98, i64 %indvars.iv117
  %102 = load double, ptr %101, align 8, !tbaa !16
  %103 = fadd double %100, %102
  %104 = load ptr, ptr %45, align 8, !tbaa !13
  %105 = getelementptr inbounds i8, ptr %104, i64 %48
  %106 = load i8, ptr %105, align 1, !tbaa !14
  %107 = sitofp i8 %106 to double
  %108 = fmul double %107, 2.000000e+00
  %109 = getelementptr inbounds float, ptr %.078, i64 %indvars.iv117
  %110 = load float, ptr %109, align 4, !tbaa !24
  %111 = fpext float %110 to double
  %112 = tail call double @llvm.fmuladd.f64(double %108, double %111, double %103)
  %113 = fcmp ogt double %112, 0.000000e+00
  %114 = fneg double %94
  %115 = fmul double %94, %114
  %.132 = select i1 %113, double %112, double 0x3D719799812DEA11
  %116 = fdiv double %115, %.132
  %117 = fcmp ugt double %116, %.084106
  %.387 = select i1 %117, double %.084106, double %116
  %.382 = select i1 %117, i32 %.079107, i32 %58
  br label %118

118:                                              ; preds = %90, %97, %61, %67, %59, %88
  %.589 = phi double [ %.084106, %59 ], [ %.084106, %88 ], [ %.185, %67 ], [ %.084106, %61 ], [ %.387, %97 ], [ %.084106, %90 ]
  %.5 = phi i32 [ %.079107, %59 ], [ %.079107, %88 ], [ %.180, %67 ], [ %.079107, %61 ], [ %.382, %97 ], [ %.079107, %90 ]
  %.3 = phi double [ %.072109, %59 ], [ %.072109, %88 ], [ %.173, %67 ], [ %.173, %61 ], [ %.2, %97 ], [ %.2, %90 ]
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %119 = load i32, ptr %4, align 8, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = icmp slt i64 %indvars.iv.next118, %120
  br i1 %121, label %53, label %._crit_edge112, !llvm.loop !26

122:                                              ; preds = %._crit_edge112
  store i32 %.075.lcssa124130, ptr %1, align 4, !tbaa !27
  store i32 %.079.lcssa, ptr %2, align 4, !tbaa !27
  br label %123

123:                                              ; preds = %._crit_edge112, %122
  %.0 = phi i32 [ 0, %122 ], [ 1, %._crit_edge112 ]
  ret i32 %.0
}

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

!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 8}
!6 = !{!"_ZTS6Solver", !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !7, i64 112, !12, i64 116}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!"bool", !8, i64 0}
!13 = !{!6, !10, i64 16}
!14 = !{!8, !8, i64 0}
!15 = !{!6, !10, i64 24}
!16 = !{!11, !11, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!6, !10, i64 48}
!20 = !{!21, !21, i64 0}
!21 = !{!"vtable pointer", !9, i64 0}
!22 = !{!6, !11, i64 64}
!23 = !{!6, !10, i64 56}
!24 = !{!25, !25, i64 0}
!25 = !{!"float", !8, i64 0}
!26 = distinct !{!26, !18}
!27 = !{!7, !7, i64 0}


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