; LLVM IR from freakout42/macrocalc :: arx/src (dbrecall)

; 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.DBFPROLOG2 = type { i8, i16, i8, i8, i8, i16 }
%struct.DBF = type { [1024 x i8], [1024 x i8], ptr, ptr, i32, i32, i8, i8, i8, i8, i8, i8, i8, i32, i32, i8, ptr, ptr, %struct.DBFPROLOG }
%struct.DBFPROLOG = type { i8, i8, i8, i8, i32, i16, i16, i16, i8, i8, [12 x i8], i8, [3 x i8] }
%struct.FIELD_RECORD = type { [11 x i8], i8, i32, i8, i8, [14 x i8] }

@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @errorex(i32 noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct.DBFPROLOG2, align 2
  %7 = alloca i8, align 1
  %8 = alloca i16, align 2
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.DBF, align 8
  %13 = alloca ptr, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 10, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 2, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 0, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 2144, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store ptr %12, ptr %13, align 8, !tbaa !9
  %14 = load i32, ptr %4, align 4, !tbaa !5
  %15 = icmp ne i32 %14, 3
  br i1 %15, label %16, label %18

16:                                               ; preds = %2
  %17 = call i32 @errorex(i32 noundef 2)
  br label %18

18:                                               ; preds = %16, %2
  %19 = load ptr, ptr %5, align 8, !tbaa !9
  %20 = getelementptr inbounds ptr, ptr %19, i64 2
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = call i32 @atoi(ptr noundef %21) #8
  store i32 %22, ptr %10, align 4, !tbaa !5
  %23 = load i32, ptr %10, align 4, !tbaa !5
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %25, label %27

25:                                               ; preds = %18
  %26 = call i32 @errorex(i32 noundef 19)
  br label %27

27:                                               ; preds = %25, %18
  %28 = load ptr, ptr %13, align 8, !tbaa !9
  %29 = getelementptr inbounds %struct.DBF, ptr %28, i32 0, i32 0
  %30 = getelementptr inbounds [1024 x i8], ptr %29, i64 0, i64 0
  %31 = load ptr, ptr %5, align 8, !tbaa !9
  %32 = getelementptr inbounds ptr, ptr %31, i64 1
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  %34 = call ptr @strncpy(ptr noundef %30, ptr noundef %33, i64 noundef 1024) #7
  %35 = load ptr, ptr %13, align 8, !tbaa !9
  %36 = getelementptr inbounds %struct.DBF, ptr %35, i32 0, i32 5
  store i32 0, ptr %36, align 4, !tbaa !13
  %37 = load ptr, ptr %13, align 8, !tbaa !9
  %38 = getelementptr inbounds %struct.DBF, ptr %37, i32 0, i32 0
  %39 = getelementptr inbounds [1024 x i8], ptr %38, i64 0, i64 0
  %40 = call noalias ptr @fopen(ptr noundef %39, ptr noundef @.str.1)
  %41 = load ptr, ptr %13, align 8, !tbaa !9
  %42 = getelementptr inbounds %struct.DBF, ptr %41, i32 0, i32 2
  store ptr %40, ptr %42, align 8, !tbaa !17
  %43 = icmp eq ptr %40, null
  br i1 %43, label %44, label %46

44:                                               ; preds = %27
  %45 = call i32 @errorex(i32 noundef 1)
  br label %46

46:                                               ; preds = %44, %27
  %47 = load ptr, ptr %13, align 8, !tbaa !9
  %48 = getelementptr inbounds %struct.DBF, ptr %47, i32 0, i32 18
  %49 = getelementptr inbounds %struct.DBFPROLOG, ptr %48, i32 0, i32 0
  %50 = load ptr, ptr %13, align 8, !tbaa !9
  %51 = getelementptr inbounds %struct.DBF, ptr %50, i32 0, i32 2
  %52 = load ptr, ptr %51, align 8, !tbaa !17
  %53 = call i64 @fread(ptr noundef %49, i64 noundef 1, i64 noundef 1, ptr noundef %52)
  store i64 %53, ptr %9, align 8, !tbaa !11
  %54 = load i64, ptr %9, align 8, !tbaa !11
  %55 = icmp ne i64 %54, 1
  br i1 %55, label %56, label %58

56:                                               ; preds = %46
  %57 = call i32 @errorex(i32 noundef 3)
  br label %58

58:                                               ; preds = %56, %46
  %59 = load ptr, ptr %13, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct.DBF, ptr %59, i32 0, i32 18
  %61 = getelementptr inbounds %struct.DBFPROLOG, ptr %60, i32 0, i32 0
  %62 = load i8, ptr %61, align 8, !tbaa !18
  %63 = zext i8 %62 to i32
  %64 = and i32 %63, 3
  switch i32 %64, label %141 [
    i32 1, label %65
    i32 2, label %67
    i32 3, label %69
    i32 4, label %69
  ]

65:                                               ; preds = %58
  %66 = call i32 @errorex(i32 noundef 4)
  br label %67

67:                                               ; preds = %65, %58
  %68 = call i32 @errorex(i32 noundef 5)
  br label %69

69:                                               ; preds = %67, %58, %58
  %70 = load ptr, ptr %13, align 8, !tbaa !9
  %71 = getelementptr inbounds %struct.DBF, ptr %70, i32 0, i32 18
  %72 = getelementptr inbounds %struct.DBFPROLOG, ptr %71, i32 0, i32 0
  %73 = getelementptr inbounds i8, ptr %72, i64 1
  %74 = load ptr, ptr %13, align 8, !tbaa !9
  %75 = getelementptr inbounds %struct.DBF, ptr %74, i32 0, i32 2
  %76 = load ptr, ptr %75, align 8, !tbaa !17
  %77 = call i64 @fread(ptr noundef %73, i64 noundef 31, i64 noundef 1, ptr noundef %76)
  store i64 %77, ptr %9, align 8, !tbaa !11
  %78 = load i64, ptr %9, align 8, !tbaa !11
  %79 = icmp ne i64 %78, 1
  br i1 %79, label %80, label %82

80:                                               ; preds = %69
  %81 = call i32 @errorex(i32 noundef 14)
  br label %82

82:                                               ; preds = %80, %69
  %83 = load i32, ptr %10, align 4, !tbaa !5
  %84 = load ptr, ptr %13, align 8, !tbaa !9
  %85 = getelementptr inbounds %struct.DBF, ptr %84, i32 0, i32 18
  %86 = getelementptr inbounds %struct.DBFPROLOG, ptr %85, i32 0, i32 4
  %87 = load i32, ptr %86, align 4, !tbaa !19
  %88 = icmp ugt i32 %83, %87
  br i1 %88, label %89, label %91

89:                                               ; preds = %82
  %90 = call i32 @errorex(i32 noundef 20)
  br label %91

91:                                               ; preds = %89, %82
  %92 = load ptr, ptr %13, align 8, !tbaa !9
  %93 = getelementptr inbounds %struct.DBF, ptr %92, i32 0, i32 18
  %94 = getelementptr inbounds %struct.DBFPROLOG, ptr %93, i32 0, i32 5
  %95 = load i16, ptr %94, align 8, !tbaa !20
  %96 = zext i16 %95 to i32
  %97 = sub i32 %96, 33
  %98 = udiv i32 %97, 32
  %99 = trunc i32 %98 to i8
  %100 = load ptr, ptr %13, align 8, !tbaa !9
  %101 = getelementptr inbounds %struct.DBF, ptr %100, i32 0, i32 15
  store i8 %99, ptr %101, align 8, !tbaa !21
  %102 = load ptr, ptr %13, align 8, !tbaa !9
  %103 = getelementptr inbounds %struct.DBF, ptr %102, i32 0, i32 15
  %104 = load i8, ptr %103, align 8, !tbaa !21
  %105 = zext i8 %104 to i32
  %106 = mul i32 %105, 32
  %107 = add i32 32, %106
  %108 = add i32 %107, 1
  %109 = trunc i32 %108 to i16
  store i16 %109, ptr %8, align 2, !tbaa !22
  %110 = load ptr, ptr %13, align 8, !tbaa !9
  %111 = getelementptr inbounds %struct.DBF, ptr %110, i32 0, i32 18
  %112 = getelementptr inbounds %struct.DBFPROLOG, ptr %111, i32 0, i32 5
  %113 = load i16, ptr %112, align 8, !tbaa !20
  %114 = zext i16 %113 to i32
  %115 = load i16, ptr %8, align 2, !tbaa !22
  %116 = zext i16 %115 to i32
  %117 = icmp eq i32 %114, %116
  br i1 %117, label %118, label %126

118:                                              ; preds = %91
  %119 = load ptr, ptr %13, align 8, !tbaa !9
  %120 = getelementptr inbounds %struct.DBF, ptr %119, i32 0, i32 18
  %121 = getelementptr inbounds %struct.DBFPROLOG, ptr %120, i32 0, i32 0
  %122 = load i8, ptr %121, align 8, !tbaa !18
  %123 = zext i8 %122 to i32
  %124 = or i32 %123, 64
  %125 = trunc i32 %124 to i8
  store i8 %125, ptr %121, align 8, !tbaa !18
  br label %140

126:                                              ; preds = %91
  %127 = load ptr, ptr %13, align 8, !tbaa !9
  %128 = getelementptr inbounds %struct.DBF, ptr %127, i32 0, i32 18
  %129 = getelementptr inbounds %struct.DBFPROLOG, ptr %128, i32 0, i32 5
  %130 = load i16, ptr %129, align 8, !tbaa !20
  %131 = zext i16 %130 to i32
  %132 = load i16, ptr %8, align 2, !tbaa !22
  %133 = zext i16 %132 to i32
  %134 = add nsw i32 %133, 1
  %135 = icmp eq i32 %131, %134
  br i1 %135, label %136, label %137

136:                                              ; preds = %126
  br label %139

137:                                              ; preds = %126
  %138 = call i32 @errorex(i32 noundef 16)
  br label %139

139:                                              ; preds = %137, %136
  br label %140

140:                                              ; preds = %139, %118
  br label %143

141:                                              ; preds = %58
  %142 = call i32 @errorex(i32 noundef 6)
  br label %143

143:                                              ; preds = %141, %140
  %144 = load ptr, ptr %13, align 8, !tbaa !9
  %145 = getelementptr inbounds %struct.DBF, ptr %144, i32 0, i32 15
  %146 = load i8, ptr %145, align 8, !tbaa !21
  %147 = zext i8 %146 to i32
  %148 = mul i32 %147, 32
  %149 = zext i32 %148 to i64
  %150 = call noalias ptr @malloc(i64 noundef %149) #9
  %151 = load ptr, ptr %13, align 8, !tbaa !9
  %152 = getelementptr inbounds %struct.DBF, ptr %151, i32 0, i32 16
  store ptr %150, ptr %152, align 8, !tbaa !23
  %153 = icmp eq ptr %150, null
  br i1 %153, label %154, label %156

154:                                              ; preds = %143
  %155 = call i32 @errorex(i32 noundef 8)
  br label %156

156:                                              ; preds = %154, %143
  %157 = load ptr, ptr %13, align 8, !tbaa !9
  %158 = getelementptr inbounds %struct.DBF, ptr %157, i32 0, i32 16
  %159 = load ptr, ptr %158, align 8, !tbaa !23
  %160 = load ptr, ptr %13, align 8, !tbaa !9
  %161 = getelementptr inbounds %struct.DBF, ptr %160, i32 0, i32 15
  %162 = load i8, ptr %161, align 8, !tbaa !21
  %163 = zext i8 %162 to i32
  %164 = mul i32 %163, 32
  %165 = zext i32 %164 to i64
  call void @llvm.memset.p0.i64(ptr align 4 %159, i8 0, i64 %165, i1 false)
  %166 = load ptr, ptr %13, align 8, !tbaa !9
  %167 = getelementptr inbounds %struct.DBF, ptr %166, i32 0, i32 16
  %168 = load ptr, ptr %167, align 8, !tbaa !23
  %169 = load ptr, ptr %13, align 8, !tbaa !9
  %170 = getelementptr inbounds %struct.DBF, ptr %169, i32 0, i32 15
  %171 = load i8, ptr %170, align 8, !tbaa !21
  %172 = zext i8 %171 to i64
  %173 = load ptr, ptr %13, align 8, !tbaa !9
  %174 = getelementptr inbounds %struct.DBF, ptr %173, i32 0, i32 2
  %175 = load ptr, ptr %174, align 8, !tbaa !17
  %176 = call i64 @fread(ptr noundef %168, i64 noundef 32, i64 noundef %172, ptr noundef %175)
  store i64 %176, ptr %9, align 8, !tbaa !11
  %177 = load i64, ptr %9, align 8, !tbaa !11
  %178 = load ptr, ptr %13, align 8, !tbaa !9
  %179 = getelementptr inbounds %struct.DBF, ptr %178, i32 0, i32 15
  %180 = load i8, ptr %179, align 8, !tbaa !21
  %181 = zext i8 %180 to i64
  %182 = icmp ne i64 %177, %181
  br i1 %182, label %183, label %185

183:                                              ; preds = %156
  %184 = call i32 @errorex(i32 noundef 9)
  br label %185

185:                                              ; preds = %183, %156
  %186 = load ptr, ptr %13, align 8, !tbaa !9
  %187 = getelementptr inbounds %struct.DBF, ptr %186, i32 0, i32 2
  %188 = load ptr, ptr %187, align 8, !tbaa !17
  %189 = call i32 @fgetc(ptr noundef %188)
  %190 = trunc i32 %189 to i16
  store i16 %190, ptr %8, align 2, !tbaa !22
  %191 = zext i16 %190 to i32
  %192 = icmp ne i32 %191, 13
  br i1 %192, label %193, label %209

193:                                              ; preds = %185
  %194 = load ptr, ptr %13, align 8, !tbaa !9
  %195 = getelementptr inbounds %struct.DBF, ptr %194, i32 0, i32 18
  %196 = getelementptr inbounds %struct.DBFPROLOG, ptr %195, i32 0, i32 0
  %197 = load i8, ptr %196, align 8, !tbaa !18
  %198 = zext i8 %197 to i32
  %199 = and i32 %198, 3
  %200 = icmp ne i32 %199, 2
  br i1 %200, label %201, label %209

201:                                              ; preds = %193
  %202 = load ptr, ptr %13, align 8, !tbaa !9
  %203 = getelementptr inbounds %struct.DBF, ptr %202, i32 0, i32 15
  %204 = load i8, ptr %203, align 8, !tbaa !21
  %205 = zext i8 %204 to i32
  %206 = icmp slt i32 %205, 32
  br i1 %206, label %207, label %209

207:                                              ; preds = %201
  %208 = call i32 @errorex(i32 noundef 10)
  br label %209

209:                                              ; preds = %207, %201, %193, %185
  %210 = load ptr, ptr %13, align 8, !tbaa !9
  %211 = getelementptr inbounds %struct.DBF, ptr %210, i32 0, i32 18
  %212 = getelementptr inbounds %struct.DBFPROLOG, ptr %211, i32 0, i32 5
  %213 = load i16, ptr %212, align 8, !tbaa !20
  %214 = zext i16 %213 to i32
  %215 = load ptr, ptr %13, align 8, !tbaa !9
  %216 = getelementptr inbounds %struct.DBF, ptr %215, i32 0, i32 15
  %217 = load i8, ptr %216, align 8, !tbaa !21
  %218 = zext i8 %217 to i32
  %219 = mul i32 %218, 32
  %220 = add i32 32, %219
  %221 = add i32 %220, 1
  %222 = sub i32 %214, %221
  %223 = trunc i32 %222 to i16
  store i16 %223, ptr %8, align 2, !tbaa !22
  %224 = load i16, ptr %8, align 2, !tbaa !22
  %225 = zext i16 %224 to i32
  %226 = icmp sgt i32 %225, 0
  br i1 %226, label %227, label %241

227:                                              ; preds = %209
  %228 = load i16, ptr %8, align 2, !tbaa !22
  %229 = zext i16 %228 to i64
  %230 = load ptr, ptr %13, align 8, !tbaa !9
  %231 = getelementptr inbounds %struct.DBF, ptr %230, i32 0, i32 2
  %232 = load ptr, ptr %231, align 8, !tbaa !17
  %233 = call i64 @fread(ptr noundef %6, i64 noundef 1, i64 noundef %229, ptr noundef %232)
  store i64 %233, ptr %9, align 8, !tbaa !11
  %234 = load i64, ptr %9, align 8, !tbaa !11
  %235 = load i16, ptr %8, align 2, !tbaa !22
  %236 = zext i16 %235 to i64
  %237 = icmp ne i64 %234, %236
  br i1 %237, label %238, label %240

238:                                              ; preds = %227
  %239 = call i32 @errorex(i32 noundef 11)
  br label %240

240:                                              ; preds = %238, %227
  br label %241

241:                                              ; preds = %240, %209
  %242 = load ptr, ptr %13, align 8, !tbaa !9
  %243 = getelementptr inbounds %struct.DBF, ptr %242, i32 0, i32 4
  store i32 0, ptr %243, align 8, !tbaa !24
  %244 = load ptr, ptr %13, align 8, !tbaa !9
  %245 = getelementptr inbounds %struct.DBF, ptr %244, i32 0, i32 18
  %246 = getelementptr inbounds %struct.DBFPROLOG, ptr %245, i32 0, i32 6
  %247 = load i16, ptr %246, align 2, !tbaa !25
  %248 = zext i16 %247 to i32
  %249 = add nsw i32 %248, 1
  %250 = sext i32 %249 to i64
  %251 = call noalias ptr @malloc(i64 noundef %250) #9
  %252 = load ptr, ptr %13, align 8, !tbaa !9
  %253 = getelementptr inbounds %struct.DBF, ptr %252, i32 0, i32 17
  store ptr %251, ptr %253, align 8, !tbaa !26
  %254 = icmp eq ptr %251, null
  br i1 %254, label %255, label %257

255:                                              ; preds = %241
  %256 = call i32 @errorex(i32 noundef 12)
  br label %257

257:                                              ; preds = %255, %241
  store i8 0, ptr %7, align 1, !tbaa !27
  store i16 1, ptr %8, align 2, !tbaa !22
  br label %258

258:                                              ; preds = %289, %257
  %259 = load i8, ptr %7, align 1, !tbaa !27
  %260 = zext i8 %259 to i32
  %261 = load ptr, ptr %13, align 8, !tbaa !9
  %262 = getelementptr inbounds %struct.DBF, ptr %261, i32 0, i32 15
  %263 = load i8, ptr %262, align 8, !tbaa !21
  %264 = zext i8 %263 to i32
  %265 = icmp slt i32 %260, %264
  br i1 %265, label %266, label %292

266:                                              ; preds = %258
  %267 = load i16, ptr %8, align 2, !tbaa !22
  %268 = zext i16 %267 to i32
  %269 = load ptr, ptr %13, align 8, !tbaa !9
  %270 = getelementptr inbounds %struct.DBF, ptr %269, i32 0, i32 16
  %271 = load ptr, ptr %270, align 8, !tbaa !23
  %272 = load i8, ptr %7, align 1, !tbaa !27
  %273 = zext i8 %272 to i64
  %274 = getelementptr inbounds %struct.FIELD_RECORD, ptr %271, i64 %273
  %275 = getelementptr inbounds %struct.FIELD_RECORD, ptr %274, i32 0, i32 2
  store i32 %268, ptr %275, align 4, !tbaa !28
  %276 = load ptr, ptr %13, align 8, !tbaa !9
  %277 = getelementptr inbounds %struct.DBF, ptr %276, i32 0, i32 16
  %278 = load ptr, ptr %277, align 8, !tbaa !23
  %279 = load i8, ptr %7, align 1, !tbaa !27
  %280 = zext i8 %279 to i64
  %281 = getelementptr inbounds %struct.FIELD_RECORD, ptr %278, i64 %280
  %282 = getelementptr inbounds %struct.FIELD_RECORD, ptr %281, i32 0, i32 3
  %283 = load i8, ptr %282, align 4, !tbaa !30
  %284 = zext i8 %283 to i32
  %285 = load i16, ptr %8, align 2, !tbaa !22
  %286 = zext i16 %285 to i32
  %287 = add nsw i32 %286, %284
  %288 = trunc i32 %287 to i16
  store i16 %288, ptr %8, align 2, !tbaa !22
  br label %289

289:                                              ; preds = %266
  %290 = load i8, ptr %7, align 1, !tbaa !27
  %291 = add i8 %290, 1
  store i8 %291, ptr %7, align 1, !tbaa !27
  br label %258, !llvm.loop !31

292:                                              ; preds = %258
  %293 = load i16, ptr %8, align 2, !tbaa !22
  %294 = zext i16 %293 to i32
  %295 = load ptr, ptr %13, align 8, !tbaa !9
  %296 = getelementptr inbounds %struct.DBF, ptr %295, i32 0, i32 18
  %297 = getelementptr inbounds %struct.DBFPROLOG, ptr %296, i32 0, i32 6
  %298 = load i16, ptr %297, align 2, !tbaa !25
  %299 = zext i16 %298 to i32
  %300 = icmp ne i32 %294, %299
  br i1 %300, label %301, label %303

301:                                              ; preds = %292
  %302 = call i32 @errorex(i32 noundef 13)
  br label %303

303:                                              ; preds = %301, %292
  %304 = load ptr, ptr %13, align 8, !tbaa !9
  %305 = getelementptr inbounds %struct.DBF, ptr %304, i32 0, i32 5
  store i32 1, ptr %305, align 4, !tbaa !13
  %306 = load ptr, ptr %13, align 8, !tbaa !9
  %307 = getelementptr inbounds %struct.DBF, ptr %306, i32 0, i32 2
  %308 = load ptr, ptr %307, align 8, !tbaa !17
  %309 = load i32, ptr %10, align 4, !tbaa !5
  %310 = sub nsw i32 %309, 1
  %311 = load ptr, ptr %13, align 8, !tbaa !9
  %312 = getelementptr inbounds %struct.DBF, ptr %311, i32 0, i32 18
  %313 = getelementptr inbounds %struct.DBFPROLOG, ptr %312, i32 0, i32 6
  %314 = load i16, ptr %313, align 2, !tbaa !25
  %315 = zext i16 %314 to i32
  %316 = mul nsw i32 %310, %315
  %317 = sext i32 %316 to i64
  %318 = call i32 @fseek(ptr noundef %308, i64 noundef %317, i32 noundef 1)
  %319 = icmp ne i32 %318, 0
  br i1 %319, label %320, label %322

320:                                              ; preds = %303
  %321 = call i32 @errorex(i32 noundef 21)
  br label %322

322:                                              ; preds = %320, %303
  %323 = load ptr, ptr %13, align 8, !tbaa !9
  %324 = getelementptr inbounds %struct.DBF, ptr %323, i32 0, i32 2
  %325 = load ptr, ptr %324, align 8, !tbaa !17
  %326 = call i32 @fgetc(ptr noundef %325)
  store i32 %326, ptr %11, align 4, !tbaa !5
  %327 = load i32, ptr %11, align 4, !tbaa !5
  %328 = icmp ne i32 %327, 42
  br i1 %328, label %329, label %331

329:                                              ; preds = %322
  %330 = call i32 @errorex(i32 noundef 22)
  br label %331

331:                                              ; preds = %329, %322
  %332 = load ptr, ptr %13, align 8, !tbaa !9
  %333 = getelementptr inbounds %struct.DBF, ptr %332, i32 0, i32 2
  %334 = load ptr, ptr %333, align 8, !tbaa !17
  %335 = call i32 @fseek(ptr noundef %334, i64 noundef -1, i32 noundef 1)
  %336 = icmp ne i32 %335, 0
  br i1 %336, label %337, label %339

337:                                              ; preds = %331
  %338 = call i32 @errorex(i32 noundef 23)
  br label %339

339:                                              ; preds = %337, %331
  %340 = load ptr, ptr %13, align 8, !tbaa !9
  %341 = getelementptr inbounds %struct.DBF, ptr %340, i32 0, i32 2
  %342 = load ptr, ptr %341, align 8, !tbaa !17
  %343 = call i32 @fgetc(ptr noundef %342)
  store i32 %343, ptr %11, align 4, !tbaa !5
  %344 = load i32, ptr %11, align 4, !tbaa !5
  %345 = icmp ne i32 %344, 42
  br i1 %345, label %346, label %348

346:                                              ; preds = %339
  %347 = call i32 @errorex(i32 noundef 24)
  br label %348

348:                                              ; preds = %346, %339
  %349 = load ptr, ptr %13, align 8, !tbaa !9
  %350 = getelementptr inbounds %struct.DBF, ptr %349, i32 0, i32 2
  %351 = load ptr, ptr %350, align 8, !tbaa !17
  %352 = call i32 @fseek(ptr noundef %351, i64 noundef -1, i32 noundef 1)
  %353 = icmp ne i32 %352, 0
  br i1 %353, label %354, label %356

354:                                              ; preds = %348
  %355 = call i32 @errorex(i32 noundef 25)
  br label %356

356:                                              ; preds = %354, %348
  %357 = load ptr, ptr %13, align 8, !tbaa !9
  %358 = getelementptr inbounds %struct.DBF, ptr %357, i32 0, i32 2
  %359 = load ptr, ptr %358, align 8, !tbaa !17
  %360 = call i32 @fputc(i32 noundef 32, ptr noundef %359)
  %361 = icmp ne i32 %360, 32
  br i1 %361, label %362, label %364

362:                                              ; preds = %356
  %363 = call i32 @errorex(i32 noundef 30)
  br label %364

364:                                              ; preds = %362, %356
  %365 = load ptr, ptr %13, align 8, !tbaa !9
  %366 = getelementptr inbounds %struct.DBF, ptr %365, i32 0, i32 2
  %367 = load ptr, ptr %366, align 8, !tbaa !17
  %368 = call i32 @fclose(ptr noundef %367)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 2144, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 10, ptr %6) #7
  ret i32 0
}

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

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #2

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

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

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #4

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

declare i32 @fgetc(ptr noundef) #4

declare i32 @fseek(ptr noundef, i64 noundef, i32 noundef) #4

declare i32 @fputc(i32 noundef, ptr noundef) #4

declare i32 @fclose(ptr noundef) #4

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint nounwind willreturn memory(read) 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 = { 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 = { "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 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 2068}
!14 = !{!"DBF", !7, i64 0, !7, i64 1024, !10, i64 2048, !10, i64 2056, !6, i64 2064, !6, i64 2068, !7, i64 2072, !7, i64 2073, !7, i64 2074, !7, i64 2075, !7, i64 2076, !7, i64 2077, !7, i64 2078, !6, i64 2080, !6, i64 2084, !7, i64 2088, !10, i64 2096, !10, i64 2104, !15, i64 2112}
!15 = !{!"DBFPROLOG", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !6, i64 4, !16, i64 8, !16, i64 10, !16, i64 12, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 28, !7, i64 29}
!16 = !{!"short", !7, i64 0}
!17 = !{!14, !10, i64 2048}
!18 = !{!14, !7, i64 2112}
!19 = !{!14, !6, i64 2116}
!20 = !{!14, !16, i64 2120}
!21 = !{!14, !7, i64 2088}
!22 = !{!16, !16, i64 0}
!23 = !{!14, !10, i64 2096}
!24 = !{!14, !6, i64 2064}
!25 = !{!14, !16, i64 2122}
!26 = !{!14, !10, i64 2104}
!27 = !{!7, !7, i64 0}
!28 = !{!29, !6, i64 12}
!29 = !{!"FIELD_RECORD", !7, i64 0, !7, i64 11, !6, i64 12, !7, i64 16, !7, i64 17, !7, i64 18}
!30 = !{!29, !7, i64 16}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}


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

%struct.DBFPROLOG2 = type { i8, i16, i8, i8, i8, i16 }
%struct.DBF = type { [1024 x i8], [1024 x i8], ptr, ptr, i32, i32, i8, i8, i8, i8, i8, i8, i8, i32, i32, i8, ptr, ptr, %struct.DBFPROLOG }
%struct.DBFPROLOG = type { i8, i8, i8, i8, i32, i16, i16, i16, i8, i8, [12 x i8], i8, [3 x i8] }
%struct.FIELD_RECORD = type { [11 x i8], i8, i32, i8, i8, [14 x i8] }

@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @errorex(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca %struct.DBFPROLOG2, align 2
  %4 = alloca %struct.DBF, align 8
  call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 2144, ptr nonnull %4) #7
  %.not = icmp eq i32 %0, 3
  br i1 %.not, label %7, label %5

5:                                                ; preds = %2
  %6 = tail call i32 @errorex(i32 noundef 2)
  br label %7

7:                                                ; preds = %5, %2
  %8 = getelementptr inbounds i8, ptr %1, i64 16
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = tail call i32 @atoi(ptr nocapture noundef %9) #8
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %12, label %14

12:                                               ; preds = %7
  %13 = tail call i32 @errorex(i32 noundef 19)
  br label %14

14:                                               ; preds = %12, %7
  %15 = getelementptr inbounds i8, ptr %1, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %17 = call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) %16, i64 noundef 1024) #7
  %18 = getelementptr inbounds i8, ptr %4, i64 2068
  store i32 0, ptr %18, align 4, !tbaa !9
  %19 = call noalias ptr @fopen(ptr noundef nonnull %4, ptr noundef nonnull @.str.1)
  %20 = getelementptr inbounds i8, ptr %4, i64 2048
  store ptr %19, ptr %20, align 8, !tbaa !14
  %21 = icmp eq ptr %19, null
  br i1 %21, label %22, label %24

22:                                               ; preds = %14
  %23 = call i32 @errorex(i32 noundef 1)
  %.pre = load ptr, ptr %20, align 8, !tbaa !14
  br label %24

24:                                               ; preds = %22, %14
  %25 = phi ptr [ %.pre, %22 ], [ %19, %14 ]
  %26 = getelementptr inbounds i8, ptr %4, i64 2112
  %27 = call i64 @fread(ptr noundef nonnull %26, i64 noundef 1, i64 noundef 1, ptr noundef %25)
  %.not72 = icmp eq i64 %27, 1
  br i1 %.not72, label %30, label %28

28:                                               ; preds = %24
  %29 = call i32 @errorex(i32 noundef 3)
  br label %30

30:                                               ; preds = %28, %24
  %31 = load i8, ptr %26, align 8, !tbaa !15
  %32 = and i8 %31, 3
  switch i8 %32, label %default.unreachable99 [
    i8 1, label %33
    i8 2, label %35
    i8 3, label %37
    i8 0, label %68
  ]

33:                                               ; preds = %30
  %34 = call i32 @errorex(i32 noundef 4)
  br label %35

35:                                               ; preds = %33, %30
  %36 = call i32 @errorex(i32 noundef 5)
  br label %37

37:                                               ; preds = %35, %30
  %38 = getelementptr inbounds i8, ptr %4, i64 2113
  %39 = load ptr, ptr %20, align 8, !tbaa !14
  %40 = call i64 @fread(ptr noundef nonnull %38, i64 noundef 31, i64 noundef 1, ptr noundef %39)
  %.not73 = icmp eq i64 %40, 1
  br i1 %.not73, label %43, label %41

41:                                               ; preds = %37
  %42 = call i32 @errorex(i32 noundef 14)
  br label %43

43:                                               ; preds = %41, %37
  %44 = getelementptr inbounds i8, ptr %4, i64 2116
  %45 = load i32, ptr %44, align 4, !tbaa !16
  %46 = icmp ugt i32 %10, %45
  br i1 %46, label %47, label %49

47:                                               ; preds = %43
  %48 = call i32 @errorex(i32 noundef 20)
  br label %49

49:                                               ; preds = %47, %43
  %50 = getelementptr inbounds i8, ptr %4, i64 2120
  %51 = load i16, ptr %50, align 8, !tbaa !17
  %52 = zext i16 %51 to i32
  %53 = add nuw nsw i32 %52, 8159
  %54 = lshr i32 %53, 5
  %55 = trunc i32 %54 to i8
  %56 = getelementptr inbounds i8, ptr %4, i64 2088
  store i8 %55, ptr %56, align 8, !tbaa !18
  %57 = and i32 %53, 8160
  %58 = add nuw nsw i32 %57, 33
  %59 = icmp eq i32 %58, %52
  br i1 %59, label %60, label %63

60:                                               ; preds = %49
  %61 = load i8, ptr %26, align 8, !tbaa !15
  %62 = or i8 %61, 64
  store i8 %62, ptr %26, align 8, !tbaa !15
  br label %70

63:                                               ; preds = %49
  %64 = add nuw nsw i32 %57, 34
  %65 = icmp eq i32 %64, %52
  br i1 %65, label %70, label %66

66:                                               ; preds = %63
  %67 = call i32 @errorex(i32 noundef 16)
  br label %70

default.unreachable99:                            ; preds = %30
  unreachable

68:                                               ; preds = %30
  %69 = call i32 @errorex(i32 noundef 6)
  br label %70

70:                                               ; preds = %60, %63, %66, %68
  %71 = getelementptr inbounds i8, ptr %4, i64 2088
  %72 = load i8, ptr %71, align 8, !tbaa !18
  %73 = zext i8 %72 to i64
  %74 = shl nuw nsw i64 %73, 5
  %75 = call noalias ptr @malloc(i64 noundef %74) #9
  %76 = getelementptr inbounds i8, ptr %4, i64 2096
  store ptr %75, ptr %76, align 8, !tbaa !19
  %77 = icmp eq ptr %75, null
  br i1 %77, label %78, label %80

78:                                               ; preds = %70
  %79 = call i32 @errorex(i32 noundef 8)
  %.pre91 = load ptr, ptr %76, align 8, !tbaa !19
  %.pre92 = load i8, ptr %71, align 8, !tbaa !18
  %.pre96 = zext i8 %.pre92 to i64
  %.pre97 = shl nuw nsw i64 %.pre96, 5
  br label %80

80:                                               ; preds = %78, %70
  %.pre-phi98 = phi i64 [ %.pre97, %78 ], [ %74, %70 ]
  %81 = phi ptr [ %.pre91, %78 ], [ %75, %70 ]
  call void @llvm.memset.p0.i64(ptr align 4 %81, i8 0, i64 %.pre-phi98, i1 false)
  %82 = load ptr, ptr %76, align 8, !tbaa !19
  %83 = load i8, ptr %71, align 8, !tbaa !18
  %84 = zext i8 %83 to i64
  %85 = load ptr, ptr %20, align 8, !tbaa !14
  %86 = call i64 @fread(ptr noundef %82, i64 noundef 32, i64 noundef %84, ptr noundef %85)
  %87 = load i8, ptr %71, align 8, !tbaa !18
  %88 = zext i8 %87 to i64
  %.not74 = icmp eq i64 %86, %88
  br i1 %.not74, label %91, label %89

89:                                               ; preds = %80
  %90 = call i32 @errorex(i32 noundef 9)
  br label %91

91:                                               ; preds = %89, %80
  %92 = load ptr, ptr %20, align 8, !tbaa !14
  %93 = call i32 @fgetc(ptr noundef %92)
  %94 = and i32 %93, 65535
  %.not75 = icmp eq i32 %94, 13
  %.pre94 = load i8, ptr %71, align 8
  br i1 %.not75, label %101, label %95

95:                                               ; preds = %91
  %96 = load i8, ptr %26, align 8, !tbaa !15
  %97 = and i8 %96, 3
  %.not76 = icmp ne i8 %97, 2
  %98 = icmp ult i8 %.pre94, 32
  %or.cond = select i1 %.not76, i1 %98, i1 false
  br i1 %or.cond, label %99, label %101

99:                                               ; preds = %95
  %100 = call i32 @errorex(i32 noundef 10)
  %.pre93 = load i8, ptr %71, align 8, !tbaa !18
  br label %101

101:                                              ; preds = %99, %95, %91
  %102 = phi i8 [ %.pre93, %99 ], [ %.pre94, %95 ], [ %.pre94, %91 ]
  %103 = getelementptr inbounds i8, ptr %4, i64 2120
  %104 = load i16, ptr %103, align 8, !tbaa !17
  %105 = zext i8 %102 to i16
  %106 = shl nuw nsw i16 %105, 5
  %107 = add nuw nsw i16 %106, 33
  %.not77 = icmp eq i16 %104, %107
  br i1 %.not77, label %115, label %108

108:                                              ; preds = %101
  %109 = sub i16 %104, %107
  %110 = zext i16 %109 to i64
  %111 = load ptr, ptr %20, align 8, !tbaa !14
  %112 = call i64 @fread(ptr noundef nonnull %3, i64 noundef 1, i64 noundef %110, ptr noundef %111)
  %.not78 = icmp eq i64 %112, %110
  br i1 %.not78, label %115, label %113

113:                                              ; preds = %108
  %114 = call i32 @errorex(i32 noundef 11)
  br label %115

115:                                              ; preds = %108, %113, %101
  %116 = getelementptr inbounds i8, ptr %4, i64 2064
  store i32 0, ptr %116, align 8, !tbaa !20
  %117 = getelementptr inbounds i8, ptr %4, i64 2122
  %118 = load i16, ptr %117, align 2, !tbaa !21
  %119 = zext i16 %118 to i64
  %120 = add nuw nsw i64 %119, 1
  %121 = call noalias ptr @malloc(i64 noundef %120) #9
  %122 = getelementptr inbounds i8, ptr %4, i64 2104
  store ptr %121, ptr %122, align 8, !tbaa !22
  %123 = icmp eq ptr %121, null
  br i1 %123, label %124, label %126

124:                                              ; preds = %115
  %125 = call i32 @errorex(i32 noundef 12)
  br label %126

126:                                              ; preds = %124, %115
  %127 = load i8, ptr %71, align 8, !tbaa !18
  %.not89 = icmp eq i8 %127, 0
  br i1 %.not89, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %126
  %128 = load ptr, ptr %76, align 8, !tbaa !19
  %wide.trip.count = zext i8 %127 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %129 = icmp eq i8 %127, 1
  br i1 %129, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 254
  br label %130

130:                                              ; preds = %130, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.1, %130 ]
  %.06987 = phi i16 [ 1, %.lr.ph.new ], [ %142, %130 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %130 ]
  %131 = zext i16 %.06987 to i32
  %132 = getelementptr inbounds %struct.FIELD_RECORD, ptr %128, i64 %indvars.iv, i32 2
  store i32 %131, ptr %132, align 4, !tbaa !23
  %133 = getelementptr inbounds %struct.FIELD_RECORD, ptr %128, i64 %indvars.iv, i32 3
  %134 = load i8, ptr %133, align 4, !tbaa !25
  %135 = zext i8 %134 to i16
  %136 = add i16 %.06987, %135
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %137 = zext i16 %136 to i32
  %138 = getelementptr inbounds %struct.FIELD_RECORD, ptr %128, i64 %indvars.iv.next, i32 2
  store i32 %137, ptr %138, align 4, !tbaa !23
  %139 = getelementptr inbounds %struct.FIELD_RECORD, ptr %128, i64 %indvars.iv.next, i32 3
  %140 = load i8, ptr %139, align 4, !tbaa !25
  %141 = zext i8 %140 to i16
  %142 = add i16 %136, %141
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %130, !llvm.loop !26

._crit_edge.loopexit.unr-lcssa:                   ; preds = %130, %.lr.ph
  %.lcssa.ph = phi i16 [ poison, %.lr.ph ], [ %142, %130 ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.1, %130 ]
  %.06987.unr = phi i16 [ 1, %.lr.ph ], [ %142, %130 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %._crit_edge.loopexit.epilog-lcssa

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %143 = zext i16 %.06987.unr to i32
  %144 = getelementptr inbounds %struct.FIELD_RECORD, ptr %128, i64 %indvars.iv.unr, i32 2
  store i32 %143, ptr %144, align 4, !tbaa !23
  %145 = getelementptr inbounds %struct.FIELD_RECORD, ptr %128, i64 %indvars.iv.unr, i32 3
  %146 = load i8, ptr %145, align 4, !tbaa !25
  %147 = zext i8 %146 to i16
  %148 = add i16 %.06987.unr, %147
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %126
  %.069.lcssa = phi i16 [ 1, %126 ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %148, %._crit_edge.loopexit.epilog-lcssa ]
  %149 = load i16, ptr %117, align 2, !tbaa !21
  %.not79 = icmp eq i16 %.069.lcssa, %149
  br i1 %.not79, label %152, label %150

150:                                              ; preds = %._crit_edge
  %151 = call i32 @errorex(i32 noundef 13)
  %.pre95 = load i16, ptr %117, align 2, !tbaa !21
  br label %152

152:                                              ; preds = %150, %._crit_edge
  %153 = phi i16 [ %.pre95, %150 ], [ %.069.lcssa, %._crit_edge ]
  store i32 1, ptr %18, align 4, !tbaa !9
  %154 = load ptr, ptr %20, align 8, !tbaa !14
  %155 = add nsw i32 %10, -1
  %156 = zext i16 %153 to i32
  %157 = mul nsw i32 %155, %156
  %158 = sext i32 %157 to i64
  %159 = call i32 @fseek(ptr noundef %154, i64 noundef %158, i32 noundef 1)
  %.not80 = icmp eq i32 %159, 0
  br i1 %.not80, label %162, label %160

160:                                              ; preds = %152
  %161 = call i32 @errorex(i32 noundef 21)
  br label %162

162:                                              ; preds = %160, %152
  %163 = load ptr, ptr %20, align 8, !tbaa !14
  %164 = call i32 @fgetc(ptr noundef %163)
  %.not81 = icmp eq i32 %164, 42
  br i1 %.not81, label %167, label %165

165:                                              ; preds = %162
  %166 = call i32 @errorex(i32 noundef 22)
  br label %167

167:                                              ; preds = %165, %162
  %168 = load ptr, ptr %20, align 8, !tbaa !14
  %169 = call i32 @fseek(ptr noundef %168, i64 noundef -1, i32 noundef 1)
  %.not82 = icmp eq i32 %169, 0
  br i1 %.not82, label %172, label %170

170:                                              ; preds = %167
  %171 = call i32 @errorex(i32 noundef 23)
  br label %172

172:                                              ; preds = %170, %167
  %173 = load ptr, ptr %20, align 8, !tbaa !14
  %174 = call i32 @fgetc(ptr noundef %173)
  %.not83 = icmp eq i32 %174, 42
  br i1 %.not83, label %177, label %175

175:                                              ; preds = %172
  %176 = call i32 @errorex(i32 noundef 24)
  br label %177

177:                                              ; preds = %175, %172
  %178 = load ptr, ptr %20, align 8, !tbaa !14
  %179 = call i32 @fseek(ptr noundef %178, i64 noundef -1, i32 noundef 1)
  %.not84 = icmp eq i32 %179, 0
  br i1 %.not84, label %182, label %180

180:                                              ; preds = %177
  %181 = call i32 @errorex(i32 noundef 25)
  br label %182

182:                                              ; preds = %180, %177
  %183 = load ptr, ptr %20, align 8, !tbaa !14
  %184 = call i32 @fputc(i32 noundef 32, ptr noundef %183)
  %.not85 = icmp eq i32 %184, 32
  br i1 %.not85, label %187, label %185

185:                                              ; preds = %182
  %186 = call i32 @errorex(i32 noundef 30)
  br label %187

187:                                              ; preds = %185, %182
  %188 = load ptr, ptr %20, align 8, !tbaa !14
  %189 = call i32 @fclose(ptr noundef %188)
  call void @llvm.lifetime.end.p0(i64 2144, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %3) #7
  ret i32 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: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #2

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

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

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

; Function Attrs: nofree nounwind
declare noundef i32 @fseek(ptr nocapture noundef, i64 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @fputc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #4

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 #4 = { 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 #5 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { 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, !11, i64 2068}
!10 = !{!"DBF", !7, i64 0, !7, i64 1024, !6, i64 2048, !6, i64 2056, !11, i64 2064, !11, i64 2068, !7, i64 2072, !7, i64 2073, !7, i64 2074, !7, i64 2075, !7, i64 2076, !7, i64 2077, !7, i64 2078, !11, i64 2080, !11, i64 2084, !7, i64 2088, !6, i64 2096, !6, i64 2104, !12, i64 2112}
!11 = !{!"int", !7, i64 0}
!12 = !{!"DBFPROLOG", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !11, i64 4, !13, i64 8, !13, i64 10, !13, i64 12, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 28, !7, i64 29}
!13 = !{!"short", !7, i64 0}
!14 = !{!10, !6, i64 2048}
!15 = !{!10, !7, i64 2112}
!16 = !{!10, !11, i64 2116}
!17 = !{!10, !13, i64 2120}
!18 = !{!10, !7, i64 2088}
!19 = !{!10, !6, i64 2096}
!20 = !{!10, !11, i64 2064}
!21 = !{!10, !13, i64 2122}
!22 = !{!10, !6, i64 2104}
!23 = !{!24, !11, i64 12}
!24 = !{!"FIELD_RECORD", !7, i64 0, !7, i64 11, !11, i64 12, !7, i64 16, !7, i64 17, !7, i64 18}
!25 = !{!24, !7, i64 16}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


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