; LLVM IR from fcimeson/cbTSP :: cbLKH/SRC (SolveRoheSubproblems)

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

%struct.Node = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, double, double, double, double, double, i8, i8, i8 }

@FirstNode = external dso_local global ptr, align 8
@Distance = external dso_local global ptr, align 8
@TraceLevel = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [41 x i8], align 1
@WeightType = external dso_local global i32, align 4
@CoordType = external dso_local global i32, align 4
@SubproblemSize = external dso_local global i32, align 4
@KDTree = external hidden global ptr, align 8
@Dimension = external dso_local global i32, align 4
@Size = external hidden global i32, align 4
@SubproblemsCompressed = external dso_local global i32, align 4
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@Optimum = external dso_local global i64, align 8
@.str.3 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [1 x i8], align 1
@SubproblemBorders = external dso_local global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local void @SolveRoheSubproblems() #0 {
  %1 = alloca ptr, align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %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
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %21 = call double @GetTime()
  store double %21, ptr %20, align 8, !tbaa !5
  call void @AllocateStructures()
  %22 = call i32 @ReadPenalties()
  store i32 0, ptr %3, align 4, !tbaa !9
  store i64 0, ptr %6, align 8, !tbaa !11
  %23 = load ptr, ptr @FirstNode, align 8, !tbaa !13
  store ptr %23, ptr %1, align 8, !tbaa !13
  br label %24

24:                                               ; preds = %53, %0
  %25 = load ptr, ptr %1, align 8, !tbaa !13
  %26 = getelementptr inbounds %struct.Node, ptr %25, i32 0, i32 26
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %28 = load ptr, ptr %1, align 8, !tbaa !13
  %29 = getelementptr inbounds %struct.Node, ptr %28, i32 0, i32 35
  %30 = load ptr, ptr %29, align 8, !tbaa !17
  %31 = icmp eq ptr %27, %30
  br i1 %31, label %50, label %32

32:                                               ; preds = %24
  %33 = load ptr, ptr %1, align 8, !tbaa !13
  %34 = getelementptr inbounds %struct.Node, ptr %33, i32 0, i32 27
  %35 = load ptr, ptr %34, align 8, !tbaa !18
  %36 = load ptr, ptr %1, align 8, !tbaa !13
  %37 = getelementptr inbounds %struct.Node, ptr %36, i32 0, i32 35
  %38 = load ptr, ptr %37, align 8, !tbaa !17
  %39 = icmp eq ptr %35, %38
  br i1 %39, label %50, label %40

40:                                               ; preds = %32
  %41 = load ptr, ptr @Distance, align 8, !tbaa !13
  %42 = load ptr, ptr %1, align 8, !tbaa !13
  %43 = load ptr, ptr %1, align 8, !tbaa !13
  %44 = getelementptr inbounds %struct.Node, ptr %43, i32 0, i32 35
  %45 = load ptr, ptr %44, align 8, !tbaa !17
  %46 = call i32 %41(ptr noundef %42, ptr noundef %45)
  %47 = sext i32 %46 to i64
  %48 = load i64, ptr %6, align 8, !tbaa !11
  %49 = add nsw i64 %48, %47
  store i64 %49, ptr %6, align 8, !tbaa !11
  br label %50

50:                                               ; preds = %40, %32, %24
  %51 = load ptr, ptr %1, align 8, !tbaa !13
  %52 = getelementptr inbounds %struct.Node, ptr %51, i32 0, i32 12
  store i32 0, ptr %52, align 8, !tbaa !19
  br label %53

53:                                               ; preds = %50
  %54 = load ptr, ptr %1, align 8, !tbaa !13
  %55 = getelementptr inbounds %struct.Node, ptr %54, i32 0, i32 35
  %56 = load ptr, ptr %55, align 8, !tbaa !17
  store ptr %56, ptr %1, align 8, !tbaa !13
  %57 = load ptr, ptr @FirstNode, align 8, !tbaa !13
  %58 = icmp ne ptr %56, %57
  br i1 %58, label %24, label %59, !llvm.loop !20

59:                                               ; preds = %53
  %60 = load i32, ptr @TraceLevel, align 4, !tbaa !9
  %61 = icmp sge i32 %60, 1
  br i1 %61, label %62, label %68

62:                                               ; preds = %59
  %63 = load i32, ptr @TraceLevel, align 4, !tbaa !9
  %64 = icmp sge i32 %63, 2
  br i1 %64, label %65, label %66

65:                                               ; preds = %62
  call void (ptr, ...) @printff(ptr noundef @.str)
  br label %66

66:                                               ; preds = %65, %62
  %67 = load i64, ptr %6, align 8, !tbaa !11
  call void (ptr, ...) @printff(ptr noundef @.str.1, i64 noundef %67)
  br label %68

68:                                               ; preds = %66, %59
  %69 = load i32, ptr @WeightType, align 4, !tbaa !9
  %70 = icmp eq i32 %69, 9
  br i1 %70, label %80, label %71

71:                                               ; preds = %68
  %72 = load i32, ptr @WeightType, align 4, !tbaa !9
  %73 = icmp eq i32 %72, 10
  br i1 %73, label %80, label %74

74:                                               ; preds = %71
  %75 = load i32, ptr @WeightType, align 4, !tbaa !9
  %76 = icmp eq i32 %75, 11
  br i1 %76, label %80, label %77

77:                                               ; preds = %74
  %78 = load i32, ptr @WeightType, align 4, !tbaa !9
  %79 = icmp eq i32 %78, 12
  br i1 %79, label %80, label %137

80:                                               ; preds = %77, %74, %71, %68
  %81 = load ptr, ptr @FirstNode, align 8, !tbaa !13
  store ptr %81, ptr %1, align 8, !tbaa !13
  br label %82

82:                                               ; preds = %130, %80
  %83 = load ptr, ptr %1, align 8, !tbaa !13
  %84 = getelementptr inbounds %struct.Node, ptr %83, i32 0, i32 46
  %85 = load double, ptr %84, align 8, !tbaa !22
  %86 = load ptr, ptr %1, align 8, !tbaa !13
  %87 = getelementptr inbounds %struct.Node, ptr %86, i32 0, i32 49
  store double %85, ptr %87, align 8, !tbaa !23
  %88 = load ptr, ptr %1, align 8, !tbaa !13
  %89 = getelementptr inbounds %struct.Node, ptr %88, i32 0, i32 47
  %90 = load double, ptr %89, align 8, !tbaa !24
  %91 = load ptr, ptr %1, align 8, !tbaa !13
  %92 = getelementptr inbounds %struct.Node, ptr %91, i32 0, i32 50
  store double %90, ptr %92, align 8, !tbaa !25
  %93 = load ptr, ptr %1, align 8, !tbaa !13
  %94 = getelementptr inbounds %struct.Node, ptr %93, i32 0, i32 48
  %95 = load double, ptr %94, align 8, !tbaa !26
  %96 = load ptr, ptr %1, align 8, !tbaa !13
  %97 = getelementptr inbounds %struct.Node, ptr %96, i32 0, i32 51
  store double %95, ptr %97, align 8, !tbaa !27
  %98 = load i32, ptr @WeightType, align 4, !tbaa !9
  %99 = icmp eq i32 %98, 9
  br i1 %99, label %103, label %100

100:                                              ; preds = %82
  %101 = load i32, ptr @WeightType, align 4, !tbaa !9
  %102 = icmp eq i32 %101, 11
  br i1 %102, label %103, label %116

103:                                              ; preds = %100, %82
  %104 = load ptr, ptr %1, align 8, !tbaa !13
  %105 = getelementptr inbounds %struct.Node, ptr %104, i32 0, i32 49
  %106 = load double, ptr %105, align 8, !tbaa !23
  %107 = load ptr, ptr %1, align 8, !tbaa !13
  %108 = getelementptr inbounds %struct.Node, ptr %107, i32 0, i32 50
  %109 = load double, ptr %108, align 8, !tbaa !25
  %110 = load ptr, ptr %1, align 8, !tbaa !13
  %111 = getelementptr inbounds %struct.Node, ptr %110, i32 0, i32 46
  %112 = load ptr, ptr %1, align 8, !tbaa !13
  %113 = getelementptr inbounds %struct.Node, ptr %112, i32 0, i32 47
  %114 = load ptr, ptr %1, align 8, !tbaa !13
  %115 = getelementptr inbounds %struct.Node, ptr %114, i32 0, i32 48
  call void @GEO2XYZ(double noundef %106, double noundef %109, ptr noundef %111, ptr noundef %113, ptr noundef %115)
  br label %129

116:                                              ; preds = %100
  %117 = load ptr, ptr %1, align 8, !tbaa !13
  %118 = getelementptr inbounds %struct.Node, ptr %117, i32 0, i32 49
  %119 = load double, ptr %118, align 8, !tbaa !23
  %120 = load ptr, ptr %1, align 8, !tbaa !13
  %121 = getelementptr inbounds %struct.Node, ptr %120, i32 0, i32 50
  %122 = load double, ptr %121, align 8, !tbaa !25
  %123 = load ptr, ptr %1, align 8, !tbaa !13
  %124 = getelementptr inbounds %struct.Node, ptr %123, i32 0, i32 46
  %125 = load ptr, ptr %1, align 8, !tbaa !13
  %126 = getelementptr inbounds %struct.Node, ptr %125, i32 0, i32 47
  %127 = load ptr, ptr %1, align 8, !tbaa !13
  %128 = getelementptr inbounds %struct.Node, ptr %127, i32 0, i32 48
  call void @GEOM2XYZ(double noundef %119, double noundef %122, ptr noundef %124, ptr noundef %126, ptr noundef %128)
  br label %129

129:                                              ; preds = %116, %103
  br label %130

130:                                              ; preds = %129
  %131 = load ptr, ptr %1, align 8, !tbaa !13
  %132 = getelementptr inbounds %struct.Node, ptr %131, i32 0, i32 35
  %133 = load ptr, ptr %132, align 8, !tbaa !17
  store ptr %133, ptr %1, align 8, !tbaa !13
  %134 = load ptr, ptr @FirstNode, align 8, !tbaa !13
  %135 = icmp ne ptr %133, %134
  br i1 %135, label %82, label %136, !llvm.loop !28

136:                                              ; preds = %130
  store i32 1, ptr @CoordType, align 4, !tbaa !9
  br label %137

137:                                              ; preds = %136, %77
  %138 = load ptr, ptr @FirstNode, align 8, !tbaa !13
  store ptr %138, ptr %1, align 8, !tbaa !13
  %139 = load ptr, ptr %1, align 8, !tbaa !13
  %140 = getelementptr inbounds %struct.Node, ptr %139, i32 0, i32 46
  %141 = load double, ptr %140, align 8, !tbaa !22
  store double %141, ptr %9, align 8, !tbaa !5
  store double %141, ptr %8, align 8, !tbaa !5
  %142 = load ptr, ptr %1, align 8, !tbaa !13
  %143 = getelementptr inbounds %struct.Node, ptr %142, i32 0, i32 47
  %144 = load double, ptr %143, align 8, !tbaa !24
  store double %144, ptr %11, align 8, !tbaa !5
  store double %144, ptr %10, align 8, !tbaa !5
  %145 = load ptr, ptr %1, align 8, !tbaa !13
  %146 = getelementptr inbounds %struct.Node, ptr %145, i32 0, i32 48
  %147 = load double, ptr %146, align 8, !tbaa !26
  store double %147, ptr %13, align 8, !tbaa !5
  store double %147, ptr %12, align 8, !tbaa !5
  br label %148

148:                                              ; preds = %217, %137
  %149 = load ptr, ptr %1, align 8, !tbaa !13
  %150 = getelementptr inbounds %struct.Node, ptr %149, i32 0, i32 35
  %151 = load ptr, ptr %150, align 8, !tbaa !17
  store ptr %151, ptr %1, align 8, !tbaa !13
  %152 = load ptr, ptr @FirstNode, align 8, !tbaa !13
  %153 = icmp ne ptr %151, %152
  br i1 %153, label %154, label %218

154:                                              ; preds = %148
  %155 = load ptr, ptr %1, align 8, !tbaa !13
  %156 = getelementptr inbounds %struct.Node, ptr %155, i32 0, i32 46
  %157 = load double, ptr %156, align 8, !tbaa !22
  %158 = load double, ptr %8, align 8, !tbaa !5
  %159 = fcmp olt double %157, %158
  br i1 %159, label %160, label %164

160:                                              ; preds = %154
  %161 = load ptr, ptr %1, align 8, !tbaa !13
  %162 = getelementptr inbounds %struct.Node, ptr %161, i32 0, i32 46
  %163 = load double, ptr %162, align 8, !tbaa !22
  store double %163, ptr %8, align 8, !tbaa !5
  br label %175

164:                                              ; preds = %154
  %165 = load ptr, ptr %1, align 8, !tbaa !13
  %166 = getelementptr inbounds %struct.Node, ptr %165, i32 0, i32 46
  %167 = load double, ptr %166, align 8, !tbaa !22
  %168 = load double, ptr %9, align 8, !tbaa !5
  %169 = fcmp ogt double %167, %168
  br i1 %169, label %170, label %174

170:                                              ; preds = %164
  %171 = load ptr, ptr %1, align 8, !tbaa !13
  %172 = getelementptr inbounds %struct.Node, ptr %171, i32 0, i32 46
  %173 = load double, ptr %172, align 8, !tbaa !22
  store double %173, ptr %9, align 8, !tbaa !5
  br label %174

174:                                              ; preds = %170, %164
  br label %175

175:                                              ; preds = %174, %160
  %176 = load ptr, ptr %1, align 8, !tbaa !13
  %177 = getelementptr inbounds %struct.Node, ptr %176, i32 0, i32 47
  %178 = load double, ptr %177, align 8, !tbaa !24
  %179 = load double, ptr %10, align 8, !tbaa !5
  %180 = fcmp olt double %178, %179
  br i1 %180, label %181, label %185

181:                                              ; preds = %175
  %182 = load ptr, ptr %1, align 8, !tbaa !13
  %183 = getelementptr inbounds %struct.Node, ptr %182, i32 0, i32 47
  %184 = load double, ptr %183, align 8, !tbaa !24
  store double %184, ptr %10, align 8, !tbaa !5
  br label %196

185:                                              ; preds = %175
  %186 = load ptr, ptr %1, align 8, !tbaa !13
  %187 = getelementptr inbounds %struct.Node, ptr %186, i32 0, i32 47
  %188 = load double, ptr %187, align 8, !tbaa !24
  %189 = load double, ptr %11, align 8, !tbaa !5
  %190 = fcmp ogt double %188, %189
  br i1 %190, label %191, label %195

191:                                              ; preds = %185
  %192 = load ptr, ptr %1, align 8, !tbaa !13
  %193 = getelementptr inbounds %struct.Node, ptr %192, i32 0, i32 47
  %194 = load double, ptr %193, align 8, !tbaa !24
  store double %194, ptr %11, align 8, !tbaa !5
  br label %195

195:                                              ; preds = %191, %185
  br label %196

196:                                              ; preds = %195, %181
  %197 = load ptr, ptr %1, align 8, !tbaa !13
  %198 = getelementptr inbounds %struct.Node, ptr %197, i32 0, i32 48
  %199 = load double, ptr %198, align 8, !tbaa !26
  %200 = load double, ptr %12, align 8, !tbaa !5
  %201 = fcmp olt double %199, %200
  br i1 %201, label %202, label %206

202:                                              ; preds = %196
  %203 = load ptr, ptr %1, align 8, !tbaa !13
  %204 = getelementptr inbounds %struct.Node, ptr %203, i32 0, i32 48
  %205 = load double, ptr %204, align 8, !tbaa !26
  store double %205, ptr %12, align 8, !tbaa !5
  br label %217

206:                                              ; preds = %196
  %207 = load ptr, ptr %1, align 8, !tbaa !13
  %208 = getelementptr inbounds %struct.Node, ptr %207, i32 0, i32 48
  %209 = load double, ptr %208, align 8, !tbaa !26
  %210 = load double, ptr %13, align 8, !tbaa !5
  %211 = fcmp ogt double %209, %210
  br i1 %211, label %212, label %216

212:                                              ; preds = %206
  %213 = load ptr, ptr %1, align 8, !tbaa !13
  %214 = getelementptr inbounds %struct.Node, ptr %213, i32 0, i32 48
  %215 = load double, ptr %214, align 8, !tbaa !26
  store double %215, ptr %13, align 8, !tbaa !5
  br label %216

216:                                              ; preds = %212, %206
  br label %217

217:                                              ; preds = %216, %202
  br label %148, !llvm.loop !29

218:                                              ; preds = %148
  %219 = load i32, ptr @SubproblemSize, align 4, !tbaa !9
  %220 = call ptr @BuildKDTree(i32 noundef %219)
  store ptr %220, ptr @KDTree, align 8, !tbaa !13
  %221 = load i32, ptr @Dimension, align 4, !tbaa !9
  store i32 %221, ptr %4, align 4, !tbaa !9
  br label %222

222:                                              ; preds = %341, %218
  %223 = load i32, ptr %4, align 4, !tbaa !9
  %224 = load i32, ptr @SubproblemSize, align 4, !tbaa !9
  %225 = icmp sgt i32 %223, %224
  br i1 %225, label %226, label %388

226:                                              ; preds = %222
  %227 = load ptr, ptr @FirstNode, align 8, !tbaa !13
  store ptr %227, ptr %1, align 8, !tbaa !13
  %228 = call i32 @Random()
  %229 = load i32, ptr %4, align 4, !tbaa !9
  %230 = urem i32 %228, %229
  store i32 %230, ptr %5, align 4, !tbaa !9
  br label %231

231:                                              ; preds = %235, %226
  %232 = load i32, ptr %5, align 4, !tbaa !9
  %233 = add nsw i32 %232, -1
  store i32 %233, ptr %5, align 4, !tbaa !9
  %234 = icmp ne i32 %232, 0
  br i1 %234, label %235, label %239

235:                                              ; preds = %231
  %236 = load ptr, ptr %1, align 8, !tbaa !13
  %237 = getelementptr inbounds %struct.Node, ptr %236, i32 0, i32 16
  %238 = load ptr, ptr %237, align 8, !tbaa !30
  store ptr %238, ptr %1, align 8, !tbaa !13
  br label %231, !llvm.loop !31

239:                                              ; preds = %231
  %240 = call i32 @Random()
  %241 = uitofp i32 %240 to double
  %242 = fmul double 5.000000e-01, %241
  %243 = fdiv double %242, 0x41DFFFFFFF800000
  %244 = fadd double 5.000000e-01, %243
  %245 = load double, ptr %9, align 8, !tbaa !5
  %246 = load double, ptr %8, align 8, !tbaa !5
  %247 = fsub double %245, %246
  %248 = fmul double %244, %247
  store double %248, ptr %14, align 8, !tbaa !5
  %249 = call i32 @Random()
  %250 = uitofp i32 %249 to double
  %251 = fmul double 5.000000e-01, %250
  %252 = fdiv double %251, 0x41DFFFFFFF800000
  %253 = fadd double 5.000000e-01, %252
  %254 = load double, ptr %11, align 8, !tbaa !5
  %255 = load double, ptr %10, align 8, !tbaa !5
  %256 = fsub double %254, %255
  %257 = fmul double %253, %256
  store double %257, ptr %15, align 8, !tbaa !5
  %258 = call i32 @Random()
  %259 = uitofp i32 %258 to double
  %260 = fmul double 5.000000e-01, %259
  %261 = fdiv double %260, 0x41DFFFFFFF800000
  %262 = fadd double 5.000000e-01, %261
  %263 = load double, ptr %13, align 8, !tbaa !5
  %264 = load double, ptr %12, align 8, !tbaa !5
  %265 = fsub double %263, %264
  %266 = fmul double %262, %265
  store double %266, ptr %16, align 8, !tbaa !5
  store double 0.000000e+00, ptr %17, align 8, !tbaa !5
  store double 2.000000e+00, ptr %19, align 8, !tbaa !5
  br label %267

267:                                              ; preds = %336, %239
  %268 = load double, ptr %17, align 8, !tbaa !5
  %269 = load double, ptr %19, align 8, !tbaa !5
  %270 = fadd double %268, %269
  %271 = fdiv double %270, 2.000000e+00
  store double %271, ptr %18, align 8, !tbaa !5
  store i32 0, ptr @Size, align 4, !tbaa !9
  %272 = load ptr, ptr %1, align 8, !tbaa !13
  %273 = getelementptr inbounds %struct.Node, ptr %272, i32 0, i32 46
  %274 = load double, ptr %273, align 8, !tbaa !22
  %275 = load double, ptr %18, align 8, !tbaa !5
  %276 = load double, ptr %14, align 8, !tbaa !5
  %277 = fneg double %275
  %278 = call double @llvm.fmuladd.f64(double %277, double %276, double %274)
  %279 = load ptr, ptr %1, align 8, !tbaa !13
  %280 = getelementptr inbounds %struct.Node, ptr %279, i32 0, i32 46
  %281 = load double, ptr %280, align 8, !tbaa !22
  %282 = load double, ptr %18, align 8, !tbaa !5
  %283 = load double, ptr %14, align 8, !tbaa !5
  %284 = call double @llvm.fmuladd.f64(double %282, double %283, double %281)
  %285 = load ptr, ptr %1, align 8, !tbaa !13
  %286 = getelementptr inbounds %struct.Node, ptr %285, i32 0, i32 47
  %287 = load double, ptr %286, align 8, !tbaa !24
  %288 = load double, ptr %18, align 8, !tbaa !5
  %289 = load double, ptr %15, align 8, !tbaa !5
  %290 = fneg double %288
  %291 = call double @llvm.fmuladd.f64(double %290, double %289, double %287)
  %292 = load ptr, ptr %1, align 8, !tbaa !13
  %293 = getelementptr inbounds %struct.Node, ptr %292, i32 0, i32 47
  %294 = load double, ptr %293, align 8, !tbaa !24
  %295 = load double, ptr %18, align 8, !tbaa !5
  %296 = load double, ptr %15, align 8, !tbaa !5
  %297 = call double @llvm.fmuladd.f64(double %295, double %296, double %294)
  %298 = load ptr, ptr %1, align 8, !tbaa !13
  %299 = getelementptr inbounds %struct.Node, ptr %298, i32 0, i32 48
  %300 = load double, ptr %299, align 8, !tbaa !26
  %301 = load double, ptr %18, align 8, !tbaa !5
  %302 = load double, ptr %16, align 8, !tbaa !5
  %303 = fneg double %301
  %304 = call double @llvm.fmuladd.f64(double %303, double %302, double %300)
  %305 = load ptr, ptr %1, align 8, !tbaa !13
  %306 = getelementptr inbounds %struct.Node, ptr %305, i32 0, i32 48
  %307 = load double, ptr %306, align 8, !tbaa !26
  %308 = load double, ptr %18, align 8, !tbaa !5
  %309 = load double, ptr %16, align 8, !tbaa !5
  %310 = call double @llvm.fmuladd.f64(double %308, double %309, double %307)
  %311 = load i32, ptr @Dimension, align 4, !tbaa !9
  %312 = sub nsw i32 %311, 1
  call void @WindowSize(double noundef %278, double noundef %284, double noundef %291, double noundef %297, double noundef %304, double noundef %310, i32 noundef 0, i32 noundef %312)
  %313 = load i32, ptr @Size, align 4, !tbaa !9
  %314 = sitofp i32 %313 to double
  %315 = load i32, ptr @SubproblemSize, align 4, !tbaa !9
  %316 = sitofp i32 %315 to double
  %317 = fmul double 0x3FE5555555555555, %316
  %318 = fcmp oge double %314, %317
  br i1 %318, label %319, label %324

319:                                              ; preds = %267
  %320 = load i32, ptr @Size, align 4, !tbaa !9
  %321 = load i32, ptr @SubproblemSize, align 4, !tbaa !9
  %322 = icmp sle i32 %320, %321
  br i1 %322, label %323, label %324

323:                                              ; preds = %319
  br label %341

324:                                              ; preds = %319, %267
  %325 = load i32, ptr @Size, align 4, !tbaa !9
  %326 = sitofp i32 %325 to double
  %327 = load i32, ptr @SubproblemSize, align 4, !tbaa !9
  %328 = sitofp i32 %327 to double
  %329 = fmul double 0x3FE5555555555555, %328
  %330 = fcmp olt double %326, %329
  br i1 %330, label %331, label %333

331:                                              ; preds = %324
  %332 = load double, ptr %18, align 8, !tbaa !5
  store double %332, ptr %17, align 8, !tbaa !5
  br label %335

333:                                              ; preds = %324
  %334 = load double, ptr %18, align 8, !tbaa !5
  store double %334, ptr %19, align 8, !tbaa !5
  br label %335

335:                                              ; preds = %333, %331
  br label %336

336:                                              ; preds = %335
  %337 = load double, ptr %19, align 8, !tbaa !5
  %338 = load double, ptr %17, align 8, !tbaa !5
  %339 = fsub double %337, %338
  %340 = fcmp ogt double %339, 0x3CB0000000000000
  br i1 %340, label %267, label %341, !llvm.loop !32

341:                                              ; preds = %336, %323
  %342 = load ptr, ptr %1, align 8, !tbaa !13
  %343 = getelementptr inbounds %struct.Node, ptr %342, i32 0, i32 46
  %344 = load double, ptr %343, align 8, !tbaa !22
  %345 = load double, ptr %18, align 8, !tbaa !5
  %346 = load double, ptr %14, align 8, !tbaa !5
  %347 = fneg double %345
  %348 = call double @llvm.fmuladd.f64(double %347, double %346, double %344)
  %349 = load ptr, ptr %1, align 8, !tbaa !13
  %350 = getelementptr inbounds %struct.Node, ptr %349, i32 0, i32 46
  %351 = load double, ptr %350, align 8, !tbaa !22
  %352 = load double, ptr %18, align 8, !tbaa !5
  %353 = load double, ptr %14, align 8, !tbaa !5
  %354 = call double @llvm.fmuladd.f64(double %352, double %353, double %351)
  %355 = load ptr, ptr %1, align 8, !tbaa !13
  %356 = getelementptr inbounds %struct.Node, ptr %355, i32 0, i32 47
  %357 = load double, ptr %356, align 8, !tbaa !24
  %358 = load double, ptr %18, align 8, !tbaa !5
  %359 = load double, ptr %15, align 8, !tbaa !5
  %360 = fneg double %358
  %361 = call double @llvm.fmuladd.f64(double %360, double %359, double %357)
  %362 = load ptr, ptr %1, align 8, !tbaa !13
  %363 = getelementptr inbounds %struct.Node, ptr %362, i32 0, i32 47
  %364 = load double, ptr %363, align 8, !tbaa !24
  %365 = load double, ptr %18, align 8, !tbaa !5
  %366 = load double, ptr %15, align 8, !tbaa !5
  %367 = call double @llvm.fmuladd.f64(double %365, double %366, double %364)
  %368 = load ptr, ptr %1, align 8, !tbaa !13
  %369 = getelementptr inbounds %struct.Node, ptr %368, i32 0, i32 48
  %370 = load double, ptr %369, align 8, !tbaa !26
  %371 = load double, ptr %18, align 8, !tbaa !5
  %372 = load double, ptr %16, align 8, !tbaa !5
  %373 = fneg double %371
  %374 = call double @llvm.fmuladd.f64(double %373, double %372, double %370)
  %375 = load ptr, ptr %1, align 8, !tbaa !13
  %376 = getelementptr inbounds %struct.Node, ptr %375, i32 0, i32 48
  %377 = load double, ptr %376, align 8, !tbaa !26
  %378 = load double, ptr %18, align 8, !tbaa !5
  %379 = load double, ptr %16, align 8, !tbaa !5
  %380 = call double @llvm.fmuladd.f64(double %378, double %379, double %377)
  %381 = load i32, ptr %3, align 4, !tbaa !9
  %382 = add nsw i32 %381, 1
  store i32 %382, ptr %3, align 4, !tbaa !9
  %383 = load i32, ptr @Dimension, align 4, !tbaa !9
  %384 = sub nsw i32 %383, 1
  call void @MakeSubproblem(double noundef %348, double noundef %354, double noundef %361, double noundef %367, double noundef %374, double noundef %380, i32 noundef %382, i32 noundef 0, i32 noundef %384)
  %385 = load i32, ptr @Size, align 4, !tbaa !9
  %386 = load i32, ptr %4, align 4, !tbaa !9
  %387 = sub nsw i32 %386, %385
  store i32 %387, ptr %4, align 4, !tbaa !9
  br label %222, !llvm.loop !33

388:                                              ; preds = %222
  %389 = load i32, ptr %4, align 4, !tbaa !9
  %390 = icmp sgt i32 %389, 3
  br i1 %390, label %391, label %406

391:                                              ; preds = %388
  %392 = load i32, ptr %3, align 4, !tbaa !9
  %393 = add nsw i32 %392, 1
  store i32 %393, ptr %3, align 4, !tbaa !9
  %394 = load ptr, ptr @FirstNode, align 8, !tbaa !13
  store ptr %394, ptr %1, align 8, !tbaa !13
  br label %395

395:                                              ; preds = %399, %391
  %396 = load i32, ptr %3, align 4, !tbaa !9
  %397 = load ptr, ptr %1, align 8, !tbaa !13
  %398 = getelementptr inbounds %struct.Node, ptr %397, i32 0, i32 12
  store i32 %396, ptr %398, align 8, !tbaa !19
  br label %399

399:                                              ; preds = %395
  %400 = load ptr, ptr %1, align 8, !tbaa !13
  %401 = getelementptr inbounds %struct.Node, ptr %400, i32 0, i32 16
  %402 = load ptr, ptr %401, align 8, !tbaa !30
  store ptr %402, ptr %1, align 8, !tbaa !13
  %403 = load ptr, ptr @FirstNode, align 8, !tbaa !13
  %404 = icmp ne ptr %402, %403
  br i1 %404, label %395, label %405, !llvm.loop !34

405:                                              ; preds = %399
  br label %406

406:                                              ; preds = %405, %388
  %407 = load i32, ptr @WeightType, align 4, !tbaa !9
  %408 = icmp eq i32 %407, 9
  br i1 %408, label %418, label %409

409:                                              ; preds = %406
  %410 = load i32, ptr @WeightType, align 4, !tbaa !9
  %411 = icmp eq i32 %410, 10
  br i1 %411, label %418, label %412

412:                                              ; preds = %409
  %413 = load i32, ptr @WeightType, align 4, !tbaa !9
  %414 = icmp eq i32 %413, 11
  br i1 %414, label %418, label %415

415:                                              ; preds = %412
  %416 = load i32, ptr @WeightType, align 4, !tbaa !9
  %417 = icmp eq i32 %416, 12
  br i1 %417, label %418, label %443

418:                                              ; preds = %415, %412, %409, %406
  %419 = load ptr, ptr @FirstNode, align 8, !tbaa !13
  store ptr %419, ptr %1, align 8, !tbaa !13
  br label %420

420:                                              ; preds = %436, %418
  %421 = load ptr, ptr %1, align 8, !tbaa !13
  %422 = getelementptr inbounds %struct.Node, ptr %421, i32 0, i32 49
  %423 = load double, ptr %422, align 8, !tbaa !23
  %424 = load ptr, ptr %1, align 8, !tbaa !13
  %425 = getelementptr inbounds %struct.Node, ptr %424, i32 0, i32 46
  store double %423, ptr %425, align 8, !tbaa !22
  %426 = load ptr, ptr %1, align 8, !tbaa !13
  %427 = getelementptr inbounds %struct.Node, ptr %426, i32 0, i32 50
  %428 = load double, ptr %427, align 8, !tbaa !25
  %429 = load ptr, ptr %1, align 8, !tbaa !13
  %430 = getelementptr inbounds %struct.Node, ptr %429, i32 0, i32 47
  store double %428, ptr %430, align 8, !tbaa !24
  %431 = load ptr, ptr %1, align 8, !tbaa !13
  %432 = getelementptr inbounds %struct.Node, ptr %431, i32 0, i32 51
  %433 = load double, ptr %432, align 8, !tbaa !27
  %434 = load ptr, ptr %1, align 8, !tbaa !13
  %435 = getelementptr inbounds %struct.Node, ptr %434, i32 0, i32 48
  store double %433, ptr %435, align 8, !tbaa !26
  br label %436

436:                                              ; preds = %420
  %437 = load ptr, ptr %1, align 8, !tbaa !13
  %438 = getelementptr inbounds %struct.Node, ptr %437, i32 0, i32 35
  %439 = load ptr, ptr %438, align 8, !tbaa !17
  store ptr %439, ptr %1, align 8, !tbaa !13
  %440 = load ptr, ptr @FirstNode, align 8, !tbaa !13
  %441 = icmp ne ptr %439, %440
  br i1 %441, label %420, label %442, !llvm.loop !35

442:                                              ; preds = %436
  store i32 0, ptr @CoordType, align 4, !tbaa !9
  br label %443

443:                                              ; preds = %442, %415
  %444 = load ptr, ptr @KDTree, align 8, !tbaa !13
  call void @free(ptr noundef %444) #5
  store i32 1, ptr %2, align 4, !tbaa !9
  br label %445

445:                                              ; preds = %464, %443
  %446 = load i32, ptr %2, align 4, !tbaa !9
  %447 = load i32, ptr %3, align 4, !tbaa !9
  %448 = icmp sle i32 %446, %447
  br i1 %448, label %449, label %467

449:                                              ; preds = %445
  %450 = load i64, ptr %6, align 8, !tbaa !11
  store i64 %450, ptr %7, align 8, !tbaa !11
  %451 = load i32, ptr %2, align 4, !tbaa !9
  %452 = load i32, ptr %3, align 4, !tbaa !9
  %453 = call i32 @SolveSubproblem(i32 noundef %451, i32 noundef %452, ptr noundef %6)
  %454 = load i32, ptr @SubproblemsCompressed, align 4, !tbaa !9
  %455 = icmp ne i32 %454, 0
  br i1 %455, label %456, label %463

456:                                              ; preds = %449
  %457 = load i64, ptr %6, align 8, !tbaa !11
  %458 = load i64, ptr %7, align 8, !tbaa !11
  %459 = icmp eq i64 %457, %458
  br i1 %459, label %460, label %463

460:                                              ; preds = %456
  %461 = load i32, ptr %2, align 4, !tbaa !9
  %462 = load i32, ptr %3, align 4, !tbaa !9
  call void @SolveCompressedSubproblem(i32 noundef %461, i32 noundef %462, ptr noundef %6)
  br label %463

463:                                              ; preds = %460, %456, %449
  br label %464

464:                                              ; preds = %463
  %465 = load i32, ptr %2, align 4, !tbaa !9
  %466 = add nsw i32 %465, 1
  store i32 %466, ptr %2, align 4, !tbaa !9
  br label %445, !llvm.loop !36

467:                                              ; preds = %445
  %468 = load i64, ptr %6, align 8, !tbaa !11
  call void (ptr, ...) @printff(ptr noundef @.str.2, i64 noundef %468)
  %469 = load i64, ptr @Optimum, align 8, !tbaa !11
  %470 = icmp ne i64 %469, -9223372036854775808
  br i1 %470, label %471, label %483

471:                                              ; preds = %467
  %472 = load i64, ptr @Optimum, align 8, !tbaa !11
  %473 = icmp ne i64 %472, 0
  br i1 %473, label %474, label %483

474:                                              ; preds = %471
  %475 = load i64, ptr %6, align 8, !tbaa !11
  %476 = load i64, ptr @Optimum, align 8, !tbaa !11
  %477 = sub nsw i64 %475, %476
  %478 = sitofp i64 %477 to double
  %479 = fmul double 1.000000e+02, %478
  %480 = load i64, ptr @Optimum, align 8, !tbaa !11
  %481 = sitofp i64 %480 to double
  %482 = fdiv double %479, %481
  call void (ptr, ...) @printff(ptr noundef @.str.3, double noundef %482)
  br label %483

483:                                              ; preds = %474, %471, %467
  %484 = call double @GetTime()
  %485 = load double, ptr %20, align 8, !tbaa !5
  %486 = fsub double %484, %485
  %487 = call double @llvm.fabs.f64(double %486)
  %488 = load i64, ptr %6, align 8, !tbaa !11
  %489 = load i64, ptr @Optimum, align 8, !tbaa !11
  %490 = icmp slt i64 %488, %489
  br i1 %490, label %491, label %492

491:                                              ; preds = %483
  br label %498

492:                                              ; preds = %483
  %493 = load i64, ptr %6, align 8, !tbaa !11
  %494 = load i64, ptr @Optimum, align 8, !tbaa !11
  %495 = icmp eq i64 %493, %494
  %496 = zext i1 %495 to i64
  %497 = select i1 %495, ptr @.str.6, ptr @.str.7
  br label %498

498:                                              ; preds = %492, %491
  %499 = phi ptr [ @.str.5, %491 ], [ %497, %492 ]
  call void (ptr, ...) @printff(ptr noundef @.str.4, double noundef %487, ptr noundef %499)
  %500 = load i32, ptr @SubproblemBorders, align 4, !tbaa !9
  %501 = icmp ne i32 %500, 0
  br i1 %501, label %502, label %507

502:                                              ; preds = %498
  %503 = load i32, ptr %3, align 4, !tbaa !9
  %504 = icmp sgt i32 %503, 1
  br i1 %504, label %505, label %507

505:                                              ; preds = %502
  %506 = load i32, ptr %3, align 4, !tbaa !9
  call void @SolveSubproblemBorderProblems(i32 noundef %506, ptr noundef %6)
  br label %507

507:                                              ; preds = %505, %502, %498
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  ret void
}

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

declare double @GetTime() #2

declare void @AllocateStructures() #2

declare i32 @ReadPenalties() #2

declare void @printff(ptr noundef, ...) #2

declare void @GEO2XYZ(double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @GEOM2XYZ(double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare ptr @BuildKDTree(i32 noundef) #2

declare i32 @Random() #2

; Function Attrs: nounwind uwtable
declare hidden void @WindowSize(double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, i32 noundef, i32 noundef) #0

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

; Function Attrs: nounwind uwtable
declare hidden void @MakeSubproblem(double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: nounwind
declare void @free(ptr noundef) #4

declare i32 @SolveSubproblem(i32 noundef, i32 noundef, ptr noundef) #2

declare void @SolveCompressedSubproblem(i32 noundef, i32 noundef, ptr noundef) #2

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

declare void @SolveSubproblemBorderProblems(i32 noundef, ptr noundef) #2

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

attributes #0 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #5 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!16, !14, i64 152}
!16 = !{!"Node", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !14, i64 56, !14, i64 64, !14, i64 72, !14, i64 80, !14, i64 88, !14, i64 96, !14, i64 104, !14, i64 112, !14, i64 120, !14, i64 128, !14, i64 136, !14, i64 144, !14, i64 152, !14, i64 160, !14, i64 168, !14, i64 176, !14, i64 184, !14, i64 192, !14, i64 200, !14, i64 208, !14, i64 216, !14, i64 224, !14, i64 232, !14, i64 240, !14, i64 248, !14, i64 256, !14, i64 264, !14, i64 272, !14, i64 280, !14, i64 288, !14, i64 296, !14, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !7, i64 360, !7, i64 361, !7, i64 362}
!17 = !{!16, !14, i64 224}
!18 = !{!16, !14, i64 160}
!19 = !{!16, !10, i64 48}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!16, !6, i64 312}
!23 = !{!16, !6, i64 336}
!24 = !{!16, !6, i64 320}
!25 = !{!16, !6, i64 344}
!26 = !{!16, !6, i64 328}
!27 = !{!16, !6, i64 352}
!28 = distinct !{!28, !21}
!29 = distinct !{!29, !21}
!30 = !{!16, !14, i64 72}
!31 = distinct !{!31, !21}
!32 = distinct !{!32, !21}
!33 = distinct !{!33, !21}
!34 = distinct !{!34, !21}
!35 = distinct !{!35, !21}
!36 = distinct !{!36, !21}


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

@FirstNode = external dso_local local_unnamed_addr global ptr, align 8
@Distance = external dso_local local_unnamed_addr global ptr, align 8
@TraceLevel = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [41 x i8], align 1
@WeightType = external dso_local local_unnamed_addr global i32, align 4
@CoordType = external dso_local local_unnamed_addr global i32, align 4
@SubproblemSize = external dso_local local_unnamed_addr global i32, align 4
@KDTree = external hidden local_unnamed_addr global ptr, align 8
@Dimension = external dso_local local_unnamed_addr global i32, align 4
@Size = external hidden local_unnamed_addr global i32, align 4
@SubproblemsCompressed = external dso_local local_unnamed_addr global i32, align 4
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@Optimum = external dso_local local_unnamed_addr global i64, align 8
@.str.3 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [1 x i8], align 1
@SubproblemBorders = external dso_local local_unnamed_addr global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local void @SolveRoheSubproblems() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  %2 = tail call double @GetTime() #5
  tail call void @AllocateStructures() #5
  %3 = tail call i32 @ReadPenalties() #5
  %4 = load ptr, ptr @FirstNode, align 8, !tbaa !5
  br label %5

5:                                                ; preds = %22, %0
  %6 = phi ptr [ %4, %0 ], [ %23, %22 ]
  %7 = phi i64 [ 0, %0 ], [ %25, %22 ]
  %.0 = phi ptr [ %4, %0 ], [ %24, %22 ]
  %8 = getelementptr inbounds i8, ptr %.0, i64 152
  %9 = load ptr, ptr %8, align 8, !tbaa !9
  %10 = getelementptr inbounds i8, ptr %.0, i64 224
  %11 = load ptr, ptr %10, align 8, !tbaa !13
  %12 = icmp eq ptr %9, %11
  br i1 %12, label %22, label %13

13:                                               ; preds = %5
  %14 = getelementptr inbounds i8, ptr %.0, i64 160
  %15 = load ptr, ptr %14, align 8, !tbaa !14
  %16 = icmp eq ptr %15, %11
  br i1 %16, label %22, label %17

17:                                               ; preds = %13
  %18 = load ptr, ptr @Distance, align 8, !tbaa !5
  %19 = tail call i32 %18(ptr noundef nonnull %.0, ptr noundef %11) #5
  %20 = sext i32 %19 to i64
  %21 = add nsw i64 %7, %20
  %.pre = load ptr, ptr %10, align 8, !tbaa !13
  %.pre227 = load ptr, ptr @FirstNode, align 8, !tbaa !5
  br label %22

22:                                               ; preds = %17, %13, %5
  %23 = phi ptr [ %.pre227, %17 ], [ %6, %13 ], [ %6, %5 ]
  %24 = phi ptr [ %.pre, %17 ], [ %11, %13 ], [ %11, %5 ]
  %25 = phi i64 [ %21, %17 ], [ %7, %13 ], [ %7, %5 ]
  %26 = getelementptr inbounds i8, ptr %.0, i64 48
  store i32 0, ptr %26, align 8, !tbaa !15
  %.not = icmp eq ptr %24, %23
  br i1 %.not, label %27, label %5, !llvm.loop !16

27:                                               ; preds = %22
  store i64 %25, ptr %1, align 8, !tbaa !18
  %28 = load i32, ptr @TraceLevel, align 4, !tbaa !20
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %30, label %33

30:                                               ; preds = %27
  %.not175 = icmp eq i32 %28, 1
  br i1 %.not175, label %32, label %31

31:                                               ; preds = %30
  tail call void (ptr, ...) @printff(ptr noundef nonnull @.str) #5
  br label %32

32:                                               ; preds = %31, %30
  tail call void (ptr, ...) @printff(ptr noundef nonnull @.str.1, i64 noundef %25) #5
  %.pre228.pre = load ptr, ptr @FirstNode, align 8, !tbaa !5
  br label %33

33:                                               ; preds = %32, %27
  %.pre228 = phi ptr [ %.pre228.pre, %32 ], [ %23, %27 ]
  %34 = load i32, ptr @WeightType, align 4
  %35 = add i32 %34, -9
  %or.cond5 = icmp ult i32 %35, 4
  br i1 %or.cond5, label %.preheader, label %56

.preheader:                                       ; preds = %33, %51
  %.1 = phi ptr [ %53, %51 ], [ %.pre228, %33 ]
  %36 = getelementptr inbounds i8, ptr %.1, i64 312
  %37 = getelementptr inbounds i8, ptr %.1, i64 336
  %38 = getelementptr inbounds i8, ptr %.1, i64 320
  %39 = load <2 x double>, ptr %36, align 8, !tbaa !21
  store <2 x double> %39, ptr %37, align 8, !tbaa !21
  %40 = getelementptr inbounds i8, ptr %.1, i64 328
  %41 = load double, ptr %40, align 8, !tbaa !22
  %42 = getelementptr inbounds i8, ptr %.1, i64 352
  store double %41, ptr %42, align 8, !tbaa !23
  %43 = load i32, ptr @WeightType, align 4
  %44 = and i32 %43, -3
  %or.cond7 = icmp eq i32 %44, 9
  br i1 %or.cond7, label %45, label %48

45:                                               ; preds = %.preheader
  %46 = extractelement <2 x double> %39, i64 0
  %47 = extractelement <2 x double> %39, i64 1
  tail call void @GEO2XYZ(double noundef %46, double noundef %47, ptr noundef nonnull %36, ptr noundef nonnull %38, ptr noundef nonnull %40) #5
  br label %51

48:                                               ; preds = %.preheader
  %49 = extractelement <2 x double> %39, i64 0
  %50 = extractelement <2 x double> %39, i64 1
  tail call void @GEOM2XYZ(double noundef %49, double noundef %50, ptr noundef nonnull %36, ptr noundef nonnull %38, ptr noundef nonnull %40) #5
  br label %51

51:                                               ; preds = %45, %48
  %52 = getelementptr inbounds i8, ptr %.1, i64 224
  %53 = load ptr, ptr %52, align 8, !tbaa !13
  %54 = load ptr, ptr @FirstNode, align 8, !tbaa !5
  %.not176 = icmp eq ptr %53, %54
  br i1 %.not176, label %55, label %.preheader, !llvm.loop !24

55:                                               ; preds = %51
  store i32 1, ptr @CoordType, align 4, !tbaa !20
  br label %56

56:                                               ; preds = %33, %55
  %57 = phi ptr [ %.pre228, %33 ], [ %54, %55 ]
  %58 = getelementptr inbounds i8, ptr %57, i64 312
  %59 = load double, ptr %58, align 8, !tbaa !25
  %60 = getelementptr inbounds i8, ptr %57, i64 320
  %61 = load double, ptr %60, align 8, !tbaa !26
  %62 = getelementptr inbounds i8, ptr %57, i64 328
  %63 = load double, ptr %62, align 8, !tbaa !22
  %64 = getelementptr inbounds i8, ptr %57, i64 224
  %65 = load ptr, ptr %64, align 8, !tbaa !13
  %.not177191 = icmp eq ptr %65, %57
  br i1 %.not177191, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %56, %87
  %66 = phi ptr [ %89, %87 ], [ %65, %56 ]
  %.0149197 = phi double [ %.1150, %87 ], [ %63, %56 ]
  %.0151196 = phi double [ %.1152, %87 ], [ %63, %56 ]
  %.0153195 = phi double [ %.1154, %87 ], [ %61, %56 ]
  %.0155194 = phi double [ %.1156, %87 ], [ %61, %56 ]
  %.0157193 = phi double [ %.1158, %87 ], [ %59, %56 ]
  %.0159192 = phi double [ %.1160, %87 ], [ %59, %56 ]
  %67 = getelementptr inbounds i8, ptr %66, i64 312
  %68 = load double, ptr %67, align 8, !tbaa !25
  %69 = fcmp olt double %68, %.0159192
  br i1 %69, label %73, label %70

70:                                               ; preds = %.lr.ph
  %71 = fcmp ogt double %68, %.0157193
  br i1 %71, label %72, label %73

72:                                               ; preds = %70
  br label %73

73:                                               ; preds = %.lr.ph, %70, %72
  %.1160 = phi double [ %.0159192, %72 ], [ %.0159192, %70 ], [ %68, %.lr.ph ]
  %.1158 = phi double [ %68, %72 ], [ %.0157193, %70 ], [ %.0157193, %.lr.ph ]
  %74 = getelementptr inbounds i8, ptr %66, i64 320
  %75 = load double, ptr %74, align 8, !tbaa !26
  %76 = fcmp olt double %75, %.0155194
  br i1 %76, label %80, label %77

77:                                               ; preds = %73
  %78 = fcmp ogt double %75, %.0153195
  br i1 %78, label %79, label %80

79:                                               ; preds = %77
  br label %80

80:                                               ; preds = %73, %77, %79
  %.1156 = phi double [ %.0155194, %79 ], [ %.0155194, %77 ], [ %75, %73 ]
  %.1154 = phi double [ %75, %79 ], [ %.0153195, %77 ], [ %.0153195, %73 ]
  %81 = getelementptr inbounds i8, ptr %66, i64 328
  %82 = load double, ptr %81, align 8, !tbaa !22
  %83 = fcmp olt double %82, %.0151196
  br i1 %83, label %87, label %84

84:                                               ; preds = %80
  %85 = fcmp ogt double %82, %.0149197
  br i1 %85, label %86, label %87

86:                                               ; preds = %84
  br label %87

87:                                               ; preds = %80, %84, %86
  %.1152 = phi double [ %.0151196, %86 ], [ %.0151196, %84 ], [ %82, %80 ]
  %.1150 = phi double [ %82, %86 ], [ %.0149197, %84 ], [ %.0149197, %80 ]
  %88 = getelementptr inbounds i8, ptr %66, i64 224
  %89 = load ptr, ptr %88, align 8, !tbaa !13
  %.not177 = icmp eq ptr %89, %57
  br i1 %.not177, label %._crit_edge, label %.lr.ph, !llvm.loop !27

._crit_edge:                                      ; preds = %87, %56
  %.0159.lcssa = phi double [ %59, %56 ], [ %.1160, %87 ]
  %.0157.lcssa = phi double [ %59, %56 ], [ %.1158, %87 ]
  %.0155.lcssa = phi double [ %61, %56 ], [ %.1156, %87 ]
  %.0153.lcssa = phi double [ %61, %56 ], [ %.1154, %87 ]
  %.0151.lcssa = phi double [ %63, %56 ], [ %.1152, %87 ]
  %.0149.lcssa = phi double [ %63, %56 ], [ %.1150, %87 ]
  %90 = load i32, ptr @SubproblemSize, align 4, !tbaa !20
  %91 = tail call ptr @BuildKDTree(i32 noundef %90) #5
  store ptr %91, ptr @KDTree, align 8, !tbaa !5
  %92 = load i32, ptr @Dimension, align 4, !tbaa !20
  %93 = load i32, ptr @SubproblemSize, align 4, !tbaa !20
  %94 = icmp sgt i32 %92, %93
  br i1 %94, label %.lr.ph213, label %._crit_edge214

.lr.ph213:                                        ; preds = %._crit_edge
  %95 = fsub double %.0157.lcssa, %.0159.lcssa
  %96 = fsub double %.0153.lcssa, %.0155.lcssa
  %97 = fsub double %.0149.lcssa, %.0151.lcssa
  br label %98

98:                                               ; preds = %.lr.ph213, %171
  %.0145211 = phi i32 [ 0, %.lr.ph213 ], [ %181, %171 ]
  %.0147210 = phi i32 [ %92, %.lr.ph213 ], [ %185, %171 ]
  %99 = load ptr, ptr @FirstNode, align 8, !tbaa !5
  %100 = tail call i32 @Random() #5
  %.fr = freeze i32 %100
  %101 = urem i32 %.fr, %.0147210
  %.not182203 = icmp eq i32 %101, 0
  br i1 %.not182203, label %._crit_edge208, label %.lr.ph207.preheader

.lr.ph207.preheader:                              ; preds = %98
  %102 = urem i32 %.fr, %.0147210
  %103 = add i32 %102, -1
  %xtraiter = and i32 %101, 7
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph207.prol.loopexit, label %.lr.ph207.prol

.lr.ph207.prol:                                   ; preds = %.lr.ph207.preheader, %.lr.ph207.prol
  %.3205.prol = phi ptr [ %106, %.lr.ph207.prol ], [ %99, %.lr.ph207.preheader ]
  %.0148204.prol = phi i32 [ %104, %.lr.ph207.prol ], [ %101, %.lr.ph207.preheader ]
  %prol.iter = phi i32 [ %prol.iter.next, %.lr.ph207.prol ], [ 0, %.lr.ph207.preheader ]
  %104 = add nsw i32 %.0148204.prol, -1
  %105 = getelementptr inbounds i8, ptr %.3205.prol, i64 72
  %106 = load ptr, ptr %105, align 8, !tbaa !28
  %prol.iter.next = add i32 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph207.prol.loopexit, label %.lr.ph207.prol, !llvm.loop !29

.lr.ph207.prol.loopexit:                          ; preds = %.lr.ph207.prol, %.lr.ph207.preheader
  %.lcssa.unr = phi ptr [ poison, %.lr.ph207.preheader ], [ %106, %.lr.ph207.prol ]
  %.3205.unr = phi ptr [ %99, %.lr.ph207.preheader ], [ %106, %.lr.ph207.prol ]
  %.0148204.unr = phi i32 [ %101, %.lr.ph207.preheader ], [ %104, %.lr.ph207.prol ]
  %107 = icmp ult i32 %103, 7
  br i1 %107, label %._crit_edge208, label %.lr.ph207

.lr.ph207:                                        ; preds = %.lr.ph207.prol.loopexit, %.lr.ph207
  %.3205 = phi ptr [ %124, %.lr.ph207 ], [ %.3205.unr, %.lr.ph207.prol.loopexit ]
  %.0148204 = phi i32 [ %122, %.lr.ph207 ], [ %.0148204.unr, %.lr.ph207.prol.loopexit ]
  %108 = getelementptr inbounds i8, ptr %.3205, i64 72
  %109 = load ptr, ptr %108, align 8, !tbaa !28
  %110 = getelementptr inbounds i8, ptr %109, i64 72
  %111 = load ptr, ptr %110, align 8, !tbaa !28
  %112 = getelementptr inbounds i8, ptr %111, i64 72
  %113 = load ptr, ptr %112, align 8, !tbaa !28
  %114 = getelementptr inbounds i8, ptr %113, i64 72
  %115 = load ptr, ptr %114, align 8, !tbaa !28
  %116 = getelementptr inbounds i8, ptr %115, i64 72
  %117 = load ptr, ptr %116, align 8, !tbaa !28
  %118 = getelementptr inbounds i8, ptr %117, i64 72
  %119 = load ptr, ptr %118, align 8, !tbaa !28
  %120 = getelementptr inbounds i8, ptr %119, i64 72
  %121 = load ptr, ptr %120, align 8, !tbaa !28
  %122 = add nsw i32 %.0148204, -8
  %123 = getelementptr inbounds i8, ptr %121, i64 72
  %124 = load ptr, ptr %123, align 8, !tbaa !28
  %.not182.7 = icmp eq i32 %122, 0
  br i1 %.not182.7, label %._crit_edge208, label %.lr.ph207, !llvm.loop !31

._crit_edge208:                                   ; preds = %.lr.ph207.prol.loopexit, %.lr.ph207, %98
  %.3.lcssa = phi ptr [ %99, %98 ], [ %.lcssa.unr, %.lr.ph207.prol.loopexit ], [ %124, %.lr.ph207 ]
  %125 = tail call i32 @Random() #5
  %126 = uitofp i32 %125 to double
  %127 = fmul double %126, 5.000000e-01
  %128 = fdiv double %127, 0x41DFFFFFFF800000
  %129 = fadd double %128, 5.000000e-01
  %130 = fmul double %95, %129
  %131 = tail call i32 @Random() #5
  %132 = uitofp i32 %131 to double
  %133 = fmul double %132, 5.000000e-01
  %134 = fdiv double %133, 0x41DFFFFFFF800000
  %135 = fadd double %134, 5.000000e-01
  %136 = fmul double %96, %135
  %137 = tail call i32 @Random() #5
  %138 = uitofp i32 %137 to double
  %139 = fmul double %138, 5.000000e-01
  %140 = fdiv double %139, 0x41DFFFFFFF800000
  %141 = fadd double %140, 5.000000e-01
  %142 = fmul double %97, %141
  %143 = getelementptr inbounds i8, ptr %.3.lcssa, i64 312
  %144 = getelementptr inbounds i8, ptr %.3.lcssa, i64 320
  %145 = getelementptr inbounds i8, ptr %.3.lcssa, i64 328
  br label %146

146:                                              ; preds = %167, %._crit_edge208
  %.0143 = phi double [ 0.000000e+00, %._crit_edge208 ], [ %..0143, %167 ]
  %.0140 = phi double [ 2.000000e+00, %._crit_edge208 ], [ %.0140., %167 ]
  %147 = fadd double %.0143, %.0140
  %148 = fmul double %147, 5.000000e-01
  store i32 0, ptr @Size, align 4, !tbaa !20
  %149 = load double, ptr %143, align 8, !tbaa !25
  %150 = fneg double %148
  %151 = tail call double @llvm.fmuladd.f64(double %150, double %130, double %149)
  %152 = tail call double @llvm.fmuladd.f64(double %148, double %130, double %149)
  %153 = load double, ptr %144, align 8, !tbaa !26
  %154 = tail call double @llvm.fmuladd.f64(double %150, double %136, double %153)
  %155 = tail call double @llvm.fmuladd.f64(double %148, double %136, double %153)
  %156 = load double, ptr %145, align 8, !tbaa !22
  %157 = tail call double @llvm.fmuladd.f64(double %150, double %142, double %156)
  %158 = tail call double @llvm.fmuladd.f64(double %148, double %142, double %156)
  %159 = load i32, ptr @Dimension, align 4, !tbaa !20
  %160 = add nsw i32 %159, -1
  tail call void @WindowSize(double noundef %151, double noundef %152, double noundef %154, double noundef %155, double noundef %157, double noundef %158, i32 noundef 0, i32 noundef %160)
  %161 = load i32, ptr @Size, align 4, !tbaa !20
  %162 = sitofp i32 %161 to double
  %163 = load i32, ptr @SubproblemSize, align 4, !tbaa !20
  %164 = sitofp i32 %163 to double
  %165 = fmul double %164, 0x3FE5555555555555
  %166 = fcmp ugt double %165, %162
  %.not183 = icmp sgt i32 %161, %163
  %or.cond = or i1 %.not183, %166
  br i1 %or.cond, label %167, label %171

167:                                              ; preds = %146
  %168 = fcmp ogt double %165, %162
  %..0143 = select i1 %168, double %148, double %.0143
  %.0140. = select i1 %168, double %.0140, double %148
  %169 = fsub double %.0140., %..0143
  %170 = fcmp ogt double %169, 0x3CB0000000000000
  br i1 %170, label %146, label %171, !llvm.loop !32

171:                                              ; preds = %146, %167
  %172 = load double, ptr %143, align 8, !tbaa !25
  %173 = tail call double @llvm.fmuladd.f64(double %150, double %130, double %172)
  %174 = tail call double @llvm.fmuladd.f64(double %148, double %130, double %172)
  %175 = load double, ptr %144, align 8, !tbaa !26
  %176 = tail call double @llvm.fmuladd.f64(double %150, double %136, double %175)
  %177 = tail call double @llvm.fmuladd.f64(double %148, double %136, double %175)
  %178 = load double, ptr %145, align 8, !tbaa !22
  %179 = tail call double @llvm.fmuladd.f64(double %150, double %142, double %178)
  %180 = tail call double @llvm.fmuladd.f64(double %148, double %142, double %178)
  %181 = add nuw nsw i32 %.0145211, 1
  %182 = load i32, ptr @Dimension, align 4, !tbaa !20
  %183 = add nsw i32 %182, -1
  tail call void @MakeSubproblem(double noundef %173, double noundef %174, double noundef %176, double noundef %177, double noundef %179, double noundef %180, i32 noundef %181, i32 noundef 0, i32 noundef %183)
  %184 = load i32, ptr @Size, align 4, !tbaa !20
  %185 = sub nsw i32 %.0147210, %184
  %186 = load i32, ptr @SubproblemSize, align 4, !tbaa !20
  %187 = icmp sgt i32 %185, %186
  br i1 %187, label %98, label %._crit_edge214, !llvm.loop !33

._crit_edge214:                                   ; preds = %171, %._crit_edge
  %.0147.lcssa = phi i32 [ %92, %._crit_edge ], [ %185, %171 ]
  %.0145.lcssa = phi i32 [ 0, %._crit_edge ], [ %181, %171 ]
  %188 = icmp sgt i32 %.0147.lcssa, 3
  br i1 %188, label %189, label %.loopexit

189:                                              ; preds = %._crit_edge214
  %190 = add nuw nsw i32 %.0145.lcssa, 1
  %191 = load ptr, ptr @FirstNode, align 8, !tbaa !5
  br label %192

192:                                              ; preds = %192, %189
  %.4 = phi ptr [ %191, %189 ], [ %195, %192 ]
  %193 = getelementptr inbounds i8, ptr %.4, i64 48
  store i32 %190, ptr %193, align 8, !tbaa !15
  %194 = getelementptr inbounds i8, ptr %.4, i64 72
  %195 = load ptr, ptr %194, align 8, !tbaa !28
  %.not178 = icmp eq ptr %195, %191
  br i1 %.not178, label %.loopexit, label %192, !llvm.loop !34

.loopexit:                                        ; preds = %192, %._crit_edge214
  %.1146 = phi i32 [ %.0145.lcssa, %._crit_edge214 ], [ %190, %192 ]
  %196 = load i32, ptr @WeightType, align 4
  %197 = add i32 %196, -9
  %or.cond13 = icmp ult i32 %197, 4
  br i1 %or.cond13, label %198, label %210

198:                                              ; preds = %.loopexit
  %199 = load ptr, ptr @FirstNode, align 8, !tbaa !5
  br label %200

200:                                              ; preds = %200, %198
  %.5 = phi ptr [ %199, %198 ], [ %208, %200 ]
  %201 = getelementptr inbounds i8, ptr %.5, i64 336
  %202 = getelementptr inbounds i8, ptr %.5, i64 312
  %203 = load <2 x double>, ptr %201, align 8, !tbaa !21
  store <2 x double> %203, ptr %202, align 8, !tbaa !21
  %204 = getelementptr inbounds i8, ptr %.5, i64 352
  %205 = load double, ptr %204, align 8, !tbaa !23
  %206 = getelementptr inbounds i8, ptr %.5, i64 328
  store double %205, ptr %206, align 8, !tbaa !22
  %207 = getelementptr inbounds i8, ptr %.5, i64 224
  %208 = load ptr, ptr %207, align 8, !tbaa !13
  %.not179 = icmp eq ptr %208, %199
  br i1 %.not179, label %209, label %200, !llvm.loop !35

209:                                              ; preds = %200
  store i32 0, ptr @CoordType, align 4, !tbaa !20
  br label %210

210:                                              ; preds = %.loopexit, %209
  %211 = load ptr, ptr @KDTree, align 8, !tbaa !5
  tail call void @free(ptr noundef %211) #5
  %.not180217 = icmp slt i32 %.1146, 1
  br i1 %.not180217, label %._crit_edge221, label %.lr.ph220

.lr.ph220:                                        ; preds = %210, %218
  %.0142218 = phi i32 [ %219, %218 ], [ 1, %210 ]
  %212 = load i64, ptr %1, align 8, !tbaa !18
  %213 = call i32 @SolveSubproblem(i32 noundef %.0142218, i32 noundef %.1146, ptr noundef nonnull %1) #5
  %214 = load i32, ptr @SubproblemsCompressed, align 4, !tbaa !20
  %.not181 = icmp ne i32 %214, 0
  %215 = load i64, ptr %1, align 8
  %216 = icmp eq i64 %215, %212
  %or.cond185 = select i1 %.not181, i1 %216, i1 false
  br i1 %or.cond185, label %217, label %218

217:                                              ; preds = %.lr.ph220
  call void @SolveCompressedSubproblem(i32 noundef %.0142218, i32 noundef %.1146, ptr noundef nonnull %1) #5
  br label %218

218:                                              ; preds = %.lr.ph220, %217
  %219 = add nuw i32 %.0142218, 1
  %exitcond.not = icmp eq i32 %.0142218, %.1146
  br i1 %exitcond.not, label %._crit_edge221.loopexit, label %.lr.ph220, !llvm.loop !36

._crit_edge221.loopexit:                          ; preds = %218
  %.pre229 = load i64, ptr %1, align 8, !tbaa !18
  br label %._crit_edge221

._crit_edge221:                                   ; preds = %._crit_edge221.loopexit, %210
  %220 = phi i64 [ %.pre229, %._crit_edge221.loopexit ], [ %25, %210 ]
  call void (ptr, ...) @printff(ptr noundef nonnull @.str.2, i64 noundef %220) #5
  %221 = load i64, ptr @Optimum, align 8
  %222 = and i64 %221, 9223372036854775807
  %or.cond15.not = icmp eq i64 %222, 0
  br i1 %or.cond15.not, label %230, label %223

223:                                              ; preds = %._crit_edge221
  %224 = load i64, ptr %1, align 8, !tbaa !18
  %225 = sub nsw i64 %224, %221
  %226 = sitofp i64 %225 to double
  %227 = fmul double %226, 1.000000e+02
  %228 = sitofp i64 %221 to double
  %229 = fdiv double %227, %228
  call void (ptr, ...) @printff(ptr noundef nonnull @.str.3, double noundef %229) #5
  br label %230

230:                                              ; preds = %223, %._crit_edge221
  %231 = call double @GetTime() #5
  %232 = fsub double %231, %2
  %233 = call double @llvm.fabs.f64(double %232)
  %234 = load i64, ptr %1, align 8, !tbaa !18
  %235 = load i64, ptr @Optimum, align 8, !tbaa !18
  %236 = icmp slt i64 %234, %235
  %237 = icmp eq i64 %234, %235
  %238 = select i1 %237, ptr @.str.6, ptr @.str.7
  %239 = select i1 %236, ptr @.str.5, ptr %238
  call void (ptr, ...) @printff(ptr noundef nonnull @.str.4, double noundef %233, ptr noundef nonnull %239) #5
  %240 = load i32, ptr @SubproblemBorders, align 4, !tbaa !20
  %241 = icmp ne i32 %240, 0
  %242 = icmp sgt i32 %.1146, 1
  %or.cond17 = select i1 %241, i1 %242, i1 false
  br i1 %or.cond17, label %243, label %244

243:                                              ; preds = %230
  call void @SolveSubproblemBorderProblems(i32 noundef %.1146, ptr noundef nonnull %1) #5
  br label %244

244:                                              ; preds = %243, %230
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret void
}

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

declare double @GetTime() local_unnamed_addr #2

declare void @AllocateStructures() local_unnamed_addr #2

declare i32 @ReadPenalties() local_unnamed_addr #2

declare void @printff(ptr noundef, ...) local_unnamed_addr #2

declare void @GEO2XYZ(double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @GEOM2XYZ(double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @BuildKDTree(i32 noundef) local_unnamed_addr #2

declare i32 @Random() local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden void @WindowSize(double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare hidden void @MakeSubproblem(double noundef, double noundef, double noundef, double noundef, double noundef, double noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

declare i32 @SolveSubproblem(i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare void @SolveCompressedSubproblem(i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

declare void @SolveSubproblemBorderProblems(i32 noundef, ptr noundef) local_unnamed_addr #2

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

attributes #0 = { 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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/C++ TBAA"}
!9 = !{!10, !6, i64 152}
!10 = !{!"Node", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !12, i64 312, !12, i64 320, !12, i64 328, !12, i64 336, !12, i64 344, !12, i64 352, !7, i64 360, !7, i64 361, !7, i64 362}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!10, !6, i64 224}
!14 = !{!10, !6, i64 160}
!15 = !{!10, !11, i64 48}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !19, i64 0}
!19 = !{!"long long", !7, i64 0}
!20 = !{!11, !11, i64 0}
!21 = !{!12, !12, i64 0}
!22 = !{!10, !12, i64 328}
!23 = !{!10, !12, i64 352}
!24 = distinct !{!24, !17}
!25 = !{!10, !12, i64 312}
!26 = !{!10, !12, i64 320}
!27 = distinct !{!27, !17}
!28 = !{!10, !6, i64 72}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.unroll.disable"}
!31 = distinct !{!31, !17}
!32 = distinct !{!32, !17}
!33 = distinct !{!33, !17}
!34 = distinct !{!34, !17}
!35 = distinct !{!35, !17}
!36 = distinct !{!36, !17}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass