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

; 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.DBMANPROLOG = type { %union.anon, i16, i16, i8, i8, i8, i8, [17 x i16], i32, i16, i16, i16, [202 x i8], i16 }
%union.anon = type { i16 }
%struct.FIELD_RECORD2 = type { [11 x i8], i8, i8, i16, i8 }
%struct.FIELD_DBMAN = type { [11 x i8], i8, i16, i8, i8, i8, i8, [10 x i8] }
%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 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @dbf_open(ptr noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca %struct.DBFPROLOG2, align 2
  %5 = alloca %struct.DBMANPROLOG, align 4
  %6 = alloca [32 x %struct.FIELD_RECORD2], align 16
  %7 = alloca [128 x %struct.FIELD_DBMAN], align 16
  %8 = alloca i8, align 1
  %9 = alloca i16, align 2
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 10, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 260, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 576, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 3584, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 2, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store i64 0, ptr %10, align 8, !tbaa !9
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.DBF, ptr %12, i32 0, i32 5
  store i32 0, ptr %13, align 4, !tbaa !11
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.DBF, ptr %14, i32 0, i32 2
  %16 = load ptr, ptr %15, align 8, !tbaa !16
  %17 = icmp eq ptr %16, null
  br i1 %17, label %18, label %36

18:                                               ; preds = %1
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.DBF, ptr %19, i32 0, i32 0
  %21 = getelementptr inbounds [1024 x i8], ptr %20, i64 0, i64 0
  %22 = call noalias ptr @fopen(ptr noundef %21, ptr noundef @.str)
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.DBF, ptr %23, i32 0, i32 2
  store ptr %22, ptr %24, align 8, !tbaa !16
  %25 = icmp eq ptr %22, null
  br i1 %25, label %26, label %35

26:                                               ; preds = %18
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.DBF, ptr %27, i32 0, i32 0
  %29 = getelementptr inbounds [1024 x i8], ptr %28, i64 0, i64 0
  %30 = call noalias ptr @fopen(ptr noundef %29, ptr noundef @.str.1)
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.DBF, ptr %31, i32 0, i32 2
  store ptr %30, ptr %32, align 8, !tbaa !16
  %33 = icmp eq ptr %30, null
  br i1 %33, label %34, label %35

34:                                               ; preds = %26
  store i32 2, ptr %2, align 4
  store i32 1, ptr %11, align 4
  br label %656

35:                                               ; preds = %26, %18
  br label %36

36:                                               ; preds = %35, %1
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.DBF, ptr %37, i32 0, i32 18
  %39 = getelementptr inbounds %struct.DBFPROLOG, ptr %38, i32 0, i32 0
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.DBF, ptr %40, i32 0, i32 2
  %42 = load ptr, ptr %41, align 8, !tbaa !16
  %43 = call i64 @fread(ptr noundef %39, i64 noundef 1, i64 noundef 1, ptr noundef %42)
  store i64 %43, ptr %10, align 8, !tbaa !9
  %44 = load i64, ptr %10, align 8, !tbaa !9
  %45 = icmp ne i64 %44, 1
  br i1 %45, label %46, label %47

46:                                               ; preds = %36
  br label %647

47:                                               ; preds = %36
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.DBF, ptr %48, i32 0, i32 18
  %50 = getelementptr inbounds %struct.DBFPROLOG, ptr %49, i32 0, i32 0
  %51 = load i8, ptr %50, align 8, !tbaa !17
  %52 = zext i8 %51 to i32
  %53 = and i32 %52, 3
  switch i32 %53, label %308 [
    i32 1, label %54
    i32 2, label %172
    i32 3, label %240
    i32 4, label %240
  ]

54:                                               ; preds = %47
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.DBF, ptr %55, i32 0, i32 18
  %57 = getelementptr inbounds %struct.DBFPROLOG, ptr %56, i32 0, i32 0
  %58 = load i8, ptr %57, align 8, !tbaa !17
  %59 = getelementptr inbounds %struct.DBMANPROLOG, ptr %5, i32 0, i32 0
  %60 = getelementptr inbounds [2 x i8], ptr %59, i64 0, i64 0
  store i8 %58, ptr %60, align 4, !tbaa !18
  %61 = getelementptr inbounds %struct.DBMANPROLOG, ptr %5, i32 0, i32 0
  %62 = getelementptr inbounds [2 x i8], ptr %61, i64 0, i64 1
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.DBF, ptr %63, i32 0, i32 2
  %65 = load ptr, ptr %64, align 8, !tbaa !16
  %66 = call i64 @fread(ptr noundef %62, i64 noundef 259, i64 noundef 1, ptr noundef %65)
  store i64 %66, ptr %10, align 8, !tbaa !9
  %67 = load i64, ptr %10, align 8, !tbaa !9
  %68 = icmp ne i64 %67, 1
  br i1 %68, label %69, label %70

69:                                               ; preds = %54
  br label %647

70:                                               ; preds = %54
  %71 = getelementptr inbounds %struct.DBMANPROLOG, ptr %5, i32 0, i32 0
  %72 = load i16, ptr %71, align 4, !tbaa !18
  %73 = zext i16 %72 to i32
  %74 = icmp ne i32 %73, 11245
  br i1 %74, label %75, label %81

75:                                               ; preds = %70
  %76 = load ptr, ptr @stderr, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.DBMANPROLOG, ptr %5, i32 0, i32 0
  %78 = load i16, ptr %77, align 4, !tbaa !18
  %79 = zext i16 %78 to i32
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef @.str.2, i32 noundef %79) #6
  br label %647

81:                                               ; preds = %70
  %82 = getelementptr inbounds %struct.DBMANPROLOG, ptr %5, i32 0, i32 3
  %83 = load i8, ptr %82, align 2, !tbaa !19
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.DBF, ptr %84, i32 0, i32 18
  %86 = getelementptr inbounds %struct.DBFPROLOG, ptr %85, i32 0, i32 1
  store i8 %83, ptr %86, align 1, !tbaa !21
  %87 = getelementptr inbounds %struct.DBMANPROLOG, ptr %5, i32 0, i32 4
  %88 = load i8, ptr %87, align 1, !tbaa !22
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.DBF, ptr %89, i32 0, i32 18
  %91 = getelementptr inbounds %struct.DBFPROLOG, ptr %90, i32 0, i32 2
  store i8 %88, ptr %91, align 2, !tbaa !23
  %92 = getelementptr inbounds %struct.DBMANPROLOG, ptr %5, i32 0, i32 5
  %93 = load i8, ptr %92, align 4, !tbaa !24
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.DBF, ptr %94, i32 0, i32 18
  %96 = getelementptr inbounds %struct.DBFPROLOG, ptr %95, i32 0, i32 3
  store i8 %93, ptr %96, align 1, !tbaa !25
  %97 = getelementptr inbounds %struct.DBMANPROLOG, ptr %5, i32 0, i32 8
  %98 = load i32, ptr %97, align 4, !tbaa !26
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.DBF, ptr %99, i32 0, i32 18
  %101 = getelementptr inbounds %struct.DBFPROLOG, ptr %100, i32 0, i32 4
  store i32 %98, ptr %101, align 4, !tbaa !27
  %102 = getelementptr inbounds %struct.DBMANPROLOG, ptr %5, i32 0, i32 9
  %103 = load i16, ptr %102, align 4, !tbaa !28
  %104 = zext i16 %103 to i32
  %105 = add nsw i32 %104, 1
  %106 = trunc i32 %105 to i16
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.DBF, ptr %107, i32 0, i32 18
  %109 = getelementptr inbounds %struct.DBFPROLOG, ptr %108, i32 0, i32 6
  store i16 %106, ptr %109, align 2, !tbaa !29
  %110 = getelementptr inbounds %struct.DBMANPROLOG, ptr %5, i32 0, i32 11
  %111 = load i16, ptr %110, align 4, !tbaa !30
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.DBF, ptr %112, i32 0, i32 18
  %114 = getelementptr inbounds %struct.DBFPROLOG, ptr %113, i32 0, i32 5
  store i16 %111, ptr %114, align 8, !tbaa !31
  %115 = getelementptr inbounds %struct.DBMANPROLOG, ptr %5, i32 0, i32 13
  %116 = load i16, ptr %115, align 4, !tbaa !32
  %117 = trunc i16 %116 to i8
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.DBF, ptr %118, i32 0, i32 15
  store i8 %117, ptr %119, align 8, !tbaa !33
  %120 = getelementptr inbounds %struct.DBMANPROLOG, ptr %5, i32 0, i32 13
  %121 = load i16, ptr %120, align 4, !tbaa !32
  %122 = zext i16 %121 to i64
  %123 = mul i64 %122, 28
  %124 = getelementptr inbounds %struct.DBMANPROLOG, ptr %5, i32 0, i32 10
  %125 = load i16, ptr %124, align 2, !tbaa !34
  %126 = zext i16 %125 to i64
  %127 = sub i64 %126, 2
  %128 = icmp ne i64 %123, %127
  br i1 %128, label %138, label %129

129:                                              ; preds = %81
  %130 = getelementptr inbounds %struct.DBMANPROLOG, ptr %5, i32 0, i32 11
  %131 = load i16, ptr %130, align 4, !tbaa !30
  %132 = zext i16 %131 to i32
  %133 = getelementptr inbounds %struct.DBMANPROLOG, ptr %5, i32 0, i32 10
  %134 = load i16, ptr %133, align 2, !tbaa !34
  %135 = zext i16 %134 to i32
  %136 = add nsw i32 %135, 256
  %137 = icmp ne i32 %132, %136
  br i1 %137, label %138, label %141

138:                                              ; preds = %129, %81
  %139 = load ptr, ptr @stderr, align 8, !tbaa !5
  %140 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %139, ptr noundef @.str.3) #6
  br label %647

141:                                              ; preds = %129
  %142 = getelementptr inbounds [128 x %struct.FIELD_DBMAN], ptr %7, i64 0, i64 0
  %143 = load ptr, ptr %3, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.DBF, ptr %143, i32 0, i32 15
  %145 = load i8, ptr %144, align 8, !tbaa !33
  %146 = zext i8 %145 to i64
  %147 = load ptr, ptr %3, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.DBF, ptr %147, i32 0, i32 2
  %149 = load ptr, ptr %148, align 8, !tbaa !16
  %150 = call i64 @fread(ptr noundef %142, i64 noundef 28, i64 noundef %146, ptr noundef %149)
  store i64 %150, ptr %10, align 8, !tbaa !9
  %151 = load i64, ptr %10, align 8, !tbaa !9
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.DBF, ptr %152, i32 0, i32 15
  %154 = load i8, ptr %153, align 8, !tbaa !33
  %155 = zext i8 %154 to i64
  %156 = icmp ne i64 %151, %155
  br i1 %156, label %157, label %158

157:                                              ; preds = %141
  br label %647

158:                                              ; preds = %141
  store i8 0, ptr %8, align 1, !tbaa !18
  br label %159

159:                                              ; preds = %168, %158
  %160 = load i8, ptr %8, align 1, !tbaa !18
  %161 = zext i8 %160 to i32
  %162 = load ptr, ptr %3, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.DBF, ptr %162, i32 0, i32 15
  %164 = load i8, ptr %163, align 8, !tbaa !33
  %165 = zext i8 %164 to i32
  %166 = icmp slt i32 %161, %165
  br i1 %166, label %167, label %171

167:                                              ; preds = %159
  br label %168

168:                                              ; preds = %167
  %169 = load i8, ptr %8, align 1, !tbaa !18
  %170 = add i8 %169, 1
  store i8 %170, ptr %8, align 1, !tbaa !18
  br label %159, !llvm.loop !35

171:                                              ; preds = %159
  br label %317

172:                                              ; preds = %47
  %173 = getelementptr inbounds %struct.DBFPROLOG2, ptr %4, i32 0, i32 0
  %174 = getelementptr inbounds i8, ptr %173, i64 1
  %175 = load ptr, ptr %3, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.DBF, ptr %175, i32 0, i32 2
  %177 = load ptr, ptr %176, align 8, !tbaa !16
  %178 = call i64 @fread(ptr noundef %174, i64 noundef 9, i64 noundef 1, ptr noundef %177)
  store i64 %178, ptr %10, align 8, !tbaa !9
  %179 = load i64, ptr %10, align 8, !tbaa !9
  %180 = icmp ne i64 %179, 1
  br i1 %180, label %181, label %182

181:                                              ; preds = %172
  br label %647

182:                                              ; preds = %172
  %183 = getelementptr inbounds %struct.DBFPROLOG2, ptr %4, i32 0, i32 2
  %184 = load i8, ptr %183, align 2, !tbaa !37
  %185 = load ptr, ptr %3, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.DBF, ptr %185, i32 0, i32 18
  %187 = getelementptr inbounds %struct.DBFPROLOG, ptr %186, i32 0, i32 1
  store i8 %184, ptr %187, align 1, !tbaa !21
  %188 = getelementptr inbounds %struct.DBFPROLOG2, ptr %4, i32 0, i32 3
  %189 = load i8, ptr %188, align 1, !tbaa !39
  %190 = load ptr, ptr %3, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.DBF, ptr %190, i32 0, i32 18
  %192 = getelementptr inbounds %struct.DBFPROLOG, ptr %191, i32 0, i32 2
  store i8 %189, ptr %192, align 2, !tbaa !23
  %193 = getelementptr inbounds %struct.DBFPROLOG2, ptr %4, i32 0, i32 4
  %194 = load i8, ptr %193, align 2, !tbaa !40
  %195 = load ptr, ptr %3, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.DBF, ptr %195, i32 0, i32 18
  %197 = getelementptr inbounds %struct.DBFPROLOG, ptr %196, i32 0, i32 3
  store i8 %194, ptr %197, align 1, !tbaa !25
  %198 = getelementptr inbounds %struct.DBFPROLOG2, ptr %4, i32 0, i32 1
  %199 = load i16, ptr %198, align 2, !tbaa !41
  %200 = zext i16 %199 to i32
  %201 = load ptr, ptr %3, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.DBF, ptr %201, i32 0, i32 18
  %203 = getelementptr inbounds %struct.DBFPROLOG, ptr %202, i32 0, i32 4
  store i32 %200, ptr %203, align 4, !tbaa !27
  %204 = getelementptr inbounds %struct.DBFPROLOG2, ptr %4, i32 0, i32 5
  %205 = load i16, ptr %204, align 2, !tbaa !42
  %206 = load ptr, ptr %3, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.DBF, ptr %206, i32 0, i32 18
  %208 = getelementptr inbounds %struct.DBFPROLOG, ptr %207, i32 0, i32 6
  store i16 %205, ptr %208, align 2, !tbaa !29
  %209 = getelementptr inbounds [32 x %struct.FIELD_RECORD2], ptr %6, i64 0, i64 0
  %210 = load ptr, ptr %3, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.DBF, ptr %210, i32 0, i32 2
  %212 = load ptr, ptr %211, align 8, !tbaa !16
  %213 = call i64 @fread(ptr noundef %209, i64 noundef 18, i64 noundef 32, ptr noundef %212)
  store i64 %213, ptr %10, align 8, !tbaa !9
  %214 = load i64, ptr %10, align 8, !tbaa !9
  %215 = icmp ne i64 %214, 32
  br i1 %215, label %216, label %217

216:                                              ; preds = %182
  br label %647

217:                                              ; preds = %182
  store i8 0, ptr %8, align 1, !tbaa !18
  br label %218

218:                                              ; preds = %233, %217
  %219 = load i8, ptr %8, align 1, !tbaa !18
  %220 = zext i8 %219 to i32
  %221 = icmp slt i32 %220, 32
  br i1 %221, label %222, label %236

222:                                              ; preds = %218
  %223 = load i8, ptr %8, align 1, !tbaa !18
  %224 = zext i8 %223 to i64
  %225 = getelementptr inbounds [32 x %struct.FIELD_RECORD2], ptr %6, i64 0, i64 %224
  %226 = getelementptr inbounds %struct.FIELD_RECORD2, ptr %225, i32 0, i32 0
  %227 = getelementptr inbounds [11 x i8], ptr %226, i64 0, i64 0
  %228 = load i8, ptr %227, align 2, !tbaa !18
  %229 = sext i8 %228 to i32
  %230 = icmp eq i32 %229, 13
  br i1 %230, label %231, label %232

231:                                              ; preds = %222
  br label %236

232:                                              ; preds = %222
  br label %233

233:                                              ; preds = %232
  %234 = load i8, ptr %8, align 1, !tbaa !18
  %235 = add i8 %234, 1
  store i8 %235, ptr %8, align 1, !tbaa !18
  br label %218, !llvm.loop !43

236:                                              ; preds = %231, %218
  %237 = load i8, ptr %8, align 1, !tbaa !18
  %238 = load ptr, ptr %3, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.DBF, ptr %238, i32 0, i32 15
  store i8 %237, ptr %239, align 8, !tbaa !33
  br label %317

240:                                              ; preds = %47, %47
  %241 = load ptr, ptr %3, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.DBF, ptr %241, i32 0, i32 18
  %243 = getelementptr inbounds %struct.DBFPROLOG, ptr %242, i32 0, i32 0
  %244 = getelementptr inbounds i8, ptr %243, i64 1
  %245 = load ptr, ptr %3, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.DBF, ptr %245, i32 0, i32 2
  %247 = load ptr, ptr %246, align 8, !tbaa !16
  %248 = call i64 @fread(ptr noundef %244, i64 noundef 31, i64 noundef 1, ptr noundef %247)
  store i64 %248, ptr %10, align 8, !tbaa !9
  %249 = load i64, ptr %10, align 8, !tbaa !9
  %250 = icmp ne i64 %249, 1
  br i1 %250, label %251, label %252

251:                                              ; preds = %240
  br label %647

252:                                              ; preds = %240
  %253 = load ptr, ptr %3, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.DBF, ptr %253, i32 0, i32 18
  %255 = getelementptr inbounds %struct.DBFPROLOG, ptr %254, i32 0, i32 5
  %256 = load i16, ptr %255, align 8, !tbaa !31
  %257 = zext i16 %256 to i32
  %258 = sub i32 %257, 33
  %259 = udiv i32 %258, 32
  %260 = trunc i32 %259 to i8
  %261 = load ptr, ptr %3, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.DBF, ptr %261, i32 0, i32 15
  store i8 %260, ptr %262, align 8, !tbaa !33
  %263 = load ptr, ptr %3, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.DBF, ptr %263, i32 0, i32 15
  %265 = load i8, ptr %264, align 8, !tbaa !33
  %266 = zext i8 %265 to i32
  %267 = mul i32 %266, 32
  %268 = add i32 32, %267
  %269 = add i32 %268, 1
  %270 = trunc i32 %269 to i16
  store i16 %270, ptr %9, align 2, !tbaa !44
  %271 = load ptr, ptr %3, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.DBF, ptr %271, i32 0, i32 18
  %273 = getelementptr inbounds %struct.DBFPROLOG, ptr %272, i32 0, i32 5
  %274 = load i16, ptr %273, align 8, !tbaa !31
  %275 = zext i16 %274 to i32
  %276 = load i16, ptr %9, align 2, !tbaa !44
  %277 = zext i16 %276 to i32
  %278 = icmp eq i32 %275, %277
  br i1 %278, label %279, label %287

279:                                              ; preds = %252
  %280 = load ptr, ptr %3, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.DBF, ptr %280, i32 0, i32 18
  %282 = getelementptr inbounds %struct.DBFPROLOG, ptr %281, i32 0, i32 0
  %283 = load i8, ptr %282, align 8, !tbaa !17
  %284 = zext i8 %283 to i32
  %285 = or i32 %284, 64
  %286 = trunc i32 %285 to i8
  store i8 %286, ptr %282, align 8, !tbaa !17
  br label %307

287:                                              ; preds = %252
  %288 = load ptr, ptr %3, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.DBF, ptr %288, i32 0, i32 18
  %290 = getelementptr inbounds %struct.DBFPROLOG, ptr %289, i32 0, i32 5
  %291 = load i16, ptr %290, align 8, !tbaa !31
  %292 = zext i16 %291 to i32
  %293 = load i16, ptr %9, align 2, !tbaa !44
  %294 = zext i16 %293 to i32
  %295 = add nsw i32 %294, 1
  %296 = icmp eq i32 %292, %295
  br i1 %296, label %297, label %298

297:                                              ; preds = %287
  br label %306

298:                                              ; preds = %287
  %299 = load ptr, ptr @stderr, align 8, !tbaa !5
  %300 = load ptr, ptr %3, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.DBF, ptr %300, i32 0, i32 18
  %302 = getelementptr inbounds %struct.DBFPROLOG, ptr %301, i32 0, i32 5
  %303 = load i16, ptr %302, align 8, !tbaa !31
  %304 = zext i16 %303 to i32
  %305 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %299, ptr noundef @.str.4, i32 noundef %304) #6
  br label %647

306:                                              ; preds = %297
  br label %307

307:                                              ; preds = %306, %279
  br label %317

308:                                              ; preds = %47
  %309 = load ptr, ptr @stderr, align 8, !tbaa !5
  %310 = load ptr, ptr %3, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.DBF, ptr %310, i32 0, i32 18
  %312 = getelementptr inbounds %struct.DBFPROLOG, ptr %311, i32 0, i32 0
  %313 = load i8, ptr %312, align 8, !tbaa !17
  %314 = zext i8 %313 to i32
  %315 = and i32 %314, 3
  %316 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %309, ptr noundef @.str.5, i32 noundef %315) #6
  br label %647

317:                                              ; preds = %307, %236, %171
  %318 = load ptr, ptr %3, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.DBF, ptr %318, i32 0, i32 15
  %320 = load i8, ptr %319, align 8, !tbaa !33
  %321 = zext i8 %320 to i32
  %322 = mul i32 %321, 32
  %323 = zext i32 %322 to i64
  %324 = call noalias ptr @malloc(i64 noundef %323) #7
  %325 = load ptr, ptr %3, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.DBF, ptr %325, i32 0, i32 16
  store ptr %324, ptr %326, align 8, !tbaa !45
  %327 = icmp eq ptr %324, null
  br i1 %327, label %328, label %329

328:                                              ; preds = %317
  store i32 8, ptr %2, align 4
  store i32 1, ptr %11, align 4
  br label %656

329:                                              ; preds = %317
  %330 = load ptr, ptr %3, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.DBF, ptr %330, i32 0, i32 16
  %332 = load ptr, ptr %331, align 8, !tbaa !45
  %333 = load ptr, ptr %3, align 8, !tbaa !5
  %334 = getelementptr inbounds %struct.DBF, ptr %333, i32 0, i32 15
  %335 = load i8, ptr %334, align 8, !tbaa !33
  %336 = zext i8 %335 to i32
  %337 = mul i32 %336, 32
  %338 = zext i32 %337 to i64
  call void @llvm.memset.p0.i64(ptr align 4 %332, i8 0, i64 %338, i1 false)
  %339 = load ptr, ptr %3, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.DBF, ptr %339, i32 0, i32 18
  %341 = getelementptr inbounds %struct.DBFPROLOG, ptr %340, i32 0, i32 0
  %342 = load i8, ptr %341, align 8, !tbaa !17
  %343 = zext i8 %342 to i32
  %344 = and i32 %343, 3
  switch i32 %344, label %494 [
    i32 1, label %345
    i32 2, label %410
    i32 3, label %474
    i32 4, label %474
  ]

345:                                              ; preds = %329
  store i8 0, ptr %8, align 1, !tbaa !18
  br label %346

346:                                              ; preds = %406, %345
  %347 = load i8, ptr %8, align 1, !tbaa !18
  %348 = zext i8 %347 to i32
  %349 = load ptr, ptr %3, align 8, !tbaa !5
  %350 = getelementptr inbounds %struct.DBF, ptr %349, i32 0, i32 15
  %351 = load i8, ptr %350, align 8, !tbaa !33
  %352 = zext i8 %351 to i32
  %353 = icmp slt i32 %348, %352
  br i1 %353, label %354, label %409

354:                                              ; preds = %346
  %355 = load ptr, ptr %3, align 8, !tbaa !5
  %356 = getelementptr inbounds %struct.DBF, ptr %355, i32 0, i32 16
  %357 = load ptr, ptr %356, align 8, !tbaa !45
  %358 = load i8, ptr %8, align 1, !tbaa !18
  %359 = zext i8 %358 to i64
  %360 = getelementptr inbounds %struct.FIELD_RECORD, ptr %357, i64 %359
  %361 = getelementptr inbounds %struct.FIELD_RECORD, ptr %360, i32 0, i32 0
  %362 = getelementptr inbounds [11 x i8], ptr %361, i64 0, i64 0
  %363 = load i8, ptr %8, align 1, !tbaa !18
  %364 = zext i8 %363 to i64
  %365 = getelementptr inbounds [128 x %struct.FIELD_DBMAN], ptr %7, i64 0, i64 %364
  %366 = getelementptr inbounds %struct.FIELD_DBMAN, ptr %365, i32 0, i32 0
  %367 = getelementptr inbounds [11 x i8], ptr %366, i64 0, i64 0
  %368 = call ptr @strncpy(ptr noundef %362, ptr noundef %367, i64 noundef 11) #6
  %369 = load i8, ptr %8, align 1, !tbaa !18
  %370 = zext i8 %369 to i64
  %371 = getelementptr inbounds [128 x %struct.FIELD_DBMAN], ptr %7, i64 0, i64 %370
  %372 = getelementptr inbounds %struct.FIELD_DBMAN, ptr %371, i32 0, i32 1
  %373 = load i8, ptr %372, align 1, !tbaa !46
  %374 = load ptr, ptr %3, align 8, !tbaa !5
  %375 = getelementptr inbounds %struct.DBF, ptr %374, i32 0, i32 16
  %376 = load ptr, ptr %375, align 8, !tbaa !45
  %377 = load i8, ptr %8, align 1, !tbaa !18
  %378 = zext i8 %377 to i64
  %379 = getelementptr inbounds %struct.FIELD_RECORD, ptr %376, i64 %378
  %380 = getelementptr inbounds %struct.FIELD_RECORD, ptr %379, i32 0, i32 1
  store i8 %373, ptr %380, align 1, !tbaa !48
  %381 = load i8, ptr %8, align 1, !tbaa !18
  %382 = zext i8 %381 to i64
  %383 = getelementptr inbounds [128 x %struct.FIELD_DBMAN], ptr %7, i64 0, i64 %382
  %384 = getelementptr inbounds %struct.FIELD_DBMAN, ptr %383, i32 0, i32 2
  %385 = load i16, ptr %384, align 4, !tbaa !50
  %386 = trunc i16 %385 to i8
  %387 = load ptr, ptr %3, align 8, !tbaa !5
  %388 = getelementptr inbounds %struct.DBF, ptr %387, i32 0, i32 16
  %389 = load ptr, ptr %388, align 8, !tbaa !45
  %390 = load i8, ptr %8, align 1, !tbaa !18
  %391 = zext i8 %390 to i64
  %392 = getelementptr inbounds %struct.FIELD_RECORD, ptr %389, i64 %391
  %393 = getelementptr inbounds %struct.FIELD_RECORD, ptr %392, i32 0, i32 3
  store i8 %386, ptr %393, align 4, !tbaa !51
  %394 = load i8, ptr %8, align 1, !tbaa !18
  %395 = zext i8 %394 to i64
  %396 = getelementptr inbounds [128 x %struct.FIELD_DBMAN], ptr %7, i64 0, i64 %395
  %397 = getelementptr inbounds %struct.FIELD_DBMAN, ptr %396, i32 0, i32 3
  %398 = load i8, ptr %397, align 2, !tbaa !52
  %399 = load ptr, ptr %3, align 8, !tbaa !5
  %400 = getelementptr inbounds %struct.DBF, ptr %399, i32 0, i32 16
  %401 = load ptr, ptr %400, align 8, !tbaa !45
  %402 = load i8, ptr %8, align 1, !tbaa !18
  %403 = zext i8 %402 to i64
  %404 = getelementptr inbounds %struct.FIELD_RECORD, ptr %401, i64 %403
  %405 = getelementptr inbounds %struct.FIELD_RECORD, ptr %404, i32 0, i32 4
  store i8 %398, ptr %405, align 1, !tbaa !53
  br label %406

406:                                              ; preds = %354
  %407 = load i8, ptr %8, align 1, !tbaa !18
  %408 = add i8 %407, 1
  store i8 %408, ptr %8, align 1, !tbaa !18
  br label %346, !llvm.loop !54

409:                                              ; preds = %346
  br label %494

410:                                              ; preds = %329
  store i8 0, ptr %8, align 1, !tbaa !18
  br label %411

411:                                              ; preds = %470, %410
  %412 = load i8, ptr %8, align 1, !tbaa !18
  %413 = zext i8 %412 to i32
  %414 = load ptr, ptr %3, align 8, !tbaa !5
  %415 = getelementptr inbounds %struct.DBF, ptr %414, i32 0, i32 15
  %416 = load i8, ptr %415, align 8, !tbaa !33
  %417 = zext i8 %416 to i32
  %418 = icmp slt i32 %413, %417
  br i1 %418, label %419, label %473

419:                                              ; preds = %411
  %420 = load ptr, ptr %3, align 8, !tbaa !5
  %421 = getelementptr inbounds %struct.DBF, ptr %420, i32 0, i32 16
  %422 = load ptr, ptr %421, align 8, !tbaa !45
  %423 = load i8, ptr %8, align 1, !tbaa !18
  %424 = zext i8 %423 to i64
  %425 = getelementptr inbounds %struct.FIELD_RECORD, ptr %422, i64 %424
  %426 = getelementptr inbounds %struct.FIELD_RECORD, ptr %425, i32 0, i32 0
  %427 = getelementptr inbounds [11 x i8], ptr %426, i64 0, i64 0
  %428 = load i8, ptr %8, align 1, !tbaa !18
  %429 = zext i8 %428 to i64
  %430 = getelementptr inbounds [32 x %struct.FIELD_RECORD2], ptr %6, i64 0, i64 %429
  %431 = getelementptr inbounds %struct.FIELD_RECORD2, ptr %430, i32 0, i32 0
  %432 = getelementptr inbounds [11 x i8], ptr %431, i64 0, i64 0
  %433 = call ptr @strncpy(ptr noundef %427, ptr noundef %432, i64 noundef 11) #6
  %434 = load i8, ptr %8, align 1, !tbaa !18
  %435 = zext i8 %434 to i64
  %436 = getelementptr inbounds [32 x %struct.FIELD_RECORD2], ptr %6, i64 0, i64 %435
  %437 = getelementptr inbounds %struct.FIELD_RECORD2, ptr %436, i32 0, i32 1
  %438 = load i8, ptr %437, align 1, !tbaa !55
  %439 = load ptr, ptr %3, align 8, !tbaa !5
  %440 = getelementptr inbounds %struct.DBF, ptr %439, i32 0, i32 16
  %441 = load ptr, ptr %440, align 8, !tbaa !45
  %442 = load i8, ptr %8, align 1, !tbaa !18
  %443 = zext i8 %442 to i64
  %444 = getelementptr inbounds %struct.FIELD_RECORD, ptr %441, i64 %443
  %445 = getelementptr inbounds %struct.FIELD_RECORD, ptr %444, i32 0, i32 1
  store i8 %438, ptr %445, align 1, !tbaa !48
  %446 = load i8, ptr %8, align 1, !tbaa !18
  %447 = zext i8 %446 to i64
  %448 = getelementptr inbounds [32 x %struct.FIELD_RECORD2], ptr %6, i64 0, i64 %447
  %449 = getelementptr inbounds %struct.FIELD_RECORD2, ptr %448, i32 0, i32 2
  %450 = load i8, ptr %449, align 2, !tbaa !57
  %451 = load ptr, ptr %3, align 8, !tbaa !5
  %452 = getelementptr inbounds %struct.DBF, ptr %451, i32 0, i32 16
  %453 = load ptr, ptr %452, align 8, !tbaa !45
  %454 = load i8, ptr %8, align 1, !tbaa !18
  %455 = zext i8 %454 to i64
  %456 = getelementptr inbounds %struct.FIELD_RECORD, ptr %453, i64 %455
  %457 = getelementptr inbounds %struct.FIELD_RECORD, ptr %456, i32 0, i32 3
  store i8 %450, ptr %457, align 4, !tbaa !51
  %458 = load i8, ptr %8, align 1, !tbaa !18
  %459 = zext i8 %458 to i64
  %460 = getelementptr inbounds [32 x %struct.FIELD_RECORD2], ptr %6, i64 0, i64 %459
  %461 = getelementptr inbounds %struct.FIELD_RECORD2, ptr %460, i32 0, i32 4
  %462 = load i8, ptr %461, align 2, !tbaa !58
  %463 = load ptr, ptr %3, align 8, !tbaa !5
  %464 = getelementptr inbounds %struct.DBF, ptr %463, i32 0, i32 16
  %465 = load ptr, ptr %464, align 8, !tbaa !45
  %466 = load i8, ptr %8, align 1, !tbaa !18
  %467 = zext i8 %466 to i64
  %468 = getelementptr inbounds %struct.FIELD_RECORD, ptr %465, i64 %467
  %469 = getelementptr inbounds %struct.FIELD_RECORD, ptr %468, i32 0, i32 4
  store i8 %462, ptr %469, align 1, !tbaa !53
  br label %470

470:                                              ; preds = %419
  %471 = load i8, ptr %8, align 1, !tbaa !18
  %472 = add i8 %471, 1
  store i8 %472, ptr %8, align 1, !tbaa !18
  br label %411, !llvm.loop !59

473:                                              ; preds = %411
  br label %494

474:                                              ; preds = %329, %329
  %475 = load ptr, ptr %3, align 8, !tbaa !5
  %476 = getelementptr inbounds %struct.DBF, ptr %475, i32 0, i32 16
  %477 = load ptr, ptr %476, align 8, !tbaa !45
  %478 = load ptr, ptr %3, align 8, !tbaa !5
  %479 = getelementptr inbounds %struct.DBF, ptr %478, i32 0, i32 15
  %480 = load i8, ptr %479, align 8, !tbaa !33
  %481 = zext i8 %480 to i64
  %482 = load ptr, ptr %3, align 8, !tbaa !5
  %483 = getelementptr inbounds %struct.DBF, ptr %482, i32 0, i32 2
  %484 = load ptr, ptr %483, align 8, !tbaa !16
  %485 = call i64 @fread(ptr noundef %477, i64 noundef 32, i64 noundef %481, ptr noundef %484)
  store i64 %485, ptr %10, align 8, !tbaa !9
  %486 = load i64, ptr %10, align 8, !tbaa !9
  %487 = load ptr, ptr %3, align 8, !tbaa !5
  %488 = getelementptr inbounds %struct.DBF, ptr %487, i32 0, i32 15
  %489 = load i8, ptr %488, align 8, !tbaa !33
  %490 = zext i8 %489 to i64
  %491 = icmp ne i64 %486, %490
  br i1 %491, label %492, label %493

492:                                              ; preds = %474
  br label %647

493:                                              ; preds = %474
  br label %494

494:                                              ; preds = %493, %473, %409, %329
  %495 = load ptr, ptr %3, align 8, !tbaa !5
  %496 = getelementptr inbounds %struct.DBF, ptr %495, i32 0, i32 18
  %497 = getelementptr inbounds %struct.DBFPROLOG, ptr %496, i32 0, i32 0
  %498 = load i8, ptr %497, align 8, !tbaa !17
  %499 = zext i8 %498 to i32
  %500 = and i32 %499, 3
  %501 = icmp ne i32 %500, 1
  br i1 %501, label %502, label %580

502:                                              ; preds = %494
  %503 = load ptr, ptr %3, align 8, !tbaa !5
  %504 = getelementptr inbounds %struct.DBF, ptr %503, i32 0, i32 2
  %505 = load ptr, ptr %504, align 8, !tbaa !16
  %506 = call i32 @fgetc(ptr noundef %505)
  %507 = trunc i32 %506 to i16
  store i16 %507, ptr %9, align 2, !tbaa !44
  %508 = zext i16 %507 to i32
  %509 = icmp ne i32 %508, 13
  br i1 %509, label %510, label %527

510:                                              ; preds = %502
  %511 = load ptr, ptr %3, align 8, !tbaa !5
  %512 = getelementptr inbounds %struct.DBF, ptr %511, i32 0, i32 18
  %513 = getelementptr inbounds %struct.DBFPROLOG, ptr %512, i32 0, i32 0
  %514 = load i8, ptr %513, align 8, !tbaa !17
  %515 = zext i8 %514 to i32
  %516 = and i32 %515, 3
  %517 = icmp ne i32 %516, 2
  br i1 %517, label %518, label %527

518:                                              ; preds = %510
  %519 = load ptr, ptr %3, align 8, !tbaa !5
  %520 = getelementptr inbounds %struct.DBF, ptr %519, i32 0, i32 15
  %521 = load i8, ptr %520, align 8, !tbaa !33
  %522 = zext i8 %521 to i32
  %523 = icmp slt i32 %522, 32
  br i1 %523, label %524, label %527

524:                                              ; preds = %518
  %525 = load ptr, ptr @stderr, align 8, !tbaa !5
  %526 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %525, ptr noundef @.str.6) #6
  store i32 11, ptr %2, align 4
  store i32 1, ptr %11, align 4
  br label %656

527:                                              ; preds = %518, %510, %502
  %528 = load ptr, ptr %3, align 8, !tbaa !5
  %529 = getelementptr inbounds %struct.DBF, ptr %528, i32 0, i32 18
  %530 = getelementptr inbounds %struct.DBFPROLOG, ptr %529, i32 0, i32 5
  %531 = load i16, ptr %530, align 8, !tbaa !31
  %532 = zext i16 %531 to i32
  %533 = load ptr, ptr %3, align 8, !tbaa !5
  %534 = getelementptr inbounds %struct.DBF, ptr %533, i32 0, i32 15
  %535 = load i8, ptr %534, align 8, !tbaa !33
  %536 = zext i8 %535 to i32
  %537 = mul i32 %536, 32
  %538 = add i32 32, %537
  %539 = add i32 %538, 1
  %540 = sub i32 %532, %539
  %541 = trunc i32 %540 to i16
  store i16 %541, ptr %9, align 2, !tbaa !44
  %542 = load ptr, ptr %3, align 8, !tbaa !5
  %543 = getelementptr inbounds %struct.DBF, ptr %542, i32 0, i32 18
  %544 = getelementptr inbounds %struct.DBFPROLOG, ptr %543, i32 0, i32 0
  %545 = load i8, ptr %544, align 8, !tbaa !17
  %546 = zext i8 %545 to i32
  %547 = and i32 %546, 3
  %548 = icmp eq i32 %547, 3
  br i1 %548, label %549, label %562

549:                                              ; preds = %527
  %550 = load ptr, ptr %3, align 8, !tbaa !5
  %551 = getelementptr inbounds %struct.DBF, ptr %550, i32 0, i32 18
  %552 = getelementptr inbounds %struct.DBFPROLOG, ptr %551, i32 0, i32 0
  %553 = load i8, ptr %552, align 8, !tbaa !17
  %554 = zext i8 %553 to i32
  %555 = and i32 %554, 64
  %556 = icmp ne i32 %555, 0
  br i1 %556, label %562, label %557

557:                                              ; preds = %549
  %558 = load i16, ptr %9, align 2, !tbaa !44
  %559 = zext i16 %558 to i32
  %560 = icmp ne i32 %559, 1
  br i1 %560, label %561, label %562

561:                                              ; preds = %557
  call void (ptr, ...) @lib_mesg(ptr noundef @.str.7)
  br label %562

562:                                              ; preds = %561, %557, %549, %527
  %563 = load i16, ptr %9, align 2, !tbaa !44
  %564 = zext i16 %563 to i32
  %565 = icmp sgt i32 %564, 0
  br i1 %565, label %566, label %579

566:                                              ; preds = %562
  %567 = load i16, ptr %9, align 2, !tbaa !44
  %568 = zext i16 %567 to i64
  %569 = load ptr, ptr %3, align 8, !tbaa !5
  %570 = getelementptr inbounds %struct.DBF, ptr %569, i32 0, i32 2
  %571 = load ptr, ptr %570, align 8, !tbaa !16
  %572 = call i64 @fread(ptr noundef %4, i64 noundef 1, i64 noundef %568, ptr noundef %571)
  store i64 %572, ptr %10, align 8, !tbaa !9
  %573 = load i64, ptr %10, align 8, !tbaa !9
  %574 = load i16, ptr %9, align 2, !tbaa !44
  %575 = zext i16 %574 to i64
  %576 = icmp ne i64 %573, %575
  br i1 %576, label %577, label %578

577:                                              ; preds = %566
  br label %647

578:                                              ; preds = %566
  br label %579

579:                                              ; preds = %578, %562
  br label %580

580:                                              ; preds = %579, %494
  %581 = load ptr, ptr %3, align 8, !tbaa !5
  %582 = getelementptr inbounds %struct.DBF, ptr %581, i32 0, i32 4
  store i32 0, ptr %582, align 8, !tbaa !60
  %583 = load ptr, ptr %3, align 8, !tbaa !5
  %584 = getelementptr inbounds %struct.DBF, ptr %583, i32 0, i32 18
  %585 = getelementptr inbounds %struct.DBFPROLOG, ptr %584, i32 0, i32 6
  %586 = load i16, ptr %585, align 2, !tbaa !29
  %587 = zext i16 %586 to i32
  %588 = add nsw i32 %587, 1
  %589 = sext i32 %588 to i64
  %590 = call noalias ptr @malloc(i64 noundef %589) #7
  %591 = load ptr, ptr %3, align 8, !tbaa !5
  %592 = getelementptr inbounds %struct.DBF, ptr %591, i32 0, i32 17
  store ptr %590, ptr %592, align 8, !tbaa !61
  %593 = icmp eq ptr %590, null
  br i1 %593, label %594, label %595

594:                                              ; preds = %580
  store i32 8, ptr %2, align 4
  store i32 1, ptr %11, align 4
  br label %656

595:                                              ; preds = %580
  store i8 0, ptr %8, align 1, !tbaa !18
  store i16 1, ptr %9, align 2, !tbaa !44
  br label %596

596:                                              ; preds = %627, %595
  %597 = load i8, ptr %8, align 1, !tbaa !18
  %598 = zext i8 %597 to i32
  %599 = load ptr, ptr %3, align 8, !tbaa !5
  %600 = getelementptr inbounds %struct.DBF, ptr %599, i32 0, i32 15
  %601 = load i8, ptr %600, align 8, !tbaa !33
  %602 = zext i8 %601 to i32
  %603 = icmp slt i32 %598, %602
  br i1 %603, label %604, label %630

604:                                              ; preds = %596
  %605 = load i16, ptr %9, align 2, !tbaa !44
  %606 = zext i16 %605 to i32
  %607 = load ptr, ptr %3, align 8, !tbaa !5
  %608 = getelementptr inbounds %struct.DBF, ptr %607, i32 0, i32 16
  %609 = load ptr, ptr %608, align 8, !tbaa !45
  %610 = load i8, ptr %8, align 1, !tbaa !18
  %611 = zext i8 %610 to i64
  %612 = getelementptr inbounds %struct.FIELD_RECORD, ptr %609, i64 %611
  %613 = getelementptr inbounds %struct.FIELD_RECORD, ptr %612, i32 0, i32 2
  store i32 %606, ptr %613, align 4, !tbaa !62
  %614 = load ptr, ptr %3, align 8, !tbaa !5
  %615 = getelementptr inbounds %struct.DBF, ptr %614, i32 0, i32 16
  %616 = load ptr, ptr %615, align 8, !tbaa !45
  %617 = load i8, ptr %8, align 1, !tbaa !18
  %618 = zext i8 %617 to i64
  %619 = getelementptr inbounds %struct.FIELD_RECORD, ptr %616, i64 %618
  %620 = getelementptr inbounds %struct.FIELD_RECORD, ptr %619, i32 0, i32 3
  %621 = load i8, ptr %620, align 4, !tbaa !51
  %622 = zext i8 %621 to i32
  %623 = load i16, ptr %9, align 2, !tbaa !44
  %624 = zext i16 %623 to i32
  %625 = add nsw i32 %624, %622
  %626 = trunc i32 %625 to i16
  store i16 %626, ptr %9, align 2, !tbaa !44
  br label %627

627:                                              ; preds = %604
  %628 = load i8, ptr %8, align 1, !tbaa !18
  %629 = add i8 %628, 1
  store i8 %629, ptr %8, align 1, !tbaa !18
  br label %596, !llvm.loop !63

630:                                              ; preds = %596
  %631 = load i16, ptr %9, align 2, !tbaa !44
  %632 = zext i16 %631 to i32
  %633 = load ptr, ptr %3, align 8, !tbaa !5
  %634 = getelementptr inbounds %struct.DBF, ptr %633, i32 0, i32 18
  %635 = getelementptr inbounds %struct.DBFPROLOG, ptr %634, i32 0, i32 6
  %636 = load i16, ptr %635, align 2, !tbaa !29
  %637 = zext i16 %636 to i32
  %638 = icmp ne i32 %632, %637
  br i1 %638, label %639, label %644

639:                                              ; preds = %630
  call void (ptr, ...) @lib_mesg(ptr noundef @.str.8)
  %640 = load i16, ptr %9, align 2, !tbaa !44
  %641 = load ptr, ptr %3, align 8, !tbaa !5
  %642 = getelementptr inbounds %struct.DBF, ptr %641, i32 0, i32 18
  %643 = getelementptr inbounds %struct.DBFPROLOG, ptr %642, i32 0, i32 6
  store i16 %640, ptr %643, align 2, !tbaa !29
  br label %644

644:                                              ; preds = %639, %630
  %645 = load ptr, ptr %3, align 8, !tbaa !5
  %646 = getelementptr inbounds %struct.DBF, ptr %645, i32 0, i32 5
  store i32 1, ptr %646, align 4, !tbaa !11
  store i32 0, ptr %2, align 4
  store i32 1, ptr %11, align 4
  br label %656

647:                                              ; preds = %577, %492, %308, %298, %251, %216, %181, %157, %138, %75, %69, %46
  %648 = load ptr, ptr %3, align 8, !tbaa !5
  %649 = getelementptr inbounds %struct.DBF, ptr %648, i32 0, i32 2
  %650 = load ptr, ptr %649, align 8, !tbaa !16
  %651 = call i32 @fclose(ptr noundef %650)
  %652 = load ptr, ptr @stderr, align 8, !tbaa !5
  %653 = load i64, ptr %10, align 8, !tbaa !9
  %654 = trunc i64 %653 to i32
  %655 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %652, ptr noundef @.str.9, i32 noundef %654) #6
  store i32 11, ptr %2, align 4
  store i32 1, ptr %11, align 4
  br label %656

656:                                              ; preds = %647, %644, %594, %524, %328, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 2, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 3584, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 576, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 260, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 10, ptr %4) #6
  %657 = load i32, ptr %2, align 4
  ret i32 %657
}

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

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

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

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

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

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

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

declare i32 @fgetc(ptr noundef) #2

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

declare i32 @fclose(ptr noundef) #2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !13, i64 2068}
!12 = !{!"DBF", !7, i64 0, !7, i64 1024, !6, i64 2048, !6, i64 2056, !13, i64 2064, !13, i64 2068, !7, i64 2072, !7, i64 2073, !7, i64 2074, !7, i64 2075, !7, i64 2076, !7, i64 2077, !7, i64 2078, !13, i64 2080, !13, i64 2084, !7, i64 2088, !6, i64 2096, !6, i64 2104, !14, i64 2112}
!13 = !{!"int", !7, i64 0}
!14 = !{!"DBFPROLOG", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !13, i64 4, !15, i64 8, !15, i64 10, !15, i64 12, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 28, !7, i64 29}
!15 = !{!"short", !7, i64 0}
!16 = !{!12, !6, i64 2048}
!17 = !{!12, !7, i64 2112}
!18 = !{!7, !7, i64 0}
!19 = !{!20, !7, i64 6}
!20 = !{!"DBMANPROLOG", !7, i64 0, !15, i64 2, !15, i64 4, !7, i64 6, !7, i64 7, !7, i64 8, !7, i64 9, !7, i64 10, !13, i64 44, !15, i64 48, !15, i64 50, !15, i64 52, !7, i64 54, !15, i64 256}
!21 = !{!12, !7, i64 2113}
!22 = !{!20, !7, i64 7}
!23 = !{!12, !7, i64 2114}
!24 = !{!20, !7, i64 8}
!25 = !{!12, !7, i64 2115}
!26 = !{!20, !13, i64 44}
!27 = !{!12, !13, i64 2116}
!28 = !{!20, !15, i64 48}
!29 = !{!12, !15, i64 2122}
!30 = !{!20, !15, i64 52}
!31 = !{!12, !15, i64 2120}
!32 = !{!20, !15, i64 256}
!33 = !{!12, !7, i64 2088}
!34 = !{!20, !15, i64 50}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!38, !7, i64 4}
!38 = !{!"DBFPROLOG2", !7, i64 0, !15, i64 2, !7, i64 4, !7, i64 5, !7, i64 6, !15, i64 8}
!39 = !{!38, !7, i64 5}
!40 = !{!38, !7, i64 6}
!41 = !{!38, !15, i64 2}
!42 = !{!38, !15, i64 8}
!43 = distinct !{!43, !36}
!44 = !{!15, !15, i64 0}
!45 = !{!12, !6, i64 2096}
!46 = !{!47, !7, i64 11}
!47 = !{!"FIELD_DBMAN", !7, i64 0, !7, i64 11, !15, i64 12, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !7, i64 18}
!48 = !{!49, !7, i64 11}
!49 = !{!"FIELD_RECORD", !7, i64 0, !7, i64 11, !13, i64 12, !7, i64 16, !7, i64 17, !7, i64 18}
!50 = !{!47, !15, i64 12}
!51 = !{!49, !7, i64 16}
!52 = !{!47, !7, i64 14}
!53 = !{!49, !7, i64 17}
!54 = distinct !{!54, !36}
!55 = !{!56, !7, i64 11}
!56 = !{!"FIELD_RECORD2", !7, i64 0, !7, i64 11, !7, i64 12, !15, i64 14, !7, i64 16}
!57 = !{!56, !7, i64 12}
!58 = !{!56, !7, i64 16}
!59 = distinct !{!59, !36}
!60 = !{!12, !13, i64 2064}
!61 = !{!12, !6, i64 2104}
!62 = !{!49, !13, i64 12}
!63 = distinct !{!63, !36}


; 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.DBMANPROLOG = type { %union.anon, i16, i16, i8, i8, i8, i8, [17 x i16], i32, i16, i16, i16, [202 x i8], i16 }
%union.anon = type { i16 }
%struct.FIELD_RECORD2 = type { [11 x i8], i8, i8, i16, i8 }
%struct.FIELD_DBMAN = type { [11 x i8], i8, i16, i8, i8, i8, i8, [10 x i8] }
%struct.FIELD_RECORD = type { [11 x i8], i8, i32, i8, i8, [14 x i8] }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 12) i32 @dbf_open(ptr nocapture noundef %0) local_unnamed_addr #0 {
  %2 = alloca %struct.DBFPROLOG2, align 2
  %3 = alloca %struct.DBMANPROLOG, align 4
  %4 = alloca [32 x %struct.FIELD_RECORD2], align 16
  %5 = alloca [128 x %struct.FIELD_DBMAN], align 16
  call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 260, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 576, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 3584, ptr nonnull %5) #7
  %6 = getelementptr inbounds i8, ptr %0, i64 2068
  store i32 0, ptr %6, align 4, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 2048
  %8 = load ptr, ptr %7, align 8, !tbaa !13
  %9 = icmp eq ptr %8, null
  br i1 %9, label %10, label %16

10:                                               ; preds = %1
  %11 = tail call noalias ptr @fopen(ptr noundef nonnull %0, ptr noundef nonnull @.str)
  store ptr %11, ptr %7, align 8, !tbaa !13
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %16

13:                                               ; preds = %10
  %14 = tail call noalias ptr @fopen(ptr noundef nonnull %0, ptr noundef nonnull @.str.1)
  store ptr %14, ptr %7, align 8, !tbaa !13
  %15 = icmp eq ptr %14, null
  br i1 %15, label %345, label %16

16:                                               ; preds = %10, %13, %1
  %17 = phi ptr [ %11, %10 ], [ %14, %13 ], [ %8, %1 ]
  %18 = getelementptr inbounds i8, ptr %0, i64 2112
  %19 = tail call i64 @fread(ptr noundef nonnull %18, i64 noundef 1, i64 noundef 1, ptr noundef nonnull %17)
  %.not = icmp eq i64 %19, 1
  br i1 %.not, label %20, label %339

20:                                               ; preds = %16
  %21 = load i8, ptr %18, align 8, !tbaa !14
  %22 = and i8 %21, 3
  switch i8 %22, label %default.unreachable195 [
    i8 1, label %23
    i8 2, label %75
    i8 3, label %195
    i8 0, label %219
  ]

23:                                               ; preds = %20
  store i8 %21, ptr %3, align 4, !tbaa !15
  %24 = getelementptr inbounds i8, ptr %3, i64 1
  %25 = load ptr, ptr %7, align 8, !tbaa !13
  %26 = call i64 @fread(ptr noundef nonnull %24, i64 noundef 259, i64 noundef 1, ptr noundef %25)
  %.not152 = icmp eq i64 %26, 1
  br i1 %.not152, label %27, label %339

27:                                               ; preds = %23
  %28 = load i16, ptr %3, align 4, !tbaa !15
  %.not153 = icmp eq i16 %28, 11245
  br i1 %.not153, label %33, label %29

29:                                               ; preds = %27
  %30 = zext i16 %28 to i32
  %31 = load ptr, ptr @stderr, align 8, !tbaa !16
  %32 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str.2, i32 noundef %30) #8
  br label %339

33:                                               ; preds = %27
  %34 = getelementptr inbounds i8, ptr %3, i64 6
  %35 = load i8, ptr %34, align 2, !tbaa !17
  %36 = getelementptr inbounds i8, ptr %0, i64 2113
  store i8 %35, ptr %36, align 1, !tbaa !19
  %37 = getelementptr inbounds i8, ptr %3, i64 7
  %38 = load i8, ptr %37, align 1, !tbaa !20
  %39 = getelementptr inbounds i8, ptr %0, i64 2114
  store i8 %38, ptr %39, align 2, !tbaa !21
  %40 = getelementptr inbounds i8, ptr %3, i64 8
  %41 = load i8, ptr %40, align 4, !tbaa !22
  %42 = getelementptr inbounds i8, ptr %0, i64 2115
  store i8 %41, ptr %42, align 1, !tbaa !23
  %43 = getelementptr inbounds i8, ptr %3, i64 44
  %44 = load i32, ptr %43, align 4, !tbaa !24
  %45 = getelementptr inbounds i8, ptr %0, i64 2116
  store i32 %44, ptr %45, align 4, !tbaa !25
  %46 = getelementptr inbounds i8, ptr %3, i64 48
  %47 = load i16, ptr %46, align 4, !tbaa !26
  %48 = add i16 %47, 1
  %49 = getelementptr inbounds i8, ptr %0, i64 2122
  store i16 %48, ptr %49, align 2, !tbaa !27
  %50 = getelementptr inbounds i8, ptr %3, i64 52
  %51 = load i16, ptr %50, align 4, !tbaa !28
  %52 = getelementptr inbounds i8, ptr %0, i64 2120
  store i16 %51, ptr %52, align 8, !tbaa !29
  %53 = getelementptr inbounds i8, ptr %3, i64 256
  %54 = load i16, ptr %53, align 4, !tbaa !30
  %55 = trunc i16 %54 to i8
  %56 = getelementptr inbounds i8, ptr %0, i64 2088
  store i8 %55, ptr %56, align 8, !tbaa !31
  %57 = zext i16 %54 to i64
  %58 = mul nuw nsw i64 %57, 28
  %59 = getelementptr inbounds i8, ptr %3, i64 50
  %60 = load i16, ptr %59, align 2, !tbaa !32
  %61 = zext i16 %60 to i64
  %62 = add nsw i64 %61, -2
  %.not154 = icmp eq i64 %58, %62
  %63 = zext i16 %51 to i32
  %64 = zext i16 %60 to i32
  %65 = add nuw nsw i32 %64, 256
  %.not155 = icmp eq i32 %65, %63
  %or.cond166 = select i1 %.not154, i1 %.not155, i1 false
  br i1 %or.cond166, label %69, label %66

66:                                               ; preds = %33
  %67 = load ptr, ptr @stderr, align 8, !tbaa !16
  %68 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %67, ptr noundef nonnull @.str.3) #8
  br label %339

69:                                               ; preds = %33
  %.mask = and i16 %54, 255
  %70 = zext nneg i16 %.mask to i64
  %71 = load ptr, ptr %7, align 8, !tbaa !13
  %72 = call i64 @fread(ptr noundef nonnull %5, i64 noundef 28, i64 noundef %70, ptr noundef %71)
  %73 = load i8, ptr %56, align 8, !tbaa !31
  %74 = zext i8 %73 to i64
  %.not156 = icmp eq i64 %72, %74
  br i1 %.not156, label %.loopexit171, label %339

75:                                               ; preds = %20
  %76 = getelementptr inbounds i8, ptr %2, i64 1
  %77 = load ptr, ptr %7, align 8, !tbaa !13
  %78 = call i64 @fread(ptr noundef nonnull %76, i64 noundef 9, i64 noundef 1, ptr noundef %77)
  %.not150 = icmp eq i64 %78, 1
  br i1 %.not150, label %79, label %339

79:                                               ; preds = %75
  %80 = getelementptr inbounds i8, ptr %2, i64 4
  %81 = load i8, ptr %80, align 2, !tbaa !33
  %82 = getelementptr inbounds i8, ptr %0, i64 2113
  store i8 %81, ptr %82, align 1, !tbaa !19
  %83 = getelementptr inbounds i8, ptr %2, i64 5
  %84 = load i8, ptr %83, align 1, !tbaa !35
  %85 = getelementptr inbounds i8, ptr %0, i64 2114
  store i8 %84, ptr %85, align 2, !tbaa !21
  %86 = getelementptr inbounds i8, ptr %2, i64 6
  %87 = load i8, ptr %86, align 2, !tbaa !36
  %88 = getelementptr inbounds i8, ptr %0, i64 2115
  store i8 %87, ptr %88, align 1, !tbaa !23
  %89 = getelementptr inbounds i8, ptr %2, i64 2
  %90 = load i16, ptr %89, align 2, !tbaa !37
  %91 = zext i16 %90 to i32
  %92 = getelementptr inbounds i8, ptr %0, i64 2116
  store i32 %91, ptr %92, align 4, !tbaa !25
  %93 = getelementptr inbounds i8, ptr %2, i64 8
  %94 = load i16, ptr %93, align 2, !tbaa !38
  %95 = getelementptr inbounds i8, ptr %0, i64 2122
  store i16 %94, ptr %95, align 2, !tbaa !27
  %96 = load ptr, ptr %7, align 8, !tbaa !13
  %97 = call i64 @fread(ptr noundef nonnull %4, i64 noundef 18, i64 noundef 32, ptr noundef %96)
  %.not151 = icmp eq i64 %97, 32
  br i1 %.not151, label %.preheader172.preheader, label %339

.preheader172.preheader:                          ; preds = %79
  %98 = load i8, ptr %4, align 16, !tbaa !15
  %99 = icmp eq i8 %98, 13
  br i1 %99, label %193, label %.preheader172.1

.preheader172.1:                                  ; preds = %.preheader172.preheader
  %100 = getelementptr inbounds i8, ptr %4, i64 18
  %101 = load i8, ptr %100, align 2, !tbaa !15
  %102 = icmp eq i8 %101, 13
  br i1 %102, label %193, label %.preheader172.2

.preheader172.2:                                  ; preds = %.preheader172.1
  %103 = getelementptr inbounds i8, ptr %4, i64 36
  %104 = load i8, ptr %103, align 4, !tbaa !15
  %105 = icmp eq i8 %104, 13
  br i1 %105, label %193, label %.preheader172.3

.preheader172.3:                                  ; preds = %.preheader172.2
  %106 = getelementptr inbounds i8, ptr %4, i64 54
  %107 = load i8, ptr %106, align 2, !tbaa !15
  %108 = icmp eq i8 %107, 13
  br i1 %108, label %193, label %.preheader172.4

.preheader172.4:                                  ; preds = %.preheader172.3
  %109 = getelementptr inbounds i8, ptr %4, i64 72
  %110 = load i8, ptr %109, align 8, !tbaa !15
  %111 = icmp eq i8 %110, 13
  br i1 %111, label %193, label %.preheader172.5

.preheader172.5:                                  ; preds = %.preheader172.4
  %112 = getelementptr inbounds i8, ptr %4, i64 90
  %113 = load i8, ptr %112, align 2, !tbaa !15
  %114 = icmp eq i8 %113, 13
  br i1 %114, label %193, label %.preheader172.6

.preheader172.6:                                  ; preds = %.preheader172.5
  %115 = getelementptr inbounds i8, ptr %4, i64 108
  %116 = load i8, ptr %115, align 4, !tbaa !15
  %117 = icmp eq i8 %116, 13
  br i1 %117, label %193, label %.preheader172.7

.preheader172.7:                                  ; preds = %.preheader172.6
  %118 = getelementptr inbounds i8, ptr %4, i64 126
  %119 = load i8, ptr %118, align 2, !tbaa !15
  %120 = icmp eq i8 %119, 13
  br i1 %120, label %193, label %.preheader172.8

.preheader172.8:                                  ; preds = %.preheader172.7
  %121 = getelementptr inbounds i8, ptr %4, i64 144
  %122 = load i8, ptr %121, align 16, !tbaa !15
  %123 = icmp eq i8 %122, 13
  br i1 %123, label %193, label %.preheader172.9

.preheader172.9:                                  ; preds = %.preheader172.8
  %124 = getelementptr inbounds i8, ptr %4, i64 162
  %125 = load i8, ptr %124, align 2, !tbaa !15
  %126 = icmp eq i8 %125, 13
  br i1 %126, label %193, label %.preheader172.10

.preheader172.10:                                 ; preds = %.preheader172.9
  %127 = getelementptr inbounds i8, ptr %4, i64 180
  %128 = load i8, ptr %127, align 4, !tbaa !15
  %129 = icmp eq i8 %128, 13
  br i1 %129, label %193, label %.preheader172.11

.preheader172.11:                                 ; preds = %.preheader172.10
  %130 = getelementptr inbounds i8, ptr %4, i64 198
  %131 = load i8, ptr %130, align 2, !tbaa !15
  %132 = icmp eq i8 %131, 13
  br i1 %132, label %193, label %.preheader172.12

.preheader172.12:                                 ; preds = %.preheader172.11
  %133 = getelementptr inbounds i8, ptr %4, i64 216
  %134 = load i8, ptr %133, align 8, !tbaa !15
  %135 = icmp eq i8 %134, 13
  br i1 %135, label %193, label %.preheader172.13

.preheader172.13:                                 ; preds = %.preheader172.12
  %136 = getelementptr inbounds i8, ptr %4, i64 234
  %137 = load i8, ptr %136, align 2, !tbaa !15
  %138 = icmp eq i8 %137, 13
  br i1 %138, label %193, label %.preheader172.14

.preheader172.14:                                 ; preds = %.preheader172.13
  %139 = getelementptr inbounds i8, ptr %4, i64 252
  %140 = load i8, ptr %139, align 4, !tbaa !15
  %141 = icmp eq i8 %140, 13
  br i1 %141, label %193, label %.preheader172.15

.preheader172.15:                                 ; preds = %.preheader172.14
  %142 = getelementptr inbounds i8, ptr %4, i64 270
  %143 = load i8, ptr %142, align 2, !tbaa !15
  %144 = icmp eq i8 %143, 13
  br i1 %144, label %193, label %.preheader172.16

.preheader172.16:                                 ; preds = %.preheader172.15
  %145 = getelementptr inbounds i8, ptr %4, i64 288
  %146 = load i8, ptr %145, align 16, !tbaa !15
  %147 = icmp eq i8 %146, 13
  br i1 %147, label %193, label %.preheader172.17

.preheader172.17:                                 ; preds = %.preheader172.16
  %148 = getelementptr inbounds i8, ptr %4, i64 306
  %149 = load i8, ptr %148, align 2, !tbaa !15
  %150 = icmp eq i8 %149, 13
  br i1 %150, label %193, label %.preheader172.18

.preheader172.18:                                 ; preds = %.preheader172.17
  %151 = getelementptr inbounds i8, ptr %4, i64 324
  %152 = load i8, ptr %151, align 4, !tbaa !15
  %153 = icmp eq i8 %152, 13
  br i1 %153, label %193, label %.preheader172.19

.preheader172.19:                                 ; preds = %.preheader172.18
  %154 = getelementptr inbounds i8, ptr %4, i64 342
  %155 = load i8, ptr %154, align 2, !tbaa !15
  %156 = icmp eq i8 %155, 13
  br i1 %156, label %193, label %.preheader172.20

.preheader172.20:                                 ; preds = %.preheader172.19
  %157 = getelementptr inbounds i8, ptr %4, i64 360
  %158 = load i8, ptr %157, align 8, !tbaa !15
  %159 = icmp eq i8 %158, 13
  br i1 %159, label %193, label %.preheader172.21

.preheader172.21:                                 ; preds = %.preheader172.20
  %160 = getelementptr inbounds i8, ptr %4, i64 378
  %161 = load i8, ptr %160, align 2, !tbaa !15
  %162 = icmp eq i8 %161, 13
  br i1 %162, label %193, label %.preheader172.22

.preheader172.22:                                 ; preds = %.preheader172.21
  %163 = getelementptr inbounds i8, ptr %4, i64 396
  %164 = load i8, ptr %163, align 4, !tbaa !15
  %165 = icmp eq i8 %164, 13
  br i1 %165, label %193, label %.preheader172.23

.preheader172.23:                                 ; preds = %.preheader172.22
  %166 = getelementptr inbounds i8, ptr %4, i64 414
  %167 = load i8, ptr %166, align 2, !tbaa !15
  %168 = icmp eq i8 %167, 13
  br i1 %168, label %193, label %.preheader172.24

.preheader172.24:                                 ; preds = %.preheader172.23
  %169 = getelementptr inbounds i8, ptr %4, i64 432
  %170 = load i8, ptr %169, align 16, !tbaa !15
  %171 = icmp eq i8 %170, 13
  br i1 %171, label %193, label %.preheader172.25

.preheader172.25:                                 ; preds = %.preheader172.24
  %172 = getelementptr inbounds i8, ptr %4, i64 450
  %173 = load i8, ptr %172, align 2, !tbaa !15
  %174 = icmp eq i8 %173, 13
  br i1 %174, label %193, label %.preheader172.26

.preheader172.26:                                 ; preds = %.preheader172.25
  %175 = getelementptr inbounds i8, ptr %4, i64 468
  %176 = load i8, ptr %175, align 4, !tbaa !15
  %177 = icmp eq i8 %176, 13
  br i1 %177, label %193, label %.preheader172.27

.preheader172.27:                                 ; preds = %.preheader172.26
  %178 = getelementptr inbounds i8, ptr %4, i64 486
  %179 = load i8, ptr %178, align 2, !tbaa !15
  %180 = icmp eq i8 %179, 13
  br i1 %180, label %193, label %.preheader172.28

.preheader172.28:                                 ; preds = %.preheader172.27
  %181 = getelementptr inbounds i8, ptr %4, i64 504
  %182 = load i8, ptr %181, align 8, !tbaa !15
  %183 = icmp eq i8 %182, 13
  br i1 %183, label %193, label %.preheader172.29

.preheader172.29:                                 ; preds = %.preheader172.28
  %184 = getelementptr inbounds i8, ptr %4, i64 522
  %185 = load i8, ptr %184, align 2, !tbaa !15
  %186 = icmp eq i8 %185, 13
  br i1 %186, label %193, label %.preheader172.30

.preheader172.30:                                 ; preds = %.preheader172.29
  %187 = getelementptr inbounds i8, ptr %4, i64 540
  %188 = load i8, ptr %187, align 4, !tbaa !15
  %189 = icmp eq i8 %188, 13
  br i1 %189, label %193, label %.preheader172.31

.preheader172.31:                                 ; preds = %.preheader172.30
  %190 = getelementptr inbounds i8, ptr %4, i64 558
  %191 = load i8, ptr %190, align 2, !tbaa !15
  %192 = icmp eq i8 %191, 13
  %spec.select = select i1 %192, i8 31, i8 32
  br label %193

193:                                              ; preds = %.preheader172.31, %.preheader172.30, %.preheader172.29, %.preheader172.28, %.preheader172.27, %.preheader172.26, %.preheader172.25, %.preheader172.24, %.preheader172.23, %.preheader172.22, %.preheader172.21, %.preheader172.20, %.preheader172.19, %.preheader172.18, %.preheader172.17, %.preheader172.16, %.preheader172.15, %.preheader172.14, %.preheader172.13, %.preheader172.12, %.preheader172.11, %.preheader172.10, %.preheader172.9, %.preheader172.8, %.preheader172.7, %.preheader172.6, %.preheader172.5, %.preheader172.4, %.preheader172.3, %.preheader172.2, %.preheader172.1, %.preheader172.preheader
  %.1.lcssa = phi i8 [ 0, %.preheader172.preheader ], [ 1, %.preheader172.1 ], [ 2, %.preheader172.2 ], [ 3, %.preheader172.3 ], [ 4, %.preheader172.4 ], [ 5, %.preheader172.5 ], [ 6, %.preheader172.6 ], [ 7, %.preheader172.7 ], [ 8, %.preheader172.8 ], [ 9, %.preheader172.9 ], [ 10, %.preheader172.10 ], [ 11, %.preheader172.11 ], [ 12, %.preheader172.12 ], [ 13, %.preheader172.13 ], [ 14, %.preheader172.14 ], [ 15, %.preheader172.15 ], [ 16, %.preheader172.16 ], [ 17, %.preheader172.17 ], [ 18, %.preheader172.18 ], [ 19, %.preheader172.19 ], [ 20, %.preheader172.20 ], [ 21, %.preheader172.21 ], [ 22, %.preheader172.22 ], [ 23, %.preheader172.23 ], [ 24, %.preheader172.24 ], [ 25, %.preheader172.25 ], [ 26, %.preheader172.26 ], [ 27, %.preheader172.27 ], [ 28, %.preheader172.28 ], [ 29, %.preheader172.29 ], [ 30, %.preheader172.30 ], [ %spec.select, %.preheader172.31 ]
  %194 = getelementptr inbounds i8, ptr %0, i64 2088
  store i8 %.1.lcssa, ptr %194, align 8, !tbaa !31
  br label %.loopexit171

195:                                              ; preds = %20
  %196 = getelementptr inbounds i8, ptr %0, i64 2113
  %197 = load ptr, ptr %7, align 8, !tbaa !13
  %198 = tail call i64 @fread(ptr noundef nonnull %196, i64 noundef 31, i64 noundef 1, ptr noundef %197)
  %.not149 = icmp eq i64 %198, 1
  br i1 %.not149, label %199, label %339

199:                                              ; preds = %195
  %200 = getelementptr inbounds i8, ptr %0, i64 2120
  %201 = load i16, ptr %200, align 8, !tbaa !29
  %202 = zext i16 %201 to i32
  %203 = add nuw nsw i32 %202, 8159
  %204 = lshr i32 %203, 5
  %205 = trunc i32 %204 to i8
  %206 = getelementptr inbounds i8, ptr %0, i64 2088
  store i8 %205, ptr %206, align 8, !tbaa !31
  %207 = and i32 %203, 8160
  %208 = add nuw nsw i32 %207, 33
  %209 = icmp eq i32 %208, %202
  br i1 %209, label %210, label %213

210:                                              ; preds = %199
  %211 = load i8, ptr %18, align 8, !tbaa !14
  %212 = or i8 %211, 64
  store i8 %212, ptr %18, align 8, !tbaa !14
  br label %.loopexit171

213:                                              ; preds = %199
  %214 = add nuw nsw i32 %207, 34
  %215 = icmp eq i32 %214, %202
  br i1 %215, label %.loopexit171, label %216

216:                                              ; preds = %213
  %217 = load ptr, ptr @stderr, align 8, !tbaa !16
  %218 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %217, ptr noundef nonnull @.str.4, i32 noundef %202) #8
  br label %339

default.unreachable195:                           ; preds = %228, %20
  unreachable

219:                                              ; preds = %20
  %220 = load ptr, ptr @stderr, align 8, !tbaa !16
  %221 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %220, ptr noundef nonnull @.str.5, i32 noundef 0) #8
  br label %339

.loopexit171:                                     ; preds = %69, %210, %213, %193
  %222 = phi i8 [ %205, %210 ], [ %205, %213 ], [ %.1.lcssa, %193 ], [ %73, %69 ]
  %223 = getelementptr inbounds i8, ptr %0, i64 2088
  %224 = zext i8 %222 to i64
  %225 = shl nuw nsw i64 %224, 5
  %calloc = tail call ptr @calloc(i64 1, i64 %225)
  %226 = getelementptr inbounds i8, ptr %0, i64 2096
  store ptr %calloc, ptr %226, align 8, !tbaa !39
  %227 = icmp eq ptr %calloc, null
  br i1 %227, label %345, label %228

228:                                              ; preds = %.loopexit171
  %229 = load i8, ptr %18, align 8, !tbaa !14
  %230 = and i8 %229, 3
  switch i8 %230, label %default.unreachable195 [
    i8 1, label %.preheader167
    i8 2, label %.preheader168
    i8 3, label %266
    i8 0, label %.loopexit
  ]

.preheader168:                                    ; preds = %228
  %.not180 = icmp eq i8 %222, 0
  br i1 %.not180, label %.loopexit, label %.lr.ph

.preheader167:                                    ; preds = %228
  %.not181 = icmp eq i8 %222, 0
  br i1 %.not181, label %.loopexit, label %.lr.ph176

.lr.ph176:                                        ; preds = %.preheader167, %.lr.ph176
  %231 = phi ptr [ %237, %.lr.ph176 ], [ %calloc, %.preheader167 ]
  %indvars.iv186 = phi i64 [ %indvars.iv.next187, %.lr.ph176 ], [ 0, %.preheader167 ]
  %232 = getelementptr inbounds %struct.FIELD_RECORD, ptr %231, i64 %indvars.iv186
  %233 = getelementptr inbounds [128 x %struct.FIELD_DBMAN], ptr %5, i64 0, i64 %indvars.iv186
  %234 = call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %232, ptr noundef nonnull dereferenceable(1) %233, i64 noundef 11) #7
  %235 = getelementptr inbounds i8, ptr %233, i64 11
  %236 = load i8, ptr %235, align 1, !tbaa !40
  %237 = load ptr, ptr %226, align 8, !tbaa !39
  %238 = getelementptr inbounds %struct.FIELD_RECORD, ptr %237, i64 %indvars.iv186, i32 1
  store i8 %236, ptr %238, align 1, !tbaa !42
  %239 = getelementptr inbounds i8, ptr %233, i64 12
  %240 = load i16, ptr %239, align 4, !tbaa !44
  %241 = trunc i16 %240 to i8
  %242 = getelementptr inbounds %struct.FIELD_RECORD, ptr %237, i64 %indvars.iv186, i32 3
  store i8 %241, ptr %242, align 4, !tbaa !45
  %243 = getelementptr inbounds i8, ptr %233, i64 14
  %244 = load i8, ptr %243, align 2, !tbaa !46
  %245 = getelementptr inbounds %struct.FIELD_RECORD, ptr %237, i64 %indvars.iv186, i32 4
  store i8 %244, ptr %245, align 1, !tbaa !47
  %indvars.iv.next187 = add nuw nsw i64 %indvars.iv186, 1
  %246 = load i8, ptr %223, align 8, !tbaa !31
  %247 = zext i8 %246 to i64
  %248 = icmp ult i64 %indvars.iv.next187, %247
  br i1 %248, label %.lr.ph176, label %.loopexit, !llvm.loop !48

.lr.ph:                                           ; preds = %.preheader168, %.lr.ph
  %249 = phi ptr [ %255, %.lr.ph ], [ %calloc, %.preheader168 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader168 ]
  %250 = getelementptr inbounds %struct.FIELD_RECORD, ptr %249, i64 %indvars.iv
  %251 = getelementptr inbounds [32 x %struct.FIELD_RECORD2], ptr %4, i64 0, i64 %indvars.iv
  %252 = call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %250, ptr noundef nonnull dereferenceable(1) %251, i64 noundef 11) #7
  %253 = getelementptr inbounds i8, ptr %251, i64 11
  %254 = load i8, ptr %253, align 1, !tbaa !50
  %255 = load ptr, ptr %226, align 8, !tbaa !39
  %256 = getelementptr inbounds %struct.FIELD_RECORD, ptr %255, i64 %indvars.iv, i32 1
  store i8 %254, ptr %256, align 1, !tbaa !42
  %257 = getelementptr inbounds i8, ptr %251, i64 12
  %258 = load i8, ptr %257, align 2, !tbaa !52
  %259 = getelementptr inbounds %struct.FIELD_RECORD, ptr %255, i64 %indvars.iv, i32 3
  store i8 %258, ptr %259, align 4, !tbaa !45
  %260 = getelementptr inbounds i8, ptr %251, i64 16
  %261 = load i8, ptr %260, align 2, !tbaa !53
  %262 = getelementptr inbounds %struct.FIELD_RECORD, ptr %255, i64 %indvars.iv, i32 4
  store i8 %261, ptr %262, align 1, !tbaa !47
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %263 = load i8, ptr %223, align 8, !tbaa !31
  %264 = zext i8 %263 to i64
  %265 = icmp ult i64 %indvars.iv.next, %264
  br i1 %265, label %.lr.ph, label %.loopexit, !llvm.loop !54

266:                                              ; preds = %228
  %267 = load ptr, ptr %7, align 8, !tbaa !13
  %268 = tail call i64 @fread(ptr noundef nonnull %calloc, i64 noundef 32, i64 noundef %224, ptr noundef %267)
  %269 = load i8, ptr %223, align 8, !tbaa !31
  %270 = zext i8 %269 to i64
  %.not157 = icmp eq i64 %268, %270
  br i1 %.not157, label %.loopexit, label %339

.loopexit:                                        ; preds = %.lr.ph, %.lr.ph176, %.preheader168, %.preheader167, %266, %228
  %271 = load i8, ptr %18, align 8, !tbaa !14
  %272 = and i8 %271, 3
  %.not158 = icmp eq i8 %272, 1
  br i1 %.not158, label %306, label %273

273:                                              ; preds = %.loopexit
  %274 = load ptr, ptr %7, align 8, !tbaa !13
  %275 = tail call i32 @fgetc(ptr noundef %274)
  %276 = and i32 %275, 65535
  %.not159 = icmp eq i32 %276, 13
  br i1 %.not159, label %._crit_edge192, label %277

._crit_edge192:                                   ; preds = %273
  %.pre = load i8, ptr %223, align 8, !tbaa !31
  %.pre194 = load i8, ptr %18, align 8, !tbaa !14
  br label %284

277:                                              ; preds = %273
  %278 = load i8, ptr %18, align 8, !tbaa !14
  %279 = and i8 %278, 3
  %.not160 = icmp ne i8 %279, 2
  %.pre193 = load i8, ptr %223, align 8, !tbaa !31
  %280 = icmp ult i8 %.pre193, 32
  %or.cond197 = select i1 %.not160, i1 %280, i1 false
  br i1 %or.cond197, label %281, label %284

281:                                              ; preds = %277
  %282 = load ptr, ptr @stderr, align 8, !tbaa !16
  %283 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %282, ptr noundef nonnull @.str.6) #8
  br label %345

284:                                              ; preds = %._crit_edge192, %277
  %285 = phi i8 [ %.pre194, %._crit_edge192 ], [ %278, %277 ]
  %286 = phi i8 [ %.pre, %._crit_edge192 ], [ %.pre193, %277 ]
  %287 = getelementptr inbounds i8, ptr %0, i64 2120
  %288 = load i16, ptr %287, align 8, !tbaa !29
  %289 = zext i8 %286 to i16
  %290 = shl nuw nsw i16 %289, 5
  %291 = add nuw nsw i16 %290, 33
  %292 = sub i16 %288, %291
  %293 = zext i8 %285 to i32
  %294 = and i32 %293, 3
  %295 = icmp eq i32 %294, 3
  br i1 %295, label %296, label %301

296:                                              ; preds = %284
  %297 = and i32 %293, 64
  %298 = icmp eq i32 %297, 0
  %299 = icmp ne i16 %292, 1
  %or.cond = select i1 %298, i1 %299, i1 false
  br i1 %or.cond, label %300, label %301

300:                                              ; preds = %296
  tail call void (ptr, ...) @lib_mesg(ptr noundef nonnull @.str.7) #7
  br label %301

301:                                              ; preds = %300, %296, %284
  %.not161 = icmp eq i16 %288, %291
  br i1 %.not161, label %306, label %302

302:                                              ; preds = %301
  %303 = zext i16 %292 to i64
  %304 = load ptr, ptr %7, align 8, !tbaa !13
  %305 = call i64 @fread(ptr noundef nonnull %2, i64 noundef 1, i64 noundef %303, ptr noundef %304)
  %.not162 = icmp eq i64 %305, %303
  br i1 %.not162, label %306, label %339

306:                                              ; preds = %301, %302, %.loopexit
  %307 = getelementptr inbounds i8, ptr %0, i64 2064
  store i32 0, ptr %307, align 8, !tbaa !55
  %308 = getelementptr inbounds i8, ptr %0, i64 2122
  %309 = load i16, ptr %308, align 2, !tbaa !27
  %310 = zext i16 %309 to i64
  %311 = add nuw nsw i64 %310, 1
  %312 = tail call noalias ptr @malloc(i64 noundef %311) #9
  %313 = getelementptr inbounds i8, ptr %0, i64 2104
  store ptr %312, ptr %313, align 8, !tbaa !56
  %314 = icmp eq ptr %312, null
  br i1 %314, label %345, label %.preheader

.preheader:                                       ; preds = %306
  %315 = load i8, ptr %223, align 8, !tbaa !31
  %.not182 = icmp eq i8 %315, 0
  br i1 %.not182, label %._crit_edge, label %.lr.ph179

.lr.ph179:                                        ; preds = %.preheader
  %316 = load ptr, ptr %226, align 8, !tbaa !39
  %wide.trip.count = zext i8 %315 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %317 = icmp eq i8 %315, 1
  br i1 %317, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph179.new

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

318:                                              ; preds = %318, %.lr.ph179.new
  %indvars.iv189 = phi i64 [ 0, %.lr.ph179.new ], [ %indvars.iv.next190.1, %318 ]
  %.0130178 = phi i16 [ 1, %.lr.ph179.new ], [ %330, %318 ]
  %niter = phi i64 [ 0, %.lr.ph179.new ], [ %niter.next.1, %318 ]
  %319 = zext i16 %.0130178 to i32
  %320 = getelementptr inbounds %struct.FIELD_RECORD, ptr %316, i64 %indvars.iv189, i32 2
  store i32 %319, ptr %320, align 4, !tbaa !57
  %321 = getelementptr inbounds %struct.FIELD_RECORD, ptr %316, i64 %indvars.iv189, i32 3
  %322 = load i8, ptr %321, align 4, !tbaa !45
  %323 = zext i8 %322 to i16
  %324 = add i16 %.0130178, %323
  %indvars.iv.next190 = or disjoint i64 %indvars.iv189, 1
  %325 = zext i16 %324 to i32
  %326 = getelementptr inbounds %struct.FIELD_RECORD, ptr %316, i64 %indvars.iv.next190, i32 2
  store i32 %325, ptr %326, align 4, !tbaa !57
  %327 = getelementptr inbounds %struct.FIELD_RECORD, ptr %316, i64 %indvars.iv.next190, i32 3
  %328 = load i8, ptr %327, align 4, !tbaa !45
  %329 = zext i8 %328 to i16
  %330 = add i16 %324, %329
  %indvars.iv.next190.1 = add nuw nsw i64 %indvars.iv189, 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 %318, !llvm.loop !58

._crit_edge.loopexit.unr-lcssa:                   ; preds = %318, %.lr.ph179
  %.lcssa.ph = phi i16 [ poison, %.lr.ph179 ], [ %330, %318 ]
  %indvars.iv189.unr = phi i64 [ 0, %.lr.ph179 ], [ %indvars.iv.next190.1, %318 ]
  %.0130178.unr = phi i16 [ 1, %.lr.ph179 ], [ %330, %318 ]
  %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
  %331 = zext i16 %.0130178.unr to i32
  %332 = getelementptr inbounds %struct.FIELD_RECORD, ptr %316, i64 %indvars.iv189.unr, i32 2
  store i32 %331, ptr %332, align 4, !tbaa !57
  %333 = getelementptr inbounds %struct.FIELD_RECORD, ptr %316, i64 %indvars.iv189.unr, i32 3
  %334 = load i8, ptr %333, align 4, !tbaa !45
  %335 = zext i8 %334 to i16
  %336 = add i16 %.0130178.unr, %335
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %.preheader
  %.0130.lcssa = phi i16 [ 1, %.preheader ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %336, %._crit_edge.loopexit.epilog-lcssa ]
  %.not163 = icmp eq i16 %.0130.lcssa, %309
  br i1 %.not163, label %338, label %337

337:                                              ; preds = %._crit_edge
  tail call void (ptr, ...) @lib_mesg(ptr noundef nonnull @.str.8) #7
  store i16 %.0130.lcssa, ptr %308, align 2, !tbaa !27
  br label %338

338:                                              ; preds = %337, %._crit_edge
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %345

339:                                              ; preds = %302, %266, %195, %79, %75, %69, %23, %16, %219, %216, %66, %29
  %.0 = phi i64 [ %19, %16 ], [ 1, %219 ], [ %198, %195 ], [ %305, %302 ], [ %268, %266 ], [ 1, %216 ], [ %78, %75 ], [ %97, %79 ], [ %26, %23 ], [ 1, %29 ], [ 1, %66 ], [ %72, %69 ]
  %340 = load ptr, ptr %7, align 8, !tbaa !13
  %341 = tail call i32 @fclose(ptr noundef %340)
  %342 = load ptr, ptr @stderr, align 8, !tbaa !16
  %343 = trunc i64 %.0 to i32
  %344 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %342, ptr noundef nonnull @.str.9, i32 noundef %343) #8
  br label %345

345:                                              ; preds = %306, %.loopexit171, %13, %339, %338, %281
  %.0132 = phi i32 [ 11, %339 ], [ 11, %281 ], [ 0, %338 ], [ 2, %13 ], [ 8, %.loopexit171 ], [ 8, %306 ]
  call void @llvm.lifetime.end.p0(i64 3584, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 576, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 260, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %2) #7
  ret i32 %.0132
}

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

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

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

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

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

; 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 #4

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

declare void @lib_mesg(ptr noundef, ...) local_unnamed_addr #5

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

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

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

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 = { 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 #3 = { 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 #4 = { 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 #5 = { "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 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #7 = { nounwind }
attributes #8 = { cold nounwind }
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, !10, i64 2068}
!6 = !{!"DBF", !7, i64 0, !7, i64 1024, !9, i64 2048, !9, i64 2056, !10, i64 2064, !10, i64 2068, !7, i64 2072, !7, i64 2073, !7, i64 2074, !7, i64 2075, !7, i64 2076, !7, i64 2077, !7, i64 2078, !10, i64 2080, !10, i64 2084, !7, i64 2088, !9, i64 2096, !9, i64 2104, !11, i64 2112}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"any pointer", !7, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!"DBFPROLOG", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !10, i64 4, !12, i64 8, !12, i64 10, !12, i64 12, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 28, !7, i64 29}
!12 = !{!"short", !7, i64 0}
!13 = !{!6, !9, i64 2048}
!14 = !{!6, !7, i64 2112}
!15 = !{!7, !7, i64 0}
!16 = !{!9, !9, i64 0}
!17 = !{!18, !7, i64 6}
!18 = !{!"DBMANPROLOG", !7, i64 0, !12, i64 2, !12, i64 4, !7, i64 6, !7, i64 7, !7, i64 8, !7, i64 9, !7, i64 10, !10, i64 44, !12, i64 48, !12, i64 50, !12, i64 52, !7, i64 54, !12, i64 256}
!19 = !{!6, !7, i64 2113}
!20 = !{!18, !7, i64 7}
!21 = !{!6, !7, i64 2114}
!22 = !{!18, !7, i64 8}
!23 = !{!6, !7, i64 2115}
!24 = !{!18, !10, i64 44}
!25 = !{!6, !10, i64 2116}
!26 = !{!18, !12, i64 48}
!27 = !{!6, !12, i64 2122}
!28 = !{!18, !12, i64 52}
!29 = !{!6, !12, i64 2120}
!30 = !{!18, !12, i64 256}
!31 = !{!6, !7, i64 2088}
!32 = !{!18, !12, i64 50}
!33 = !{!34, !7, i64 4}
!34 = !{!"DBFPROLOG2", !7, i64 0, !12, i64 2, !7, i64 4, !7, i64 5, !7, i64 6, !12, i64 8}
!35 = !{!34, !7, i64 5}
!36 = !{!34, !7, i64 6}
!37 = !{!34, !12, i64 2}
!38 = !{!34, !12, i64 8}
!39 = !{!6, !9, i64 2096}
!40 = !{!41, !7, i64 11}
!41 = !{!"FIELD_DBMAN", !7, i64 0, !7, i64 11, !12, i64 12, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !7, i64 18}
!42 = !{!43, !7, i64 11}
!43 = !{!"FIELD_RECORD", !7, i64 0, !7, i64 11, !10, i64 12, !7, i64 16, !7, i64 17, !7, i64 18}
!44 = !{!41, !12, i64 12}
!45 = !{!43, !7, i64 16}
!46 = !{!41, !7, i64 14}
!47 = !{!43, !7, i64 17}
!48 = distinct !{!48, !49}
!49 = !{!"llvm.loop.mustprogress"}
!50 = !{!51, !7, i64 11}
!51 = !{!"FIELD_RECORD2", !7, i64 0, !7, i64 11, !7, i64 12, !12, i64 14, !7, i64 16}
!52 = !{!51, !7, i64 12}
!53 = !{!51, !7, i64 16}
!54 = distinct !{!54, !49}
!55 = !{!6, !10, i64 2064}
!56 = !{!6, !9, i64 2104}
!57 = !{!43, !10, i64 12}
!58 = distinct !{!58, !49}


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