; LLVM IR from mbheinen/bpa-ipf-tsp :: cflow (post_pvcurve)

; 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.FILENM = type { [12 x [60 x i8]], i32 }
%struct.MATRIX = type { i32, i32, i32, i32, [200 x i32], [500 x i32], [3 x [60 x i8]], [500 x [200 x ptr]] }

@.str.25 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.75 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #0

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

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @efopen(ptr noundef, ptr noundef) #2

declare i32 @fclose(ptr noundef) #3

; Function Attrs: nounwind
declare ptr @strcat(ptr noundef, ptr noundef) #0

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

; Function Attrs: nounwind uwtable
define dso_local i32 @write_pre_contingency(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [12288 x i8], align 16
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [12 x ptr], align 16
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12288, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 96, ptr %8) #4
  %9 = load ptr, ptr %3, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.FILENM, ptr %9, i32 0, i32 0
  %11 = getelementptr inbounds [12 x [60 x i8]], ptr %10, i64 0, i64 9
  %12 = getelementptr inbounds [60 x i8], ptr %11, i64 0, i64 0
  %13 = call ptr @efopen(ptr noundef %12, ptr noundef @.str.31)
  %14 = getelementptr inbounds [12 x ptr], ptr %8, i64 0, i64 9
  store ptr %13, ptr %14, align 8, !tbaa !5
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %15

15:                                               ; preds = %29, %2
  %16 = load i32, ptr %6, align 4, !tbaa !9
  %17 = icmp slt i32 %16, 3
  br i1 %17, label %18, label %32

18:                                               ; preds = %15
  %19 = getelementptr inbounds [12 x ptr], ptr %8, i64 0, i64 9
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.MATRIX, ptr %21, i64 0
  %23 = getelementptr inbounds %struct.MATRIX, ptr %22, i32 0, i32 6
  %24 = load i32, ptr %6, align 4, !tbaa !9
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [3 x [60 x i8]], ptr %23, i64 0, i64 %25
  %27 = getelementptr inbounds [60 x i8], ptr %26, i64 0, i64 0
  %28 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef @.str.74, ptr noundef %27) #4
  br label %29

29:                                               ; preds = %18
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %6, align 4, !tbaa !9
  br label %15, !llvm.loop !11

32:                                               ; preds = %15
  %33 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %34 = call ptr @strcpy(ptr noundef %33, ptr noundef @.str.25) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %151, %32
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.MATRIX, ptr %37, i64 0
  %39 = getelementptr inbounds %struct.MATRIX, ptr %38, i32 0, i32 0
  %40 = load i32, ptr %39, align 8, !tbaa !13
  %41 = icmp slt i32 %36, %40
  br i1 %41, label %42, label %154

42:                                               ; preds = %35
  %43 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %44 = call ptr @strcpy(ptr noundef %43, ptr noundef @.str.25) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %67, %42
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.MATRIX, ptr %47, i64 0
  %49 = getelementptr inbounds %struct.MATRIX, ptr %48, i32 0, i32 1
  %50 = load i32, ptr %49, align 4, !tbaa !15
  %51 = icmp slt i32 %46, %50
  br i1 %51, label %52, label %70

52:                                               ; preds = %45
  %53 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.MATRIX, ptr %54, i64 0
  %56 = getelementptr inbounds %struct.MATRIX, ptr %55, i32 0, i32 7
  %57 = load i32, ptr %6, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [500 x [200 x ptr]], ptr %56, i64 0, i64 %58
  %60 = load i32, ptr %7, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [200 x ptr], ptr %59, i64 0, i64 %61
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  %64 = call ptr @strcat(ptr noundef %53, ptr noundef %63) #4
  %65 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %66 = call ptr @strcat(ptr noundef %65, ptr noundef @.str.75) #4
  br label %67

67:                                               ; preds = %52
  %68 = load i32, ptr %7, align 4, !tbaa !9
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %7, align 4, !tbaa !9
  br label %45, !llvm.loop !16

70:                                               ; preds = %45
  store i32 2, ptr %7, align 4, !tbaa !9
  br label %71

71:                                               ; preds = %107, %70
  %72 = load i32, ptr %7, align 4, !tbaa !9
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.MATRIX, ptr %73, i64 1
  %75 = getelementptr inbounds %struct.MATRIX, ptr %74, i32 0, i32 1
  %76 = load i32, ptr %75, align 4, !tbaa !15
  %77 = icmp slt i32 %72, %76
  br i1 %77, label %78, label %110

78:                                               ; preds = %71
  %79 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.MATRIX, ptr %80, i64 1
  %82 = getelementptr inbounds %struct.MATRIX, ptr %81, i32 0, i32 7
  %83 = load i32, ptr %6, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [500 x [200 x ptr]], ptr %82, i64 0, i64 %84
  %86 = load i32, ptr %7, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [200 x ptr], ptr %85, i64 0, i64 %87
  %89 = load ptr, ptr %88, align 8, !tbaa !5
  %90 = call ptr @strcat(ptr noundef %79, ptr noundef %89) #4
  %91 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %92 = call ptr @strcat(ptr noundef %91, ptr noundef @.str.75) #4
  %93 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.MATRIX, ptr %94, i64 2
  %96 = getelementptr inbounds %struct.MATRIX, ptr %95, i32 0, i32 7
  %97 = load i32, ptr %6, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [500 x [200 x ptr]], ptr %96, i64 0, i64 %98
  %100 = load i32, ptr %7, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [200 x ptr], ptr %99, i64 0, i64 %101
  %103 = load ptr, ptr %102, align 8, !tbaa !5
  %104 = call ptr @strcat(ptr noundef %93, ptr noundef %103) #4
  %105 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %106 = call ptr @strcat(ptr noundef %105, ptr noundef @.str.75) #4
  br label %107

107:                                              ; preds = %78
  %108 = load i32, ptr %7, align 4, !tbaa !9
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %7, align 4, !tbaa !9
  br label %71, !llvm.loop !17

110:                                              ; preds = %71
  store i32 2, ptr %7, align 4, !tbaa !9
  br label %111

111:                                              ; preds = %143, %110
  %112 = load i32, ptr %7, align 4, !tbaa !9
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.MATRIX, ptr %113, i64 3
  %115 = getelementptr inbounds %struct.MATRIX, ptr %114, i32 0, i32 1
  %116 = load i32, ptr %115, align 4, !tbaa !15
  %117 = icmp slt i32 %112, %116
  br i1 %117, label %118, label %146

118:                                              ; preds = %111
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.MATRIX, ptr %119, i64 3
  %121 = getelementptr inbounds %struct.MATRIX, ptr %120, i32 0, i32 4
  %122 = load i32, ptr %7, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [200 x i32], ptr %121, i64 0, i64 %123
  %125 = load i32, ptr %124, align 4, !tbaa !9
  %126 = icmp sgt i32 %125, 0
  br i1 %126, label %127, label %142

127:                                              ; preds = %118
  %128 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.MATRIX, ptr %129, i64 3
  %131 = getelementptr inbounds %struct.MATRIX, ptr %130, i32 0, i32 7
  %132 = load i32, ptr %6, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [500 x [200 x ptr]], ptr %131, i64 0, i64 %133
  %135 = load i32, ptr %7, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [200 x ptr], ptr %134, i64 0, i64 %136
  %138 = load ptr, ptr %137, align 8, !tbaa !5
  %139 = call ptr @strcat(ptr noundef %128, ptr noundef %138) #4
  %140 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %141 = call ptr @strcat(ptr noundef %140, ptr noundef @.str.75) #4
  br label %142

142:                                              ; preds = %127, %118
  br label %143

143:                                              ; preds = %142
  %144 = load i32, ptr %7, align 4, !tbaa !9
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %7, align 4, !tbaa !9
  br label %111, !llvm.loop !18

146:                                              ; preds = %111
  %147 = getelementptr inbounds [12 x ptr], ptr %8, i64 0, i64 9
  %148 = load ptr, ptr %147, align 8, !tbaa !5
  %149 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %150 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %148, ptr noundef @.str.76, ptr noundef %149) #4
  br label %151

151:                                              ; preds = %146
  %152 = load i32, ptr %6, align 4, !tbaa !9
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %6, align 4, !tbaa !9
  br label %35, !llvm.loop !19

154:                                              ; preds = %35
  %155 = getelementptr inbounds [12 x ptr], ptr %8, i64 0, i64 9
  %156 = load ptr, ptr %155, align 8, !tbaa !5
  %157 = call i32 @fclose(ptr noundef %156)
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.FILENM, ptr %158, i32 0, i32 1
  %160 = load i32, ptr %159, align 4, !tbaa !20
  %161 = icmp eq i32 %160, 1
  br i1 %161, label %162, label %366

162:                                              ; preds = %154
  %163 = load ptr, ptr %3, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.FILENM, ptr %163, i32 0, i32 0
  %165 = getelementptr inbounds [12 x [60 x i8]], ptr %164, i64 0, i64 11
  %166 = getelementptr inbounds [60 x i8], ptr %165, i64 0, i64 0
  %167 = call ptr @efopen(ptr noundef %166, ptr noundef @.str.31)
  %168 = getelementptr inbounds [12 x ptr], ptr %8, i64 0, i64 11
  store ptr %167, ptr %168, align 8, !tbaa !5
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %169

169:                                              ; preds = %183, %162
  %170 = load i32, ptr %6, align 4, !tbaa !9
  %171 = icmp slt i32 %170, 3
  br i1 %171, label %172, label %186

172:                                              ; preds = %169
  %173 = getelementptr inbounds [12 x ptr], ptr %8, i64 0, i64 10
  %174 = load ptr, ptr %173, align 16, !tbaa !5
  %175 = load ptr, ptr %4, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.MATRIX, ptr %175, i64 0
  %177 = getelementptr inbounds %struct.MATRIX, ptr %176, i32 0, i32 6
  %178 = load i32, ptr %6, align 4, !tbaa !9
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [3 x [60 x i8]], ptr %177, i64 0, i64 %179
  %181 = getelementptr inbounds [60 x i8], ptr %180, i64 0, i64 0
  %182 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %174, ptr noundef @.str.74, ptr noundef %181) #4
  br label %183

183:                                              ; preds = %172
  %184 = load i32, ptr %6, align 4, !tbaa !9
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %6, align 4, !tbaa !9
  br label %169, !llvm.loop !22

186:                                              ; preds = %169
  %187 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %188 = call ptr @strcpy(ptr noundef %187, ptr noundef @.str.25) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %189

189:                                              ; preds = %229, %186
  %190 = load i32, ptr %6, align 4, !tbaa !9
  %191 = load ptr, ptr %4, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.MATRIX, ptr %191, i64 0
  %193 = getelementptr inbounds %struct.MATRIX, ptr %192, i32 0, i32 1
  %194 = load i32, ptr %193, align 4, !tbaa !15
  %195 = icmp slt i32 %190, %194
  br i1 %195, label %196, label %232

196:                                              ; preds = %189
  %197 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %198 = call ptr @strcpy(ptr noundef %197, ptr noundef @.str.25) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %199

199:                                              ; preds = %221, %196
  %200 = load i32, ptr %7, align 4, !tbaa !9
  %201 = load ptr, ptr %4, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.MATRIX, ptr %201, i64 0
  %203 = getelementptr inbounds %struct.MATRIX, ptr %202, i32 0, i32 0
  %204 = load i32, ptr %203, align 8, !tbaa !13
  %205 = icmp slt i32 %200, %204
  br i1 %205, label %206, label %224

206:                                              ; preds = %199
  %207 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %208 = load ptr, ptr %4, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.MATRIX, ptr %208, i64 0
  %210 = getelementptr inbounds %struct.MATRIX, ptr %209, i32 0, i32 7
  %211 = load i32, ptr %7, align 4, !tbaa !9
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [500 x [200 x ptr]], ptr %210, i64 0, i64 %212
  %214 = load i32, ptr %6, align 4, !tbaa !9
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [200 x ptr], ptr %213, i64 0, i64 %215
  %217 = load ptr, ptr %216, align 8, !tbaa !5
  %218 = call ptr @strcat(ptr noundef %207, ptr noundef %217) #4
  %219 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %220 = call ptr @strcat(ptr noundef %219, ptr noundef @.str.75) #4
  br label %221

221:                                              ; preds = %206
  %222 = load i32, ptr %7, align 4, !tbaa !9
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %7, align 4, !tbaa !9
  br label %199, !llvm.loop !23

224:                                              ; preds = %199
  %225 = getelementptr inbounds [12 x ptr], ptr %8, i64 0, i64 11
  %226 = load ptr, ptr %225, align 8, !tbaa !5
  %227 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %228 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %226, ptr noundef @.str.76, ptr noundef %227) #4
  br label %229

229:                                              ; preds = %224
  %230 = load i32, ptr %6, align 4, !tbaa !9
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %6, align 4, !tbaa !9
  br label %189, !llvm.loop !24

232:                                              ; preds = %189
  store i32 2, ptr %6, align 4, !tbaa !9
  br label %233

233:                                              ; preds = %305, %232
  %234 = load i32, ptr %6, align 4, !tbaa !9
  %235 = load ptr, ptr %4, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.MATRIX, ptr %235, i64 1
  %237 = getelementptr inbounds %struct.MATRIX, ptr %236, i32 0, i32 1
  %238 = load i32, ptr %237, align 4, !tbaa !15
  %239 = icmp slt i32 %234, %238
  br i1 %239, label %240, label %308

240:                                              ; preds = %233
  %241 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %242 = call ptr @strcpy(ptr noundef %241, ptr noundef @.str.25) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %243

243:                                              ; preds = %265, %240
  %244 = load i32, ptr %7, align 4, !tbaa !9
  %245 = load ptr, ptr %4, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.MATRIX, ptr %245, i64 0
  %247 = getelementptr inbounds %struct.MATRIX, ptr %246, i32 0, i32 0
  %248 = load i32, ptr %247, align 8, !tbaa !13
  %249 = icmp slt i32 %244, %248
  br i1 %249, label %250, label %268

250:                                              ; preds = %243
  %251 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %252 = load ptr, ptr %4, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.MATRIX, ptr %252, i64 1
  %254 = getelementptr inbounds %struct.MATRIX, ptr %253, i32 0, i32 7
  %255 = load i32, ptr %7, align 4, !tbaa !9
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [500 x [200 x ptr]], ptr %254, i64 0, i64 %256
  %258 = load i32, ptr %6, align 4, !tbaa !9
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [200 x ptr], ptr %257, i64 0, i64 %259
  %261 = load ptr, ptr %260, align 8, !tbaa !5
  %262 = call ptr @strcat(ptr noundef %251, ptr noundef %261) #4
  %263 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %264 = call ptr @strcat(ptr noundef %263, ptr noundef @.str.75) #4
  br label %265

265:                                              ; preds = %250
  %266 = load i32, ptr %7, align 4, !tbaa !9
  %267 = add nsw i32 %266, 1
  store i32 %267, ptr %7, align 4, !tbaa !9
  br label %243, !llvm.loop !25

268:                                              ; preds = %243
  %269 = getelementptr inbounds [12 x ptr], ptr %8, i64 0, i64 11
  %270 = load ptr, ptr %269, align 8, !tbaa !5
  %271 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %272 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %270, ptr noundef @.str.76, ptr noundef %271) #4
  %273 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %274 = call ptr @strcpy(ptr noundef %273, ptr noundef @.str.25) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %275

275:                                              ; preds = %297, %268
  %276 = load i32, ptr %7, align 4, !tbaa !9
  %277 = load ptr, ptr %4, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.MATRIX, ptr %277, i64 0
  %279 = getelementptr inbounds %struct.MATRIX, ptr %278, i32 0, i32 0
  %280 = load i32, ptr %279, align 8, !tbaa !13
  %281 = icmp slt i32 %276, %280
  br i1 %281, label %282, label %300

282:                                              ; preds = %275
  %283 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %284 = load ptr, ptr %4, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.MATRIX, ptr %284, i64 3
  %286 = getelementptr inbounds %struct.MATRIX, ptr %285, i32 0, i32 7
  %287 = load i32, ptr %7, align 4, !tbaa !9
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds [500 x [200 x ptr]], ptr %286, i64 0, i64 %288
  %290 = load i32, ptr %6, align 4, !tbaa !9
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds [200 x ptr], ptr %289, i64 0, i64 %291
  %293 = load ptr, ptr %292, align 8, !tbaa !5
  %294 = call ptr @strcat(ptr noundef %283, ptr noundef %293) #4
  %295 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %296 = call ptr @strcat(ptr noundef %295, ptr noundef @.str.75) #4
  br label %297

297:                                              ; preds = %282
  %298 = load i32, ptr %7, align 4, !tbaa !9
  %299 = add nsw i32 %298, 1
  store i32 %299, ptr %7, align 4, !tbaa !9
  br label %275, !llvm.loop !26

300:                                              ; preds = %275
  %301 = getelementptr inbounds [12 x ptr], ptr %8, i64 0, i64 11
  %302 = load ptr, ptr %301, align 8, !tbaa !5
  %303 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %304 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %302, ptr noundef @.str.76, ptr noundef %303) #4
  br label %305

305:                                              ; preds = %300
  %306 = load i32, ptr %6, align 4, !tbaa !9
  %307 = add nsw i32 %306, 1
  store i32 %307, ptr %6, align 4, !tbaa !9
  br label %233, !llvm.loop !27

308:                                              ; preds = %233
  store i32 2, ptr %6, align 4, !tbaa !9
  br label %309

309:                                              ; preds = %359, %308
  %310 = load i32, ptr %6, align 4, !tbaa !9
  %311 = load ptr, ptr %4, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct.MATRIX, ptr %311, i64 3
  %313 = getelementptr inbounds %struct.MATRIX, ptr %312, i32 0, i32 1
  %314 = load i32, ptr %313, align 4, !tbaa !15
  %315 = icmp slt i32 %310, %314
  br i1 %315, label %316, label %362

316:                                              ; preds = %309
  %317 = load ptr, ptr %4, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct.MATRIX, ptr %317, i64 3
  %319 = getelementptr inbounds %struct.MATRIX, ptr %318, i32 0, i32 4
  %320 = load i32, ptr %6, align 4, !tbaa !9
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [200 x i32], ptr %319, i64 0, i64 %321
  %323 = load i32, ptr %322, align 4, !tbaa !9
  %324 = icmp sgt i32 %323, 0
  br i1 %324, label %325, label %358

325:                                              ; preds = %316
  %326 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %327 = call ptr @strcpy(ptr noundef %326, ptr noundef @.str.25) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %328

328:                                              ; preds = %350, %325
  %329 = load i32, ptr %7, align 4, !tbaa !9
  %330 = load ptr, ptr %4, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.MATRIX, ptr %330, i64 0
  %332 = getelementptr inbounds %struct.MATRIX, ptr %331, i32 0, i32 0
  %333 = load i32, ptr %332, align 8, !tbaa !13
  %334 = icmp slt i32 %329, %333
  br i1 %334, label %335, label %353

335:                                              ; preds = %328
  %336 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %337 = load ptr, ptr %4, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.MATRIX, ptr %337, i64 3
  %339 = getelementptr inbounds %struct.MATRIX, ptr %338, i32 0, i32 7
  %340 = load i32, ptr %7, align 4, !tbaa !9
  %341 = sext i32 %340 to i64
  %342 = getelementptr inbounds [500 x [200 x ptr]], ptr %339, i64 0, i64 %341
  %343 = load i32, ptr %6, align 4, !tbaa !9
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds [200 x ptr], ptr %342, i64 0, i64 %344
  %346 = load ptr, ptr %345, align 8, !tbaa !5
  %347 = call ptr @strcat(ptr noundef %336, ptr noundef %346) #4
  %348 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %349 = call ptr @strcat(ptr noundef %348, ptr noundef @.str.75) #4
  br label %350

350:                                              ; preds = %335
  %351 = load i32, ptr %7, align 4, !tbaa !9
  %352 = add nsw i32 %351, 1
  store i32 %352, ptr %7, align 4, !tbaa !9
  br label %328, !llvm.loop !28

353:                                              ; preds = %328
  %354 = getelementptr inbounds [12 x ptr], ptr %8, i64 0, i64 11
  %355 = load ptr, ptr %354, align 8, !tbaa !5
  %356 = getelementptr inbounds [12288 x i8], ptr %5, i64 0, i64 0
  %357 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %355, ptr noundef @.str.76, ptr noundef %356) #4
  br label %358

358:                                              ; preds = %353, %316
  br label %359

359:                                              ; preds = %358
  %360 = load i32, ptr %6, align 4, !tbaa !9
  %361 = add nsw i32 %360, 1
  store i32 %361, ptr %6, align 4, !tbaa !9
  br label %309, !llvm.loop !29

362:                                              ; preds = %309
  %363 = getelementptr inbounds [12 x ptr], ptr %8, i64 0, i64 11
  %364 = load ptr, ptr %363, align 8, !tbaa !5
  %365 = call i32 @fclose(ptr noundef %364)
  br label %366

366:                                              ; preds = %362, %154
  call void @llvm.lifetime.end.p0(i64 96, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 12288, ptr %5) #4
  ret i32 0
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !10, i64 0}
!14 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !7, i64 16, !7, i64 816, !7, i64 2816, !7, i64 3000}
!15 = !{!14, !10, i64 4}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = !{!21, !10, i64 720}
!21 = !{!"", !7, i64 0, !10, i64 720}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12}
!29 = distinct !{!29, !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"

@.str.25 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.75 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #0

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @efopen(ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcat(ptr noalias noundef returned, ptr noalias nocapture noundef readonly) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @write_pre_contingency(ptr noundef %0, ptr noundef %1) local_unnamed_addr #3 {
  %3 = alloca [12288 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 12288, ptr nonnull %3) #4
  %4 = getelementptr inbounds i8, ptr %0, i64 540
  %5 = tail call ptr @efopen(ptr noundef nonnull %4, ptr noundef nonnull @.str.31)
  %6 = getelementptr inbounds i8, ptr %1, i64 2816
  %7 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %5, ptr noundef nonnull @.str.74, ptr noundef nonnull %6) #4
  %8 = getelementptr inbounds i8, ptr %1, i64 2876
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %5, ptr noundef nonnull @.str.74, ptr noundef nonnull %8) #4
  %10 = getelementptr inbounds i8, ptr %1, i64 2936
  %11 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %5, ptr noundef nonnull @.str.74, ptr noundef nonnull %10) #4
  %12 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.25) #4
  %13 = load i32, ptr %1, align 8, !tbaa !5
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph94, label %._crit_edge95

.lr.ph94:                                         ; preds = %2
  %15 = getelementptr inbounds i8, ptr %1, i64 4
  %16 = getelementptr inbounds i8, ptr %1, i64 3000
  %17 = getelementptr inbounds i8, ptr %1, i64 803004
  %18 = getelementptr inbounds i8, ptr %1, i64 806000
  %19 = getelementptr inbounds i8, ptr %1, i64 1609000
  %20 = getelementptr inbounds i8, ptr %1, i64 2409004
  %21 = getelementptr inbounds i8, ptr %1, i64 2409016
  %22 = getelementptr inbounds i8, ptr %1, i64 2412000
  br label %23

23:                                               ; preds = %.lr.ph94, %._crit_edge
  %indvars.iv133 = phi i64 [ 0, %.lr.ph94 ], [ %indvars.iv.next134, %._crit_edge ]
  %24 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.25) #4
  %25 = load i32, ptr %15, align 4, !tbaa !10
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.lr.ph, label %.preheader85

.lr.ph:                                           ; preds = %23
  %wide.trip.count = zext nneg i32 %25 to i64
  br label %29

.preheader85:                                     ; preds = %29, %23
  %27 = load i32, ptr %17, align 4, !tbaa !10
  %28 = icmp sgt i32 %27, 2
  br i1 %28, label %.lr.ph89, label %.preheader84

.lr.ph89:                                         ; preds = %.preheader85
  %wide.trip.count126 = zext nneg i32 %27 to i64
  br label %36

29:                                               ; preds = %.lr.ph, %29
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %29 ]
  %30 = getelementptr inbounds [500 x [200 x ptr]], ptr %16, i64 0, i64 %indvars.iv133, i64 %indvars.iv
  %31 = load ptr, ptr %30, align 8, !tbaa !11
  %32 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %31) #4
  %33 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.75) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader85, label %29, !llvm.loop !13

.preheader84:                                     ; preds = %36, %.preheader85
  %34 = load i32, ptr %20, align 4, !tbaa !10
  %35 = icmp sgt i32 %34, 2
  br i1 %35, label %.lr.ph91, label %._crit_edge

.lr.ph91:                                         ; preds = %.preheader84
  %wide.trip.count131 = zext nneg i32 %34 to i64
  br label %45

36:                                               ; preds = %.lr.ph89, %36
  %indvars.iv123 = phi i64 [ 2, %.lr.ph89 ], [ %indvars.iv.next124, %36 ]
  %37 = getelementptr inbounds [500 x [200 x ptr]], ptr %18, i64 0, i64 %indvars.iv133, i64 %indvars.iv123
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %38) #4
  %40 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.75) #4
  %41 = getelementptr inbounds [500 x [200 x ptr]], ptr %19, i64 0, i64 %indvars.iv133, i64 %indvars.iv123
  %42 = load ptr, ptr %41, align 8, !tbaa !11
  %43 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %42) #4
  %44 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.75) #4
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %exitcond127.not = icmp eq i64 %indvars.iv.next124, %wide.trip.count126
  br i1 %exitcond127.not, label %.preheader84, label %36, !llvm.loop !15

45:                                               ; preds = %.lr.ph91, %54
  %indvars.iv128 = phi i64 [ 2, %.lr.ph91 ], [ %indvars.iv.next129, %54 ]
  %46 = getelementptr inbounds [200 x i32], ptr %21, i64 0, i64 %indvars.iv128
  %47 = load i32, ptr %46, align 4, !tbaa !16
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %49, label %54

49:                                               ; preds = %45
  %50 = getelementptr inbounds [500 x [200 x ptr]], ptr %22, i64 0, i64 %indvars.iv133, i64 %indvars.iv128
  %51 = load ptr, ptr %50, align 8, !tbaa !11
  %52 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %51) #4
  %53 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.75) #4
  br label %54

54:                                               ; preds = %45, %49
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %exitcond132.not = icmp eq i64 %indvars.iv.next129, %wide.trip.count131
  br i1 %exitcond132.not, label %._crit_edge, label %45, !llvm.loop !17

._crit_edge:                                      ; preds = %54, %.preheader84
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %5, ptr noundef nonnull @.str.76, ptr noundef nonnull %3) #4
  %indvars.iv.next134 = add nuw nsw i64 %indvars.iv133, 1
  %56 = load i32, ptr %1, align 8, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = icmp slt i64 %indvars.iv.next134, %57
  br i1 %58, label %23, label %._crit_edge95, !llvm.loop !18

._crit_edge95:                                    ; preds = %._crit_edge, %2
  %59 = call i32 @fclose(ptr noundef %5)
  %60 = getelementptr inbounds i8, ptr %0, i64 720
  %61 = load i32, ptr %60, align 4, !tbaa !19
  %62 = icmp eq i32 %61, 1
  br i1 %62, label %63, label %138

63:                                               ; preds = %._crit_edge95
  %64 = getelementptr inbounds i8, ptr %0, i64 660
  %65 = call ptr @efopen(ptr noundef nonnull %64, ptr noundef nonnull @.str.31)
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef undef, ptr noundef nonnull @.str.74, ptr noundef nonnull %6) #4
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef undef, ptr noundef nonnull @.str.74, ptr noundef nonnull %8) #4
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef undef, ptr noundef nonnull @.str.74, ptr noundef nonnull %10) #4
  %69 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.25) #4
  %70 = getelementptr inbounds i8, ptr %1, i64 4
  %71 = load i32, ptr %70, align 4, !tbaa !10
  %72 = icmp sgt i32 %71, 0
  br i1 %72, label %.lr.ph103, label %.preheader83

.lr.ph103:                                        ; preds = %63
  %73 = getelementptr inbounds i8, ptr %1, i64 3000
  br label %79

.preheader83:                                     ; preds = %._crit_edge100, %63
  %74 = getelementptr inbounds i8, ptr %1, i64 803004
  %75 = load i32, ptr %74, align 4, !tbaa !10
  %76 = icmp sgt i32 %75, 2
  br i1 %76, label %.lr.ph113, label %.preheader

.lr.ph113:                                        ; preds = %.preheader83
  %77 = getelementptr inbounds i8, ptr %1, i64 806000
  %78 = getelementptr inbounds i8, ptr %1, i64 2412000
  br label %97

79:                                               ; preds = %.lr.ph103, %._crit_edge100
  %indvars.iv145 = phi i64 [ 0, %.lr.ph103 ], [ %indvars.iv.next146, %._crit_edge100 ]
  %80 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.25) #4
  %81 = load i32, ptr %1, align 8, !tbaa !5
  %82 = icmp sgt i32 %81, 0
  br i1 %82, label %.lr.ph99, label %._crit_edge100

.lr.ph99:                                         ; preds = %79
  %wide.trip.count143 = zext nneg i32 %81 to i64
  br label %83

83:                                               ; preds = %.lr.ph99, %83
  %indvars.iv140 = phi i64 [ 0, %.lr.ph99 ], [ %indvars.iv.next141, %83 ]
  %84 = getelementptr inbounds [500 x [200 x ptr]], ptr %73, i64 0, i64 %indvars.iv140, i64 %indvars.iv145
  %85 = load ptr, ptr %84, align 8, !tbaa !11
  %86 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %85) #4
  %87 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.75) #4
  %indvars.iv.next141 = add nuw nsw i64 %indvars.iv140, 1
  %exitcond144.not = icmp eq i64 %indvars.iv.next141, %wide.trip.count143
  br i1 %exitcond144.not, label %._crit_edge100, label %83, !llvm.loop !21

._crit_edge100:                                   ; preds = %83, %79
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef nonnull @.str.76, ptr noundef nonnull %3) #4
  %indvars.iv.next146 = add nuw nsw i64 %indvars.iv145, 1
  %89 = load i32, ptr %70, align 4, !tbaa !10
  %90 = sext i32 %89 to i64
  %91 = icmp slt i64 %indvars.iv.next146, %90
  br i1 %91, label %79, label %.preheader83, !llvm.loop !22

.preheader:                                       ; preds = %._crit_edge111, %.preheader83
  %92 = getelementptr inbounds i8, ptr %1, i64 2409004
  %93 = load i32, ptr %92, align 4, !tbaa !10
  %94 = icmp sgt i32 %93, 2
  br i1 %94, label %.lr.ph119, label %._crit_edge120

.lr.ph119:                                        ; preds = %.preheader
  %95 = getelementptr inbounds i8, ptr %1, i64 2409016
  %96 = getelementptr inbounds i8, ptr %1, i64 2412000
  br label %119

97:                                               ; preds = %.lr.ph113, %._crit_edge111
  %indvars.iv158 = phi i64 [ 2, %.lr.ph113 ], [ %indvars.iv.next159, %._crit_edge111 ]
  %98 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.25) #4
  %99 = load i32, ptr %1, align 8, !tbaa !5
  %100 = icmp sgt i32 %99, 0
  br i1 %100, label %.lr.ph106, label %._crit_edge107

.lr.ph106:                                        ; preds = %97
  %wide.trip.count151 = zext nneg i32 %99 to i64
  br label %101

101:                                              ; preds = %.lr.ph106, %101
  %indvars.iv148 = phi i64 [ 0, %.lr.ph106 ], [ %indvars.iv.next149, %101 ]
  %102 = getelementptr inbounds [500 x [200 x ptr]], ptr %77, i64 0, i64 %indvars.iv148, i64 %indvars.iv158
  %103 = load ptr, ptr %102, align 8, !tbaa !11
  %104 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %103) #4
  %105 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.75) #4
  %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1
  %exitcond152.not = icmp eq i64 %indvars.iv.next149, %wide.trip.count151
  br i1 %exitcond152.not, label %._crit_edge107, label %101, !llvm.loop !23

._crit_edge107:                                   ; preds = %101, %97
  %106 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef nonnull @.str.76, ptr noundef nonnull %3) #4
  %107 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.25) #4
  %108 = load i32, ptr %1, align 8, !tbaa !5
  %109 = icmp sgt i32 %108, 0
  br i1 %109, label %.lr.ph110, label %._crit_edge111

.lr.ph110:                                        ; preds = %._crit_edge107
  %wide.trip.count156 = zext nneg i32 %108 to i64
  br label %110

110:                                              ; preds = %.lr.ph110, %110
  %indvars.iv153 = phi i64 [ 0, %.lr.ph110 ], [ %indvars.iv.next154, %110 ]
  %111 = getelementptr inbounds [500 x [200 x ptr]], ptr %78, i64 0, i64 %indvars.iv153, i64 %indvars.iv158
  %112 = load ptr, ptr %111, align 8, !tbaa !11
  %113 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %112) #4
  %114 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.75) #4
  %indvars.iv.next154 = add nuw nsw i64 %indvars.iv153, 1
  %exitcond157.not = icmp eq i64 %indvars.iv.next154, %wide.trip.count156
  br i1 %exitcond157.not, label %._crit_edge111, label %110, !llvm.loop !24

._crit_edge111:                                   ; preds = %110, %._crit_edge107
  %115 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef nonnull @.str.76, ptr noundef nonnull %3) #4
  %indvars.iv.next159 = add nuw nsw i64 %indvars.iv158, 1
  %116 = load i32, ptr %74, align 4, !tbaa !10
  %117 = sext i32 %116 to i64
  %118 = icmp slt i64 %indvars.iv.next159, %117
  br i1 %118, label %97, label %.preheader, !llvm.loop !25

119:                                              ; preds = %.lr.ph119, %133
  %120 = phi i32 [ %93, %.lr.ph119 ], [ %134, %133 ]
  %indvars.iv166 = phi i64 [ 2, %.lr.ph119 ], [ %indvars.iv.next167, %133 ]
  %121 = getelementptr inbounds [200 x i32], ptr %95, i64 0, i64 %indvars.iv166
  %122 = load i32, ptr %121, align 4, !tbaa !16
  %123 = icmp sgt i32 %122, 0
  br i1 %123, label %124, label %133

124:                                              ; preds = %119
  %125 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.25) #4
  %126 = load i32, ptr %1, align 8, !tbaa !5
  %127 = icmp sgt i32 %126, 0
  br i1 %127, label %.lr.ph116.preheader, label %._crit_edge117

.lr.ph116.preheader:                              ; preds = %124
  %wide.trip.count164 = zext nneg i32 %126 to i64
  br label %.lr.ph116

.lr.ph116:                                        ; preds = %.lr.ph116.preheader, %.lr.ph116
  %indvars.iv161 = phi i64 [ 0, %.lr.ph116.preheader ], [ %indvars.iv.next162, %.lr.ph116 ]
  %128 = getelementptr inbounds [500 x [200 x ptr]], ptr %96, i64 0, i64 %indvars.iv161, i64 %indvars.iv166
  %129 = load ptr, ptr %128, align 8, !tbaa !11
  %130 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) %129) #4
  %131 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %3, ptr noundef nonnull dereferenceable(1) @.str.75) #4
  %indvars.iv.next162 = add nuw nsw i64 %indvars.iv161, 1
  %exitcond165.not = icmp eq i64 %indvars.iv.next162, %wide.trip.count164
  br i1 %exitcond165.not, label %._crit_edge117, label %.lr.ph116, !llvm.loop !26

._crit_edge117:                                   ; preds = %.lr.ph116, %124
  %132 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef nonnull @.str.76, ptr noundef nonnull %3) #4
  %.pre = load i32, ptr %92, align 4, !tbaa !10
  br label %133

133:                                              ; preds = %119, %._crit_edge117
  %134 = phi i32 [ %120, %119 ], [ %.pre, %._crit_edge117 ]
  %indvars.iv.next167 = add nuw nsw i64 %indvars.iv166, 1
  %135 = sext i32 %134 to i64
  %136 = icmp slt i64 %indvars.iv.next167, %135
  br i1 %136, label %119, label %._crit_edge120, !llvm.loop !27

._crit_edge120:                                   ; preds = %133, %.preheader
  %137 = call i32 @fclose(ptr noundef %65)
  br label %138

138:                                              ; preds = %._crit_edge120, %._crit_edge95
  call void @llvm.lifetime.end.p0(i64 12288, ptr nonnull %3) #4
  ret i32 0
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !8, i64 16, !8, i64 816, !8, i64 2816, !8, i64 3000}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = !{!20, !7, i64 720}
!20 = !{!"", !8, i64 0, !7, i64 720}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !14}
!26 = distinct !{!26, !14}
!27 = distinct !{!27, !14}


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