; LLVM IR from freakout42/macrocalc :: arx/src (rdb_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.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] }

@__const.rdb_open.rdbname = external hidden unnamed_addr constant [17 x i8], align 16
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @rdb_open(ptr noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca i16, align 2
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca [17 x i8], align 16
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #9
  call void @llvm.lifetime.start.p0(i64 2, ptr %5) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.start.p0(i64 17, ptr %19) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %19, ptr align 16 @__const.rdb_open.rdbname, i64 17, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  %24 = call noalias ptr @malloc(i64 noundef 4001) #10
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.DBF, ptr %25, i32 0, i32 17
  store ptr %24, ptr %26, align 8, !tbaa !9
  %27 = icmp eq ptr %24, null
  br i1 %27, label %28, label %29

28:                                               ; preds = %1
  store i32 8, ptr %2, align 4
  store i32 1, ptr %21, align 4
  br label %648

29:                                               ; preds = %1
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.DBF, ptr %30, i32 0, i32 2
  %32 = load ptr, ptr %31, align 8, !tbaa !14
  %33 = icmp eq ptr %32, null
  br i1 %33, label %34, label %47

34:                                               ; preds = %29
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.DBF, ptr %35, i32 0, i32 0
  %37 = getelementptr inbounds [1024 x i8], ptr %36, i64 0, i64 0
  %38 = call noalias ptr @fopen(ptr noundef %37, ptr noundef @.str)
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.DBF, ptr %39, i32 0, i32 2
  store ptr %38, ptr %40, align 8, !tbaa !14
  %41 = icmp eq ptr %38, null
  br i1 %41, label %42, label %43

42:                                               ; preds = %34
  store i32 2, ptr %2, align 4
  store i32 1, ptr %21, align 4
  br label %648

43:                                               ; preds = %34
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.DBF, ptr %44, i32 0, i32 1
  %46 = getelementptr inbounds [1024 x i8], ptr %45, i64 0, i64 0
  store i8 0, ptr %46, align 8, !tbaa !15
  br label %68

47:                                               ; preds = %29
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.DBF, ptr %48, i32 0, i32 5
  %50 = load i32, ptr %49, align 4, !tbaa !16
  %51 = icmp ne i32 %50, 1
  br i1 %51, label %52, label %67

52:                                               ; preds = %47
  %53 = getelementptr inbounds [17 x i8], ptr %19, i64 0, i64 0
  %54 = call i32 @mkstemp(ptr noundef %53)
  store i32 %54, ptr %20, align 4, !tbaa !17
  %55 = load i32, ptr %20, align 4, !tbaa !17
  %56 = call noalias ptr @fdopen(i32 noundef %55, ptr noundef @.str.1) #9
  store ptr %56, ptr %8, align 8, !tbaa !5
  %57 = icmp eq ptr %56, null
  br i1 %57, label %58, label %59

58:                                               ; preds = %52
  store i32 3, ptr %2, align 4
  store i32 1, ptr %21, align 4
  br label %648

59:                                               ; preds = %52
  %60 = getelementptr inbounds [17 x i8], ptr %19, i64 0, i64 0
  %61 = call i32 @unlink(ptr noundef %60) #9
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.DBF, ptr %62, i32 0, i32 1
  %64 = getelementptr inbounds [1024 x i8], ptr %63, i64 0, i64 0
  %65 = getelementptr inbounds [17 x i8], ptr %19, i64 0, i64 0
  %66 = call ptr @strcpy(ptr noundef %64, ptr noundef %65) #9
  br label %67

67:                                               ; preds = %59, %47
  br label %68

68:                                               ; preds = %67, %43
  store i32 0, ptr %6, align 4, !tbaa !17
  br label %69

69:                                               ; preds = %514, %68
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.DBF, ptr %70, i32 0, i32 2
  %72 = load ptr, ptr %71, align 8, !tbaa !14
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.DBF, ptr %73, i32 0, i32 17
  %75 = load ptr, ptr %74, align 8, !tbaa !9
  %76 = call ptr @str_gets(ptr noundef %72, ptr noundef %75, i64 noundef 4000)
  %77 = icmp ne ptr %76, null
  br i1 %77, label %78, label %517

78:                                               ; preds = %69
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = icmp ne ptr %79, null
  br i1 %80, label %81, label %87

81:                                               ; preds = %78
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.DBF, ptr %83, i32 0, i32 17
  %85 = load ptr, ptr %84, align 8, !tbaa !9
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %82, ptr noundef @.str.2, ptr noundef %85) #9
  br label %87

87:                                               ; preds = %81, %78
  %88 = load i32, ptr %6, align 4, !tbaa !17
  %89 = icmp eq i32 %88, 0
  br i1 %89, label %90, label %140

90:                                               ; preds = %87
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.DBF, ptr %91, i32 0, i32 17
  %93 = load ptr, ptr %92, align 8, !tbaa !9
  store ptr %93, ptr %11, align 8, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !17
  br label %94

94:                                               ; preds = %111, %90
  %95 = load ptr, ptr %11, align 8, !tbaa !5
  %96 = icmp ne ptr %95, null
  br i1 %96, label %97, label %114

97:                                               ; preds = %94
  %98 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %98, ptr %9, align 8, !tbaa !5
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.DBF, ptr %100, i32 0, i32 6
  %102 = load i8, ptr %101, align 8, !tbaa !18
  %103 = sext i8 %102 to i32
  %104 = call ptr @strchr(ptr noundef %99, i32 noundef %103) #11
  store ptr %104, ptr %11, align 8, !tbaa !5
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = icmp ne ptr %105, null
  br i1 %106, label %107, label %110

107:                                              ; preds = %97
  %108 = load ptr, ptr %11, align 8, !tbaa !5
  %109 = getelementptr inbounds i8, ptr %108, i32 1
  store ptr %109, ptr %11, align 8, !tbaa !5
  br label %110

110:                                              ; preds = %107, %97
  br label %111

111:                                              ; preds = %110
  %112 = load i32, ptr %7, align 4, !tbaa !17
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %7, align 4, !tbaa !17
  br label %94, !llvm.loop !19

114:                                              ; preds = %94
  %115 = load i32, ptr %7, align 4, !tbaa !17
  %116 = trunc i32 %115 to i8
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.DBF, ptr %117, i32 0, i32 15
  store i8 %116, ptr %118, align 8, !tbaa !21
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.DBF, ptr %119, i32 0, i32 15
  %121 = load i8, ptr %120, align 8, !tbaa !21
  %122 = zext i8 %121 to i32
  %123 = mul i32 %122, 32
  %124 = zext i32 %123 to i64
  %125 = call noalias ptr @malloc(i64 noundef %124) #10
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.DBF, ptr %126, i32 0, i32 16
  store ptr %125, ptr %127, align 8, !tbaa !22
  %128 = icmp eq ptr %125, null
  br i1 %128, label %129, label %130

129:                                              ; preds = %114
  store i32 8, ptr %2, align 4
  store i32 1, ptr %21, align 4
  br label %648

130:                                              ; preds = %114
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.DBF, ptr %131, i32 0, i32 16
  %133 = load ptr, ptr %132, align 8, !tbaa !22
  %134 = load ptr, ptr %3, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.DBF, ptr %134, i32 0, i32 15
  %136 = load i8, ptr %135, align 8, !tbaa !21
  %137 = zext i8 %136 to i32
  %138 = mul i32 %137, 32
  %139 = zext i32 %138 to i64
  call void @llvm.memset.p0.i64(ptr align 4 %133, i8 0, i64 %139, i1 false)
  br label %140

140:                                              ; preds = %130, %87
  %141 = load ptr, ptr %3, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.DBF, ptr %141, i32 0, i32 17
  %143 = load ptr, ptr %142, align 8, !tbaa !9
  store ptr %143, ptr %11, align 8, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !17
  br label %144

144:                                              ; preds = %501, %140
  %145 = load ptr, ptr %11, align 8, !tbaa !5
  %146 = icmp ne ptr %145, null
  br i1 %146, label %147, label %504

147:                                              ; preds = %144
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.DBF, ptr %148, i32 0, i32 16
  %150 = load ptr, ptr %149, align 8, !tbaa !22
  %151 = load i32, ptr %7, align 4, !tbaa !17
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds %struct.FIELD_RECORD, ptr %150, i64 %152
  store ptr %153, ptr %13, align 8, !tbaa !5
  %154 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %154, ptr %10, align 8, !tbaa !5
  %155 = load ptr, ptr %10, align 8, !tbaa !5
  %156 = load ptr, ptr %3, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.DBF, ptr %156, i32 0, i32 6
  %158 = load i8, ptr %157, align 8, !tbaa !18
  %159 = sext i8 %158 to i32
  %160 = call ptr @strchr(ptr noundef %155, i32 noundef %159) #11
  store ptr %160, ptr %11, align 8, !tbaa !5
  %161 = icmp ne ptr %160, null
  br i1 %161, label %162, label %165

162:                                              ; preds = %147
  %163 = load ptr, ptr %11, align 8, !tbaa !5
  %164 = getelementptr inbounds i8, ptr %163, i32 1
  store ptr %164, ptr %11, align 8, !tbaa !5
  store i8 0, ptr %163, align 1, !tbaa !15
  br label %165

165:                                              ; preds = %162, %147
  %166 = load ptr, ptr %10, align 8, !tbaa !5
  %167 = call ptr @str_trim(ptr noundef %166)
  store ptr %167, ptr %9, align 8, !tbaa !5
  %168 = load i32, ptr %6, align 4, !tbaa !17
  switch i32 %168, label %291 [
    i32 0, label %169
    i32 1, label %226
    i32 2, label %265
    i32 67, label %473
  ]

169:                                              ; preds = %165
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  %171 = load i8, ptr %170, align 1, !tbaa !15
  %172 = sext i8 %171 to i32
  %173 = icmp eq i32 %172, 0
  br i1 %173, label %174, label %175

174:                                              ; preds = %169
  store i32 11, ptr %2, align 4
  store i32 1, ptr %21, align 4
  br label %648

175:                                              ; preds = %169
  %176 = load ptr, ptr %3, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.DBF, ptr %176, i32 0, i32 14
  %178 = load i32, ptr %177, align 4, !tbaa !23
  switch i32 %178, label %203 [
    i32 1, label %179
    i32 2, label %182
    i32 3, label %185
    i32 0, label %203
  ]

179:                                              ; preds = %175
  %180 = load ptr, ptr %9, align 8, !tbaa !5
  %181 = call ptr @str_upr(ptr noundef %180)
  br label %203

182:                                              ; preds = %175
  %183 = load ptr, ptr %9, align 8, !tbaa !5
  %184 = call ptr @str_low(ptr noundef %183)
  br label %203

185:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  %186 = call ptr @__ctype_toupper_loc() #12
  %187 = load ptr, ptr %186, align 8, !tbaa !5
  %188 = load ptr, ptr %9, align 8, !tbaa !5
  %189 = getelementptr inbounds i8, ptr %188, i64 0
  %190 = load i8, ptr %189, align 1, !tbaa !15
  %191 = sext i8 %190 to i32
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds i32, ptr %187, i64 %192
  %194 = load i32, ptr %193, align 4, !tbaa !17
  store i32 %194, ptr %22, align 4, !tbaa !17
  %195 = load i32, ptr %22, align 4, !tbaa !17
  store i32 %195, ptr %23, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  %196 = load i32, ptr %23, align 4, !tbaa !17
  %197 = trunc i32 %196 to i8
  %198 = load ptr, ptr %9, align 8, !tbaa !5
  %199 = getelementptr inbounds i8, ptr %198, i64 0
  store i8 %197, ptr %199, align 1, !tbaa !15
  %200 = load ptr, ptr %9, align 8, !tbaa !5
  %201 = getelementptr inbounds i8, ptr %200, i64 1
  %202 = call ptr @str_low(ptr noundef %201)
  br label %203

203:                                              ; preds = %185, %182, %179, %175, %175
  %204 = load ptr, ptr %13, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.FIELD_RECORD, ptr %204, i32 0, i32 0
  %206 = getelementptr inbounds [11 x i8], ptr %205, i64 0, i64 0
  %207 = load ptr, ptr %9, align 8, !tbaa !5
  %208 = call ptr @strncpy(ptr noundef %206, ptr noundef %207, i64 noundef 10) #9
  %209 = load ptr, ptr %9, align 8, !tbaa !5
  %210 = call i64 @strlen(ptr noundef %209) #11
  %211 = trunc i64 %210 to i32
  %212 = icmp sgt i32 %211, 10
  br i1 %212, label %213, label %216

213:                                              ; preds = %203
  %214 = load ptr, ptr %9, align 8, !tbaa !5
  %215 = load ptr, ptr %9, align 8, !tbaa !5
  call void (ptr, ...) @lib_mesg(ptr noundef @.str.3, ptr noundef %214, i32 noundef 10, ptr noundef %215)
  br label %216

216:                                              ; preds = %213, %203
  %217 = load ptr, ptr %13, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.FIELD_RECORD, ptr %217, i32 0, i32 1
  store i8 67, ptr %218, align 1, !tbaa !24
  %219 = load ptr, ptr %13, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.FIELD_RECORD, ptr %219, i32 0, i32 3
  store i8 8, ptr %220, align 4, !tbaa !26
  %221 = load ptr, ptr %13, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.FIELD_RECORD, ptr %221, i32 0, i32 4
  store i8 0, ptr %222, align 1, !tbaa !27
  %223 = load ptr, ptr %13, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.FIELD_RECORD, ptr %223, i32 0, i32 5
  %225 = getelementptr inbounds [14 x i8], ptr %224, i64 0, i64 0
  store i8 0, ptr %225, align 2, !tbaa !15
  br label %500

226:                                              ; preds = %165
  %227 = load ptr, ptr %9, align 8, !tbaa !5
  %228 = load i8, ptr %227, align 1, !tbaa !15
  %229 = sext i8 %228 to i32
  %230 = icmp eq i32 %229, 0
  br i1 %230, label %231, label %238

231:                                              ; preds = %226
  %232 = load ptr, ptr %3, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.DBF, ptr %232, i32 0, i32 7
  %234 = load i8, ptr %233, align 1, !tbaa !28
  %235 = sext i8 %234 to i32
  %236 = icmp ne i32 %235, 0
  br i1 %236, label %237, label %238

237:                                              ; preds = %231
  store i32 11, ptr %2, align 4
  store i32 1, ptr %21, align 4
  br label %648

238:                                              ; preds = %231, %226
  %239 = load ptr, ptr %3, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.DBF, ptr %239, i32 0, i32 7
  %241 = load i8, ptr %240, align 1, !tbaa !28
  %242 = icmp ne i8 %241, 0
  br i1 %242, label %244, label %243

243:                                              ; preds = %238
  br label %266

244:                                              ; preds = %238
  %245 = load ptr, ptr %9, align 8, !tbaa !5
  %246 = call i64 @strlen(ptr noundef %245) #11
  %247 = trunc i64 %246 to i8
  %248 = load ptr, ptr %13, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.FIELD_RECORD, ptr %248, i32 0, i32 3
  store i8 %247, ptr %249, align 4, !tbaa !26
  %250 = load ptr, ptr %13, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.FIELD_RECORD, ptr %250, i32 0, i32 3
  %252 = load i8, ptr %251, align 4, !tbaa !26
  %253 = load ptr, ptr %13, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.FIELD_RECORD, ptr %253, i32 0, i32 5
  %255 = getelementptr inbounds [14 x i8], ptr %254, i64 0, i64 0
  store i8 %252, ptr %255, align 2, !tbaa !15
  %256 = load ptr, ptr %9, align 8, !tbaa !5
  %257 = call i64 @strspn(ptr noundef %256, ptr noundef @.str.4) #11
  %258 = load ptr, ptr %13, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.FIELD_RECORD, ptr %258, i32 0, i32 3
  %260 = load i8, ptr %259, align 4, !tbaa !26
  %261 = zext i8 %260 to i64
  %262 = icmp ne i64 %257, %261
  br i1 %262, label %263, label %264

263:                                              ; preds = %244
  store i32 11, ptr %2, align 4
  store i32 1, ptr %21, align 4
  br label %648

264:                                              ; preds = %244
  br label %500

265:                                              ; preds = %165
  br label %266

266:                                              ; preds = %265, %243
  %267 = load ptr, ptr %13, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.FIELD_RECORD, ptr %267, i32 0, i32 5
  %269 = getelementptr inbounds [14 x i8], ptr %268, i64 0, i64 0
  %270 = load i8, ptr %269, align 2, !tbaa !15
  %271 = zext i8 %270 to i32
  %272 = icmp sgt i32 %271, 1
  %273 = zext i1 %272 to i64
  %274 = select i1 %272, i32 68, i32 76
  %275 = trunc i32 %274 to i8
  %276 = load ptr, ptr %13, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.FIELD_RECORD, ptr %276, i32 0, i32 1
  store i8 %275, ptr %277, align 1, !tbaa !24
  %278 = load ptr, ptr %13, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.FIELD_RECORD, ptr %278, i32 0, i32 5
  %280 = getelementptr inbounds [14 x i8], ptr %279, i64 0, i64 0
  %281 = load i8, ptr %280, align 2, !tbaa !15
  %282 = zext i8 %281 to i32
  %283 = icmp sgt i32 %282, 1
  %284 = zext i1 %283 to i64
  %285 = select i1 %283, i32 8, i32 1
  %286 = trunc i32 %285 to i8
  %287 = load ptr, ptr %13, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.FIELD_RECORD, ptr %287, i32 0, i32 3
  store i8 %286, ptr %288, align 4, !tbaa !26
  %289 = load ptr, ptr %13, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.FIELD_RECORD, ptr %289, i32 0, i32 4
  store i8 0, ptr %290, align 1, !tbaa !27
  br label %291

291:                                              ; preds = %266, %165
  %292 = load ptr, ptr %9, align 8, !tbaa !5
  %293 = load i8, ptr %292, align 1, !tbaa !15
  %294 = sext i8 %293 to i32
  %295 = icmp eq i32 %294, 0
  br i1 %295, label %296, label %297

296:                                              ; preds = %291
  br label %500

297:                                              ; preds = %291
  %298 = load ptr, ptr %9, align 8, !tbaa !5
  %299 = call i64 @strlen(ptr noundef %298) #11
  %300 = trunc i64 %299 to i32
  store i32 %300, ptr %14, align 4, !tbaa !17
  %301 = load i32, ptr %14, align 4, !tbaa !17
  %302 = load ptr, ptr %13, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.FIELD_RECORD, ptr %302, i32 0, i32 5
  %304 = getelementptr inbounds [14 x i8], ptr %303, i64 0, i64 0
  %305 = load i8, ptr %304, align 2, !tbaa !15
  %306 = zext i8 %305 to i32
  %307 = icmp ult i32 %301, %306
  br i1 %307, label %308, label %314

308:                                              ; preds = %297
  %309 = load ptr, ptr %13, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.FIELD_RECORD, ptr %309, i32 0, i32 5
  %311 = getelementptr inbounds [14 x i8], ptr %310, i64 0, i64 0
  %312 = load i8, ptr %311, align 2, !tbaa !15
  %313 = zext i8 %312 to i32
  br label %316

314:                                              ; preds = %297
  %315 = load i32, ptr %14, align 4, !tbaa !17
  br label %316

316:                                              ; preds = %314, %308
  %317 = phi i32 [ %313, %308 ], [ %315, %314 ]
  %318 = trunc i32 %317 to i8
  %319 = load ptr, ptr %13, align 8, !tbaa !5
  %320 = getelementptr inbounds %struct.FIELD_RECORD, ptr %319, i32 0, i32 5
  %321 = getelementptr inbounds [14 x i8], ptr %320, i64 0, i64 0
  store i8 %318, ptr %321, align 2, !tbaa !15
  %322 = load ptr, ptr %13, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.FIELD_RECORD, ptr %322, i32 0, i32 1
  %324 = load i8, ptr %323, align 1, !tbaa !24
  %325 = zext i8 %324 to i32
  switch i32 %325, label %472 [
    i32 76, label %326
    i32 68, label %347
    i32 78, label %393
    i32 70, label %393
  ]

326:                                              ; preds = %316
  %327 = load i32, ptr %14, align 4, !tbaa !17
  %328 = icmp eq i32 %327, 1
  br i1 %328, label %329, label %342

329:                                              ; preds = %326
  %330 = load ptr, ptr %13, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.FIELD_RECORD, ptr %330, i32 0, i32 0
  %332 = getelementptr inbounds [11 x i8], ptr %331, i64 0, i64 0
  %333 = call i32 @strcmp(ptr noundef %332, ptr noundef @.str.5) #11
  %334 = icmp ne i32 %333, 0
  br i1 %334, label %335, label %342

335:                                              ; preds = %329
  %336 = load ptr, ptr %9, align 8, !tbaa !5
  %337 = load i8, ptr %336, align 1, !tbaa !15
  %338 = sext i8 %337 to i32
  %339 = call ptr @strchr(ptr noundef @.str.6, i32 noundef %338) #11
  %340 = icmp ne ptr %339, null
  br i1 %340, label %341, label %342

341:                                              ; preds = %335
  br label %472

342:                                              ; preds = %335, %329, %326
  %343 = load ptr, ptr %13, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct.FIELD_RECORD, ptr %343, i32 0, i32 1
  store i8 68, ptr %344, align 1, !tbaa !24
  %345 = load ptr, ptr %13, align 8, !tbaa !5
  %346 = getelementptr inbounds %struct.FIELD_RECORD, ptr %345, i32 0, i32 3
  store i8 8, ptr %346, align 4, !tbaa !26
  br label %347

347:                                              ; preds = %342, %316
  %348 = load i32, ptr %14, align 4, !tbaa !17
  %349 = icmp eq i32 %348, 6
  br i1 %349, label %350, label %367

350:                                              ; preds = %347
  %351 = load ptr, ptr %9, align 8, !tbaa !5
  %352 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %351, ptr noundef @.str.7, ptr noundef %16, ptr noundef %17, ptr noundef %18) #9
  %353 = icmp eq i32 %352, 3
  br i1 %353, label %354, label %367

354:                                              ; preds = %350
  %355 = load i32, ptr %17, align 4, !tbaa !17
  %356 = icmp sgt i32 %355, 0
  br i1 %356, label %357, label %367

357:                                              ; preds = %354
  %358 = load i32, ptr %17, align 4, !tbaa !17
  %359 = icmp sle i32 %358, 12
  br i1 %359, label %360, label %367

360:                                              ; preds = %357
  %361 = load i32, ptr %18, align 4, !tbaa !17
  %362 = icmp sgt i32 %361, 0
  br i1 %362, label %363, label %367

363:                                              ; preds = %360
  %364 = load i32, ptr %18, align 4, !tbaa !17
  %365 = icmp sle i32 %364, 31
  br i1 %365, label %366, label %367

366:                                              ; preds = %363
  br label %472

367:                                              ; preds = %363, %360, %357, %354, %350, %347
  %368 = load i32, ptr %14, align 4, !tbaa !17
  %369 = icmp eq i32 %368, 8
  br i1 %369, label %370, label %387

370:                                              ; preds = %367
  %371 = load ptr, ptr %9, align 8, !tbaa !5
  %372 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %371, ptr noundef @.str.8, ptr noundef %16, ptr noundef %17, ptr noundef %18) #9
  %373 = icmp eq i32 %372, 3
  br i1 %373, label %374, label %387

374:                                              ; preds = %370
  %375 = load i32, ptr %17, align 4, !tbaa !17
  %376 = icmp sgt i32 %375, 0
  br i1 %376, label %377, label %387

377:                                              ; preds = %374
  %378 = load i32, ptr %17, align 4, !tbaa !17
  %379 = icmp sle i32 %378, 12
  br i1 %379, label %380, label %387

380:                                              ; preds = %377
  %381 = load i32, ptr %18, align 4, !tbaa !17
  %382 = icmp sgt i32 %381, 0
  br i1 %382, label %383, label %387

383:                                              ; preds = %380
  %384 = load i32, ptr %18, align 4, !tbaa !17
  %385 = icmp sle i32 %384, 31
  br i1 %385, label %386, label %387

386:                                              ; preds = %383
  br label %472

387:                                              ; preds = %383, %380, %377, %374, %370, %367
  br label %388

388:                                              ; preds = %387
  %389 = load ptr, ptr %13, align 8, !tbaa !5
  %390 = getelementptr inbounds %struct.FIELD_RECORD, ptr %389, i32 0, i32 1
  store i8 78, ptr %390, align 1, !tbaa !24
  %391 = load ptr, ptr %13, align 8, !tbaa !5
  %392 = getelementptr inbounds %struct.FIELD_RECORD, ptr %391, i32 0, i32 3
  store i8 1, ptr %392, align 4, !tbaa !26
  br label %393

393:                                              ; preds = %388, %316, %316
  %394 = load ptr, ptr %9, align 8, !tbaa !5
  %395 = call double @str_chkd(ptr noundef %394)
  %396 = fcmp une double %395, 0x7FF0000000000000
  br i1 %396, label %397, label %467

397:                                              ; preds = %393
  %398 = load ptr, ptr %9, align 8, !tbaa !5
  %399 = call ptr @strchr(ptr noundef %398, i32 noundef 46) #11
  store ptr %399, ptr %12, align 8, !tbaa !5
  %400 = icmp eq ptr %399, null
  br i1 %400, label %401, label %402

401:                                              ; preds = %397
  store i32 0, ptr %15, align 4, !tbaa !17
  br label %413

402:                                              ; preds = %397
  %403 = load i32, ptr %14, align 4, !tbaa !17
  %404 = zext i32 %403 to i64
  %405 = load ptr, ptr %12, align 8, !tbaa !5
  %406 = load ptr, ptr %9, align 8, !tbaa !5
  %407 = ptrtoint ptr %405 to i64
  %408 = ptrtoint ptr %406 to i64
  %409 = sub i64 %407, %408
  %410 = sub nsw i64 %404, %409
  %411 = sub nsw i64 %410, 1
  %412 = trunc i64 %411 to i32
  store i32 %412, ptr %15, align 4, !tbaa !17
  br label %413

413:                                              ; preds = %402, %401
  %414 = load ptr, ptr %13, align 8, !tbaa !5
  %415 = getelementptr inbounds %struct.FIELD_RECORD, ptr %414, i32 0, i32 3
  %416 = load i8, ptr %415, align 4, !tbaa !26
  %417 = zext i8 %416 to i32
  %418 = load ptr, ptr %13, align 8, !tbaa !5
  %419 = getelementptr inbounds %struct.FIELD_RECORD, ptr %418, i32 0, i32 5
  %420 = getelementptr inbounds [14 x i8], ptr %419, i64 0, i64 0
  %421 = load i8, ptr %420, align 2, !tbaa !15
  %422 = zext i8 %421 to i32
  %423 = icmp slt i32 %417, %422
  br i1 %423, label %424, label %430

424:                                              ; preds = %413
  %425 = load ptr, ptr %13, align 8, !tbaa !5
  %426 = getelementptr inbounds %struct.FIELD_RECORD, ptr %425, i32 0, i32 5
  %427 = getelementptr inbounds [14 x i8], ptr %426, i64 0, i64 0
  %428 = load i8, ptr %427, align 2, !tbaa !15
  %429 = zext i8 %428 to i32
  br label %435

430:                                              ; preds = %413
  %431 = load ptr, ptr %13, align 8, !tbaa !5
  %432 = getelementptr inbounds %struct.FIELD_RECORD, ptr %431, i32 0, i32 3
  %433 = load i8, ptr %432, align 4, !tbaa !26
  %434 = zext i8 %433 to i32
  br label %435

435:                                              ; preds = %430, %424
  %436 = phi i32 [ %429, %424 ], [ %434, %430 ]
  %437 = trunc i32 %436 to i8
  %438 = load ptr, ptr %13, align 8, !tbaa !5
  %439 = getelementptr inbounds %struct.FIELD_RECORD, ptr %438, i32 0, i32 3
  store i8 %437, ptr %439, align 4, !tbaa !26
  %440 = load ptr, ptr %13, align 8, !tbaa !5
  %441 = getelementptr inbounds %struct.FIELD_RECORD, ptr %440, i32 0, i32 4
  %442 = load i8, ptr %441, align 1, !tbaa !27
  %443 = zext i8 %442 to i32
  %444 = load i32, ptr %15, align 4, !tbaa !17
  %445 = icmp ult i32 %443, %444
  br i1 %445, label %446, label %448

446:                                              ; preds = %435
  %447 = load i32, ptr %15, align 4, !tbaa !17
  br label %453

448:                                              ; preds = %435
  %449 = load ptr, ptr %13, align 8, !tbaa !5
  %450 = getelementptr inbounds %struct.FIELD_RECORD, ptr %449, i32 0, i32 4
  %451 = load i8, ptr %450, align 1, !tbaa !27
  %452 = zext i8 %451 to i32
  br label %453

453:                                              ; preds = %448, %446
  %454 = phi i32 [ %447, %446 ], [ %452, %448 ]
  %455 = trunc i32 %454 to i8
  %456 = load ptr, ptr %13, align 8, !tbaa !5
  %457 = getelementptr inbounds %struct.FIELD_RECORD, ptr %456, i32 0, i32 4
  store i8 %455, ptr %457, align 1, !tbaa !27
  %458 = load ptr, ptr %13, align 8, !tbaa !5
  %459 = getelementptr inbounds %struct.FIELD_RECORD, ptr %458, i32 0, i32 3
  %460 = load i8, ptr %459, align 4, !tbaa !26
  %461 = zext i8 %460 to i32
  %462 = icmp sgt i32 %461, 15
  br i1 %462, label %463, label %466

463:                                              ; preds = %453
  %464 = load ptr, ptr %13, align 8, !tbaa !5
  %465 = getelementptr inbounds %struct.FIELD_RECORD, ptr %464, i32 0, i32 1
  store i8 70, ptr %465, align 1, !tbaa !24
  br label %466

466:                                              ; preds = %463, %453
  br label %472

467:                                              ; preds = %393
  %468 = load ptr, ptr %13, align 8, !tbaa !5
  %469 = getelementptr inbounds %struct.FIELD_RECORD, ptr %468, i32 0, i32 1
  store i8 67, ptr %469, align 1, !tbaa !24
  %470 = load ptr, ptr %13, align 8, !tbaa !5
  %471 = getelementptr inbounds %struct.FIELD_RECORD, ptr %470, i32 0, i32 4
  store i8 0, ptr %471, align 1, !tbaa !27
  br label %472

472:                                              ; preds = %467, %466, %386, %366, %341, %316
  br label %473

473:                                              ; preds = %472, %165
  %474 = load ptr, ptr %13, align 8, !tbaa !5
  %475 = getelementptr inbounds %struct.FIELD_RECORD, ptr %474, i32 0, i32 3
  %476 = load i8, ptr %475, align 4, !tbaa !26
  %477 = zext i8 %476 to i32
  %478 = load ptr, ptr %13, align 8, !tbaa !5
  %479 = getelementptr inbounds %struct.FIELD_RECORD, ptr %478, i32 0, i32 5
  %480 = getelementptr inbounds [14 x i8], ptr %479, i64 0, i64 0
  %481 = load i8, ptr %480, align 2, !tbaa !15
  %482 = zext i8 %481 to i32
  %483 = icmp slt i32 %477, %482
  br i1 %483, label %484, label %490

484:                                              ; preds = %473
  %485 = load ptr, ptr %13, align 8, !tbaa !5
  %486 = getelementptr inbounds %struct.FIELD_RECORD, ptr %485, i32 0, i32 5
  %487 = getelementptr inbounds [14 x i8], ptr %486, i64 0, i64 0
  %488 = load i8, ptr %487, align 2, !tbaa !15
  %489 = zext i8 %488 to i32
  br label %495

490:                                              ; preds = %473
  %491 = load ptr, ptr %13, align 8, !tbaa !5
  %492 = getelementptr inbounds %struct.FIELD_RECORD, ptr %491, i32 0, i32 3
  %493 = load i8, ptr %492, align 4, !tbaa !26
  %494 = zext i8 %493 to i32
  br label %495

495:                                              ; preds = %490, %484
  %496 = phi i32 [ %489, %484 ], [ %494, %490 ]
  %497 = trunc i32 %496 to i8
  %498 = load ptr, ptr %13, align 8, !tbaa !5
  %499 = getelementptr inbounds %struct.FIELD_RECORD, ptr %498, i32 0, i32 3
  store i8 %497, ptr %499, align 4, !tbaa !26
  br label %500

500:                                              ; preds = %495, %296, %264, %216
  br label %501

501:                                              ; preds = %500
  %502 = load i32, ptr %7, align 4, !tbaa !17
  %503 = add nsw i32 %502, 1
  store i32 %503, ptr %7, align 4, !tbaa !17
  br label %144, !llvm.loop !29

504:                                              ; preds = %144
  %505 = load ptr, ptr %3, align 8, !tbaa !5
  %506 = getelementptr inbounds %struct.DBF, ptr %505, i32 0, i32 5
  %507 = load i32, ptr %506, align 4, !tbaa !16
  %508 = icmp eq i32 %507, 1
  br i1 %508, label %509, label %513

509:                                              ; preds = %504
  %510 = load i32, ptr %6, align 4, !tbaa !17
  %511 = icmp eq i32 %510, 1
  br i1 %511, label %512, label %513

512:                                              ; preds = %509
  br label %517

513:                                              ; preds = %509, %504
  br label %514

514:                                              ; preds = %513
  %515 = load i32, ptr %6, align 4, !tbaa !17
  %516 = add nsw i32 %515, 1
  store i32 %516, ptr %6, align 4, !tbaa !17
  br label %69, !llvm.loop !30

517:                                              ; preds = %512, %69
  %518 = load i32, ptr %6, align 4, !tbaa !17
  %519 = icmp eq i32 %518, 0
  br i1 %519, label %520, label %521

520:                                              ; preds = %517
  store i32 11, ptr %2, align 4
  store i32 1, ptr %21, align 4
  br label %648

521:                                              ; preds = %517
  %522 = load ptr, ptr %3, align 8, !tbaa !5
  %523 = getelementptr inbounds %struct.DBF, ptr %522, i32 0, i32 5
  %524 = load i32, ptr %523, align 4, !tbaa !16
  %525 = icmp ne i32 %524, 1
  br i1 %525, label %526, label %555

526:                                              ; preds = %521
  %527 = load ptr, ptr %8, align 8, !tbaa !5
  %528 = icmp ne ptr %527, null
  br i1 %528, label %529, label %537

529:                                              ; preds = %526
  %530 = load ptr, ptr %3, align 8, !tbaa !5
  %531 = getelementptr inbounds %struct.DBF, ptr %530, i32 0, i32 2
  %532 = load ptr, ptr %531, align 8, !tbaa !14
  %533 = call i32 @fclose(ptr noundef %532)
  %534 = load ptr, ptr %8, align 8, !tbaa !5
  %535 = load ptr, ptr %3, align 8, !tbaa !5
  %536 = getelementptr inbounds %struct.DBF, ptr %535, i32 0, i32 2
  store ptr %534, ptr %536, align 8, !tbaa !14
  br label %537

537:                                              ; preds = %529, %526
  %538 = load ptr, ptr %3, align 8, !tbaa !5
  %539 = getelementptr inbounds %struct.DBF, ptr %538, i32 0, i32 2
  %540 = load ptr, ptr %539, align 8, !tbaa !14
  call void @rewind(ptr noundef %540)
  %541 = load ptr, ptr %3, align 8, !tbaa !5
  %542 = getelementptr inbounds %struct.DBF, ptr %541, i32 0, i32 2
  %543 = load ptr, ptr %542, align 8, !tbaa !14
  %544 = load ptr, ptr %3, align 8, !tbaa !5
  %545 = getelementptr inbounds %struct.DBF, ptr %544, i32 0, i32 17
  %546 = load ptr, ptr %545, align 8, !tbaa !9
  %547 = call ptr @str_gets(ptr noundef %543, ptr noundef %546, i64 noundef 4000)
  %548 = load ptr, ptr %3, align 8, !tbaa !5
  %549 = getelementptr inbounds %struct.DBF, ptr %548, i32 0, i32 2
  %550 = load ptr, ptr %549, align 8, !tbaa !14
  %551 = load ptr, ptr %3, align 8, !tbaa !5
  %552 = getelementptr inbounds %struct.DBF, ptr %551, i32 0, i32 17
  %553 = load ptr, ptr %552, align 8, !tbaa !9
  %554 = call ptr @str_gets(ptr noundef %550, ptr noundef %553, i64 noundef 4000)
  br label %555

555:                                              ; preds = %537, %521
  %556 = load ptr, ptr %3, align 8, !tbaa !5
  %557 = getelementptr inbounds %struct.DBF, ptr %556, i32 0, i32 5
  store i32 0, ptr %557, align 4, !tbaa !16
  %558 = load ptr, ptr %3, align 8, !tbaa !5
  %559 = getelementptr inbounds %struct.DBF, ptr %558, i32 0, i32 18
  %560 = getelementptr inbounds %struct.DBFPROLOG, ptr %559, i32 0, i32 0
  store i8 3, ptr %560, align 8, !tbaa !31
  %561 = load ptr, ptr %3, align 8, !tbaa !5
  %562 = getelementptr inbounds %struct.DBF, ptr %561, i32 0, i32 4
  store i32 0, ptr %562, align 8, !tbaa !32
  %563 = load i32, ptr %6, align 4, !tbaa !17
  %564 = sub nsw i32 %563, 2
  store i32 %564, ptr %6, align 4, !tbaa !17
  %565 = load ptr, ptr %3, align 8, !tbaa !5
  %566 = getelementptr inbounds %struct.DBF, ptr %565, i32 0, i32 18
  %567 = getelementptr inbounds %struct.DBFPROLOG, ptr %566, i32 0, i32 4
  store i32 %564, ptr %567, align 4, !tbaa !33
  %568 = load ptr, ptr %3, align 8, !tbaa !5
  %569 = getelementptr inbounds %struct.DBF, ptr %568, i32 0, i32 15
  %570 = load i8, ptr %569, align 8, !tbaa !21
  %571 = zext i8 %570 to i32
  %572 = mul i32 %571, 32
  %573 = add i32 32, %572
  %574 = add i32 %573, 1
  %575 = trunc i32 %574 to i16
  %576 = load ptr, ptr %3, align 8, !tbaa !5
  %577 = getelementptr inbounds %struct.DBF, ptr %576, i32 0, i32 18
  %578 = getelementptr inbounds %struct.DBFPROLOG, ptr %577, i32 0, i32 5
  store i16 %575, ptr %578, align 8, !tbaa !34
  %579 = load ptr, ptr %3, align 8, !tbaa !5
  %580 = getelementptr inbounds %struct.DBF, ptr %579, i32 0, i32 18
  %581 = getelementptr inbounds %struct.DBFPROLOG, ptr %580, i32 0, i32 6
  store i16 1, ptr %581, align 2, !tbaa !35
  store i8 0, ptr %4, align 1, !tbaa !15
  br label %582

582:                                              ; preds = %607, %555
  %583 = load i8, ptr %4, align 1, !tbaa !15
  %584 = zext i8 %583 to i32
  %585 = load ptr, ptr %3, align 8, !tbaa !5
  %586 = getelementptr inbounds %struct.DBF, ptr %585, i32 0, i32 15
  %587 = load i8, ptr %586, align 8, !tbaa !21
  %588 = zext i8 %587 to i32
  %589 = icmp slt i32 %584, %588
  br i1 %589, label %590, label %610

590:                                              ; preds = %582
  %591 = load ptr, ptr %3, align 8, !tbaa !5
  %592 = getelementptr inbounds %struct.DBF, ptr %591, i32 0, i32 16
  %593 = load ptr, ptr %592, align 8, !tbaa !22
  %594 = load i8, ptr %4, align 1, !tbaa !15
  %595 = zext i8 %594 to i64
  %596 = getelementptr inbounds %struct.FIELD_RECORD, ptr %593, i64 %595
  %597 = getelementptr inbounds %struct.FIELD_RECORD, ptr %596, i32 0, i32 3
  %598 = load i8, ptr %597, align 4, !tbaa !26
  %599 = zext i8 %598 to i32
  %600 = load ptr, ptr %3, align 8, !tbaa !5
  %601 = getelementptr inbounds %struct.DBF, ptr %600, i32 0, i32 18
  %602 = getelementptr inbounds %struct.DBFPROLOG, ptr %601, i32 0, i32 6
  %603 = load i16, ptr %602, align 2, !tbaa !35
  %604 = zext i16 %603 to i32
  %605 = add nsw i32 %604, %599
  %606 = trunc i32 %605 to i16
  store i16 %606, ptr %602, align 2, !tbaa !35
  br label %607

607:                                              ; preds = %590
  %608 = load i8, ptr %4, align 1, !tbaa !15
  %609 = add i8 %608, 1
  store i8 %609, ptr %4, align 1, !tbaa !15
  br label %582, !llvm.loop !36

610:                                              ; preds = %582
  store i8 0, ptr %4, align 1, !tbaa !15
  store i16 1, ptr %5, align 2, !tbaa !37
  br label %611

611:                                              ; preds = %642, %610
  %612 = load i8, ptr %4, align 1, !tbaa !15
  %613 = zext i8 %612 to i32
  %614 = load ptr, ptr %3, align 8, !tbaa !5
  %615 = getelementptr inbounds %struct.DBF, ptr %614, i32 0, i32 15
  %616 = load i8, ptr %615, align 8, !tbaa !21
  %617 = zext i8 %616 to i32
  %618 = icmp slt i32 %613, %617
  br i1 %618, label %619, label %645

619:                                              ; preds = %611
  %620 = load i16, ptr %5, align 2, !tbaa !37
  %621 = sext i16 %620 to i32
  %622 = load ptr, ptr %3, align 8, !tbaa !5
  %623 = getelementptr inbounds %struct.DBF, ptr %622, i32 0, i32 16
  %624 = load ptr, ptr %623, align 8, !tbaa !22
  %625 = load i8, ptr %4, align 1, !tbaa !15
  %626 = zext i8 %625 to i64
  %627 = getelementptr inbounds %struct.FIELD_RECORD, ptr %624, i64 %626
  %628 = getelementptr inbounds %struct.FIELD_RECORD, ptr %627, i32 0, i32 2
  store i32 %621, ptr %628, align 4, !tbaa !38
  %629 = load ptr, ptr %3, align 8, !tbaa !5
  %630 = getelementptr inbounds %struct.DBF, ptr %629, i32 0, i32 16
  %631 = load ptr, ptr %630, align 8, !tbaa !22
  %632 = load i8, ptr %4, align 1, !tbaa !15
  %633 = zext i8 %632 to i64
  %634 = getelementptr inbounds %struct.FIELD_RECORD, ptr %631, i64 %633
  %635 = getelementptr inbounds %struct.FIELD_RECORD, ptr %634, i32 0, i32 3
  %636 = load i8, ptr %635, align 4, !tbaa !26
  %637 = zext i8 %636 to i32
  %638 = load i16, ptr %5, align 2, !tbaa !37
  %639 = sext i16 %638 to i32
  %640 = add nsw i32 %639, %637
  %641 = trunc i32 %640 to i16
  store i16 %641, ptr %5, align 2, !tbaa !37
  br label %642

642:                                              ; preds = %619
  %643 = load i8, ptr %4, align 1, !tbaa !15
  %644 = add i8 %643, 1
  store i8 %644, ptr %4, align 1, !tbaa !15
  br label %611, !llvm.loop !39

645:                                              ; preds = %611
  %646 = load ptr, ptr %3, align 8, !tbaa !5
  %647 = getelementptr inbounds %struct.DBF, ptr %646, i32 0, i32 5
  store i32 1, ptr %647, align 4, !tbaa !16
  store i32 0, ptr %2, align 4
  store i32 1, ptr %21, align 4
  br label %648

648:                                              ; preds = %645, %520, %263, %237, %174, %129, %58, %42, %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 17, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 2, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #9
  %649 = load i32, ptr %2, align 4
  ret i32 %649
}

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

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

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

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

declare i32 @mkstemp(ptr noundef) #4

; Function Attrs: nounwind
declare noalias ptr @fdopen(i32 noundef, ptr noundef) #5

; Function Attrs: nounwind
declare i32 @unlink(ptr noundef) #5

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

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

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

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

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

declare ptr @str_trim(ptr noundef) #4

declare ptr @str_upr(ptr noundef) #4

declare ptr @str_low(ptr noundef) #4

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

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

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strspn(ptr noundef, ptr noundef) #6

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

; Function Attrs: nounwind
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #5

declare double @str_chkd(ptr noundef) #4

declare i32 @fclose(ptr noundef) #4

declare void @rewind(ptr noundef) #4

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 2104}
!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 = !{!7, !7, i64 0}
!16 = !{!10, !11, i64 2068}
!17 = !{!11, !11, i64 0}
!18 = !{!10, !7, i64 2072}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!10, !7, i64 2088}
!22 = !{!10, !6, i64 2096}
!23 = !{!10, !11, i64 2084}
!24 = !{!25, !7, i64 11}
!25 = !{!"FIELD_RECORD", !7, i64 0, !7, i64 11, !11, i64 12, !7, i64 16, !7, i64 17, !7, i64 18}
!26 = !{!25, !7, i64 16}
!27 = !{!25, !7, i64 17}
!28 = !{!10, !7, i64 2073}
!29 = distinct !{!29, !20}
!30 = distinct !{!30, !20}
!31 = !{!10, !7, i64 2112}
!32 = !{!10, !11, i64 2064}
!33 = !{!10, !11, i64 2116}
!34 = !{!10, !13, i64 2120}
!35 = !{!10, !13, i64 2122}
!36 = distinct !{!36, !20}
!37 = !{!13, !13, i64 0}
!38 = !{!25, !11, i64 12}
!39 = distinct !{!39, !20}


; 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.FIELD_RECORD = type { [11 x i8], i8, i32, i8, i8, [14 x i8] }

@__const.rdb_open.rdbname = external hidden unnamed_addr constant [17 x i8], align 16
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 12) i32 @rdb_open(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca [17 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #11
  call void @llvm.lifetime.start.p0(i64 17, ptr nonnull %5) #11
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(17) %5, ptr noundef nonnull align 16 dereferenceable(17) @__const.rdb_open.rdbname, i64 17, i1 false)
  %6 = tail call noalias dereferenceable_or_null(4001) ptr @malloc(i64 noundef 4001) #12
  %7 = getelementptr inbounds i8, ptr %0, i64 2104
  store ptr %6, ptr %7, align 8, !tbaa !5
  %8 = icmp eq ptr %6, null
  br i1 %8, label %.loopexit, label %9

9:                                                ; preds = %1
  %10 = getelementptr inbounds i8, ptr %0, i64 2048
  %11 = load ptr, ptr %10, align 8, !tbaa !13
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %18

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

16:                                               ; preds = %13
  %17 = getelementptr inbounds i8, ptr %0, i64 1024
  store i8 0, ptr %17, align 8, !tbaa !14
  br label %29

18:                                               ; preds = %9
  %19 = getelementptr inbounds i8, ptr %0, i64 2068
  %20 = load i32, ptr %19, align 4, !tbaa !15
  %.not = icmp eq i32 %20, 1
  br i1 %.not, label %29, label %21

21:                                               ; preds = %18
  %22 = call i32 @mkstemp(ptr noundef nonnull %5) #11
  %23 = call noalias ptr @fdopen(i32 noundef %22, ptr noundef nonnull @.str.1) #11
  %24 = icmp eq ptr %23, null
  br i1 %24, label %.loopexit, label %25

25:                                               ; preds = %21
  %26 = call i32 @unlink(ptr noundef nonnull %5) #11
  %27 = getelementptr inbounds i8, ptr %0, i64 1024
  %28 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %27, ptr noundef nonnull dereferenceable(1) %5) #11
  %.pre = load ptr, ptr %10, align 8, !tbaa !13
  br label %29

29:                                               ; preds = %18, %25, %16
  %30 = phi ptr [ %14, %16 ], [ %.pre, %25 ], [ %11, %18 ]
  %.0175 = phi ptr [ null, %16 ], [ %23, %25 ], [ null, %18 ]
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = call ptr @str_gets(ptr noundef %30, ptr noundef %31, i64 noundef 4000) #11
  %.not193221 = icmp eq ptr %32, null
  br i1 %.not193221, label %.loopexit, label %.lr.ph224

.lr.ph224:                                        ; preds = %29
  %.not194 = icmp eq ptr %.0175, null
  %33 = getelementptr inbounds i8, ptr %0, i64 2072
  %34 = getelementptr inbounds i8, ptr %0, i64 2088
  %35 = getelementptr inbounds i8, ptr %0, i64 2096
  %36 = getelementptr inbounds i8, ptr %0, i64 2073
  %37 = getelementptr inbounds i8, ptr %0, i64 2084
  %38 = getelementptr inbounds i8, ptr %0, i64 2068
  br label %39

39:                                               ; preds = %.lr.ph224, %193
  %.0172222 = phi i32 [ 0, %.lr.ph224 ], [ %194, %193 ]
  br i1 %.not194, label %43, label %40

40:                                               ; preds = %39
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %.0175, ptr noundef nonnull @.str.2, ptr noundef %41) #11
  br label %43

43:                                               ; preds = %40, %39
  %44 = icmp eq i32 %.0172222, 0
  %.pre251 = load ptr, ptr %7, align 8, !tbaa !5
  br i1 %44, label %45, label %56

45:                                               ; preds = %43
  %.not195214 = icmp eq ptr %.pre251, null
  br i1 %.not195214, label %select.unfold._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %45
  %46 = load i8, ptr %33, align 8, !tbaa !16
  %47 = sext i8 %46 to i32
  br label %select.unfold

select.unfold:                                    ; preds = %.lr.ph, %select.unfold
  %.0173216 = phi i32 [ 0, %.lr.ph ], [ %50, %select.unfold ]
  %.0176215 = phi ptr [ %.pre251, %.lr.ph ], [ %49, %select.unfold ]
  %48 = call ptr @strchr(ptr noundef nonnull dereferenceable(1) %.0176215, i32 noundef %47) #13
  %.not206 = icmp eq ptr %48, null
  %49 = getelementptr inbounds i8, ptr %48, i64 1
  %50 = add nuw nsw i32 %.0173216, 1
  br i1 %.not206, label %select.unfold._crit_edge, label %select.unfold

select.unfold._crit_edge:                         ; preds = %select.unfold, %45
  %.0173.lcssa = phi i32 [ 0, %45 ], [ %50, %select.unfold ]
  %51 = trunc i32 %.0173.lcssa to i8
  store i8 %51, ptr %34, align 8, !tbaa !17
  %52 = shl i32 %.0173.lcssa, 5
  %53 = and i32 %52, 8160
  %54 = zext nneg i32 %53 to i64
  %calloc = call ptr @calloc(i64 1, i64 %54)
  store ptr %calloc, ptr %35, align 8, !tbaa !18
  %55 = icmp eq ptr %calloc, null
  br i1 %55, label %.loopexit, label %56

56:                                               ; preds = %select.unfold._crit_edge, %43
  %.not196217 = icmp eq ptr %.pre251, null
  br i1 %.not196217, label %._crit_edge, label %.lr.ph220

.lr.ph220:                                        ; preds = %56, %189
  %indvars.iv = phi i64 [ %indvars.iv.next, %189 ], [ 0, %56 ]
  %.2218 = phi ptr [ %.3, %189 ], [ %.pre251, %56 ]
  %57 = load ptr, ptr %35, align 8, !tbaa !18
  %58 = getelementptr inbounds %struct.FIELD_RECORD, ptr %57, i64 %indvars.iv
  %59 = load i8, ptr %33, align 8, !tbaa !16
  %60 = sext i8 %59 to i32
  %61 = call ptr @strchr(ptr noundef nonnull dereferenceable(1) %.2218, i32 noundef %60) #13
  %.not199 = icmp eq ptr %61, null
  br i1 %.not199, label %64, label %62

62:                                               ; preds = %.lr.ph220
  %63 = getelementptr inbounds i8, ptr %61, i64 1
  store i8 0, ptr %61, align 1, !tbaa !14
  br label %64

64:                                               ; preds = %62, %.lr.ph220
  %.3 = phi ptr [ %63, %62 ], [ null, %.lr.ph220 ]
  %65 = call ptr @str_trim(ptr noundef nonnull %.2218) #11
  switch i32 %.0172222, label %115 [
    i32 0, label %66
    i32 1, label %95
    i32 2, label %.thread255
    i32 67, label %184
  ]

66:                                               ; preds = %64
  %67 = load i8, ptr %65, align 1, !tbaa !14
  %68 = icmp eq i8 %67, 0
  br i1 %68, label %.loopexit, label %69

69:                                               ; preds = %66
  %70 = load i32, ptr %37, align 4, !tbaa !19
  switch i32 %70, label %84 [
    i32 1, label %71
    i32 2, label %73
    i32 3, label %75
  ]

71:                                               ; preds = %69
  %72 = call ptr @str_upr(ptr noundef nonnull %65) #11
  br label %84

73:                                               ; preds = %69
  %74 = call ptr @str_low(ptr noundef nonnull %65) #11
  br label %84

75:                                               ; preds = %69
  %76 = tail call ptr @__ctype_toupper_loc() #14
  %77 = load ptr, ptr %76, align 8, !tbaa !20
  %78 = sext i8 %67 to i64
  %79 = getelementptr inbounds i32, ptr %77, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !21
  %81 = trunc i32 %80 to i8
  store i8 %81, ptr %65, align 1, !tbaa !14
  %82 = getelementptr inbounds i8, ptr %65, i64 1
  %83 = call ptr @str_low(ptr noundef nonnull %82) #11
  br label %84

84:                                               ; preds = %75, %73, %71, %69
  %85 = call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %58, ptr noundef nonnull dereferenceable(1) %65, i64 noundef 10) #11
  %86 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %65) #13
  %87 = trunc i64 %86 to i32
  %88 = icmp sgt i32 %87, 10
  br i1 %88, label %89, label %90

89:                                               ; preds = %84
  call void (ptr, ...) @lib_mesg(ptr noundef nonnull @.str.3, ptr noundef nonnull %65, i32 noundef 10, ptr noundef nonnull %65) #11
  br label %90

90:                                               ; preds = %89, %84
  %91 = getelementptr inbounds i8, ptr %58, i64 11
  store i8 67, ptr %91, align 1, !tbaa !22
  %92 = getelementptr inbounds i8, ptr %58, i64 16
  store i8 8, ptr %92, align 4, !tbaa !24
  %93 = getelementptr inbounds i8, ptr %58, i64 17
  store i8 0, ptr %93, align 1, !tbaa !25
  %94 = getelementptr inbounds i8, ptr %58, i64 18
  store i8 0, ptr %94, align 2, !tbaa !14
  br label %189

95:                                               ; preds = %64
  %96 = load i8, ptr %65, align 1, !tbaa !14
  %97 = icmp eq i8 %96, 0
  %.pre252 = load i8, ptr %36, align 1, !tbaa !26
  %.not200 = icmp eq i8 %.pre252, 0
  br i1 %97, label %98, label %99

98:                                               ; preds = %95
  br i1 %.not200, label %.thread255, label %.loopexit

99:                                               ; preds = %95
  br i1 %.not200, label %.thread255, label %100

100:                                              ; preds = %99
  %101 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %65) #13
  %102 = trunc i64 %101 to i8
  %103 = getelementptr inbounds i8, ptr %58, i64 16
  store i8 %102, ptr %103, align 4, !tbaa !24
  %104 = getelementptr inbounds i8, ptr %58, i64 18
  store i8 %102, ptr %104, align 2, !tbaa !14
  %105 = call i64 @strspn(ptr noundef nonnull %65, ptr noundef nonnull @.str.4) #13
  %106 = and i64 %101, 255
  %.not202 = icmp eq i64 %105, %106
  br i1 %.not202, label %189, label %.loopexit

.thread255:                                       ; preds = %98, %64, %99
  %107 = getelementptr inbounds i8, ptr %58, i64 18
  %108 = load i8, ptr %107, align 2, !tbaa !14
  %109 = icmp ugt i8 %108, 1
  %110 = select i1 %109, i8 68, i8 76
  %111 = getelementptr inbounds i8, ptr %58, i64 11
  store i8 %110, ptr %111, align 1, !tbaa !22
  %112 = select i1 %109, i8 8, i8 1
  %113 = getelementptr inbounds i8, ptr %58, i64 16
  store i8 %112, ptr %113, align 4, !tbaa !24
  %114 = getelementptr inbounds i8, ptr %58, i64 17
  store i8 0, ptr %114, align 1, !tbaa !25
  br label %115

115:                                              ; preds = %.thread255, %64
  %116 = load i8, ptr %65, align 1, !tbaa !14
  %117 = icmp eq i8 %116, 0
  br i1 %117, label %189, label %118

118:                                              ; preds = %115
  %119 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %65) #13
  %120 = trunc i64 %119 to i32
  %121 = getelementptr inbounds i8, ptr %58, i64 18
  %122 = load i8, ptr %121, align 2, !tbaa !14
  %123 = zext i8 %122 to i32
  %. = call i32 @llvm.umax.i32(i32 %120, i32 %123)
  %124 = trunc i32 %. to i8
  store i8 %124, ptr %121, align 2, !tbaa !14
  %125 = getelementptr inbounds i8, ptr %58, i64 11
  %126 = load i8, ptr %125, align 1, !tbaa !22
  %127 = zext i8 %126 to i32
  %128 = add nsw i32 %127, -68
  %129 = call i32 @llvm.fshl.i32(i32 %128, i32 %128, i32 31)
  switch i32 %129, label %184 [
    i32 4, label %130
    i32 0, label %140
    i32 5, label %161
    i32 1, label %161
  ]

130:                                              ; preds = %118
  %131 = icmp eq i32 %120, 1
  br i1 %131, label %132, label %138

132:                                              ; preds = %130
  %133 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %58, ptr noundef nonnull dereferenceable(1) @.str.5) #13
  %.not203 = icmp eq i32 %133, 0
  br i1 %.not203, label %138, label %134

134:                                              ; preds = %132
  %135 = load i8, ptr %65, align 1, !tbaa !14
  %136 = sext i8 %135 to i32
  %137 = call ptr @strchr(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %136) #13
  %.not204 = icmp eq ptr %137, null
  br i1 %.not204, label %138, label %184

138:                                              ; preds = %134, %132, %130
  store i8 68, ptr %125, align 1, !tbaa !22
  %139 = getelementptr inbounds i8, ptr %58, i64 16
  store i8 8, ptr %139, align 4, !tbaa !24
  br label %140

140:                                              ; preds = %138, %118
  switch i32 %120, label %159 [
    i32 6, label %141
    i32 8, label %150
  ]

141:                                              ; preds = %140
  %142 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %65, ptr noundef nonnull @.str.7, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4) #11
  %143 = icmp eq i32 %142, 3
  %144 = load i32, ptr %3, align 4
  %145 = add i32 %144, -1
  %146 = icmp ult i32 %145, 12
  %or.cond3 = select i1 %143, i1 %146, i1 false
  %147 = load i32, ptr %4, align 4
  %148 = add i32 %147, -1
  %149 = icmp ult i32 %148, 31
  %or.cond7 = select i1 %or.cond3, i1 %149, i1 false
  br i1 %or.cond7, label %184, label %159

150:                                              ; preds = %140
  %151 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %65, ptr noundef nonnull @.str.8, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4) #11
  %152 = icmp eq i32 %151, 3
  %153 = load i32, ptr %3, align 4
  %154 = add i32 %153, -1
  %155 = icmp ult i32 %154, 12
  %or.cond11 = select i1 %152, i1 %155, i1 false
  %156 = load i32, ptr %4, align 4
  %157 = add i32 %156, -1
  %158 = icmp ult i32 %157, 31
  %or.cond15 = select i1 %or.cond11, i1 %158, i1 false
  br i1 %or.cond15, label %184, label %159

159:                                              ; preds = %141, %140, %150
  store i8 78, ptr %125, align 1, !tbaa !22
  %160 = getelementptr inbounds i8, ptr %58, i64 16
  store i8 1, ptr %160, align 4, !tbaa !24
  br label %161

161:                                              ; preds = %159, %118, %118
  %162 = call double @str_chkd(ptr noundef nonnull %65) #11
  %163 = fcmp une double %162, 0x7FF0000000000000
  br i1 %163, label %164, label %182

164:                                              ; preds = %161
  %165 = call ptr @strchr(ptr noundef nonnull dereferenceable(1) %65, i32 noundef 46) #13
  %166 = icmp eq ptr %165, null
  %167 = ptrtoint ptr %165 to i64
  %168 = ptrtoint ptr %65 to i64
  %.neg = add i64 %119, %168
  %169 = sub i64 %.neg, %167
  %170 = trunc i64 %169 to i32
  %171 = add i32 %170, -1
  %.0171 = select i1 %166, i32 0, i32 %171
  %172 = getelementptr inbounds i8, ptr %58, i64 16
  %173 = load i8, ptr %172, align 4, !tbaa !24
  %174 = load i8, ptr %121, align 2, !tbaa !14
  %.in = call i8 @llvm.umax.i8(i8 %173, i8 %174)
  store i8 %.in, ptr %172, align 4, !tbaa !24
  %175 = getelementptr inbounds i8, ptr %58, i64 17
  %176 = load i8, ptr %175, align 1, !tbaa !25
  %177 = zext i8 %176 to i32
  %178 = call i32 @llvm.umax.i32(i32 %.0171, i32 %177)
  %179 = trunc i32 %178 to i8
  store i8 %179, ptr %175, align 1, !tbaa !25
  %180 = icmp ugt i8 %.in, 15
  br i1 %180, label %181, label %184

181:                                              ; preds = %164
  store i8 70, ptr %125, align 1, !tbaa !22
  br label %184

182:                                              ; preds = %161
  store i8 67, ptr %125, align 1, !tbaa !22
  %183 = getelementptr inbounds i8, ptr %58, i64 17
  store i8 0, ptr %183, align 1, !tbaa !25
  br label %184

184:                                              ; preds = %118, %182, %134, %141, %150, %181, %164, %64
  %185 = getelementptr inbounds i8, ptr %58, i64 16
  %186 = load i8, ptr %185, align 4, !tbaa !24
  %187 = getelementptr inbounds i8, ptr %58, i64 18
  %188 = load i8, ptr %187, align 2, !tbaa !14
  %.207 = call i8 @llvm.umax.i8(i8 %186, i8 %188)
  store i8 %.207, ptr %185, align 4, !tbaa !24
  br label %189

189:                                              ; preds = %90, %184, %100, %115
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.not196 = icmp eq ptr %.3, null
  br i1 %.not196, label %._crit_edge, label %.lr.ph220, !llvm.loop !27

._crit_edge:                                      ; preds = %189, %56
  %190 = load i32, ptr %38, align 4, !tbaa !15
  %191 = icmp eq i32 %190, 1
  %192 = icmp eq i32 %.0172222, 1
  %or.cond17 = select i1 %191, i1 %192, i1 false
  br i1 %or.cond17, label %.thread.thread, label %193

193:                                              ; preds = %._crit_edge
  %194 = add nuw nsw i32 %.0172222, 1
  %195 = load ptr, ptr %10, align 8, !tbaa !13
  %196 = load ptr, ptr %7, align 8, !tbaa !5
  %197 = call ptr @str_gets(ptr noundef %195, ptr noundef %196, i64 noundef 4000) #11
  %.not193 = icmp eq ptr %197, null
  br i1 %.not193, label %.thread, label %39, !llvm.loop !29

.thread:                                          ; preds = %193
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 2068
  %.pre253 = load i32, ptr %.phi.trans.insert, align 4, !tbaa !15
  %198 = icmp eq i32 %.pre253, 1
  %199 = add nsw i32 %.0172222, -1
  br i1 %198, label %.thread.thread, label %200

200:                                              ; preds = %.thread
  %.not198 = icmp eq ptr %.0175, null
  %.pre254 = load ptr, ptr %10, align 8, !tbaa !13
  br i1 %.not198, label %203, label %201

201:                                              ; preds = %200
  %202 = call i32 @fclose(ptr noundef %.pre254)
  store ptr %.0175, ptr %10, align 8, !tbaa !13
  br label %203

203:                                              ; preds = %201, %200
  %204 = phi ptr [ %.0175, %201 ], [ %.pre254, %200 ]
  call void @rewind(ptr noundef %204)
  %205 = load ptr, ptr %10, align 8, !tbaa !13
  %206 = load ptr, ptr %7, align 8, !tbaa !5
  %207 = call ptr @str_gets(ptr noundef %205, ptr noundef %206, i64 noundef 4000) #11
  %208 = load ptr, ptr %10, align 8, !tbaa !13
  %209 = load ptr, ptr %7, align 8, !tbaa !5
  %210 = call ptr @str_gets(ptr noundef %208, ptr noundef %209, i64 noundef 4000) #11
  br label %.thread.thread

.thread.thread:                                   ; preds = %._crit_edge, %203, %.thread
  %.0172213260 = phi i32 [ %199, %203 ], [ %199, %.thread ], [ -1, %._crit_edge ]
  %211 = getelementptr inbounds i8, ptr %0, i64 2068
  %212 = getelementptr inbounds i8, ptr %0, i64 2112
  store i8 3, ptr %212, align 8, !tbaa !30
  %213 = getelementptr inbounds i8, ptr %0, i64 2064
  store i32 0, ptr %213, align 8, !tbaa !31
  %214 = getelementptr inbounds i8, ptr %0, i64 2116
  store i32 %.0172213260, ptr %214, align 4, !tbaa !32
  %215 = getelementptr inbounds i8, ptr %0, i64 2088
  %216 = load i8, ptr %215, align 8, !tbaa !17
  %217 = zext i8 %216 to i16
  %218 = shl nuw nsw i16 %217, 5
  %219 = add nuw nsw i16 %218, 33
  %220 = getelementptr inbounds i8, ptr %0, i64 2120
  store i16 %219, ptr %220, align 8, !tbaa !33
  %221 = getelementptr inbounds i8, ptr %0, i64 2122
  store i16 1, ptr %221, align 2, !tbaa !34
  %.not234 = icmp eq i8 %216, 0
  br i1 %.not234, label %._crit_edge233, label %.lr.ph229

.lr.ph229:                                        ; preds = %.thread.thread
  %222 = getelementptr inbounds i8, ptr %0, i64 2096
  %223 = load ptr, ptr %222, align 8, !tbaa !18
  %wide.trip.count = zext i8 %216 to i64
  %min.iters.check = icmp ult i8 %216, 16
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph229
  %indvars.iv243.ph = phi i64 [ 0, %.lr.ph229 ], [ %n.vec, %middle.block ]
  %.ph = phi i16 [ 1, %.lr.ph229 ], [ %292, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph229
  %n.vec = and i64 %wide.trip.count, 240
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <8 x i16> [ <i16 1, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0>, %vector.ph ], [ %289, %vector.body ]
  %vec.phi269 = phi <8 x i16> [ zeroinitializer, %vector.ph ], [ %290, %vector.body ]
  %224 = or disjoint i64 %index, 1
  %225 = or disjoint i64 %index, 2
  %226 = or disjoint i64 %index, 3
  %227 = or disjoint i64 %index, 4
  %228 = or disjoint i64 %index, 5
  %229 = or disjoint i64 %index, 6
  %230 = or disjoint i64 %index, 7
  %231 = or disjoint i64 %index, 8
  %232 = or disjoint i64 %index, 9
  %233 = or disjoint i64 %index, 10
  %234 = or disjoint i64 %index, 11
  %235 = or disjoint i64 %index, 12
  %236 = or disjoint i64 %index, 13
  %237 = or disjoint i64 %index, 14
  %238 = or disjoint i64 %index, 15
  %239 = getelementptr inbounds %struct.FIELD_RECORD, ptr %223, i64 %index, i32 3
  %240 = getelementptr inbounds %struct.FIELD_RECORD, ptr %223, i64 %224, i32 3
  %241 = getelementptr inbounds %struct.FIELD_RECORD, ptr %223, i64 %225, i32 3
  %242 = getelementptr inbounds %struct.FIELD_RECORD, ptr %223, i64 %226, i32 3
  %243 = getelementptr inbounds %struct.FIELD_RECORD, ptr %223, i64 %227, i32 3
  %244 = getelementptr inbounds %struct.FIELD_RECORD, ptr %223, i64 %228, i32 3
  %245 = getelementptr inbounds %struct.FIELD_RECORD, ptr %223, i64 %229, i32 3
  %246 = getelementptr inbounds %struct.FIELD_RECORD, ptr %223, i64 %230, i32 3
  %247 = getelementptr inbounds %struct.FIELD_RECORD, ptr %223, i64 %231, i32 3
  %248 = getelementptr inbounds %struct.FIELD_RECORD, ptr %223, i64 %232, i32 3
  %249 = getelementptr inbounds %struct.FIELD_RECORD, ptr %223, i64 %233, i32 3
  %250 = getelementptr inbounds %struct.FIELD_RECORD, ptr %223, i64 %234, i32 3
  %251 = getelementptr inbounds %struct.FIELD_RECORD, ptr %223, i64 %235, i32 3
  %252 = getelementptr inbounds %struct.FIELD_RECORD, ptr %223, i64 %236, i32 3
  %253 = getelementptr inbounds %struct.FIELD_RECORD, ptr %223, i64 %237, i32 3
  %254 = getelementptr inbounds %struct.FIELD_RECORD, ptr %223, i64 %238, i32 3
  %255 = load i8, ptr %239, align 4, !tbaa !24
  %256 = load i8, ptr %240, align 4, !tbaa !24
  %257 = load i8, ptr %241, align 4, !tbaa !24
  %258 = load i8, ptr %242, align 4, !tbaa !24
  %259 = load i8, ptr %243, align 4, !tbaa !24
  %260 = load i8, ptr %244, align 4, !tbaa !24
  %261 = load i8, ptr %245, align 4, !tbaa !24
  %262 = load i8, ptr %246, align 4, !tbaa !24
  %263 = insertelement <8 x i8> poison, i8 %255, i64 0
  %264 = insertelement <8 x i8> %263, i8 %256, i64 1
  %265 = insertelement <8 x i8> %264, i8 %257, i64 2
  %266 = insertelement <8 x i8> %265, i8 %258, i64 3
  %267 = insertelement <8 x i8> %266, i8 %259, i64 4
  %268 = insertelement <8 x i8> %267, i8 %260, i64 5
  %269 = insertelement <8 x i8> %268, i8 %261, i64 6
  %270 = insertelement <8 x i8> %269, i8 %262, i64 7
  %271 = load i8, ptr %247, align 4, !tbaa !24
  %272 = load i8, ptr %248, align 4, !tbaa !24
  %273 = load i8, ptr %249, align 4, !tbaa !24
  %274 = load i8, ptr %250, align 4, !tbaa !24
  %275 = load i8, ptr %251, align 4, !tbaa !24
  %276 = load i8, ptr %252, align 4, !tbaa !24
  %277 = load i8, ptr %253, align 4, !tbaa !24
  %278 = load i8, ptr %254, align 4, !tbaa !24
  %279 = insertelement <8 x i8> poison, i8 %271, i64 0
  %280 = insertelement <8 x i8> %279, i8 %272, i64 1
  %281 = insertelement <8 x i8> %280, i8 %273, i64 2
  %282 = insertelement <8 x i8> %281, i8 %274, i64 3
  %283 = insertelement <8 x i8> %282, i8 %275, i64 4
  %284 = insertelement <8 x i8> %283, i8 %276, i64 5
  %285 = insertelement <8 x i8> %284, i8 %277, i64 6
  %286 = insertelement <8 x i8> %285, i8 %278, i64 7
  %287 = zext <8 x i8> %270 to <8 x i16>
  %288 = zext <8 x i8> %286 to <8 x i16>
  %289 = add <8 x i16> %vec.phi, %287
  %290 = add <8 x i16> %vec.phi269, %288
  %index.next = add nuw i64 %index, 16
  %291 = icmp eq i64 %index.next, %n.vec
  br i1 %291, label %middle.block, label %vector.body, !llvm.loop !35

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <8 x i16> %290, %289
  %292 = call i16 @llvm.vector.reduce.add.v8i16(<8 x i16> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader, label %scalar.ph.preheader

.preheader:                                       ; preds = %scalar.ph, %middle.block
  %.lcssa = phi i16 [ %292, %middle.block ], [ %300, %scalar.ph ]
  store i16 %.lcssa, ptr %221, align 2, !tbaa !34
  br i1 %.not234, label %._crit_edge233, label %.lr.ph232

.lr.ph232:                                        ; preds = %.preheader
  %293 = getelementptr inbounds i8, ptr %0, i64 2096
  %294 = load ptr, ptr %293, align 8, !tbaa !18
  %xtraiter = and i64 %wide.trip.count, 1
  %295 = icmp eq i8 %216, 1
  br i1 %295, label %._crit_edge233.loopexit.unr-lcssa, label %.lr.ph232.new

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

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv243 = phi i64 [ %indvars.iv.next244, %scalar.ph ], [ %indvars.iv243.ph, %scalar.ph.preheader ]
  %296 = phi i16 [ %300, %scalar.ph ], [ %.ph, %scalar.ph.preheader ]
  %297 = getelementptr inbounds %struct.FIELD_RECORD, ptr %223, i64 %indvars.iv243, i32 3
  %298 = load i8, ptr %297, align 4, !tbaa !24
  %299 = zext i8 %298 to i16
  %300 = add i16 %296, %299
  %indvars.iv.next244 = add nuw nsw i64 %indvars.iv243, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next244, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %scalar.ph, !llvm.loop !38

301:                                              ; preds = %301, %.lr.ph232.new
  %indvars.iv246 = phi i64 [ 0, %.lr.ph232.new ], [ %indvars.iv.next247.1, %301 ]
  %.0170230 = phi i32 [ 1, %.lr.ph232.new ], [ %313, %301 ]
  %niter = phi i64 [ 0, %.lr.ph232.new ], [ %niter.next.1, %301 ]
  %sext = shl i32 %.0170230, 16
  %302 = ashr exact i32 %sext, 16
  %303 = getelementptr inbounds %struct.FIELD_RECORD, ptr %294, i64 %indvars.iv246, i32 2
  store i32 %302, ptr %303, align 4, !tbaa !39
  %304 = getelementptr inbounds %struct.FIELD_RECORD, ptr %294, i64 %indvars.iv246, i32 3
  %305 = load i8, ptr %304, align 4, !tbaa !24
  %306 = zext i8 %305 to i32
  %307 = add nsw i32 %.0170230, %306
  %indvars.iv.next247 = or disjoint i64 %indvars.iv246, 1
  %sext.1 = shl i32 %307, 16
  %308 = ashr exact i32 %sext.1, 16
  %309 = getelementptr inbounds %struct.FIELD_RECORD, ptr %294, i64 %indvars.iv.next247, i32 2
  store i32 %308, ptr %309, align 4, !tbaa !39
  %310 = getelementptr inbounds %struct.FIELD_RECORD, ptr %294, i64 %indvars.iv.next247, i32 3
  %311 = load i8, ptr %310, align 4, !tbaa !24
  %312 = zext i8 %311 to i32
  %313 = add nsw i32 %308, %312
  %indvars.iv.next247.1 = add nuw nsw i64 %indvars.iv246, 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_edge233.loopexit.unr-lcssa.loopexit, label %301, !llvm.loop !40

._crit_edge233.loopexit.unr-lcssa.loopexit:       ; preds = %301
  %314 = shl i32 %313, 16
  %315 = ashr exact i32 %314, 16
  br label %._crit_edge233.loopexit.unr-lcssa

._crit_edge233.loopexit.unr-lcssa:                ; preds = %._crit_edge233.loopexit.unr-lcssa.loopexit, %.lr.ph232
  %indvars.iv246.unr = phi i64 [ 0, %.lr.ph232 ], [ %indvars.iv.next247.1, %._crit_edge233.loopexit.unr-lcssa.loopexit ]
  %.0170230.unr = phi i32 [ 1, %.lr.ph232 ], [ %315, %._crit_edge233.loopexit.unr-lcssa.loopexit ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge233, label %._crit_edge233.loopexit.epilog-lcssa

._crit_edge233.loopexit.epilog-lcssa:             ; preds = %._crit_edge233.loopexit.unr-lcssa
  %316 = getelementptr inbounds %struct.FIELD_RECORD, ptr %294, i64 %indvars.iv246.unr, i32 2
  store i32 %.0170230.unr, ptr %316, align 4, !tbaa !39
  br label %._crit_edge233

._crit_edge233:                                   ; preds = %._crit_edge233.loopexit.epilog-lcssa, %._crit_edge233.loopexit.unr-lcssa, %.thread.thread, %.preheader
  store i32 1, ptr %211, align 4, !tbaa !15
  br label %.loopexit

.loopexit:                                        ; preds = %select.unfold._crit_edge, %100, %98, %66, %29, %21, %13, %1, %._crit_edge233
  %.0 = phi i32 [ 0, %._crit_edge233 ], [ 8, %1 ], [ 2, %13 ], [ 3, %21 ], [ 11, %29 ], [ 11, %66 ], [ 11, %98 ], [ 11, %100 ], [ 8, %select.unfold._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 17, ptr nonnull %5) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #11
  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: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #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: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #4

declare i32 @mkstemp(ptr noundef) local_unnamed_addr #5

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

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

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

declare ptr @str_gets(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #5

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

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

declare ptr @str_trim(ptr noundef) local_unnamed_addr #5

declare ptr @str_upr(ptr noundef) local_unnamed_addr #5

declare ptr @str_low(ptr noundef) local_unnamed_addr #5

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

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

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

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

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

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

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

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

declare double @str_chkd(ptr noundef) local_unnamed_addr #5

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i8 @llvm.umax.i8(i8, i8) #9

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i16 @llvm.vector.reduce.add.v8i16(<8 x i16>) #9

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { "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 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 #7 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { mustprogress nofree nosync nounwind willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #11 = { nounwind }
attributes #12 = { nounwind allocsize(0) }
attributes #13 = { nounwind willreturn memory(read) }
attributes #14 = { nounwind willreturn memory(none) }

!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, !9, i64 2104}
!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 = !{!7, !7, i64 0}
!15 = !{!6, !10, i64 2068}
!16 = !{!6, !7, i64 2072}
!17 = !{!6, !7, i64 2088}
!18 = !{!6, !9, i64 2096}
!19 = !{!6, !10, i64 2084}
!20 = !{!9, !9, i64 0}
!21 = !{!10, !10, i64 0}
!22 = !{!23, !7, i64 11}
!23 = !{!"FIELD_RECORD", !7, i64 0, !7, i64 11, !10, i64 12, !7, i64 16, !7, i64 17, !7, i64 18}
!24 = !{!23, !7, i64 16}
!25 = !{!23, !7, i64 17}
!26 = !{!6, !7, i64 2073}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}
!30 = !{!6, !7, i64 2112}
!31 = !{!6, !10, i64 2064}
!32 = !{!6, !10, i64 2116}
!33 = !{!6, !12, i64 2120}
!34 = !{!6, !12, i64 2122}
!35 = distinct !{!35, !28, !36, !37}
!36 = !{!"llvm.loop.isvectorized", i32 1}
!37 = !{!"llvm.loop.unroll.runtime.disable"}
!38 = distinct !{!38, !28, !37, !36}
!39 = !{!23, !10, i64 12}
!40 = distinct !{!40, !28}


; Effective O3 passes: ADCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass