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

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

@ProblemFileName = external dso_local global ptr, align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@ProblemFile = external dso_local global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [31 x i8], align 1
@TraceLevel = external dso_local global i32, align 4
@.str.2 = external hidden unnamed_addr constant [32 x i8], align 1
@FirstNode = external dso_local global ptr, align 8
@ProblemType = external dso_local global i32, align 4
@WeightFormat = external dso_local global i32, align 4
@WeightType = external dso_local global i32, align 4
@CoordType = external dso_local global i32, align 4
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@Name = external dso_local global ptr, align 8
@EdgeWeightFormat = external dso_local global ptr, align 8
@EdgeWeightType = external dso_local global ptr, align 8
@Type = external dso_local global ptr, align 8
@DisplayDataType = external dso_local global ptr, align 8
@NodeCoordType = external dso_local global ptr, align 8
@EdgeDataFormat = external dso_local global ptr, align 8
@Distance = external dso_local global ptr, align 8
@C = external dso_local global ptr, align 8
@c = external dso_local global ptr, align 8
@Delimiters = external hidden constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [20 x i8], align 1
@Swaps = external dso_local global i32, align 4
@Seed = external dso_local global i32, align 4
@Precision = external dso_local global i32, align 4
@InitialStepSize = external dso_local global i32, align 4
@MaxSwaps = external dso_local global i32, align 4
@Dimension = external dso_local global i32, align 4
@KickType = external dso_local global i32, align 4
@Runs = external dso_local global i32, align 4
@MaxCandidates = external dso_local global i32, align 4
@ExtraCandidates = external dso_local global i32, align 4
@SubproblemSize = external dso_local global i32, align 4
@AscentCandidates = external dso_local global i32, align 4
@InitialPeriod = external dso_local global i32, align 4
@Excess = external dso_local global double, align 8
@MaxTrials = external dso_local global i32, align 4
@CostMatrix = external dso_local global ptr, align 8
@MaxMatrixDimension = external dso_local global i32, align 4
@.str.24 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [72 x i8], align 1
@__PRETTY_FUNCTION__.ReadProblem = external hidden unnamed_addr constant [19 x i8], align 1
@NodeSet = external dso_local global ptr, align 8
@.str.26 = external hidden unnamed_addr constant [30 x i8], align 1
@D = external dso_local global ptr, align 8
@SubsequentMoveType = external dso_local global i32, align 4
@MoveType = external dso_local global i32, align 4
@SubsequentPatching = external dso_local global i32, align 4
@PatchingC = external dso_local global i32, align 4
@PatchingA = external dso_local global i32, align 4
@NonsequentialMoveType = external dso_local global i32, align 4
@BestSubsequentMove = external dso_local global ptr, align 8
@BestMove = external dso_local global ptr, align 8
@__const.ReadProblem.BestOptMove = external hidden unnamed_addr constant [6 x ptr], align 16
@__const.ReadProblem.BestOptMove.27 = external hidden unnamed_addr constant [6 x ptr], align 16
@.str.28 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [1 x i8], align 1
@InitialTourFileName = external dso_local global ptr, align 8
@InitialTourFile = external dso_local global ptr, align 8
@InputTourFileName = external dso_local global ptr, align 8
@InputTourFile = external dso_local global ptr, align 8
@SubproblemTourFileName = external dso_local global ptr, align 8
@SubproblemTourFile = external dso_local global ptr, align 8
@MergeTourFiles = external dso_local global i32, align 4
@MergeTourFile = external dso_local global ptr, align 8
@.str.31 = external hidden unnamed_addr constant [66 x i8], align 1
@MergeTourFileName = external dso_local global ptr, align 8
@LastLine = external dso_local global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local void @ReadProblem() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca [6 x ptr], align 16
  %13 = alloca [6 x ptr], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #10
  %14 = load ptr, ptr @ProblemFileName, align 8, !tbaa !5
  %15 = call noalias ptr @fopen(ptr noundef %14, ptr noundef @.str)
  store ptr %15, ptr @ProblemFile, align 8, !tbaa !5
  %16 = icmp ne ptr %15, null
  br i1 %16, label %19, label %17

17:                                               ; preds = %0
  %18 = load ptr, ptr @ProblemFileName, align 8, !tbaa !5
  call void (ptr, ...) @eprintf(ptr noundef @.str.1, ptr noundef %18)
  br label %19

19:                                               ; preds = %17, %0
  %20 = load i32, ptr @TraceLevel, align 4, !tbaa !9
  %21 = icmp sge i32 %20, 1
  br i1 %21, label %22, label %24

22:                                               ; preds = %19
  %23 = load ptr, ptr @ProblemFileName, align 8, !tbaa !5
  call void (ptr, ...) @printff(ptr noundef @.str.2, ptr noundef %23)
  br label %24

24:                                               ; preds = %22, %19
  call void @FreeStructures()
  store ptr null, ptr @FirstNode, align 8, !tbaa !5
  store i32 -1, ptr @ProblemType, align 4, !tbaa !9
  store i32 -1, ptr @WeightFormat, align 4, !tbaa !9
  store i32 -1, ptr @WeightType, align 4, !tbaa !9
  store i32 2, ptr @CoordType, align 4, !tbaa !9
  %25 = call ptr @Copy(ptr noundef @.str.3)
  store ptr %25, ptr @Name, align 8, !tbaa !5
  store ptr null, ptr @EdgeWeightFormat, align 8, !tbaa !5
  store ptr null, ptr @EdgeWeightType, align 8, !tbaa !5
  store ptr null, ptr @Type, align 8, !tbaa !5
  store ptr null, ptr @DisplayDataType, align 8, !tbaa !5
  store ptr null, ptr @NodeCoordType, align 8, !tbaa !5
  store ptr null, ptr @EdgeDataFormat, align 8, !tbaa !5
  store ptr null, ptr @Distance, align 8, !tbaa !5
  store ptr null, ptr @C, align 8, !tbaa !5
  store ptr null, ptr @c, align 8, !tbaa !5
  br label %26

26:                                               ; preds = %175, %34, %24
  %27 = load ptr, ptr @ProblemFile, align 8, !tbaa !5
  %28 = call ptr @ReadLine(ptr noundef %27)
  store ptr %28, ptr %3, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %176

30:                                               ; preds = %26
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = call ptr @strtok(ptr noundef %31, ptr noundef @Delimiters) #10
  store ptr %32, ptr %4, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  br label %26, !llvm.loop !11

35:                                               ; preds = %30
  store i32 0, ptr %1, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %61, %35
  %37 = load i32, ptr %1, align 4, !tbaa !9
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = call i64 @strlen(ptr noundef %38) #11
  %40 = trunc i64 %39 to i32
  %41 = icmp slt i32 %37, %40
  br i1 %41, label %42, label %64

42:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #10
  %43 = call ptr @__ctype_toupper_loc() #12
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = load i32, ptr %1, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i8, ptr %45, i64 %47
  %49 = load i8, ptr %48, align 1, !tbaa !13
  %50 = sext i8 %49 to i32
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds i32, ptr %44, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !9
  store i32 %53, ptr %5, align 4, !tbaa !9
  %54 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %54, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #10
  %55 = load i32, ptr %6, align 4, !tbaa !9
  %56 = trunc i32 %55 to i8
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = load i32, ptr %1, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds i8, ptr %57, i64 %59
  store i8 %56, ptr %60, align 1, !tbaa !13
  br label %61

61:                                               ; preds = %42
  %62 = load i32, ptr %1, align 4, !tbaa !9
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %1, align 4, !tbaa !9
  br label %36, !llvm.loop !14

64:                                               ; preds = %36
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = call i32 @strcmp(ptr noundef %65, ptr noundef @.str.4) #11
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %69, label %68

68:                                               ; preds = %64
  br label %175

69:                                               ; preds = %64
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = call i32 @strcmp(ptr noundef %70, ptr noundef @.str.5) #11
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %75, label %73

73:                                               ; preds = %69
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  call void (ptr, ...) @eprintf(ptr noundef @.str.6, ptr noundef %74)
  br label %174

75:                                               ; preds = %69
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = call i32 @strcmp(ptr noundef %76, ptr noundef @.str.7) #11
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %81, label %79

79:                                               ; preds = %75
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  call void (ptr, ...) @eprintf(ptr noundef @.str.6, ptr noundef %80)
  br label %173

81:                                               ; preds = %75
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = call i32 @strcmp(ptr noundef %82, ptr noundef @.str.8) #11
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %86, label %85

85:                                               ; preds = %81
  call void @Read_DIMENSION()
  br label %172

86:                                               ; preds = %81
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = call i32 @strcmp(ptr noundef %87, ptr noundef @.str.9) #11
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %91, label %90

90:                                               ; preds = %86
  call void @Read_DISPLAY_DATA_SECTION()
  br label %171

91:                                               ; preds = %86
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = call i32 @strcmp(ptr noundef %92, ptr noundef @.str.10) #11
  %94 = icmp ne i32 %93, 0
  br i1 %94, label %96, label %95

95:                                               ; preds = %91
  call void @Read_DISPLAY_DATA_TYPE()
  br label %170

96:                                               ; preds = %91
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = call i32 @strcmp(ptr noundef %97, ptr noundef @.str.11) #11
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %101, label %100

100:                                              ; preds = %96
  call void @Read_EDGE_DATA_FORMAT()
  br label %169

101:                                              ; preds = %96
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = call i32 @strcmp(ptr noundef %102, ptr noundef @.str.12) #11
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %106, label %105

105:                                              ; preds = %101
  call void @Read_EDGE_DATA_SECTION()
  br label %168

106:                                              ; preds = %101
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = call i32 @strcmp(ptr noundef %107, ptr noundef @.str.13) #11
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %111, label %110

110:                                              ; preds = %106
  call void @Read_EDGE_WEIGHT_FORMAT()
  br label %167

111:                                              ; preds = %106
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = call i32 @strcmp(ptr noundef %112, ptr noundef @.str.14) #11
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %116, label %115

115:                                              ; preds = %111
  call void @Read_EDGE_WEIGHT_SECTION()
  br label %166

116:                                              ; preds = %111
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = call i32 @strcmp(ptr noundef %117, ptr noundef @.str.15) #11
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %121, label %120

120:                                              ; preds = %116
  call void @Read_EDGE_WEIGHT_TYPE()
  br label %165

121:                                              ; preds = %116
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = call i32 @strcmp(ptr noundef %122, ptr noundef @.str.16) #11
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %126, label %125

125:                                              ; preds = %121
  br label %176

126:                                              ; preds = %121
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = call i32 @strcmp(ptr noundef %127, ptr noundef @.str.17) #11
  %129 = icmp ne i32 %128, 0
  br i1 %129, label %131, label %130

130:                                              ; preds = %126
  call void @Read_FIXED_EDGES_SECTION()
  br label %163

131:                                              ; preds = %126
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = call i32 @strcmp(ptr noundef %132, ptr noundef @.str.18) #11
  %134 = icmp ne i32 %133, 0
  br i1 %134, label %136, label %135

135:                                              ; preds = %131
  call void @Read_NAME()
  br label %162

136:                                              ; preds = %131
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = call i32 @strcmp(ptr noundef %137, ptr noundef @.str.19) #11
  %139 = icmp ne i32 %138, 0
  br i1 %139, label %141, label %140

140:                                              ; preds = %136
  call void @Read_NODE_COORD_SECTION()
  br label %161

141:                                              ; preds = %136
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  %143 = call i32 @strcmp(ptr noundef %142, ptr noundef @.str.20) #11
  %144 = icmp ne i32 %143, 0
  br i1 %144, label %146, label %145

145:                                              ; preds = %141
  call void @Read_NODE_COORD_TYPE()
  br label %160

146:                                              ; preds = %141
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = call i32 @strcmp(ptr noundef %147, ptr noundef @.str.21) #11
  %149 = icmp ne i32 %148, 0
  br i1 %149, label %151, label %150

150:                                              ; preds = %146
  call void @Read_TOUR_SECTION(ptr noundef @ProblemFile)
  br label %159

151:                                              ; preds = %146
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = call i32 @strcmp(ptr noundef %152, ptr noundef @.str.22) #11
  %154 = icmp ne i32 %153, 0
  br i1 %154, label %156, label %155

155:                                              ; preds = %151
  call void @Read_TYPE()
  br label %158

156:                                              ; preds = %151
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  call void (ptr, ...) @eprintf(ptr noundef @.str.23, ptr noundef %157)
  br label %158

158:                                              ; preds = %156, %155
  br label %159

159:                                              ; preds = %158, %150
  br label %160

160:                                              ; preds = %159, %145
  br label %161

161:                                              ; preds = %160, %140
  br label %162

162:                                              ; preds = %161, %135
  br label %163

163:                                              ; preds = %162, %130
  br label %164

164:                                              ; preds = %163
  br label %165

165:                                              ; preds = %164, %120
  br label %166

166:                                              ; preds = %165, %115
  br label %167

167:                                              ; preds = %166, %110
  br label %168

168:                                              ; preds = %167, %105
  br label %169

169:                                              ; preds = %168, %100
  br label %170

170:                                              ; preds = %169, %95
  br label %171

171:                                              ; preds = %170, %90
  br label %172

172:                                              ; preds = %171, %85
  br label %173

173:                                              ; preds = %172, %79
  br label %174

174:                                              ; preds = %173, %73
  br label %175

175:                                              ; preds = %174, %68
  br label %26, !llvm.loop !11

176:                                              ; preds = %125, %26
  store i32 0, ptr @Swaps, align 4, !tbaa !9
  %177 = load i32, ptr @Seed, align 4, !tbaa !9
  %178 = icmp eq i32 %177, 0
  br i1 %178, label %179, label %182

179:                                              ; preds = %176
  %180 = call i64 @time(ptr noundef null) #10
  %181 = trunc i64 %180 to i32
  store i32 %181, ptr @Seed, align 4, !tbaa !9
  br label %182

182:                                              ; preds = %179, %176
  %183 = load i32, ptr @Precision, align 4, !tbaa !9
  %184 = icmp eq i32 %183, 0
  br i1 %184, label %185, label %186

185:                                              ; preds = %182
  store i32 100, ptr @Precision, align 4, !tbaa !9
  br label %186

186:                                              ; preds = %185, %182
  %187 = load i32, ptr @InitialStepSize, align 4, !tbaa !9
  %188 = icmp eq i32 %187, 0
  br i1 %188, label %189, label %190

189:                                              ; preds = %186
  store i32 1, ptr @InitialStepSize, align 4, !tbaa !9
  br label %190

190:                                              ; preds = %189, %186
  %191 = load i32, ptr @MaxSwaps, align 4, !tbaa !9
  %192 = icmp slt i32 %191, 0
  br i1 %192, label %193, label %195

193:                                              ; preds = %190
  %194 = load i32, ptr @Dimension, align 4, !tbaa !9
  store i32 %194, ptr @MaxSwaps, align 4, !tbaa !9
  br label %195

195:                                              ; preds = %193, %190
  %196 = load i32, ptr @KickType, align 4, !tbaa !9
  %197 = load i32, ptr @Dimension, align 4, !tbaa !9
  %198 = sdiv i32 %197, 2
  %199 = icmp sgt i32 %196, %198
  br i1 %199, label %200, label %203

200:                                              ; preds = %195
  %201 = load i32, ptr @Dimension, align 4, !tbaa !9
  %202 = sdiv i32 %201, 2
  store i32 %202, ptr @KickType, align 4, !tbaa !9
  br label %203

203:                                              ; preds = %200, %195
  %204 = load i32, ptr @Runs, align 4, !tbaa !9
  %205 = icmp eq i32 %204, 0
  br i1 %205, label %206, label %207

206:                                              ; preds = %203
  store i32 10, ptr @Runs, align 4, !tbaa !9
  br label %207

207:                                              ; preds = %206, %203
  %208 = load i32, ptr @MaxCandidates, align 4, !tbaa !9
  %209 = load i32, ptr @Dimension, align 4, !tbaa !9
  %210 = sub nsw i32 %209, 1
  %211 = icmp sgt i32 %208, %210
  br i1 %211, label %212, label %215

212:                                              ; preds = %207
  %213 = load i32, ptr @Dimension, align 4, !tbaa !9
  %214 = sub nsw i32 %213, 1
  store i32 %214, ptr @MaxCandidates, align 4, !tbaa !9
  br label %215

215:                                              ; preds = %212, %207
  %216 = load i32, ptr @ExtraCandidates, align 4, !tbaa !9
  %217 = load i32, ptr @Dimension, align 4, !tbaa !9
  %218 = sub nsw i32 %217, 1
  %219 = icmp sgt i32 %216, %218
  br i1 %219, label %220, label %223

220:                                              ; preds = %215
  %221 = load i32, ptr @Dimension, align 4, !tbaa !9
  %222 = sub nsw i32 %221, 1
  store i32 %222, ptr @ExtraCandidates, align 4, !tbaa !9
  br label %223

223:                                              ; preds = %220, %215
  %224 = load i32, ptr @SubproblemSize, align 4, !tbaa !9
  %225 = load i32, ptr @Dimension, align 4, !tbaa !9
  %226 = icmp sge i32 %224, %225
  br i1 %226, label %227, label %229

227:                                              ; preds = %223
  %228 = load i32, ptr @Dimension, align 4, !tbaa !9
  store i32 %228, ptr @SubproblemSize, align 4, !tbaa !9
  br label %265

229:                                              ; preds = %223
  %230 = load i32, ptr @SubproblemSize, align 4, !tbaa !9
  %231 = icmp eq i32 %230, 0
  br i1 %231, label %232, label %264

232:                                              ; preds = %229
  %233 = load i32, ptr @AscentCandidates, align 4, !tbaa !9
  %234 = load i32, ptr @Dimension, align 4, !tbaa !9
  %235 = sub nsw i32 %234, 1
  %236 = icmp sgt i32 %233, %235
  br i1 %236, label %237, label %240

237:                                              ; preds = %232
  %238 = load i32, ptr @Dimension, align 4, !tbaa !9
  %239 = sub nsw i32 %238, 1
  store i32 %239, ptr @AscentCandidates, align 4, !tbaa !9
  br label %240

240:                                              ; preds = %237, %232
  %241 = load i32, ptr @InitialPeriod, align 4, !tbaa !9
  %242 = icmp slt i32 %241, 0
  br i1 %242, label %243, label %250

243:                                              ; preds = %240
  %244 = load i32, ptr @Dimension, align 4, !tbaa !9
  %245 = sdiv i32 %244, 2
  store i32 %245, ptr @InitialPeriod, align 4, !tbaa !9
  %246 = load i32, ptr @InitialPeriod, align 4, !tbaa !9
  %247 = icmp slt i32 %246, 100
  br i1 %247, label %248, label %249

248:                                              ; preds = %243
  store i32 100, ptr @InitialPeriod, align 4, !tbaa !9
  br label %249

249:                                              ; preds = %248, %243
  br label %250

250:                                              ; preds = %249, %240
  %251 = load double, ptr @Excess, align 8, !tbaa !15
  %252 = fcmp olt double %251, 0.000000e+00
  br i1 %252, label %253, label %257

253:                                              ; preds = %250
  %254 = load i32, ptr @Dimension, align 4, !tbaa !9
  %255 = sitofp i32 %254 to double
  %256 = fdiv double 1.000000e+00, %255
  store double %256, ptr @Excess, align 8, !tbaa !15
  br label %257

257:                                              ; preds = %253, %250
  %258 = load i32, ptr @MaxTrials, align 4, !tbaa !9
  %259 = icmp eq i32 %258, -1
  br i1 %259, label %260, label %262

260:                                              ; preds = %257
  %261 = load i32, ptr @Dimension, align 4, !tbaa !9
  store i32 %261, ptr @MaxTrials, align 4, !tbaa !9
  br label %262

262:                                              ; preds = %260, %257
  %263 = load i32, ptr @Dimension, align 4, !tbaa !9
  call void @MakeHeap(i32 noundef %263)
  br label %264

264:                                              ; preds = %262, %229
  br label %265

265:                                              ; preds = %264, %227
  %266 = load ptr, ptr @CostMatrix, align 8, !tbaa !5
  %267 = icmp eq ptr %266, null
  br i1 %267, label %268, label %402

268:                                              ; preds = %265
  %269 = load i32, ptr @Dimension, align 4, !tbaa !9
  %270 = load i32, ptr @MaxMatrixDimension, align 4, !tbaa !9
  %271 = icmp sle i32 %269, %270
  br i1 %271, label %272, label %402

272:                                              ; preds = %268
  %273 = load ptr, ptr @Distance, align 8, !tbaa !5
  %274 = icmp ne ptr %273, null
  br i1 %274, label %275, label %402

275:                                              ; preds = %272
  %276 = load ptr, ptr @Distance, align 8, !tbaa !5
  %277 = icmp ne ptr %276, @Distance_1
  br i1 %277, label %278, label %402

278:                                              ; preds = %275
  %279 = load ptr, ptr @Distance, align 8, !tbaa !5
  %280 = icmp ne ptr %279, @Distance_ATSP
  br i1 %280, label %281, label %402

281:                                              ; preds = %278
  %282 = load i32, ptr @WeightType, align 4, !tbaa !9
  %283 = icmp ne i32 %282, 9
  br i1 %283, label %284, label %402

284:                                              ; preds = %281
  %285 = load i32, ptr @WeightType, align 4, !tbaa !9
  %286 = icmp ne i32 %285, 10
  br i1 %286, label %287, label %402

287:                                              ; preds = %284
  %288 = load i32, ptr @WeightType, align 4, !tbaa !9
  %289 = icmp ne i32 %288, 11
  br i1 %289, label %290, label %402

290:                                              ; preds = %287
  %291 = load i32, ptr @WeightType, align 4, !tbaa !9
  %292 = icmp ne i32 %291, 12
  br i1 %292, label %293, label %402

293:                                              ; preds = %290
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  %294 = load i32, ptr @Dimension, align 4, !tbaa !9
  %295 = sext i32 %294 to i64
  %296 = load i32, ptr @Dimension, align 4, !tbaa !9
  %297 = sub nsw i32 %296, 1
  %298 = sext i32 %297 to i64
  %299 = mul i64 %295, %298
  %300 = udiv i64 %299, 2
  %301 = call noalias ptr @calloc(i64 noundef %300, i64 noundef 4) #13
  store ptr %301, ptr @CostMatrix, align 8, !tbaa !5
  %302 = icmp ne ptr %301, null
  br i1 %302, label %303, label %304

303:                                              ; preds = %293
  br label %305

304:                                              ; preds = %293
  call void @__assert_fail(ptr noundef @.str.24, ptr noundef @.str.25, i32 noundef 323, ptr noundef @__PRETTY_FUNCTION__.ReadProblem) #14
  unreachable

305:                                              ; preds = %303
  %306 = load ptr, ptr @FirstNode, align 8, !tbaa !5
  %307 = getelementptr inbounds %struct.Node, ptr %306, i32 0, i32 16
  %308 = load ptr, ptr %307, align 8, !tbaa !17
  store ptr %308, ptr %7, align 8, !tbaa !5
  br label %309

309:                                              ; preds = %395, %305
  %310 = load ptr, ptr @CostMatrix, align 8, !tbaa !5
  %311 = load ptr, ptr %7, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct.Node, ptr %311, i32 0, i32 0
  %313 = load i32, ptr %312, align 8, !tbaa !19
  %314 = sub nsw i32 %313, 1
  %315 = sext i32 %314 to i64
  %316 = load ptr, ptr %7, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.Node, ptr %316, i32 0, i32 0
  %318 = load i32, ptr %317, align 8, !tbaa !19
  %319 = sub nsw i32 %318, 2
  %320 = sext i32 %319 to i64
  %321 = mul i64 %315, %320
  %322 = udiv i64 %321, 2
  %323 = getelementptr inbounds i32, ptr %310, i64 %322
  %324 = getelementptr inbounds i32, ptr %323, i64 -1
  %325 = load ptr, ptr %7, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.Node, ptr %325, i32 0, i32 14
  store ptr %324, ptr %326, align 8, !tbaa !20
  %327 = load i32, ptr @ProblemType, align 4, !tbaa !9
  %328 = icmp ne i32 %327, 6
  br i1 %328, label %335, label %329

329:                                              ; preds = %309
  %330 = load ptr, ptr %7, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.Node, ptr %330, i32 0, i32 0
  %332 = load i32, ptr %331, align 8, !tbaa !19
  %333 = load i32, ptr @Dimension, align 4, !tbaa !9
  %334 = icmp slt i32 %332, %333
  br i1 %334, label %335, label %374

335:                                              ; preds = %329, %309
  %336 = load ptr, ptr @FirstNode, align 8, !tbaa !5
  store ptr %336, ptr %8, align 8, !tbaa !5
  br label %337

337:                                              ; preds = %369, %335
  %338 = load ptr, ptr %8, align 8, !tbaa !5
  %339 = load ptr, ptr %7, align 8, !tbaa !5
  %340 = icmp ne ptr %338, %339
  br i1 %340, label %341, label %373

341:                                              ; preds = %337
  %342 = load ptr, ptr %7, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct.Node, ptr %342, i32 0, i32 26
  %344 = load ptr, ptr %343, align 8, !tbaa !21
  %345 = load ptr, ptr %8, align 8, !tbaa !5
  %346 = icmp eq ptr %344, %345
  br i1 %346, label %353, label %347

347:                                              ; preds = %341
  %348 = load ptr, ptr %7, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct.Node, ptr %348, i32 0, i32 27
  %350 = load ptr, ptr %349, align 8, !tbaa !22
  %351 = load ptr, ptr %8, align 8, !tbaa !5
  %352 = icmp eq ptr %350, %351
  br i1 %352, label %353, label %354

353:                                              ; preds = %347, %341
  br label %359

354:                                              ; preds = %347
  %355 = load ptr, ptr @Distance, align 8, !tbaa !5
  %356 = load ptr, ptr %7, align 8, !tbaa !5
  %357 = load ptr, ptr %8, align 8, !tbaa !5
  %358 = call i32 %355(ptr noundef %356, ptr noundef %357)
  br label %359

359:                                              ; preds = %354, %353
  %360 = phi i32 [ 0, %353 ], [ %358, %354 ]
  %361 = load ptr, ptr %7, align 8, !tbaa !5
  %362 = getelementptr inbounds %struct.Node, ptr %361, i32 0, i32 14
  %363 = load ptr, ptr %362, align 8, !tbaa !20
  %364 = load ptr, ptr %8, align 8, !tbaa !5
  %365 = getelementptr inbounds %struct.Node, ptr %364, i32 0, i32 0
  %366 = load i32, ptr %365, align 8, !tbaa !19
  %367 = sext i32 %366 to i64
  %368 = getelementptr inbounds i32, ptr %363, i64 %367
  store i32 %360, ptr %368, align 4, !tbaa !9
  br label %369

369:                                              ; preds = %359
  %370 = load ptr, ptr %8, align 8, !tbaa !5
  %371 = getelementptr inbounds %struct.Node, ptr %370, i32 0, i32 16
  %372 = load ptr, ptr %371, align 8, !tbaa !17
  store ptr %372, ptr %8, align 8, !tbaa !5
  br label %337, !llvm.loop !23

373:                                              ; preds = %337
  br label %394

374:                                              ; preds = %329
  %375 = load ptr, ptr @FirstNode, align 8, !tbaa !5
  store ptr %375, ptr %8, align 8, !tbaa !5
  br label %376

376:                                              ; preds = %389, %374
  %377 = load ptr, ptr %8, align 8, !tbaa !5
  %378 = load ptr, ptr %7, align 8, !tbaa !5
  %379 = icmp ne ptr %377, %378
  br i1 %379, label %380, label %393

380:                                              ; preds = %376
  %381 = load ptr, ptr %7, align 8, !tbaa !5
  %382 = getelementptr inbounds %struct.Node, ptr %381, i32 0, i32 14
  %383 = load ptr, ptr %382, align 8, !tbaa !20
  %384 = load ptr, ptr %8, align 8, !tbaa !5
  %385 = getelementptr inbounds %struct.Node, ptr %384, i32 0, i32 0
  %386 = load i32, ptr %385, align 8, !tbaa !19
  %387 = sext i32 %386 to i64
  %388 = getelementptr inbounds i32, ptr %383, i64 %387
  store i32 0, ptr %388, align 4, !tbaa !9
  br label %389

389:                                              ; preds = %380
  %390 = load ptr, ptr %8, align 8, !tbaa !5
  %391 = getelementptr inbounds %struct.Node, ptr %390, i32 0, i32 16
  %392 = load ptr, ptr %391, align 8, !tbaa !17
  store ptr %392, ptr %8, align 8, !tbaa !5
  br label %376, !llvm.loop !24

393:                                              ; preds = %376
  br label %394

394:                                              ; preds = %393, %373
  br label %395

395:                                              ; preds = %394
  %396 = load ptr, ptr %7, align 8, !tbaa !5
  %397 = getelementptr inbounds %struct.Node, ptr %396, i32 0, i32 16
  %398 = load ptr, ptr %397, align 8, !tbaa !17
  store ptr %398, ptr %7, align 8, !tbaa !5
  %399 = load ptr, ptr @FirstNode, align 8, !tbaa !5
  %400 = icmp ne ptr %398, %399
  br i1 %400, label %309, label %401, !llvm.loop !25

401:                                              ; preds = %395
  store i32 0, ptr @WeightType, align 4, !tbaa !9
  store ptr null, ptr @c, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  br label %402

402:                                              ; preds = %401, %290, %287, %284, %281, %278, %275, %272, %268, %265
  %403 = load i32, ptr @Precision, align 4, !tbaa !9
  %404 = icmp sgt i32 %403, 1
  br i1 %404, label %405, label %465

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

408:                                              ; preds = %405
  %409 = load i32, ptr @ProblemType, align 4, !tbaa !9
  %410 = icmp eq i32 %409, 1
  br i1 %410, label %411, label %465

411:                                              ; preds = %408, %405
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #10
  %412 = load i32, ptr @ProblemType, align 4, !tbaa !9
  %413 = icmp eq i32 %412, 1
  br i1 %413, label %414, label %417

414:                                              ; preds = %411
  %415 = load i32, ptr @Dimension, align 4, !tbaa !9
  %416 = sdiv i32 %415, 2
  br label %419

417:                                              ; preds = %411
  %418 = load i32, ptr @Dimension, align 4, !tbaa !9
  br label %419

419:                                              ; preds = %417, %414
  %420 = phi i32 [ %416, %414 ], [ %418, %417 ]
  store i32 %420, ptr %10, align 4, !tbaa !9
  store i32 2, ptr %1, align 4, !tbaa !9
  br label %421

421:                                              ; preds = %461, %419
  %422 = load i32, ptr %1, align 4, !tbaa !9
  %423 = load i32, ptr %10, align 4, !tbaa !9
  %424 = icmp sle i32 %422, %423
  br i1 %424, label %425, label %464

425:                                              ; preds = %421
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #10
  %426 = load ptr, ptr @NodeSet, align 8, !tbaa !5
  %427 = load i32, ptr %1, align 4, !tbaa !9
  %428 = sext i32 %427 to i64
  %429 = getelementptr inbounds %struct.Node, ptr %426, i64 %428
  store ptr %429, ptr %11, align 8, !tbaa !5
  store i32 1, ptr %9, align 4, !tbaa !9
  br label %430

430:                                              ; preds = %457, %425
  %431 = load i32, ptr %9, align 4, !tbaa !9
  %432 = load i32, ptr %1, align 4, !tbaa !9
  %433 = icmp slt i32 %431, %432
  br i1 %433, label %434, label %460

434:                                              ; preds = %430
  %435 = load ptr, ptr %11, align 8, !tbaa !5
  %436 = getelementptr inbounds %struct.Node, ptr %435, i32 0, i32 14
  %437 = load ptr, ptr %436, align 8, !tbaa !20
  %438 = load i32, ptr %9, align 4, !tbaa !9
  %439 = sext i32 %438 to i64
  %440 = getelementptr inbounds i32, ptr %437, i64 %439
  %441 = load i32, ptr %440, align 4, !tbaa !9
  %442 = load i32, ptr @Precision, align 4, !tbaa !9
  %443 = mul nsw i32 %441, %442
  %444 = load i32, ptr @Precision, align 4, !tbaa !9
  %445 = sdiv i32 %443, %444
  %446 = load ptr, ptr %11, align 8, !tbaa !5
  %447 = getelementptr inbounds %struct.Node, ptr %446, i32 0, i32 14
  %448 = load ptr, ptr %447, align 8, !tbaa !20
  %449 = load i32, ptr %9, align 4, !tbaa !9
  %450 = sext i32 %449 to i64
  %451 = getelementptr inbounds i32, ptr %448, i64 %450
  %452 = load i32, ptr %451, align 4, !tbaa !9
  %453 = icmp ne i32 %445, %452
  br i1 %453, label %454, label %456

454:                                              ; preds = %434
  %455 = load i32, ptr @Precision, align 4, !tbaa !9
  call void (ptr, ...) @eprintf(ptr noundef @.str.26, i32 noundef %455)
  br label %456

456:                                              ; preds = %454, %434
  br label %457

457:                                              ; preds = %456
  %458 = load i32, ptr %9, align 4, !tbaa !9
  %459 = add nsw i32 %458, 1
  store i32 %459, ptr %9, align 4, !tbaa !9
  br label %430, !llvm.loop !26

460:                                              ; preds = %430
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #10
  br label %461

461:                                              ; preds = %460
  %462 = load i32, ptr %1, align 4, !tbaa !9
  %463 = add nsw i32 %462, 1
  store i32 %463, ptr %1, align 4, !tbaa !9
  br label %421, !llvm.loop !27

464:                                              ; preds = %421
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #10
  br label %465

465:                                              ; preds = %464, %408, %402
  %466 = load i32, ptr @WeightType, align 4, !tbaa !9
  %467 = icmp eq i32 %466, 0
  %468 = zext i1 %467 to i64
  %469 = select i1 %467, ptr @C_EXPLICIT, ptr @C_FUNCTION
  store ptr %469, ptr @C, align 8, !tbaa !5
  %470 = load i32, ptr @WeightType, align 4, !tbaa !9
  %471 = icmp eq i32 %470, 0
  %472 = zext i1 %471 to i64
  %473 = select i1 %471, ptr @D_EXPLICIT, ptr @D_FUNCTION
  store ptr %473, ptr @D, align 8, !tbaa !5
  %474 = load i32, ptr @SubsequentMoveType, align 4, !tbaa !9
  %475 = icmp eq i32 %474, 0
  br i1 %475, label %476, label %478

476:                                              ; preds = %465
  %477 = load i32, ptr @MoveType, align 4, !tbaa !9
  store i32 %477, ptr @SubsequentMoveType, align 4, !tbaa !9
  br label %478

478:                                              ; preds = %476, %465
  %479 = load i32, ptr @MoveType, align 4, !tbaa !9
  %480 = load i32, ptr @SubsequentMoveType, align 4, !tbaa !9
  %481 = icmp sge i32 %479, %480
  br i1 %481, label %485, label %482

482:                                              ; preds = %478
  %483 = load i32, ptr @SubsequentPatching, align 4, !tbaa !9
  %484 = icmp ne i32 %483, 0
  br i1 %484, label %487, label %485

485:                                              ; preds = %482, %478
  %486 = load i32, ptr @MoveType, align 4, !tbaa !9
  br label %489

487:                                              ; preds = %482
  %488 = load i32, ptr @SubsequentMoveType, align 4, !tbaa !9
  br label %489

489:                                              ; preds = %487, %485
  %490 = phi i32 [ %486, %485 ], [ %488, %487 ]
  store i32 %490, ptr %2, align 4, !tbaa !9
  %491 = load i32, ptr @PatchingC, align 4, !tbaa !9
  %492 = load i32, ptr %2, align 4, !tbaa !9
  %493 = icmp sgt i32 %491, %492
  br i1 %493, label %494, label %496

494:                                              ; preds = %489
  %495 = load i32, ptr %2, align 4, !tbaa !9
  store i32 %495, ptr @PatchingC, align 4, !tbaa !9
  br label %496

496:                                              ; preds = %494, %489
  %497 = load i32, ptr @PatchingA, align 4, !tbaa !9
  %498 = icmp sgt i32 %497, 1
  br i1 %498, label %499, label %512

499:                                              ; preds = %496
  %500 = load i32, ptr @PatchingA, align 4, !tbaa !9
  %501 = load i32, ptr @PatchingC, align 4, !tbaa !9
  %502 = icmp sge i32 %500, %501
  br i1 %502, label %503, label %512

503:                                              ; preds = %499
  %504 = load i32, ptr @PatchingC, align 4, !tbaa !9
  %505 = icmp sgt i32 %504, 2
  br i1 %505, label %506, label %509

506:                                              ; preds = %503
  %507 = load i32, ptr @PatchingC, align 4, !tbaa !9
  %508 = sub nsw i32 %507, 1
  br label %510

509:                                              ; preds = %503
  br label %510

510:                                              ; preds = %509, %506
  %511 = phi i32 [ %508, %506 ], [ 1, %509 ]
  store i32 %511, ptr @PatchingA, align 4, !tbaa !9
  br label %512

512:                                              ; preds = %510, %499, %496
  %513 = load i32, ptr @NonsequentialMoveType, align 4, !tbaa !9
  %514 = icmp eq i32 %513, -1
  br i1 %514, label %524, label %515

515:                                              ; preds = %512
  %516 = load i32, ptr @NonsequentialMoveType, align 4, !tbaa !9
  %517 = load i32, ptr %2, align 4, !tbaa !9
  %518 = load i32, ptr @PatchingC, align 4, !tbaa !9
  %519 = add nsw i32 %517, %518
  %520 = load i32, ptr @PatchingA, align 4, !tbaa !9
  %521 = add nsw i32 %519, %520
  %522 = sub nsw i32 %521, 1
  %523 = icmp sgt i32 %516, %522
  br i1 %523, label %524, label %531

524:                                              ; preds = %515, %512
  %525 = load i32, ptr %2, align 4, !tbaa !9
  %526 = load i32, ptr @PatchingC, align 4, !tbaa !9
  %527 = add nsw i32 %525, %526
  %528 = load i32, ptr @PatchingA, align 4, !tbaa !9
  %529 = add nsw i32 %527, %528
  %530 = sub nsw i32 %529, 1
  store i32 %530, ptr @NonsequentialMoveType, align 4, !tbaa !9
  br label %531

531:                                              ; preds = %524, %515
  %532 = load i32, ptr @PatchingC, align 4, !tbaa !9
  %533 = icmp sge i32 %532, 1
  br i1 %533, label %534, label %549

534:                                              ; preds = %531
  %535 = load i32, ptr @NonsequentialMoveType, align 4, !tbaa !9
  %536 = icmp sge i32 %535, 4
  br i1 %536, label %537, label %549

537:                                              ; preds = %534
  store ptr @BestKOptMove, ptr @BestSubsequentMove, align 8, !tbaa !5
  store ptr @BestKOptMove, ptr @BestMove, align 8, !tbaa !5
  %538 = load i32, ptr @SubsequentPatching, align 4, !tbaa !9
  %539 = icmp ne i32 %538, 0
  br i1 %539, label %548, label %540

540:                                              ; preds = %537
  %541 = load i32, ptr @SubsequentMoveType, align 4, !tbaa !9
  %542 = icmp sle i32 %541, 5
  br i1 %542, label %543, label %548

543:                                              ; preds = %540
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %12, ptr align 16 @__const.ReadProblem.BestOptMove, i64 48, i1 false)
  %544 = load i32, ptr @SubsequentMoveType, align 4, !tbaa !9
  %545 = sext i32 %544 to i64
  %546 = getelementptr inbounds [6 x ptr], ptr %12, i64 0, i64 %545
  %547 = load ptr, ptr %546, align 8, !tbaa !5
  store ptr %547, ptr @BestSubsequentMove, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #10
  br label %548

548:                                              ; preds = %543, %540, %537
  br label %570

549:                                              ; preds = %534, %531
  call void @llvm.lifetime.start.p0(i64 48, ptr %13) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 @__const.ReadProblem.BestOptMove.27, i64 48, i1 false)
  %550 = load i32, ptr @MoveType, align 4, !tbaa !9
  %551 = icmp sle i32 %550, 5
  br i1 %551, label %552, label %557

552:                                              ; preds = %549
  %553 = load i32, ptr @MoveType, align 4, !tbaa !9
  %554 = sext i32 %553 to i64
  %555 = getelementptr inbounds [6 x ptr], ptr %13, i64 0, i64 %554
  %556 = load ptr, ptr %555, align 8, !tbaa !5
  br label %558

557:                                              ; preds = %549
  br label %558

558:                                              ; preds = %557, %552
  %559 = phi ptr [ %556, %552 ], [ @BestKOptMove, %557 ]
  store ptr %559, ptr @BestMove, align 8, !tbaa !5
  %560 = load i32, ptr @SubsequentMoveType, align 4, !tbaa !9
  %561 = icmp sle i32 %560, 5
  br i1 %561, label %562, label %567

562:                                              ; preds = %558
  %563 = load i32, ptr @SubsequentMoveType, align 4, !tbaa !9
  %564 = sext i32 %563 to i64
  %565 = getelementptr inbounds [6 x ptr], ptr %13, i64 0, i64 %564
  %566 = load ptr, ptr %565, align 8, !tbaa !5
  br label %568

567:                                              ; preds = %558
  br label %568

568:                                              ; preds = %567, %562
  %569 = phi ptr [ %566, %562 ], [ @BestKOptMove, %567 ]
  store ptr %569, ptr @BestSubsequentMove, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #10
  br label %570

570:                                              ; preds = %568, %548
  %571 = load i32, ptr @ProblemType, align 4, !tbaa !9
  %572 = icmp eq i32 %571, 3
  br i1 %572, label %576, label %573

573:                                              ; preds = %570
  %574 = load i32, ptr @ProblemType, align 4, !tbaa !9
  %575 = icmp eq i32 %574, 6
  br i1 %575, label %576, label %577

576:                                              ; preds = %573, %570
  store i32 0, ptr @MaxCandidates, align 4, !tbaa !9
  br label %577

577:                                              ; preds = %576, %573
  %578 = load i32, ptr @TraceLevel, align 4, !tbaa !9
  %579 = icmp sge i32 %578, 1
  br i1 %579, label %580, label %581

580:                                              ; preds = %577
  call void (ptr, ...) @printff(ptr noundef @.str.28)
  call void @PrintParameters()
  br label %589

581:                                              ; preds = %577
  %582 = load ptr, ptr @ProblemFileName, align 8, !tbaa !5
  %583 = icmp ne ptr %582, null
  br i1 %583, label %584, label %586

584:                                              ; preds = %581
  %585 = load ptr, ptr @ProblemFileName, align 8, !tbaa !5
  br label %587

586:                                              ; preds = %581
  br label %587

587:                                              ; preds = %586, %584
  %588 = phi ptr [ %585, %584 ], [ @.str.30, %586 ]
  call void (ptr, ...) @printff(ptr noundef @.str.29, ptr noundef %588)
  br label %589

589:                                              ; preds = %587, %580
  %590 = load ptr, ptr @ProblemFile, align 8, !tbaa !5
  %591 = call i32 @fclose(ptr noundef %590)
  %592 = load ptr, ptr @InitialTourFileName, align 8, !tbaa !5
  %593 = icmp ne ptr %592, null
  br i1 %593, label %594, label %596

594:                                              ; preds = %589
  %595 = load ptr, ptr @InitialTourFileName, align 8, !tbaa !5
  call void @ReadTour(ptr noundef %595, ptr noundef @InitialTourFile)
  br label %596

596:                                              ; preds = %594, %589
  %597 = load ptr, ptr @InputTourFileName, align 8, !tbaa !5
  %598 = icmp ne ptr %597, null
  br i1 %598, label %599, label %601

599:                                              ; preds = %596
  %600 = load ptr, ptr @InputTourFileName, align 8, !tbaa !5
  call void @ReadTour(ptr noundef %600, ptr noundef @InputTourFile)
  br label %601

601:                                              ; preds = %599, %596
  %602 = load ptr, ptr @SubproblemTourFileName, align 8, !tbaa !5
  %603 = icmp ne ptr %602, null
  br i1 %603, label %604, label %609

604:                                              ; preds = %601
  %605 = load i32, ptr @SubproblemSize, align 4, !tbaa !9
  %606 = icmp sgt i32 %605, 0
  br i1 %606, label %607, label %609

607:                                              ; preds = %604
  %608 = load ptr, ptr @SubproblemTourFileName, align 8, !tbaa !5
  call void @ReadTour(ptr noundef %608, ptr noundef @SubproblemTourFile)
  br label %609

609:                                              ; preds = %607, %604, %601
  %610 = load i32, ptr @MergeTourFiles, align 4, !tbaa !9
  %611 = icmp sge i32 %610, 1
  br i1 %611, label %612, label %640

612:                                              ; preds = %609
  %613 = load ptr, ptr @MergeTourFile, align 8, !tbaa !5
  call void @free(ptr noundef %613) #10
  %614 = load i32, ptr @MergeTourFiles, align 4, !tbaa !9
  %615 = sext i32 %614 to i64
  %616 = mul i64 %615, 8
  %617 = call noalias ptr @malloc(i64 noundef %616) #15
  store ptr %617, ptr @MergeTourFile, align 8, !tbaa !5
  %618 = icmp ne ptr %617, null
  br i1 %618, label %619, label %620

619:                                              ; preds = %612
  br label %621

620:                                              ; preds = %612
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.25, i32 noundef 396, ptr noundef @__PRETTY_FUNCTION__.ReadProblem) #14
  unreachable

621:                                              ; preds = %619
  store i32 0, ptr %1, align 4, !tbaa !9
  br label %622

622:                                              ; preds = %636, %621
  %623 = load i32, ptr %1, align 4, !tbaa !9
  %624 = load i32, ptr @MergeTourFiles, align 4, !tbaa !9
  %625 = icmp slt i32 %623, %624
  br i1 %625, label %626, label %639

626:                                              ; preds = %622
  %627 = load ptr, ptr @MergeTourFileName, align 8, !tbaa !5
  %628 = load i32, ptr %1, align 4, !tbaa !9
  %629 = sext i32 %628 to i64
  %630 = getelementptr inbounds ptr, ptr %627, i64 %629
  %631 = load ptr, ptr %630, align 8, !tbaa !5
  %632 = load ptr, ptr @MergeTourFile, align 8, !tbaa !5
  %633 = load i32, ptr %1, align 4, !tbaa !9
  %634 = sext i32 %633 to i64
  %635 = getelementptr inbounds ptr, ptr %632, i64 %634
  call void @ReadTour(ptr noundef %631, ptr noundef %635)
  br label %636

636:                                              ; preds = %626
  %637 = load i32, ptr %1, align 4, !tbaa !9
  %638 = add nsw i32 %637, 1
  store i32 %638, ptr %1, align 4, !tbaa !9
  br label %622, !llvm.loop !28

639:                                              ; preds = %622
  br label %640

640:                                              ; preds = %639, %609
  %641 = load ptr, ptr @LastLine, align 8, !tbaa !5
  call void @free(ptr noundef %641) #10
  store ptr null, ptr @LastLine, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #10
  ret void
}

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

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

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

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

declare void @FreeStructures() #2

; Function Attrs: nounwind uwtable
declare hidden ptr @Copy(ptr noundef) #0

declare ptr @ReadLine(ptr noundef) #2

; Function Attrs: nounwind
declare ptr @strtok(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__ctype_toupper_loc() #5

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden void @Read_DIMENSION() #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_DISPLAY_DATA_SECTION() #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_DISPLAY_DATA_TYPE() #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_EDGE_DATA_FORMAT() #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_EDGE_DATA_SECTION() #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_EDGE_WEIGHT_FORMAT() #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_EDGE_WEIGHT_SECTION() #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_EDGE_WEIGHT_TYPE() #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_FIXED_EDGES_SECTION() #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_NAME() #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_NODE_COORD_SECTION() #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_NODE_COORD_TYPE() #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_TOUR_SECTION(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_TYPE() #0

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #3

declare void @MakeHeap(i32 noundef) #2

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

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #6

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #7

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

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

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

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

declare ptr @BestKOptMove(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #8

declare void @PrintParameters() #2

declare i32 @fclose(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @ReadTour(ptr noundef, ptr noundef) #0

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #9

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

!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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !12}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!18, !6, i64 72}
!18 = !{!"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, !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, !16, i64 312, !16, i64 320, !16, i64 328, !16, i64 336, !16, i64 344, !16, i64 352, !7, i64 360, !7, i64 361, !7, i64 362}
!19 = !{!18, !10, i64 0}
!20 = !{!18, !6, i64 56}
!21 = !{!18, !6, i64 152}
!22 = !{!18, !6, i64 160}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12}


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

@ProblemFileName = external dso_local local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@ProblemFile = external dso_local global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [31 x i8], align 1
@TraceLevel = external dso_local local_unnamed_addr global i32, align 4
@.str.2 = external hidden unnamed_addr constant [32 x i8], align 1
@FirstNode = external dso_local local_unnamed_addr global ptr, align 8
@ProblemType = external dso_local local_unnamed_addr global i32, align 4
@WeightFormat = external dso_local local_unnamed_addr global i32, align 4
@WeightType = external dso_local local_unnamed_addr global i32, align 4
@CoordType = external dso_local local_unnamed_addr global i32, align 4
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@Name = external dso_local local_unnamed_addr global ptr, align 8
@EdgeWeightFormat = external dso_local local_unnamed_addr global ptr, align 8
@EdgeWeightType = external dso_local local_unnamed_addr global ptr, align 8
@Type = external dso_local local_unnamed_addr global ptr, align 8
@DisplayDataType = external dso_local local_unnamed_addr global ptr, align 8
@NodeCoordType = external dso_local local_unnamed_addr global ptr, align 8
@EdgeDataFormat = external dso_local local_unnamed_addr global ptr, align 8
@Distance = external dso_local local_unnamed_addr global ptr, align 8
@C = external dso_local local_unnamed_addr global ptr, align 8
@c = external dso_local local_unnamed_addr global ptr, align 8
@Delimiters = external hidden constant [12 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [20 x i8], align 1
@Swaps = external dso_local local_unnamed_addr global i32, align 4
@Seed = external dso_local local_unnamed_addr global i32, align 4
@Precision = external dso_local local_unnamed_addr global i32, align 4
@InitialStepSize = external dso_local local_unnamed_addr global i32, align 4
@MaxSwaps = external dso_local local_unnamed_addr global i32, align 4
@Dimension = external dso_local local_unnamed_addr global i32, align 4
@KickType = external dso_local local_unnamed_addr global i32, align 4
@Runs = external dso_local local_unnamed_addr global i32, align 4
@MaxCandidates = external dso_local local_unnamed_addr global i32, align 4
@ExtraCandidates = external dso_local local_unnamed_addr global i32, align 4
@SubproblemSize = external dso_local local_unnamed_addr global i32, align 4
@AscentCandidates = external dso_local local_unnamed_addr global i32, align 4
@InitialPeriod = external dso_local local_unnamed_addr global i32, align 4
@Excess = external dso_local local_unnamed_addr global double, align 8
@MaxTrials = external dso_local local_unnamed_addr global i32, align 4
@CostMatrix = external dso_local local_unnamed_addr global ptr, align 8
@MaxMatrixDimension = external dso_local local_unnamed_addr global i32, align 4
@.str.24 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [72 x i8], align 1
@__PRETTY_FUNCTION__.ReadProblem = external hidden unnamed_addr constant [19 x i8], align 1
@D = external dso_local local_unnamed_addr global ptr, align 8
@SubsequentMoveType = external dso_local local_unnamed_addr global i32, align 4
@MoveType = external dso_local local_unnamed_addr global i32, align 4
@SubsequentPatching = external dso_local local_unnamed_addr global i32, align 4
@PatchingC = external dso_local local_unnamed_addr global i32, align 4
@PatchingA = external dso_local local_unnamed_addr global i32, align 4
@NonsequentialMoveType = external dso_local local_unnamed_addr global i32, align 4
@BestSubsequentMove = external dso_local local_unnamed_addr global ptr, align 8
@BestMove = external dso_local local_unnamed_addr global ptr, align 8
@__const.ReadProblem.BestOptMove = external hidden unnamed_addr constant [6 x ptr], align 16
@__const.ReadProblem.BestOptMove.27 = external hidden unnamed_addr constant [6 x ptr], align 16
@.str.28 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [1 x i8], align 1
@InitialTourFileName = external dso_local local_unnamed_addr global ptr, align 8
@InitialTourFile = external dso_local global ptr, align 8
@InputTourFileName = external dso_local local_unnamed_addr global ptr, align 8
@InputTourFile = external dso_local global ptr, align 8
@SubproblemTourFileName = external dso_local local_unnamed_addr global ptr, align 8
@SubproblemTourFile = external dso_local global ptr, align 8
@MergeTourFiles = external dso_local local_unnamed_addr global i32, align 4
@MergeTourFile = external dso_local local_unnamed_addr global ptr, align 8
@.str.31 = external hidden unnamed_addr constant [66 x i8], align 1
@MergeTourFileName = external dso_local local_unnamed_addr global ptr, align 8
@LastLine = external dso_local local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local void @ReadProblem() local_unnamed_addr #0 {
  %1 = load ptr, ptr @ProblemFileName, align 8, !tbaa !5
  %2 = tail call noalias ptr @fopen(ptr noundef %1, ptr noundef nonnull @.str)
  store ptr %2, ptr @ProblemFile, align 8, !tbaa !5
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %3, label %5

3:                                                ; preds = %0
  %4 = load ptr, ptr @ProblemFileName, align 8, !tbaa !5
  tail call void (ptr, ...) @eprintf(ptr noundef nonnull @.str.1, ptr noundef %4) #12
  br label %5

5:                                                ; preds = %3, %0
  %6 = load i32, ptr @TraceLevel, align 4, !tbaa !9
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %8, label %10

8:                                                ; preds = %5
  %9 = load ptr, ptr @ProblemFileName, align 8, !tbaa !5
  tail call void (ptr, ...) @printff(ptr noundef nonnull @.str.2, ptr noundef %9) #12
  br label %10

10:                                               ; preds = %8, %5
  tail call void @FreeStructures() #12
  store ptr null, ptr @FirstNode, align 8, !tbaa !5
  store i32 -1, ptr @ProblemType, align 4, !tbaa !9
  store i32 -1, ptr @WeightFormat, align 4, !tbaa !9
  store i32 -1, ptr @WeightType, align 4, !tbaa !9
  store i32 2, ptr @CoordType, align 4, !tbaa !9
  %11 = tail call ptr @Copy(ptr noundef nonnull @.str.3)
  store ptr %11, ptr @Name, align 8, !tbaa !5
  store ptr null, ptr @EdgeWeightFormat, align 8, !tbaa !5
  store ptr null, ptr @EdgeWeightType, align 8, !tbaa !5
  store ptr null, ptr @Type, align 8, !tbaa !5
  store ptr null, ptr @DisplayDataType, align 8, !tbaa !5
  store ptr null, ptr @NodeCoordType, align 8, !tbaa !5
  store ptr null, ptr @EdgeDataFormat, align 8, !tbaa !5
  store ptr null, ptr @Distance, align 8, !tbaa !5
  store ptr null, ptr @C, align 8, !tbaa !5
  store ptr null, ptr @c, align 8, !tbaa !5
  %12 = load ptr, ptr @ProblemFile, align 8, !tbaa !5
  %13 = tail call ptr @ReadLine(ptr noundef %12) #12
  %.not119164 = icmp eq ptr %13, null
  br i1 %.not119164, label %._crit_edge167, label %.lr.ph166

.lr.ph166:                                        ; preds = %10, %.backedge
  %14 = phi ptr [ %84, %.backedge ], [ %13, %10 ]
  %15 = tail call ptr @strtok(ptr noundef nonnull %14, ptr noundef nonnull @Delimiters) #12
  %.not120 = icmp eq ptr %15, null
  br i1 %.not120, label %.backedge, label %.preheader162

.preheader162:                                    ; preds = %.lr.ph166
  %16 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %15) #13
  %17 = trunc i64 %16 to i32
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader162
  %19 = tail call ptr @__ctype_toupper_loc() #14
  br label %20

20:                                               ; preds = %.lr.ph, %20
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %20 ]
  %21 = load ptr, ptr %19, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %15, i64 %indvars.iv
  %23 = load i8, ptr %22, align 1, !tbaa !11
  %24 = sext i8 %23 to i64
  %25 = getelementptr inbounds i32, ptr %21, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !9
  %27 = trunc i32 %26 to i8
  store i8 %27, ptr %22, align 1, !tbaa !11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %28 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %15) #13
  %sext = shl i64 %28, 32
  %29 = ashr exact i64 %sext, 32
  %30 = icmp slt i64 %indvars.iv.next, %29
  br i1 %30, label %20, label %._crit_edge, !llvm.loop !12

._crit_edge:                                      ; preds = %20, %.preheader162
  %31 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.4) #13
  %.not121 = icmp eq i32 %31, 0
  br i1 %.not121, label %.backedge, label %32

32:                                               ; preds = %._crit_edge
  %33 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.5) #13
  %.not122 = icmp eq i32 %33, 0
  br i1 %.not122, label %34, label %35

34:                                               ; preds = %32
  tail call void (ptr, ...) @eprintf(ptr noundef nonnull @.str.6, ptr noundef nonnull %15) #12
  br label %.backedge

35:                                               ; preds = %32
  %36 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.7) #13
  %.not123 = icmp eq i32 %36, 0
  br i1 %.not123, label %37, label %38

37:                                               ; preds = %35
  tail call void (ptr, ...) @eprintf(ptr noundef nonnull @.str.6, ptr noundef nonnull %15) #12
  br label %.backedge

38:                                               ; preds = %35
  %39 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.8) #13
  %.not124 = icmp eq i32 %39, 0
  br i1 %.not124, label %40, label %41

40:                                               ; preds = %38
  tail call void @Read_DIMENSION()
  br label %.backedge

41:                                               ; preds = %38
  %42 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.9) #13
  %.not125 = icmp eq i32 %42, 0
  br i1 %.not125, label %43, label %44

43:                                               ; preds = %41
  tail call void @Read_DISPLAY_DATA_SECTION()
  br label %.backedge

44:                                               ; preds = %41
  %45 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.10) #13
  %.not126 = icmp eq i32 %45, 0
  br i1 %.not126, label %46, label %47

46:                                               ; preds = %44
  tail call void @Read_DISPLAY_DATA_TYPE()
  br label %.backedge

47:                                               ; preds = %44
  %48 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.11) #13
  %.not127 = icmp eq i32 %48, 0
  br i1 %.not127, label %49, label %50

49:                                               ; preds = %47
  tail call void @Read_EDGE_DATA_FORMAT()
  br label %.backedge

50:                                               ; preds = %47
  %51 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.12) #13
  %.not128 = icmp eq i32 %51, 0
  br i1 %.not128, label %52, label %53

52:                                               ; preds = %50
  tail call void @Read_EDGE_DATA_SECTION()
  br label %.backedge

53:                                               ; preds = %50
  %54 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.13) #13
  %.not129 = icmp eq i32 %54, 0
  br i1 %.not129, label %55, label %56

55:                                               ; preds = %53
  tail call void @Read_EDGE_WEIGHT_FORMAT()
  br label %.backedge

56:                                               ; preds = %53
  %57 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.14) #13
  %.not130 = icmp eq i32 %57, 0
  br i1 %.not130, label %58, label %59

58:                                               ; preds = %56
  tail call void @Read_EDGE_WEIGHT_SECTION()
  br label %.backedge

59:                                               ; preds = %56
  %60 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.15) #13
  %.not131 = icmp eq i32 %60, 0
  br i1 %.not131, label %61, label %62

61:                                               ; preds = %59
  tail call void @Read_EDGE_WEIGHT_TYPE()
  br label %.backedge

62:                                               ; preds = %59
  %63 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.16) #13
  %.not132 = icmp eq i32 %63, 0
  br i1 %.not132, label %._crit_edge167, label %64

64:                                               ; preds = %62
  %65 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.17) #13
  %.not149 = icmp eq i32 %65, 0
  br i1 %.not149, label %66, label %67

66:                                               ; preds = %64
  tail call void @Read_FIXED_EDGES_SECTION()
  br label %.backedge

67:                                               ; preds = %64
  %68 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.18) #13
  %.not150 = icmp eq i32 %68, 0
  br i1 %.not150, label %69, label %70

69:                                               ; preds = %67
  tail call void @Read_NAME()
  br label %.backedge

70:                                               ; preds = %67
  %71 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.19) #13
  %.not151 = icmp eq i32 %71, 0
  br i1 %.not151, label %72, label %73

72:                                               ; preds = %70
  tail call void @Read_NODE_COORD_SECTION()
  br label %.backedge

73:                                               ; preds = %70
  %74 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.20) #13
  %.not152 = icmp eq i32 %74, 0
  br i1 %.not152, label %75, label %76

75:                                               ; preds = %73
  tail call void @Read_NODE_COORD_TYPE()
  br label %.backedge

76:                                               ; preds = %73
  %77 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.21) #13
  %.not153 = icmp eq i32 %77, 0
  br i1 %.not153, label %78, label %79

78:                                               ; preds = %76
  tail call void @Read_TOUR_SECTION(ptr noundef nonnull @ProblemFile)
  br label %.backedge

79:                                               ; preds = %76
  %80 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.22) #13
  %.not154 = icmp eq i32 %80, 0
  br i1 %.not154, label %81, label %82

81:                                               ; preds = %79
  tail call void @Read_TYPE()
  br label %.backedge

82:                                               ; preds = %79
  tail call void (ptr, ...) @eprintf(ptr noundef nonnull @.str.23, ptr noundef nonnull %15) #12
  br label %.backedge

.backedge:                                        ; preds = %._crit_edge, %37, %43, %49, %55, %61, %66, %72, %78, %82, %81, %75, %69, %58, %52, %46, %40, %34, %.lr.ph166
  %83 = load ptr, ptr @ProblemFile, align 8, !tbaa !5
  %84 = tail call ptr @ReadLine(ptr noundef %83) #12
  %.not119 = icmp eq ptr %84, null
  br i1 %.not119, label %._crit_edge167, label %.lr.ph166, !llvm.loop !14

._crit_edge167:                                   ; preds = %.backedge, %62, %10
  store i32 0, ptr @Swaps, align 4, !tbaa !9
  %85 = load i32, ptr @Seed, align 4, !tbaa !9
  %86 = icmp eq i32 %85, 0
  br i1 %86, label %87, label %90

87:                                               ; preds = %._crit_edge167
  %88 = tail call i64 @time(ptr noundef null) #12
  %89 = trunc i64 %88 to i32
  store i32 %89, ptr @Seed, align 4, !tbaa !9
  br label %90

90:                                               ; preds = %87, %._crit_edge167
  %91 = load i32, ptr @Precision, align 4, !tbaa !9
  %92 = icmp eq i32 %91, 0
  br i1 %92, label %93, label %94

93:                                               ; preds = %90
  store i32 100, ptr @Precision, align 4, !tbaa !9
  br label %94

94:                                               ; preds = %93, %90
  %95 = load i32, ptr @InitialStepSize, align 4, !tbaa !9
  %96 = icmp eq i32 %95, 0
  br i1 %96, label %97, label %98

97:                                               ; preds = %94
  store i32 1, ptr @InitialStepSize, align 4, !tbaa !9
  br label %98

98:                                               ; preds = %97, %94
  %99 = load i32, ptr @MaxSwaps, align 4, !tbaa !9
  %100 = icmp slt i32 %99, 0
  %.pre = load i32, ptr @Dimension, align 4, !tbaa !9
  br i1 %100, label %101, label %102

101:                                              ; preds = %98
  store i32 %.pre, ptr @MaxSwaps, align 4, !tbaa !9
  br label %102

102:                                              ; preds = %101, %98
  %103 = load i32, ptr @KickType, align 4, !tbaa !9
  %104 = sdiv i32 %.pre, 2
  %105 = icmp sgt i32 %103, %104
  br i1 %105, label %106, label %107

106:                                              ; preds = %102
  store i32 %104, ptr @KickType, align 4, !tbaa !9
  br label %107

107:                                              ; preds = %106, %102
  %108 = load i32, ptr @Runs, align 4, !tbaa !9
  %109 = icmp eq i32 %108, 0
  br i1 %109, label %110, label %111

110:                                              ; preds = %107
  store i32 10, ptr @Runs, align 4, !tbaa !9
  br label %111

111:                                              ; preds = %110, %107
  %112 = load i32, ptr @MaxCandidates, align 4, !tbaa !9
  %.not133 = icmp slt i32 %112, %.pre
  br i1 %.not133, label %115, label %113

113:                                              ; preds = %111
  %114 = add nsw i32 %.pre, -1
  store i32 %114, ptr @MaxCandidates, align 4, !tbaa !9
  br label %115

115:                                              ; preds = %113, %111
  %116 = load i32, ptr @ExtraCandidates, align 4, !tbaa !9
  %.not134 = icmp slt i32 %116, %.pre
  br i1 %.not134, label %119, label %117

117:                                              ; preds = %115
  %118 = add nsw i32 %.pre, -1
  store i32 %118, ptr @ExtraCandidates, align 4, !tbaa !9
  br label %119

119:                                              ; preds = %117, %115
  %120 = load i32, ptr @SubproblemSize, align 4, !tbaa !9
  %.not135 = icmp slt i32 %120, %.pre
  br i1 %.not135, label %122, label %121

121:                                              ; preds = %119
  store i32 %.pre, ptr @SubproblemSize, align 4, !tbaa !9
  br label %143

122:                                              ; preds = %119
  %123 = icmp eq i32 %120, 0
  br i1 %123, label %124, label %143

124:                                              ; preds = %122
  %125 = load i32, ptr @AscentCandidates, align 4, !tbaa !9
  %.not136 = icmp slt i32 %125, %.pre
  br i1 %.not136, label %128, label %126

126:                                              ; preds = %124
  %127 = add nsw i32 %.pre, -1
  store i32 %127, ptr @AscentCandidates, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %126, %124
  %129 = load i32, ptr @InitialPeriod, align 4, !tbaa !9
  %130 = icmp slt i32 %129, 0
  br i1 %130, label %131, label %132

131:                                              ; preds = %128
  %spec.store.select = tail call i32 @llvm.smax.i32(i32 %104, i32 100)
  store i32 %spec.store.select, ptr @InitialPeriod, align 4
  br label %132

132:                                              ; preds = %131, %128
  %133 = load double, ptr @Excess, align 8, !tbaa !15
  %134 = fcmp olt double %133, 0.000000e+00
  br i1 %134, label %135, label %138

135:                                              ; preds = %132
  %136 = sitofp i32 %.pre to double
  %137 = fdiv double 1.000000e+00, %136
  store double %137, ptr @Excess, align 8, !tbaa !15
  br label %138

138:                                              ; preds = %135, %132
  %139 = load i32, ptr @MaxTrials, align 4, !tbaa !9
  %140 = icmp eq i32 %139, -1
  br i1 %140, label %141, label %142

141:                                              ; preds = %138
  store i32 %.pre, ptr @MaxTrials, align 4, !tbaa !9
  br label %142

142:                                              ; preds = %141, %138
  tail call void @MakeHeap(i32 noundef %.pre) #12
  br label %143

143:                                              ; preds = %122, %142, %121
  %144 = load ptr, ptr @CostMatrix, align 8, !tbaa !5
  %145 = icmp eq ptr %144, null
  %.pre189.pre = load i32, ptr @WeightType, align 4
  br i1 %145, label %146, label %.loopexit157

146:                                              ; preds = %143
  %147 = load i32, ptr @Dimension, align 4, !tbaa !9
  %148 = load i32, ptr @MaxMatrixDimension, align 4, !tbaa !9
  %149 = icmp sle i32 %147, %148
  %150 = load ptr, ptr @Distance, align 8
  %151 = icmp ne ptr %150, null
  %152 = icmp ne ptr %150, @Distance_1
  %153 = and i1 %151, %152
  %154 = icmp ne ptr %150, @Distance_ATSP
  %155 = and i1 %154, %153
  %or.cond5 = select i1 %149, i1 %155, i1 false
  %156 = add i32 %.pre189.pre, -13
  %157 = icmp ult i32 %156, -4
  %or.cond13 = select i1 %or.cond5, i1 %157, i1 false
  br i1 %or.cond13, label %158, label %.loopexit157

158:                                              ; preds = %146
  %159 = sext i32 %147 to i64
  %160 = add nsw i32 %147, -1
  %161 = sext i32 %160 to i64
  %162 = mul nsw i64 %161, %159
  %163 = lshr i64 %162, 1
  %164 = tail call noalias ptr @calloc(i64 noundef %163, i64 noundef 4) #15
  store ptr %164, ptr @CostMatrix, align 8, !tbaa !5
  %.not137 = icmp eq ptr %164, null
  br i1 %.not137, label %165, label %166

165:                                              ; preds = %158
  tail call void @__assert_fail(ptr noundef nonnull @.str.24, ptr noundef nonnull @.str.25, i32 noundef 323, ptr noundef nonnull @__PRETTY_FUNCTION__.ReadProblem) #16
  unreachable

166:                                              ; preds = %158
  %167 = load ptr, ptr @FirstNode, align 8, !tbaa !5
  %168 = getelementptr inbounds i8, ptr %167, i64 72
  %169 = load ptr, ptr %168, align 8, !tbaa !17
  br label %170

170:                                              ; preds = %.loopexit159, %166
  %171 = phi ptr [ %167, %166 ], [ %209, %.loopexit159 ]
  %.095 = phi ptr [ %169, %166 ], [ %211, %.loopexit159 ]
  %172 = load ptr, ptr @CostMatrix, align 8, !tbaa !5
  %173 = load i32, ptr %.095, align 8, !tbaa !19
  %174 = add nsw i32 %173, -1
  %175 = sext i32 %174 to i64
  %176 = add nsw i32 %173, -2
  %177 = sext i32 %176 to i64
  %178 = mul nsw i64 %175, %177
  %179 = lshr i64 %178, 1
  %180 = getelementptr inbounds i32, ptr %172, i64 %179
  %181 = getelementptr inbounds i8, ptr %180, i64 -4
  %182 = getelementptr inbounds i8, ptr %.095, i64 56
  store ptr %181, ptr %182, align 8, !tbaa !20
  %183 = load i32, ptr @ProblemType, align 4, !tbaa !9
  %.not138 = icmp ne i32 %183, 6
  %184 = load i32, ptr @Dimension, align 4
  %185 = icmp slt i32 %173, %184
  %or.cond = select i1 %.not138, i1 true, i1 %185
  %.not140174 = icmp eq ptr %171, %.095
  br i1 %or.cond, label %.preheader158, label %.preheader160

.preheader160:                                    ; preds = %170
  br i1 %.not140174, label %.loopexit159, label %.lr.ph172

.preheader158:                                    ; preds = %170
  br i1 %.not140174, label %.loopexit159, label %.lr.ph176

.lr.ph176:                                        ; preds = %.preheader158
  %186 = getelementptr inbounds i8, ptr %.095, i64 152
  %187 = getelementptr inbounds i8, ptr %.095, i64 160
  br label %188

188:                                              ; preds = %.lr.ph176, %198
  %189 = phi ptr [ %181, %.lr.ph176 ], [ %199, %198 ]
  %.097175 = phi ptr [ %171, %.lr.ph176 ], [ %.097, %198 ]
  %190 = load ptr, ptr %186, align 8, !tbaa !21
  %191 = icmp eq ptr %190, %.097175
  br i1 %191, label %198, label %192

192:                                              ; preds = %188
  %193 = load ptr, ptr %187, align 8, !tbaa !22
  %194 = icmp eq ptr %193, %.097175
  br i1 %194, label %198, label %195

195:                                              ; preds = %192
  %196 = load ptr, ptr @Distance, align 8, !tbaa !5
  %197 = tail call i32 %196(ptr noundef nonnull %.095, ptr noundef %.097175) #12
  %.pre187 = load ptr, ptr %182, align 8, !tbaa !20
  br label %198

198:                                              ; preds = %188, %192, %195
  %199 = phi ptr [ %.pre187, %195 ], [ %189, %192 ], [ %189, %188 ]
  %200 = phi i32 [ %197, %195 ], [ 0, %192 ], [ 0, %188 ]
  %201 = load i32, ptr %.097175, align 8, !tbaa !19
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds i32, ptr %199, i64 %202
  store i32 %200, ptr %203, align 4, !tbaa !9
  %204 = getelementptr inbounds i8, ptr %.097175, i64 72
  %.097 = load ptr, ptr %204, align 8, !tbaa !5
  %.not140 = icmp eq ptr %.097, %.095
  br i1 %.not140, label %.loopexit159.loopexit, label %188, !llvm.loop !23

.lr.ph172:                                        ; preds = %.preheader160, %.lr.ph172
  %.198171 = phi ptr [ %.198, %.lr.ph172 ], [ %171, %.preheader160 ]
  %205 = load i32, ptr %.198171, align 8, !tbaa !19
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds i32, ptr %181, i64 %206
  store i32 0, ptr %207, align 4, !tbaa !9
  %208 = getelementptr inbounds i8, ptr %.198171, i64 72
  %.198 = load ptr, ptr %208, align 8, !tbaa !5
  %.not139 = icmp eq ptr %.198, %.095
  br i1 %.not139, label %.loopexit159, label %.lr.ph172, !llvm.loop !24

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

.loopexit159:                                     ; preds = %.lr.ph172, %.loopexit159.loopexit, %.preheader160, %.preheader158
  %209 = phi ptr [ %.pre188, %.loopexit159.loopexit ], [ %171, %.preheader160 ], [ %171, %.preheader158 ], [ %171, %.lr.ph172 ]
  %210 = getelementptr inbounds i8, ptr %.095, i64 72
  %211 = load ptr, ptr %210, align 8, !tbaa !17
  %.not141 = icmp eq ptr %211, %209
  br i1 %.not141, label %212, label %170, !llvm.loop !25

212:                                              ; preds = %.loopexit159
  store i32 0, ptr @WeightType, align 4, !tbaa !9
  store ptr null, ptr @c, align 8, !tbaa !5
  br label %.loopexit157

.loopexit157:                                     ; preds = %212, %146, %143
  %.pre189 = phi i32 [ 0, %212 ], [ %.pre189.pre, %146 ], [ %.pre189.pre, %143 ]
  %213 = icmp eq i32 %.pre189, 0
  %214 = select i1 %213, ptr @C_EXPLICIT, ptr @C_FUNCTION
  store ptr %214, ptr @C, align 8, !tbaa !5
  %215 = select i1 %213, ptr @D_EXPLICIT, ptr @D_FUNCTION
  store ptr %215, ptr @D, align 8, !tbaa !5
  %216 = load i32, ptr @SubsequentMoveType, align 4
  %217 = icmp eq i32 %216, 0
  %218 = load i32, ptr @MoveType, align 4
  br i1 %217, label %219, label %thread-pre-split

219:                                              ; preds = %.loopexit157
  store i32 %218, ptr @SubsequentMoveType, align 4, !tbaa !9
  br label %thread-pre-split

thread-pre-split:                                 ; preds = %.loopexit157, %219
  %220 = phi i32 [ %218, %219 ], [ %216, %.loopexit157 ]
  %221 = icmp slt i32 %218, %220
  %222 = load i32, ptr @SubsequentPatching, align 4
  %223 = icmp ne i32 %222, 0
  %or.cond17 = select i1 %221, i1 %223, i1 false
  %224 = select i1 %or.cond17, i32 %220, i32 %218
  %225 = load i32, ptr @PatchingC, align 4
  %226 = icmp sgt i32 %225, %224
  br i1 %226, label %227, label %228

227:                                              ; preds = %thread-pre-split
  store i32 %224, ptr @PatchingC, align 4, !tbaa !9
  br label %228

228:                                              ; preds = %227, %thread-pre-split
  %229 = phi i32 [ %224, %227 ], [ %225, %thread-pre-split ]
  %230 = load i32, ptr @PatchingA, align 4, !tbaa !9
  %231 = icmp slt i32 %230, 2
  %.not143 = icmp slt i32 %230, %229
  %or.cond192 = or i1 %231, %.not143
  br i1 %or.cond192, label %236, label %232

232:                                              ; preds = %228
  %233 = icmp sgt i32 %229, 2
  %234 = add nsw i32 %229, -1
  %235 = select i1 %233, i32 %234, i32 1
  store i32 %235, ptr @PatchingA, align 4, !tbaa !9
  br label %236

236:                                              ; preds = %232, %228
  %237 = phi i32 [ %235, %232 ], [ %230, %228 ]
  %238 = load i32, ptr @NonsequentialMoveType, align 4
  %239 = icmp eq i32 %238, -1
  br i1 %239, label %243, label %240

240:                                              ; preds = %236
  %241 = add nsw i32 %229, %224
  %242 = add nsw i32 %241, %237
  %.not144 = icmp slt i32 %238, %242
  br i1 %.not144, label %247, label %243

243:                                              ; preds = %240, %236
  %244 = add i32 %224, -1
  %245 = add i32 %244, %229
  %246 = add i32 %245, %237
  store i32 %246, ptr @NonsequentialMoveType, align 4, !tbaa !9
  br label %247

247:                                              ; preds = %243, %240
  %248 = phi i32 [ %246, %243 ], [ %238, %240 ]
  %249 = icmp sgt i32 %229, 0
  %250 = icmp sgt i32 %248, 3
  %or.cond19 = select i1 %249, i1 %250, i1 false
  br i1 %or.cond19, label %251, label %254

251:                                              ; preds = %247
  store ptr @BestKOptMove, ptr @BestSubsequentMove, align 8, !tbaa !5
  store ptr @BestKOptMove, ptr @BestMove, align 8, !tbaa !5
  %252 = icmp eq i32 %222, 0
  %253 = icmp slt i32 %220, 6
  %or.cond21 = and i1 %253, %252
  br i1 %or.cond21, label %.sink.split.sink.split, label %266

254:                                              ; preds = %247
  %255 = icmp slt i32 %218, 6
  br i1 %255, label %256, label %260

256:                                              ; preds = %254
  %257 = sext i32 %218 to i64
  %258 = getelementptr inbounds [6 x ptr], ptr @__const.ReadProblem.BestOptMove.27, i64 0, i64 %257
  %259 = load ptr, ptr %258, align 8, !tbaa !5
  br label %260

260:                                              ; preds = %254, %256
  %261 = phi ptr [ %259, %256 ], [ @BestKOptMove, %254 ]
  store ptr %261, ptr @BestMove, align 8, !tbaa !5
  %262 = icmp slt i32 %220, 6
  br i1 %262, label %.sink.split.sink.split, label %.sink.split

.sink.split.sink.split:                           ; preds = %260, %251
  %__const.ReadProblem.BestOptMove.27.sink = phi ptr [ @__const.ReadProblem.BestOptMove, %251 ], [ @__const.ReadProblem.BestOptMove.27, %260 ]
  %263 = sext i32 %220 to i64
  %264 = getelementptr inbounds [6 x ptr], ptr %__const.ReadProblem.BestOptMove.27.sink, i64 0, i64 %263
  %265 = load ptr, ptr %264, align 8, !tbaa !5
  br label %.sink.split

.sink.split:                                      ; preds = %.sink.split.sink.split, %260
  %.sink = phi ptr [ @BestKOptMove, %260 ], [ %265, %.sink.split.sink.split ]
  store ptr %.sink, ptr @BestSubsequentMove, align 8, !tbaa !5
  br label %266

266:                                              ; preds = %.sink.split, %251
  %267 = load i32, ptr @ProblemType, align 4
  switch i32 %267, label %269 [
    i32 6, label %268
    i32 3, label %268
  ]

268:                                              ; preds = %266, %266
  store i32 0, ptr @MaxCandidates, align 4, !tbaa !9
  br label %269

269:                                              ; preds = %266, %268
  %270 = load i32, ptr @TraceLevel, align 4, !tbaa !9
  %271 = icmp sgt i32 %270, 0
  br i1 %271, label %272, label %273

272:                                              ; preds = %269
  tail call void (ptr, ...) @printff(ptr noundef nonnull @.str.28) #12
  tail call void @PrintParameters() #12
  br label %276

273:                                              ; preds = %269
  %274 = load ptr, ptr @ProblemFileName, align 8
  %.not145 = icmp eq ptr %274, null
  %275 = select i1 %.not145, ptr @.str.30, ptr %274
  tail call void (ptr, ...) @printff(ptr noundef nonnull @.str.29, ptr noundef nonnull %275) #12
  br label %276

276:                                              ; preds = %273, %272
  %277 = load ptr, ptr @ProblemFile, align 8, !tbaa !5
  %278 = tail call i32 @fclose(ptr noundef %277)
  %279 = load ptr, ptr @InitialTourFileName, align 8, !tbaa !5
  %.not146 = icmp eq ptr %279, null
  br i1 %.not146, label %281, label %280

280:                                              ; preds = %276
  tail call void @ReadTour(ptr noundef nonnull %279, ptr noundef nonnull @InitialTourFile)
  br label %281

281:                                              ; preds = %280, %276
  %282 = load ptr, ptr @InputTourFileName, align 8, !tbaa !5
  %.not147 = icmp eq ptr %282, null
  br i1 %.not147, label %284, label %283

283:                                              ; preds = %281
  tail call void @ReadTour(ptr noundef nonnull %282, ptr noundef nonnull @InputTourFile)
  br label %284

284:                                              ; preds = %283, %281
  %285 = load ptr, ptr @SubproblemTourFileName, align 8, !tbaa !5
  %286 = icmp ne ptr %285, null
  %287 = load i32, ptr @SubproblemSize, align 4
  %288 = icmp sgt i32 %287, 0
  %or.cond25 = select i1 %286, i1 %288, i1 false
  br i1 %or.cond25, label %289, label %290

289:                                              ; preds = %284
  tail call void @ReadTour(ptr noundef nonnull %285, ptr noundef nonnull @SubproblemTourFile)
  br label %290

290:                                              ; preds = %289, %284
  %291 = load i32, ptr @MergeTourFiles, align 4, !tbaa !9
  %292 = icmp sgt i32 %291, 0
  br i1 %292, label %293, label %.loopexit

293:                                              ; preds = %290
  %294 = load ptr, ptr @MergeTourFile, align 8, !tbaa !5
  tail call void @free(ptr noundef %294) #12
  %295 = load i32, ptr @MergeTourFiles, align 4, !tbaa !9
  %296 = sext i32 %295 to i64
  %297 = shl nsw i64 %296, 3
  %298 = tail call noalias ptr @malloc(i64 noundef %297) #17
  store ptr %298, ptr @MergeTourFile, align 8, !tbaa !5
  %.not148 = icmp eq ptr %298, null
  br i1 %.not148, label %300, label %.preheader

.preheader:                                       ; preds = %293
  %299 = icmp sgt i32 %295, 0
  br i1 %299, label %.lr.ph180, label %.loopexit

300:                                              ; preds = %293
  tail call void @__assert_fail(ptr noundef nonnull @.str.31, ptr noundef nonnull @.str.25, i32 noundef 396, ptr noundef nonnull @__PRETTY_FUNCTION__.ReadProblem) #16
  unreachable

.lr.ph180:                                        ; preds = %.preheader, %.lr.ph180
  %indvars.iv183 = phi i64 [ %indvars.iv.next184, %.lr.ph180 ], [ 0, %.preheader ]
  %301 = load ptr, ptr @MergeTourFileName, align 8, !tbaa !5
  %302 = getelementptr inbounds ptr, ptr %301, i64 %indvars.iv183
  %303 = load ptr, ptr %302, align 8, !tbaa !5
  %304 = load ptr, ptr @MergeTourFile, align 8, !tbaa !5
  %305 = getelementptr inbounds ptr, ptr %304, i64 %indvars.iv183
  tail call void @ReadTour(ptr noundef %303, ptr noundef %305)
  %indvars.iv.next184 = add nuw nsw i64 %indvars.iv183, 1
  %306 = load i32, ptr @MergeTourFiles, align 4, !tbaa !9
  %307 = sext i32 %306 to i64
  %308 = icmp slt i64 %indvars.iv.next184, %307
  br i1 %308, label %.lr.ph180, label %.loopexit, !llvm.loop !26

.loopexit:                                        ; preds = %.lr.ph180, %.preheader, %290
  %309 = load ptr, ptr @LastLine, align 8, !tbaa !5
  tail call void @free(ptr noundef %309) #12
  store ptr null, ptr @LastLine, align 8, !tbaa !5
  ret void
}

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #1

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

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

declare void @FreeStructures() local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden ptr @Copy(ptr noundef) local_unnamed_addr #0

declare ptr @ReadLine(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn
declare ptr @strtok(ptr noundef, ptr nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__ctype_toupper_loc() local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden void @Read_DIMENSION() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_DISPLAY_DATA_SECTION() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_DISPLAY_DATA_TYPE() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_EDGE_DATA_FORMAT() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_EDGE_DATA_SECTION() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_EDGE_WEIGHT_FORMAT() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_EDGE_WEIGHT_SECTION() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_EDGE_WEIGHT_TYPE() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_FIXED_EDGES_SECTION() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_NAME() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_NODE_COORD_SECTION() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_NODE_COORD_TYPE() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_TOUR_SECTION(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @Read_TYPE() local_unnamed_addr #0

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #6

declare void @MakeHeap(i32 noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #7

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #8

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

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

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

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

declare ptr @BestKOptMove(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @PrintParameters() local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @ReadTour(ptr noundef, ptr 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 #9

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #10

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #11

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 = { nofree 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 #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 nofree nounwind willreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nofree nosync nounwind willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(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 #8 = { noreturn 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 #9 = { 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 #10 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(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 #11 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #12 = { nounwind }
attributes #13 = { nounwind willreturn memory(read) }
attributes #14 = { nounwind willreturn memory(none) }
attributes #15 = { nounwind allocsize(0,1) }
attributes #16 = { noreturn nounwind }
attributes #17 = { nounwind allocsize(0) }

!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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!18, !6, i64 72}
!18 = !{!"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, !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, !16, i64 312, !16, i64 320, !16, i64 328, !16, i64 336, !16, i64 344, !16, i64 352, !7, i64 360, !7, i64 361, !7, i64 362}
!19 = !{!18, !10, i64 0}
!20 = !{!18, !6, i64 56}
!21 = !{!18, !6, i64 152}
!22 = !{!18, !6, i64 160}
!23 = distinct !{!23, !13}
!24 = distinct !{!24, !13}
!25 = distinct !{!25, !13}
!26 = distinct !{!26, !13}


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