; LLVM IR from robotic-vision-lab/Cloud-Object-Recognition-Engine :: 3rdparty/libsvm/svm.ll (ZN9Solver_NU18select_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: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6Solver14is_lower_boundEi(ptr noundef nonnull align 8 dereferenceable(117), i32 noundef) #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) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef double @_ZL3maxIdET_S0_S0_(double noundef, double noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN9Solver_NU18select_working_setERiS0_(ptr noundef nonnull align 8 dereferenceable(128) %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 double, align 8
  %12 = alloca double, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca double, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %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
  %27 = alloca double, align 8
  %28 = 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
  %29 = 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 8, ptr %11) #4
  store double 0xFFF0000000000000, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store double 0xFFF0000000000000, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 -1, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 -1, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store double 0x7FF0000000000000, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !11
  br label %30

30:                                               ; preds = %92, %3
  %31 = load i32, ptr %16, align 4, !tbaa !11
  %32 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 1
  %33 = load i32, ptr %32, align 8, !tbaa !13
  %34 = icmp slt i32 %31, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %95

36:                                               ; preds = %30
  %37 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 3
  %38 = load ptr, ptr %37, align 8, !tbaa !16
  %39 = load i32, ptr %16, align 4, !tbaa !11
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i8, ptr %38, i64 %40
  %42 = load i8, ptr %41, align 1, !tbaa !17
  %43 = sext i8 %42 to i32
  %44 = icmp eq i32 %43, 1
  br i1 %44, label %45, label %69

45:                                               ; preds = %36
  %46 = load i32, ptr %16, align 4, !tbaa !11
  %47 = call noundef zeroext i1 @_ZN6Solver14is_upper_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %29, i32 noundef %46)
  br i1 %47, label %68, label %48

48:                                               ; preds = %45
  %49 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 4
  %50 = load ptr, ptr %49, align 8, !tbaa !18
  %51 = load i32, ptr %16, align 4, !tbaa !11
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds double, ptr %50, i64 %52
  %54 = load double, ptr %53, align 8, !tbaa !9
  %55 = fneg double %54
  %56 = load double, ptr %8, align 8, !tbaa !9
  %57 = fcmp oge double %55, %56
  br i1 %57, label %58, label %67

58:                                               ; preds = %48
  %59 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 4
  %60 = load ptr, ptr %59, align 8, !tbaa !18
  %61 = load i32, ptr %16, align 4, !tbaa !11
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds double, ptr %60, i64 %62
  %64 = load double, ptr %63, align 8, !tbaa !9
  %65 = fneg double %64
  store double %65, ptr %8, align 8, !tbaa !9
  %66 = load i32, ptr %16, align 4, !tbaa !11
  store i32 %66, ptr %10, align 4, !tbaa !11
  br label %67

67:                                               ; preds = %58, %48
  br label %68

68:                                               ; preds = %67, %45
  br label %91

69:                                               ; preds = %36
  %70 = load i32, ptr %16, align 4, !tbaa !11
  %71 = call noundef zeroext i1 @_ZN6Solver14is_lower_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %29, i32 noundef %70)
  br i1 %71, label %90, label %72

72:                                               ; preds = %69
  %73 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 4
  %74 = load ptr, ptr %73, align 8, !tbaa !18
  %75 = load i32, ptr %16, align 4, !tbaa !11
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds double, ptr %74, i64 %76
  %78 = load double, ptr %77, align 8, !tbaa !9
  %79 = load double, ptr %11, align 8, !tbaa !9
  %80 = fcmp oge double %78, %79
  br i1 %80, label %81, label %89

81:                                               ; preds = %72
  %82 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 4
  %83 = load ptr, ptr %82, align 8, !tbaa !18
  %84 = load i32, ptr %16, align 4, !tbaa !11
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds double, ptr %83, i64 %85
  %87 = load double, ptr %86, align 8, !tbaa !9
  store double %87, ptr %11, align 8, !tbaa !9
  %88 = load i32, ptr %16, align 4, !tbaa !11
  store i32 %88, ptr %13, align 4, !tbaa !11
  br label %89

89:                                               ; preds = %81, %72
  br label %90

90:                                               ; preds = %89, %69
  br label %91

91:                                               ; preds = %90, %68
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %16, align 4, !tbaa !11
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %16, align 4, !tbaa !11
  br label %30, !llvm.loop !19

95:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %96 = load i32, ptr %10, align 4, !tbaa !11
  store i32 %96, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %97 = load i32, ptr %13, align 4, !tbaa !11
  store i32 %97, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  store ptr null, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  store ptr null, ptr %20, align 8, !tbaa !5
  %98 = load i32, ptr %17, align 4, !tbaa !11
  %99 = icmp ne i32 %98, -1
  br i1 %99, label %100, label %110

100:                                              ; preds = %95
  %101 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 7
  %102 = load ptr, ptr %101, align 8, !tbaa !21
  %103 = load i32, ptr %17, align 4, !tbaa !11
  %104 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 1
  %105 = load i32, ptr %104, align 8, !tbaa !13
  %106 = load ptr, ptr %102, align 8, !tbaa !22
  %107 = getelementptr inbounds ptr, ptr %106, i64 0
  %108 = load ptr, ptr %107, align 8
  %109 = call noundef ptr %108(ptr noundef nonnull align 8 dereferenceable(8) %102, i32 noundef %103, i32 noundef %105)
  store ptr %109, ptr %19, align 8, !tbaa !5
  br label %110

110:                                              ; preds = %100, %95
  %111 = load i32, ptr %18, align 4, !tbaa !11
  %112 = icmp ne i32 %111, -1
  br i1 %112, label %113, label %123

113:                                              ; preds = %110
  %114 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 7
  %115 = load ptr, ptr %114, align 8, !tbaa !21
  %116 = load i32, ptr %18, align 4, !tbaa !11
  %117 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 1
  %118 = load i32, ptr %117, align 8, !tbaa !13
  %119 = load ptr, ptr %115, align 8, !tbaa !22
  %120 = getelementptr inbounds ptr, ptr %119, i64 0
  %121 = load ptr, ptr %120, align 8
  %122 = call noundef ptr %121(ptr noundef nonnull align 8 dereferenceable(8) %115, i32 noundef %116, i32 noundef %118)
  store ptr %122, ptr %20, align 8, !tbaa !5
  br label %123

123:                                              ; preds = %113, %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  store i32 0, ptr %21, align 4, !tbaa !11
  br label %124

124:                                              ; preds = %296, %123
  %125 = load i32, ptr %21, align 4, !tbaa !11
  %126 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 1
  %127 = load i32, ptr %126, align 8, !tbaa !13
  %128 = icmp slt i32 %125, %127
  br i1 %128, label %130, label %129

129:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  br label %299

130:                                              ; preds = %124
  %131 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 3
  %132 = load ptr, ptr %131, align 8, !tbaa !16
  %133 = load i32, ptr %21, align 4, !tbaa !11
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds i8, ptr %132, i64 %134
  %136 = load i8, ptr %135, align 1, !tbaa !17
  %137 = sext i8 %136 to i32
  %138 = icmp eq i32 %137, 1
  br i1 %138, label %139, label %216

139:                                              ; preds = %130
  %140 = load i32, ptr %21, align 4, !tbaa !11
  %141 = call noundef zeroext i1 @_ZN6Solver14is_lower_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %29, i32 noundef %140)
  br i1 %141, label %215, label %142

142:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %143 = load double, ptr %8, align 8, !tbaa !9
  %144 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 4
  %145 = load ptr, ptr %144, align 8, !tbaa !18
  %146 = load i32, ptr %21, align 4, !tbaa !11
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds double, ptr %145, i64 %147
  %149 = load double, ptr %148, align 8, !tbaa !9
  %150 = fadd double %143, %149
  store double %150, ptr %22, align 8, !tbaa !9
  %151 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 4
  %152 = load ptr, ptr %151, align 8, !tbaa !18
  %153 = load i32, ptr %21, 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 = load double, ptr %9, align 8, !tbaa !9
  %158 = fcmp oge double %156, %157
  br i1 %158, label %159, label %166

159:                                              ; preds = %142
  %160 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 4
  %161 = load ptr, ptr %160, align 8, !tbaa !18
  %162 = load i32, ptr %21, align 4, !tbaa !11
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds double, ptr %161, i64 %163
  %165 = load double, ptr %164, align 8, !tbaa !9
  store double %165, ptr %9, align 8, !tbaa !9
  br label %166

166:                                              ; preds = %159, %142
  %167 = load double, ptr %22, align 8, !tbaa !9
  %168 = fcmp ogt double %167, 0.000000e+00
  br i1 %168, label %169, label %214

169:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %170 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 8
  %171 = load ptr, ptr %170, align 8, !tbaa !24
  %172 = load i32, ptr %17, align 4, !tbaa !11
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds double, ptr %171, i64 %173
  %175 = load double, ptr %174, align 8, !tbaa !9
  %176 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 8
  %177 = load ptr, ptr %176, align 8, !tbaa !24
  %178 = load i32, ptr %21, align 4, !tbaa !11
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds double, ptr %177, i64 %179
  %181 = load double, ptr %180, align 8, !tbaa !9
  %182 = fadd double %175, %181
  %183 = load ptr, ptr %19, align 8, !tbaa !5
  %184 = load i32, ptr %21, align 4, !tbaa !11
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds float, ptr %183, i64 %185
  %187 = load float, ptr %186, align 4, !tbaa !25
  %188 = fmul float 2.000000e+00, %187
  %189 = fpext float %188 to double
  %190 = fsub double %182, %189
  store double %190, ptr %24, align 8, !tbaa !9
  %191 = load double, ptr %24, align 8, !tbaa !9
  %192 = fcmp ogt double %191, 0.000000e+00
  br i1 %192, label %193, label %200

193:                                              ; preds = %169
  %194 = load double, ptr %22, align 8, !tbaa !9
  %195 = load double, ptr %22, align 8, !tbaa !9
  %196 = fmul double %194, %195
  %197 = fneg double %196
  %198 = load double, ptr %24, align 8, !tbaa !9
  %199 = fdiv double %197, %198
  store double %199, ptr %23, align 8, !tbaa !9
  br label %206

200:                                              ; preds = %169
  %201 = load double, ptr %22, align 8, !tbaa !9
  %202 = load double, ptr %22, align 8, !tbaa !9
  %203 = fmul double %201, %202
  %204 = fneg double %203
  %205 = fdiv double %204, 0x3D719799812DEA11
  store double %205, ptr %23, align 8, !tbaa !9
  br label %206

206:                                              ; preds = %200, %193
  %207 = load double, ptr %23, align 8, !tbaa !9
  %208 = load double, ptr %15, align 8, !tbaa !9
  %209 = fcmp ole double %207, %208
  br i1 %209, label %210, label %213

210:                                              ; preds = %206
  %211 = load i32, ptr %21, align 4, !tbaa !11
  store i32 %211, ptr %14, align 4, !tbaa !11
  %212 = load double, ptr %23, align 8, !tbaa !9
  store double %212, ptr %15, align 8, !tbaa !9
  br label %213

213:                                              ; preds = %210, %206
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  br label %214

214:                                              ; preds = %213, %166
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  br label %215

215:                                              ; preds = %214, %139
  br label %295

216:                                              ; preds = %130
  %217 = load i32, ptr %21, align 4, !tbaa !11
  %218 = call noundef zeroext i1 @_ZN6Solver14is_upper_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %29, i32 noundef %217)
  br i1 %218, label %294, label %219

219:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %220 = load double, ptr %11, align 8, !tbaa !9
  %221 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 4
  %222 = load ptr, ptr %221, align 8, !tbaa !18
  %223 = load i32, ptr %21, align 4, !tbaa !11
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds double, ptr %222, i64 %224
  %226 = load double, ptr %225, align 8, !tbaa !9
  %227 = fsub double %220, %226
  store double %227, ptr %25, align 8, !tbaa !9
  %228 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 4
  %229 = load ptr, ptr %228, align 8, !tbaa !18
  %230 = load i32, ptr %21, 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
  %235 = load double, ptr %12, align 8, !tbaa !9
  %236 = fcmp oge double %234, %235
  br i1 %236, label %237, label %245

237:                                              ; preds = %219
  %238 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 4
  %239 = load ptr, ptr %238, align 8, !tbaa !18
  %240 = load i32, ptr %21, align 4, !tbaa !11
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds double, ptr %239, i64 %241
  %243 = load double, ptr %242, align 8, !tbaa !9
  %244 = fneg double %243
  store double %244, ptr %12, align 8, !tbaa !9
  br label %245

245:                                              ; preds = %237, %219
  %246 = load double, ptr %25, align 8, !tbaa !9
  %247 = fcmp ogt double %246, 0.000000e+00
  br i1 %247, label %248, label %293

248:                                              ; preds = %245
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  %249 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 8
  %250 = load ptr, ptr %249, align 8, !tbaa !24
  %251 = load i32, ptr %18, align 4, !tbaa !11
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds double, ptr %250, i64 %252
  %254 = load double, ptr %253, align 8, !tbaa !9
  %255 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 8
  %256 = load ptr, ptr %255, align 8, !tbaa !24
  %257 = load i32, ptr %21, align 4, !tbaa !11
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds double, ptr %256, i64 %258
  %260 = load double, ptr %259, align 8, !tbaa !9
  %261 = fadd double %254, %260
  %262 = load ptr, ptr %20, align 8, !tbaa !5
  %263 = load i32, ptr %21, align 4, !tbaa !11
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds float, ptr %262, i64 %264
  %266 = load float, ptr %265, align 4, !tbaa !25
  %267 = fmul float 2.000000e+00, %266
  %268 = fpext float %267 to double
  %269 = fsub double %261, %268
  store double %269, ptr %27, align 8, !tbaa !9
  %270 = load double, ptr %27, align 8, !tbaa !9
  %271 = fcmp ogt double %270, 0.000000e+00
  br i1 %271, label %272, label %279

272:                                              ; preds = %248
  %273 = load double, ptr %25, align 8, !tbaa !9
  %274 = load double, ptr %25, align 8, !tbaa !9
  %275 = fmul double %273, %274
  %276 = fneg double %275
  %277 = load double, ptr %27, align 8, !tbaa !9
  %278 = fdiv double %276, %277
  store double %278, ptr %26, align 8, !tbaa !9
  br label %285

279:                                              ; preds = %248
  %280 = load double, ptr %25, align 8, !tbaa !9
  %281 = load double, ptr %25, align 8, !tbaa !9
  %282 = fmul double %280, %281
  %283 = fneg double %282
  %284 = fdiv double %283, 0x3D719799812DEA11
  store double %284, ptr %26, align 8, !tbaa !9
  br label %285

285:                                              ; preds = %279, %272
  %286 = load double, ptr %26, align 8, !tbaa !9
  %287 = load double, ptr %15, align 8, !tbaa !9
  %288 = fcmp ole double %286, %287
  br i1 %288, label %289, label %292

289:                                              ; preds = %285
  %290 = load i32, ptr %21, align 4, !tbaa !11
  store i32 %290, ptr %14, align 4, !tbaa !11
  %291 = load double, ptr %26, align 8, !tbaa !9
  store double %291, ptr %15, align 8, !tbaa !9
  br label %292

292:                                              ; preds = %289, %285
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  br label %293

293:                                              ; preds = %292, %245
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  br label %294

294:                                              ; preds = %293, %216
  br label %295

295:                                              ; preds = %294, %215
  br label %296

296:                                              ; preds = %295
  %297 = load i32, ptr %21, align 4, !tbaa !11
  %298 = add nsw i32 %297, 1
  store i32 %298, ptr %21, align 4, !tbaa !11
  br label %124, !llvm.loop !27

299:                                              ; preds = %129
  %300 = load double, ptr %8, align 8, !tbaa !9
  %301 = load double, ptr %9, align 8, !tbaa !9
  %302 = fadd double %300, %301
  %303 = load double, ptr %11, align 8, !tbaa !9
  %304 = load double, ptr %12, align 8, !tbaa !9
  %305 = fadd double %303, %304
  %306 = call noundef double @_ZL3maxIdET_S0_S0_(double noundef %302, double noundef %305)
  %307 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 9
  %308 = load double, ptr %307, align 8, !tbaa !28
  %309 = fcmp olt double %306, %308
  br i1 %309, label %310, label %311

310:                                              ; preds = %299
  store i32 1, ptr %4, align 4
  store i32 1, ptr %28, align 4
  br label %329

311:                                              ; preds = %299
  %312 = getelementptr inbounds %class.Solver, ptr %29, i32 0, i32 3
  %313 = load ptr, ptr %312, align 8, !tbaa !16
  %314 = load i32, ptr %14, align 4, !tbaa !11
  %315 = sext i32 %314 to i64
  %316 = getelementptr inbounds i8, ptr %313, i64 %315
  %317 = load i8, ptr %316, align 1, !tbaa !17
  %318 = sext i8 %317 to i32
  %319 = icmp eq i32 %318, 1
  br i1 %319, label %320, label %323

320:                                              ; preds = %311
  %321 = load i32, ptr %10, align 4, !tbaa !11
  %322 = load ptr, ptr %6, align 8, !tbaa !5
  store i32 %321, ptr %322, align 4, !tbaa !11
  br label %326

323:                                              ; preds = %311
  %324 = load i32, ptr %13, align 4, !tbaa !11
  %325 = load ptr, ptr %6, align 8, !tbaa !5
  store i32 %324, ptr %325, align 4, !tbaa !11
  br label %326

326:                                              ; preds = %323, %320
  %327 = load i32, ptr %14, align 4, !tbaa !11
  %328 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 %327, ptr %328, align 4, !tbaa !11
  store i32 0, ptr %4, align 4
  store i32 1, ptr %28, align 4
  br label %329

329:                                              ; preds = %326, %310
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  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 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, 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
  %330 = load i32, ptr %4, align 4
  ret i32 %330
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6Solver14is_lower_boundEi(ptr noundef nonnull align 8 dereferenceable(117), i32 noundef) local_unnamed_addr #0 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 #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef double @_ZL3maxIdET_S0_S0_(double noundef, double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN9Solver_NU18select_working_setERiS0_(ptr noundef nonnull align 8 dereferenceable(128) %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_edge131

.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 %.182, -1
  br i1 %.not, label %42, label %36

9:                                                ; preds = %.lr.ph, %32
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %32 ]
  %.077119 = phi double [ 0xFFF0000000000000, %.lr.ph ], [ %.1, %32 ]
  %.081118 = phi i32 [ -1, %.lr.ph ], [ %.182, %32 ]
  %.086117 = phi double [ 0xFFF0000000000000, %.lr.ph ], [ %.187, %32 ]
  %.0101115 = phi i32 [ -1, %.lr.ph ], [ %.1102, %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 %.077119, %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, %.086117
  br i1 %30, label %32, label %31

31:                                               ; preds = %26
  br label %32

32:                                               ; preds = %17, %23, %15, %26, %31, %24
  %.1102 = phi i32 [ %.0101115, %15 ], [ %.0101115, %23 ], [ %.0101115, %17 ], [ %.0101115, %24 ], [ %14, %31 ], [ %.0101115, %26 ]
  %.187 = phi double [ %.086117, %15 ], [ %.086117, %23 ], [ %.086117, %17 ], [ %.086117, %24 ], [ %29, %31 ], [ %.086117, %26 ]
  %.182 = phi i32 [ %.081118, %15 ], [ %14, %23 ], [ %.081118, %17 ], [ %.081118, %24 ], [ %.081118, %31 ], [ %.081118, %26 ]
  %.1 = phi double [ %.077119, %15 ], [ %21, %23 ], [ %.077119, %17 ], [ %.077119, %24 ], [ %.077119, %31 ], [ %.077119, %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 %.182, i32 noundef %33)
  %.pre140.pre = load i32, ptr %4, align 8, !tbaa !5
  br label %42

42:                                               ; preds = %36, %._crit_edge
  %.081.lcssa150 = phi i32 [ %.182, %36 ], [ -1, %._crit_edge ]
  %.pre140 = phi i32 [ %.pre140.pre, %36 ], [ %33, %._crit_edge ]
  %.085 = phi ptr [ %41, %36 ], [ null, %._crit_edge ]
  %.not112 = icmp eq i32 %.1102, -1
  br i1 %.not112, label %49, label %43

43:                                               ; preds = %42
  %44 = getelementptr inbounds i8, ptr %0, i64 48
  %45 = load ptr, ptr %44, align 8, !tbaa !19
  %46 = load ptr, ptr %45, align 8, !tbaa !20
  %47 = load ptr, ptr %46, align 8
  %48 = tail call noundef ptr %47(ptr noundef nonnull align 8 dereferenceable(8) %45, i32 noundef %.1102, i32 noundef %.pre140)
  %.pre = load i32, ptr %4, align 8, !tbaa !5
  br label %49

49:                                               ; preds = %43, %42
  %.0101.lcssa148162 = phi i32 [ %.1102, %43 ], [ -1, %42 ]
  %50 = phi i32 [ %.pre, %43 ], [ %.pre140, %42 ]
  %.084 = phi ptr [ %48, %43 ], [ null, %42 ]
  %51 = icmp sgt i32 %50, 0
  br i1 %51, label %.lr.ph130, label %._crit_edge131

.lr.ph130:                                        ; preds = %49
  %52 = getelementptr inbounds i8, ptr %0, i64 16
  %53 = getelementptr inbounds i8, ptr %0, i64 24
  %54 = getelementptr inbounds i8, ptr %0, i64 56
  br label %61

._crit_edge131:                                   ; preds = %100, %3, %49
  %.077.lcssa151159174 = phi double [ %.1, %49 ], [ 0xFFF0000000000000, %3 ], [ %.1, %100 ]
  %.081.lcssa150160173 = phi i32 [ %.081.lcssa150, %49 ], [ -1, %3 ], [ %.081.lcssa150, %100 ]
  %.086.lcssa149161172 = phi double [ %.187, %49 ], [ 0xFFF0000000000000, %3 ], [ %.187, %100 ]
  %.0101.lcssa148162171 = phi i32 [ %.0101.lcssa148162, %49 ], [ -1, %3 ], [ %.0101.lcssa148162, %100 ]
  %.095.lcssa = phi i32 [ -1, %49 ], [ -1, %3 ], [ %.5100, %100 ]
  %.088.lcssa = phi double [ 0xFFF0000000000000, %49 ], [ 0xFFF0000000000000, %3 ], [ %.290, %100 ]
  %.078.lcssa = phi double [ 0xFFF0000000000000, %49 ], [ 0xFFF0000000000000, %3 ], [ %.2, %100 ]
  %55 = fadd double %.077.lcssa151159174, %.078.lcssa
  %56 = fadd double %.086.lcssa149161172, %.088.lcssa
  %57 = tail call noundef double @_ZL3maxIdET_S0_S0_(double noundef %55, double noundef %56)
  %58 = getelementptr inbounds i8, ptr %0, i64 64
  %59 = load double, ptr %58, align 8, !tbaa !22
  %60 = fcmp olt double %57, %59
  br i1 %60, label %111, label %104

61:                                               ; preds = %.lr.ph130, %100
  %indvars.iv137 = phi i64 [ 0, %.lr.ph130 ], [ %indvars.iv.next138, %100 ]
  %.078128 = phi double [ 0xFFF0000000000000, %.lr.ph130 ], [ %.2, %100 ]
  %.088126 = phi double [ 0xFFF0000000000000, %.lr.ph130 ], [ %.290, %100 ]
  %.092125 = phi double [ 0x7FF0000000000000, %.lr.ph130 ], [ %.5, %100 ]
  %.095124 = phi i32 [ -1, %.lr.ph130 ], [ %.5100, %100 ]
  %62 = load ptr, ptr %52, align 8, !tbaa !13
  %63 = getelementptr inbounds i8, ptr %62, i64 %indvars.iv137
  %64 = load i8, ptr %63, align 1, !tbaa !14
  %65 = icmp eq i8 %64, 1
  %66 = trunc nuw nsw i64 %indvars.iv137 to i32
  br i1 %65, label %67, label %75

67:                                               ; preds = %61
  %68 = tail call noundef zeroext i1 @_ZN6Solver14is_lower_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %0, i32 noundef %66)
  br i1 %68, label %100, label %69

69:                                               ; preds = %67
  %70 = load ptr, ptr %53, align 8, !tbaa !15
  %71 = getelementptr inbounds double, ptr %70, i64 %indvars.iv137
  %72 = load double, ptr %71, align 8, !tbaa !16
  %73 = fadd double %.1, %72
  %.inv113 = fcmp oge double %72, %.078128
  %.179 = select i1 %.inv113, double %72, double %.078128
  %74 = fcmp ogt double %73, 0.000000e+00
  br i1 %74, label %.sink.split, label %100

75:                                               ; preds = %61
  %76 = tail call noundef zeroext i1 @_ZN6Solver14is_upper_boundEi(ptr noundef nonnull align 8 dereferenceable(117) %0, i32 noundef %66)
  br i1 %76, label %100, label %77

77:                                               ; preds = %75
  %78 = load ptr, ptr %53, align 8, !tbaa !15
  %79 = getelementptr inbounds double, ptr %78, i64 %indvars.iv137
  %80 = load double, ptr %79, align 8, !tbaa !16
  %81 = fsub double %.187, %80
  %82 = fneg double %80
  %.inv = fcmp ole double %.088126, %82
  %.189 = select i1 %.inv, double %82, double %.088126
  %83 = fcmp ogt double %81, 0.000000e+00
  br i1 %83, label %.sink.split, label %100

.sink.split:                                      ; preds = %77, %69
  %.sink196.in = phi i32 [ %.081.lcssa150, %69 ], [ %.0101.lcssa148162, %77 ]
  %.084.sink = phi ptr [ %.085, %69 ], [ %.084, %77 ]
  %.sink = phi double [ %73, %69 ], [ %81, %77 ]
  %.290.ph = phi double [ %.088126, %69 ], [ %.189, %77 ]
  %.2.ph = phi double [ %.179, %69 ], [ %.078128, %77 ]
  %.sink196 = sext i32 %.sink196.in to i64
  %84 = load ptr, ptr %54, align 8, !tbaa !23
  %85 = getelementptr inbounds double, ptr %84, i64 %.sink196
  %86 = load double, ptr %85, align 8, !tbaa !16
  %87 = getelementptr inbounds double, ptr %84, i64 %indvars.iv137
  %88 = load double, ptr %87, align 8, !tbaa !16
  %89 = fadd double %86, %88
  %90 = getelementptr inbounds float, ptr %.084.sink, i64 %indvars.iv137
  %91 = load float, ptr %90, align 4, !tbaa !24
  %92 = fmul float %91, 2.000000e+00
  %93 = fpext float %92 to double
  %94 = fsub double %89, %93
  %95 = fcmp ogt double %94, 0.000000e+00
  %96 = fneg double %.sink
  %97 = fmul double %.sink, %96
  %.176 = select i1 %95, double %94, double 0x3D719799812DEA11
  %98 = fdiv double %97, %.176
  %99 = fcmp ugt double %98, %.092125
  %.398 = select i1 %99, i32 %.095124, i32 %66
  %.3 = select i1 %99, double %.092125, double %98
  br label %100

100:                                              ; preds = %.sink.split, %77, %69, %67, %75
  %.5100 = phi i32 [ %.095124, %67 ], [ %.095124, %75 ], [ %.095124, %69 ], [ %.095124, %77 ], [ %.398, %.sink.split ]
  %.5 = phi double [ %.092125, %67 ], [ %.092125, %75 ], [ %.092125, %69 ], [ %.092125, %77 ], [ %.3, %.sink.split ]
  %.290 = phi double [ %.088126, %67 ], [ %.088126, %75 ], [ %.088126, %69 ], [ %.189, %77 ], [ %.290.ph, %.sink.split ]
  %.2 = phi double [ %.078128, %67 ], [ %.078128, %75 ], [ %.179, %69 ], [ %.078128, %77 ], [ %.2.ph, %.sink.split ]
  %indvars.iv.next138 = add nuw nsw i64 %indvars.iv137, 1
  %101 = load i32, ptr %4, align 8, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = icmp slt i64 %indvars.iv.next138, %102
  br i1 %103, label %61, label %._crit_edge131, !llvm.loop !26

104:                                              ; preds = %._crit_edge131
  %105 = getelementptr inbounds i8, ptr %0, i64 16
  %106 = load ptr, ptr %105, align 8, !tbaa !13
  %107 = sext i32 %.095.lcssa to i64
  %108 = getelementptr inbounds i8, ptr %106, i64 %107
  %109 = load i8, ptr %108, align 1, !tbaa !14
  %110 = icmp eq i8 %109, 1
  %.081..0101 = select i1 %110, i32 %.081.lcssa150160173, i32 %.0101.lcssa148162171
  store i32 %.081..0101, ptr %1, align 4, !tbaa !27
  store i32 %.095.lcssa, ptr %2, align 4, !tbaa !27
  br label %111

111:                                              ; preds = %._crit_edge131, %104
  %.0 = phi i32 [ 0, %104 ], [ 1, %._crit_edge131 ]
  ret i32 %.0
}

attributes #0 = { 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 #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 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