; LLVM IR from serban/kmeans :: file_io (file_read)

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

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [57 x i8], align 1
@__PRETTY_FUNCTION__.file_read = external hidden unnamed_addr constant [45 x i8], align 1
@_debug = external global i32, align 4
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @file_read(i32 noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  store i32 %0, ptr %6, align 4, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %21 = load i32, ptr %6, align 4, !tbaa !5
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %133

23:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  %24 = load ptr, ptr %7, align 8, !tbaa !9
  %25 = call i32 (ptr, i32, ...) @open(ptr noundef %24, i32 noundef 0, ptr noundef @.str)
  store i32 %25, ptr %15, align 4, !tbaa !5
  %26 = icmp eq i32 %25, -1
  br i1 %26, label %27, label %31

27:                                               ; preds = %23
  %28 = load ptr, ptr @stderr, align 8, !tbaa !9
  %29 = load ptr, ptr %7, align 8, !tbaa !9
  %30 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef @.str.1, ptr noundef %29) #9
  store ptr null, ptr %5, align 8
  store i32 1, ptr %16, align 4
  br label %130

31:                                               ; preds = %23
  %32 = load i32, ptr %15, align 4, !tbaa !5
  %33 = load ptr, ptr %8, align 8, !tbaa !9
  %34 = call i64 @read(i32 noundef %32, ptr noundef %33, i64 noundef 4)
  store i64 %34, ptr %14, align 8, !tbaa !11
  %35 = load i64, ptr %14, align 8, !tbaa !11
  %36 = icmp eq i64 %35, 4
  br i1 %36, label %37, label %38

37:                                               ; preds = %31
  br label %39

38:                                               ; preds = %31
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 48, ptr noundef @__PRETTY_FUNCTION__.file_read) #10
  unreachable

39:                                               ; preds = %37
  %40 = load i32, ptr %15, align 4, !tbaa !5
  %41 = load ptr, ptr %9, align 8, !tbaa !9
  %42 = call i64 @read(i32 noundef %40, ptr noundef %41, i64 noundef 4)
  store i64 %42, ptr %14, align 8, !tbaa !11
  %43 = load i64, ptr %14, align 8, !tbaa !11
  %44 = icmp eq i64 %43, 4
  br i1 %44, label %45, label %46

45:                                               ; preds = %39
  br label %47

46:                                               ; preds = %39
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 50, ptr noundef @__PRETTY_FUNCTION__.file_read) #10
  unreachable

47:                                               ; preds = %45
  %48 = load i32, ptr @_debug, align 4, !tbaa !5
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %50, label %59

50:                                               ; preds = %47
  %51 = load ptr, ptr %7, align 8, !tbaa !9
  %52 = load ptr, ptr %8, align 8, !tbaa !9
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, ptr noundef %51, i32 noundef %53)
  %55 = load ptr, ptr %7, align 8, !tbaa !9
  %56 = load ptr, ptr %9, align 8, !tbaa !9
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, ptr noundef %55, i32 noundef %57)
  br label %59

59:                                               ; preds = %50, %47
  %60 = load ptr, ptr %8, align 8, !tbaa !9
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = load ptr, ptr %9, align 8, !tbaa !9
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = mul nsw i32 %61, %63
  store i32 %64, ptr %13, align 4, !tbaa !5
  %65 = load ptr, ptr %8, align 8, !tbaa !9
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = mul i64 %67, 8
  %69 = call noalias ptr @malloc(i64 noundef %68) #11
  store ptr %69, ptr %10, align 8, !tbaa !9
  %70 = load ptr, ptr %10, align 8, !tbaa !9
  %71 = icmp ne ptr %70, null
  br i1 %71, label %72, label %73

72:                                               ; preds = %59
  br label %74

73:                                               ; preds = %59
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.3, i32 noundef 59, ptr noundef @__PRETTY_FUNCTION__.file_read) #10
  unreachable

74:                                               ; preds = %72
  %75 = load i32, ptr %13, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = mul i64 %76, 4
  %78 = call noalias ptr @malloc(i64 noundef %77) #11
  %79 = load ptr, ptr %10, align 8, !tbaa !9
  %80 = getelementptr inbounds ptr, ptr %79, i64 0
  store ptr %78, ptr %80, align 8, !tbaa !9
  %81 = load ptr, ptr %10, align 8, !tbaa !9
  %82 = getelementptr inbounds ptr, ptr %81, i64 0
  %83 = load ptr, ptr %82, align 8, !tbaa !9
  %84 = icmp ne ptr %83, null
  br i1 %84, label %85, label %86

85:                                               ; preds = %74
  br label %87

86:                                               ; preds = %74
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.3, i32 noundef 61, ptr noundef @__PRETTY_FUNCTION__.file_read) #10
  unreachable

87:                                               ; preds = %85
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %108, %87
  %89 = load i32, ptr %11, align 4, !tbaa !5
  %90 = load ptr, ptr %8, align 8, !tbaa !9
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = icmp slt i32 %89, %91
  br i1 %92, label %93, label %111

93:                                               ; preds = %88
  %94 = load ptr, ptr %10, align 8, !tbaa !9
  %95 = load i32, ptr %11, align 4, !tbaa !5
  %96 = sub nsw i32 %95, 1
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds ptr, ptr %94, i64 %97
  %99 = load ptr, ptr %98, align 8, !tbaa !9
  %100 = load ptr, ptr %9, align 8, !tbaa !9
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds float, ptr %99, i64 %102
  %104 = load ptr, ptr %10, align 8, !tbaa !9
  %105 = load i32, ptr %11, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds ptr, ptr %104, i64 %106
  store ptr %103, ptr %107, align 8, !tbaa !9
  br label %108

108:                                              ; preds = %93
  %109 = load i32, ptr %11, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %11, align 4, !tbaa !5
  br label %88, !llvm.loop !13

111:                                              ; preds = %88
  %112 = load i32, ptr %15, align 4, !tbaa !5
  %113 = load ptr, ptr %10, align 8, !tbaa !9
  %114 = getelementptr inbounds ptr, ptr %113, i64 0
  %115 = load ptr, ptr %114, align 8, !tbaa !9
  %116 = load i32, ptr %13, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = mul i64 %117, 4
  %119 = call i64 @read(i32 noundef %112, ptr noundef %115, i64 noundef %118)
  store i64 %119, ptr %14, align 8, !tbaa !11
  %120 = load i64, ptr %14, align 8, !tbaa !11
  %121 = load i32, ptr %13, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = mul i64 %122, 4
  %124 = icmp eq i64 %120, %123
  br i1 %124, label %125, label %126

125:                                              ; preds = %111
  br label %127

126:                                              ; preds = %111
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.3, i32 noundef 66, ptr noundef @__PRETTY_FUNCTION__.file_read) #10
  unreachable

127:                                              ; preds = %125
  %128 = load i32, ptr %15, align 4, !tbaa !5
  %129 = call i32 @close(i32 noundef %128)
  store i32 0, ptr %16, align 4
  br label %130

130:                                              ; preds = %127, %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  %131 = load i32, ptr %16, align 4
  switch i32 %131, label %342 [
    i32 0, label %132
  ]

132:                                              ; preds = %130
  br label %340

133:                                              ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  %134 = load ptr, ptr %7, align 8, !tbaa !9
  %135 = call noalias ptr @fopen(ptr noundef %134, ptr noundef @.str.9)
  store ptr %135, ptr %17, align 8, !tbaa !9
  %136 = icmp eq ptr %135, null
  br i1 %136, label %137, label %141

137:                                              ; preds = %133
  %138 = load ptr, ptr @stderr, align 8, !tbaa !9
  %139 = load ptr, ptr %7, align 8, !tbaa !9
  %140 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %138, ptr noundef @.str.1, ptr noundef %139) #9
  store ptr null, ptr %5, align 8
  store i32 1, ptr %16, align 4
  br label %337

141:                                              ; preds = %133
  store i32 128, ptr %20, align 4, !tbaa !5
  %142 = load i32, ptr %20, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = call noalias ptr @malloc(i64 noundef %143) #11
  store ptr %144, ptr %18, align 8, !tbaa !9
  %145 = load ptr, ptr %18, align 8, !tbaa !9
  %146 = icmp ne ptr %145, null
  br i1 %146, label %147, label %148

147:                                              ; preds = %141
  br label %149

148:                                              ; preds = %141
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.3, i32 noundef 83, ptr noundef @__PRETTY_FUNCTION__.file_read) #10
  unreachable

149:                                              ; preds = %147
  %150 = load ptr, ptr %8, align 8, !tbaa !9
  store i32 0, ptr %150, align 4, !tbaa !5
  br label %151

151:                                              ; preds = %202, %149
  %152 = load ptr, ptr %18, align 8, !tbaa !9
  %153 = load i32, ptr %20, align 4, !tbaa !5
  %154 = load ptr, ptr %17, align 8, !tbaa !9
  %155 = call ptr @fgets(ptr noundef %152, i32 noundef %153, ptr noundef %154)
  %156 = icmp ne ptr %155, null
  br i1 %156, label %157, label %203

157:                                              ; preds = %151
  br label %158

158:                                              ; preds = %193, %157
  %159 = load ptr, ptr %18, align 8, !tbaa !9
  %160 = call i64 @strlen(ptr noundef %159) #12
  %161 = load i32, ptr %20, align 4, !tbaa !5
  %162 = sub nsw i32 %161, 1
  %163 = sext i32 %162 to i64
  %164 = icmp eq i64 %160, %163
  br i1 %164, label %165, label %194

165:                                              ; preds = %158
  %166 = load ptr, ptr %18, align 8, !tbaa !9
  %167 = call i64 @strlen(ptr noundef %166) #12
  %168 = trunc i64 %167 to i32
  store i32 %168, ptr %13, align 4, !tbaa !5
  %169 = load ptr, ptr %17, align 8, !tbaa !9
  %170 = load i32, ptr %13, align 4, !tbaa !5
  %171 = sub nsw i32 0, %170
  %172 = sext i32 %171 to i64
  %173 = call i32 @fseek(ptr noundef %169, i64 noundef %172, i32 noundef 1)
  %174 = load i32, ptr %20, align 4, !tbaa !5
  %175 = add nsw i32 %174, 128
  store i32 %175, ptr %20, align 4, !tbaa !5
  %176 = load ptr, ptr %18, align 8, !tbaa !9
  %177 = load i32, ptr %20, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = call ptr @realloc(ptr noundef %176, i64 noundef %178) #13
  store ptr %179, ptr %18, align 8, !tbaa !9
  %180 = load ptr, ptr %18, align 8, !tbaa !9
  %181 = icmp ne ptr %180, null
  br i1 %181, label %182, label %183

182:                                              ; preds = %165
  br label %184

183:                                              ; preds = %165
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.3, i32 noundef 96, ptr noundef @__PRETTY_FUNCTION__.file_read) #10
  unreachable

184:                                              ; preds = %182
  %185 = load ptr, ptr %18, align 8, !tbaa !9
  %186 = load i32, ptr %20, align 4, !tbaa !5
  %187 = load ptr, ptr %17, align 8, !tbaa !9
  %188 = call ptr @fgets(ptr noundef %185, i32 noundef %186, ptr noundef %187)
  store ptr %188, ptr %19, align 8, !tbaa !9
  %189 = load ptr, ptr %19, align 8, !tbaa !9
  %190 = icmp ne ptr %189, null
  br i1 %190, label %191, label %192

191:                                              ; preds = %184
  br label %193

192:                                              ; preds = %184
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.3, i32 noundef 99, ptr noundef @__PRETTY_FUNCTION__.file_read) #10
  unreachable

193:                                              ; preds = %191
  br label %158, !llvm.loop !15

194:                                              ; preds = %158
  %195 = load ptr, ptr %18, align 8, !tbaa !9
  %196 = call ptr @strtok(ptr noundef %195, ptr noundef @.str.12) #9
  %197 = icmp ne ptr %196, null
  br i1 %197, label %198, label %202

198:                                              ; preds = %194
  %199 = load ptr, ptr %8, align 8, !tbaa !9
  %200 = load i32, ptr %199, align 4, !tbaa !5
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %199, align 4, !tbaa !5
  br label %202

202:                                              ; preds = %198, %194
  br label %151, !llvm.loop !16

203:                                              ; preds = %151
  %204 = load ptr, ptr %17, align 8, !tbaa !9
  call void @rewind(ptr noundef %204)
  %205 = load i32, ptr @_debug, align 4, !tbaa !5
  %206 = icmp ne i32 %205, 0
  br i1 %206, label %207, label %210

207:                                              ; preds = %203
  %208 = load i32, ptr %20, align 4, !tbaa !5
  %209 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, i32 noundef %208)
  br label %210

210:                                              ; preds = %207, %203
  %211 = load ptr, ptr %9, align 8, !tbaa !9
  store i32 0, ptr %211, align 4, !tbaa !5
  br label %212

212:                                              ; preds = %231, %210
  %213 = load ptr, ptr %18, align 8, !tbaa !9
  %214 = load i32, ptr %20, align 4, !tbaa !5
  %215 = load ptr, ptr %17, align 8, !tbaa !9
  %216 = call ptr @fgets(ptr noundef %213, i32 noundef %214, ptr noundef %215)
  %217 = icmp ne ptr %216, null
  br i1 %217, label %218, label %232

218:                                              ; preds = %212
  %219 = load ptr, ptr %18, align 8, !tbaa !9
  %220 = call ptr @strtok(ptr noundef %219, ptr noundef @.str.12) #9
  %221 = icmp ne ptr %220, null
  br i1 %221, label %222, label %231

222:                                              ; preds = %218
  br label %223

223:                                              ; preds = %226, %222
  %224 = call ptr @strtok(ptr noundef null, ptr noundef @.str.14) #9
  %225 = icmp ne ptr %224, null
  br i1 %225, label %226, label %230

226:                                              ; preds = %223
  %227 = load ptr, ptr %9, align 8, !tbaa !9
  %228 = load i32, ptr %227, align 4, !tbaa !5
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %227, align 4, !tbaa !5
  br label %223, !llvm.loop !17

230:                                              ; preds = %223
  br label %232

231:                                              ; preds = %218
  br label %212, !llvm.loop !18

232:                                              ; preds = %230, %212
  %233 = load ptr, ptr %17, align 8, !tbaa !9
  call void @rewind(ptr noundef %233)
  %234 = load i32, ptr @_debug, align 4, !tbaa !5
  %235 = icmp ne i32 %234, 0
  br i1 %235, label %236, label %245

236:                                              ; preds = %232
  %237 = load ptr, ptr %7, align 8, !tbaa !9
  %238 = load ptr, ptr %8, align 8, !tbaa !9
  %239 = load i32, ptr %238, align 4, !tbaa !5
  %240 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, ptr noundef %237, i32 noundef %239)
  %241 = load ptr, ptr %7, align 8, !tbaa !9
  %242 = load ptr, ptr %9, align 8, !tbaa !9
  %243 = load i32, ptr %242, align 4, !tbaa !5
  %244 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, ptr noundef %241, i32 noundef %243)
  br label %245

245:                                              ; preds = %236, %232
  %246 = load ptr, ptr %8, align 8, !tbaa !9
  %247 = load i32, ptr %246, align 4, !tbaa !5
  %248 = load ptr, ptr %9, align 8, !tbaa !9
  %249 = load i32, ptr %248, align 4, !tbaa !5
  %250 = mul nsw i32 %247, %249
  store i32 %250, ptr %13, align 4, !tbaa !5
  %251 = load ptr, ptr %8, align 8, !tbaa !9
  %252 = load i32, ptr %251, align 4, !tbaa !5
  %253 = sext i32 %252 to i64
  %254 = mul i64 %253, 8
  %255 = call noalias ptr @malloc(i64 noundef %254) #11
  store ptr %255, ptr %10, align 8, !tbaa !9
  %256 = load ptr, ptr %10, align 8, !tbaa !9
  %257 = icmp ne ptr %256, null
  br i1 %257, label %258, label %259

258:                                              ; preds = %245
  br label %260

259:                                              ; preds = %245
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.3, i32 noundef 126, ptr noundef @__PRETTY_FUNCTION__.file_read) #10
  unreachable

260:                                              ; preds = %258
  %261 = load i32, ptr %13, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = mul i64 %262, 4
  %264 = call noalias ptr @malloc(i64 noundef %263) #11
  %265 = load ptr, ptr %10, align 8, !tbaa !9
  %266 = getelementptr inbounds ptr, ptr %265, i64 0
  store ptr %264, ptr %266, align 8, !tbaa !9
  %267 = load ptr, ptr %10, align 8, !tbaa !9
  %268 = getelementptr inbounds ptr, ptr %267, i64 0
  %269 = load ptr, ptr %268, align 8, !tbaa !9
  %270 = icmp ne ptr %269, null
  br i1 %270, label %271, label %272

271:                                              ; preds = %260
  br label %273

272:                                              ; preds = %260
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.3, i32 noundef 128, ptr noundef @__PRETTY_FUNCTION__.file_read) #10
  unreachable

273:                                              ; preds = %271
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %274

274:                                              ; preds = %294, %273
  %275 = load i32, ptr %11, align 4, !tbaa !5
  %276 = load ptr, ptr %8, align 8, !tbaa !9
  %277 = load i32, ptr %276, align 4, !tbaa !5
  %278 = icmp slt i32 %275, %277
  br i1 %278, label %279, label %297

279:                                              ; preds = %274
  %280 = load ptr, ptr %10, align 8, !tbaa !9
  %281 = load i32, ptr %11, align 4, !tbaa !5
  %282 = sub nsw i32 %281, 1
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds ptr, ptr %280, i64 %283
  %285 = load ptr, ptr %284, align 8, !tbaa !9
  %286 = load ptr, ptr %9, align 8, !tbaa !9
  %287 = load i32, ptr %286, align 4, !tbaa !5
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds float, ptr %285, i64 %288
  %290 = load ptr, ptr %10, align 8, !tbaa !9
  %291 = load i32, ptr %11, align 4, !tbaa !5
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds ptr, ptr %290, i64 %292
  store ptr %289, ptr %293, align 8, !tbaa !9
  br label %294

294:                                              ; preds = %279
  %295 = load i32, ptr %11, align 4, !tbaa !5
  %296 = add nsw i32 %295, 1
  store i32 %296, ptr %11, align 4, !tbaa !5
  br label %274, !llvm.loop !19

297:                                              ; preds = %274
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %298

298:                                              ; preds = %330, %308, %297
  %299 = load ptr, ptr %18, align 8, !tbaa !9
  %300 = load i32, ptr %20, align 4, !tbaa !5
  %301 = load ptr, ptr %17, align 8, !tbaa !9
  %302 = call ptr @fgets(ptr noundef %299, i32 noundef %300, ptr noundef %301)
  %303 = icmp ne ptr %302, null
  br i1 %303, label %304, label %333

304:                                              ; preds = %298
  %305 = load ptr, ptr %18, align 8, !tbaa !9
  %306 = call ptr @strtok(ptr noundef %305, ptr noundef @.str.12) #9
  %307 = icmp eq ptr %306, null
  br i1 %307, label %308, label %309

308:                                              ; preds = %304
  br label %298, !llvm.loop !20

309:                                              ; preds = %304
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %310

310:                                              ; preds = %327, %309
  %311 = load i32, ptr %12, align 4, !tbaa !5
  %312 = load ptr, ptr %9, align 8, !tbaa !9
  %313 = load i32, ptr %312, align 4, !tbaa !5
  %314 = icmp slt i32 %311, %313
  br i1 %314, label %315, label %330

315:                                              ; preds = %310
  %316 = call ptr @strtok(ptr noundef null, ptr noundef @.str.14) #9
  %317 = call double @atof(ptr noundef %316) #12
  %318 = fptrunc double %317 to float
  %319 = load ptr, ptr %10, align 8, !tbaa !9
  %320 = load i32, ptr %11, align 4, !tbaa !5
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds ptr, ptr %319, i64 %321
  %323 = load ptr, ptr %322, align 8, !tbaa !9
  %324 = load i32, ptr %12, align 4, !tbaa !5
  %325 = sext i32 %324 to i64
  %326 = getelementptr inbounds float, ptr %323, i64 %325
  store float %318, ptr %326, align 4, !tbaa !21
  br label %327

327:                                              ; preds = %315
  %328 = load i32, ptr %12, align 4, !tbaa !5
  %329 = add nsw i32 %328, 1
  store i32 %329, ptr %12, align 4, !tbaa !5
  br label %310, !llvm.loop !23

330:                                              ; preds = %310
  %331 = load i32, ptr %11, align 4, !tbaa !5
  %332 = add nsw i32 %331, 1
  store i32 %332, ptr %11, align 4, !tbaa !5
  br label %298, !llvm.loop !20

333:                                              ; preds = %298
  %334 = load ptr, ptr %17, align 8, !tbaa !9
  %335 = call i32 @fclose(ptr noundef %334)
  %336 = load ptr, ptr %18, align 8, !tbaa !9
  call void @free(ptr noundef %336) #9
  store i32 0, ptr %16, align 4
  br label %337

337:                                              ; preds = %333, %137
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  %338 = load i32, ptr %16, align 4
  switch i32 %338, label %342 [
    i32 0, label %339
  ]

339:                                              ; preds = %337
  br label %340

340:                                              ; preds = %339, %132
  %341 = load ptr, ptr %10, align 8, !tbaa !9
  store ptr %341, ptr %5, align 8
  store i32 1, ptr %16, align 4
  br label %342

342:                                              ; preds = %340, %337, %130
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  %343 = load ptr, ptr %5, align 8
  ret ptr %343
}

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

declare i32 @open(ptr noundef, i32 noundef, ...) #2

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

declare i64 @read(i32 noundef, ptr noundef, i64 noundef) #2

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

declare i32 @printf(ptr noundef, ...) #2

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

declare i32 @close(i32 noundef) #2

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

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

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

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

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

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 noundef) #7

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

declare void @rewind(ptr noundef) #2

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare double @atof(ptr noundef nonnull) #8

declare i32 @fclose(ptr noundef) #2

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

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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = { nounwind allocsize(1) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { inlinehint nounwind willreturn memory(read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nounwind }
attributes #10 = { noreturn nounwind }
attributes #11 = { nounwind allocsize(0) }
attributes #12 = { nounwind willreturn memory(read) }
attributes #13 = { nounwind allocsize(1) }

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [57 x i8], align 1
@__PRETTY_FUNCTION__.file_read = external hidden unnamed_addr constant [45 x i8], align 1
@_debug = external local_unnamed_addr global i32, align 4
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noalias noundef ptr @file_read(i32 noundef %0, ptr noundef %1, ptr nocapture noundef %2, ptr nocapture noundef %3) local_unnamed_addr #0 {
  %.not = icmp eq i32 %0, 0
  br i1 %.not, label %60, label %5

5:                                                ; preds = %4
  %6 = tail call i32 (ptr, i32, ...) @open(ptr noundef %1, i32 noundef 0, ptr noundef nonnull @.str) #11
  %.not139 = icmp eq i32 %6, -1
  br i1 %.not139, label %.thread, label %9

.thread:                                          ; preds = %5
  %7 = load ptr, ptr @stderr, align 8, !tbaa !5
  %8 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %7, ptr noundef nonnull @.str.1, ptr noundef %1) #12
  br label %158

9:                                                ; preds = %5
  %10 = tail call i64 @read(i32 noundef %6, ptr noundef %2, i64 noundef 4) #11
  %11 = icmp eq i64 %10, 4
  br i1 %11, label %13, label %12

12:                                               ; preds = %9
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 48, ptr noundef nonnull @__PRETTY_FUNCTION__.file_read) #13
  unreachable

13:                                               ; preds = %9
  %14 = tail call i64 @read(i32 noundef %6, ptr noundef %3, i64 noundef 4) #11
  %15 = icmp eq i64 %14, 4
  br i1 %15, label %17, label %16

16:                                               ; preds = %13
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 50, ptr noundef nonnull @__PRETTY_FUNCTION__.file_read) #13
  unreachable

17:                                               ; preds = %13
  %18 = load i32, ptr @_debug, align 4, !tbaa !9
  %.not136 = icmp eq i32 %18, 0
  br i1 %.not136, label %24, label %19

19:                                               ; preds = %17
  %20 = load i32, ptr %2, align 4, !tbaa !9
  %21 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef %1, i32 noundef %20)
  %22 = load i32, ptr %3, align 4, !tbaa !9
  %23 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, ptr noundef %1, i32 noundef %22)
  br label %24

24:                                               ; preds = %19, %17
  %25 = load i32, ptr %2, align 4, !tbaa !9
  %26 = load i32, ptr %3, align 4, !tbaa !9
  %27 = sext i32 %25 to i64
  %28 = shl nsw i64 %27, 3
  %29 = tail call noalias ptr @malloc(i64 noundef %28) #14
  %.not137 = icmp eq ptr %29, null
  br i1 %.not137, label %30, label %31

30:                                               ; preds = %24
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.3, i32 noundef 59, ptr noundef nonnull @__PRETTY_FUNCTION__.file_read) #13
  unreachable

31:                                               ; preds = %24
  %32 = mul nsw i32 %26, %25
  %33 = sext i32 %32 to i64
  %34 = shl nsw i64 %33, 2
  %35 = tail call noalias ptr @malloc(i64 noundef %34) #14
  store ptr %35, ptr %29, align 8, !tbaa !5
  %.not138 = icmp eq ptr %35, null
  br i1 %.not138, label %41, label %.preheader148

.preheader148:                                    ; preds = %31
  %36 = icmp sgt i32 %25, 1
  br i1 %36, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader148
  %37 = sext i32 %26 to i64
  %wide.trip.count = zext nneg i32 %25 to i64
  %load_initial200 = load ptr, ptr %29, align 8
  %38 = add nsw i64 %wide.trip.count, -1
  %39 = add nsw i64 %wide.trip.count, -2
  %xtraiter = and i64 %38, 7
  %40 = icmp ult i64 %39, 7
  br i1 %40, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %38, -8
  %invariant.gep = getelementptr i8, ptr %29, i64 8
  %invariant.gep219 = getelementptr i8, ptr %29, i64 16
  %invariant.gep221 = getelementptr i8, ptr %29, i64 24
  %invariant.gep223 = getelementptr i8, ptr %29, i64 32
  %invariant.gep225 = getelementptr i8, ptr %29, i64 40
  %invariant.gep227 = getelementptr i8, ptr %29, i64 48
  %invariant.gep229 = getelementptr i8, ptr %29, i64 56
  br label %42

41:                                               ; preds = %31
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.3, i32 noundef 61, ptr noundef nonnull @__PRETTY_FUNCTION__.file_read) #13
  unreachable

42:                                               ; preds = %42, %.lr.ph.new
  %store_forwarded201 = phi ptr [ %load_initial200, %.lr.ph.new ], [ %51, %42 ]
  %indvars.iv = phi i64 [ 1, %.lr.ph.new ], [ %indvars.iv.next.7, %42 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.7, %42 ]
  %43 = getelementptr ptr, ptr %29, i64 %indvars.iv
  %44 = getelementptr inbounds float, ptr %store_forwarded201, i64 %37
  store ptr %44, ptr %43, align 8, !tbaa !5
  %gep = getelementptr ptr, ptr %invariant.gep, i64 %indvars.iv
  %45 = getelementptr inbounds float, ptr %44, i64 %37
  store ptr %45, ptr %gep, align 8, !tbaa !5
  %gep220 = getelementptr ptr, ptr %invariant.gep219, i64 %indvars.iv
  %46 = getelementptr inbounds float, ptr %45, i64 %37
  store ptr %46, ptr %gep220, align 8, !tbaa !5
  %gep222 = getelementptr ptr, ptr %invariant.gep221, i64 %indvars.iv
  %47 = getelementptr inbounds float, ptr %46, i64 %37
  store ptr %47, ptr %gep222, align 8, !tbaa !5
  %gep224 = getelementptr ptr, ptr %invariant.gep223, i64 %indvars.iv
  %48 = getelementptr inbounds float, ptr %47, i64 %37
  store ptr %48, ptr %gep224, align 8, !tbaa !5
  %gep226 = getelementptr ptr, ptr %invariant.gep225, i64 %indvars.iv
  %49 = getelementptr inbounds float, ptr %48, i64 %37
  store ptr %49, ptr %gep226, align 8, !tbaa !5
  %gep228 = getelementptr ptr, ptr %invariant.gep227, i64 %indvars.iv
  %50 = getelementptr inbounds float, ptr %49, i64 %37
  store ptr %50, ptr %gep228, align 8, !tbaa !5
  %gep230 = getelementptr ptr, ptr %invariant.gep229, i64 %indvars.iv
  %51 = getelementptr inbounds float, ptr %50, i64 %37
  store ptr %51, ptr %gep230, align 8, !tbaa !5
  %indvars.iv.next.7 = add nuw nsw i64 %indvars.iv, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %._crit_edge.loopexit.unr-lcssa, label %42, !llvm.loop !11

._crit_edge.loopexit.unr-lcssa:                   ; preds = %42, %.lr.ph
  %store_forwarded201.unr = phi ptr [ %load_initial200, %.lr.ph ], [ %51, %42 ]
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next.7, %42 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge.loopexit, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader
  %store_forwarded201.epil = phi ptr [ %53, %.epil.preheader ], [ %store_forwarded201.unr, %._crit_edge.loopexit.unr-lcssa ]
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %52 = getelementptr ptr, ptr %29, i64 %indvars.iv.epil
  %53 = getelementptr inbounds float, ptr %store_forwarded201.epil, i64 %37
  store ptr %53, ptr %52, align 8, !tbaa !5
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge.loopexit, label %.epil.preheader, !llvm.loop !13

._crit_edge.loopexit:                             ; preds = %.epil.preheader, %._crit_edge.loopexit.unr-lcssa
  %.pre = load ptr, ptr %29, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader148
  %54 = phi ptr [ %.pre, %._crit_edge.loopexit ], [ %35, %.preheader148 ]
  %55 = tail call i64 @read(i32 noundef %6, ptr noundef %54, i64 noundef %34) #11
  %56 = icmp eq i64 %55, %34
  br i1 %56, label %58, label %57

57:                                               ; preds = %._crit_edge
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.3, i32 noundef 66, ptr noundef nonnull @__PRETTY_FUNCTION__.file_read) #13
  unreachable

58:                                               ; preds = %._crit_edge
  %59 = tail call i32 @close(i32 noundef %6) #11
  br label %158

60:                                               ; preds = %4
  %61 = tail call noalias ptr @fopen(ptr noundef %1, ptr noundef nonnull @.str.9)
  %.not135 = icmp eq ptr %61, null
  br i1 %.not135, label %.thread141, label %64

.thread141:                                       ; preds = %60
  %62 = load ptr, ptr @stderr, align 8, !tbaa !5
  %63 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %62, ptr noundef nonnull @.str.1, ptr noundef %1) #12
  br label %158

64:                                               ; preds = %60
  %65 = tail call noalias dereferenceable_or_null(128) ptr @malloc(i64 noundef 128) #14
  %.not122 = icmp eq ptr %65, null
  br i1 %.not122, label %66, label %67

66:                                               ; preds = %64
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.3, i32 noundef 83, ptr noundef nonnull @__PRETTY_FUNCTION__.file_read) #13
  unreachable

67:                                               ; preds = %64
  store i32 0, ptr %2, align 4, !tbaa !9
  %68 = tail call ptr @fgets(ptr noundef nonnull %65, i32 noundef 128, ptr noundef nonnull %61)
  %.not123158 = icmp eq ptr %68, null
  br i1 %.not123158, label %._crit_edge161, label %.preheader147

.preheader147:                                    ; preds = %67, %89
  %.0160 = phi i64 [ %indvars.iv176, %89 ], [ 128, %67 ]
  %.0104159 = phi ptr [ %.1105, %89 ], [ %65, %67 ]
  %sext = shl i64 %.0160, 32
  %69 = ashr exact i64 %sext, 32
  br label %70

70:                                               ; preds = %.preheader147, %79
  %indvars.iv176 = phi i64 [ %69, %.preheader147 ], [ %indvars.iv.next177, %79 ]
  %.1105 = phi ptr [ %.0104159, %.preheader147 ], [ %77, %79 ]
  %71 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %.1105) #15
  %72 = add nsw i64 %indvars.iv176, -1
  %73 = icmp eq i64 %71, %72
  br i1 %73, label %74, label %83

74:                                               ; preds = %70
  %.neg = mul i64 %71, -4294967296
  %75 = ashr exact i64 %.neg, 32
  %76 = tail call i32 @fseek(ptr noundef nonnull %61, i64 noundef %75, i32 noundef 1)
  %indvars.iv.next177 = add nsw i64 %indvars.iv176, 128
  %77 = tail call ptr @realloc(ptr noundef %.1105, i64 noundef %indvars.iv.next177) #16
  %.not133 = icmp eq ptr %77, null
  br i1 %.not133, label %78, label %79

78:                                               ; preds = %74
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.3, i32 noundef 96, ptr noundef nonnull @__PRETTY_FUNCTION__.file_read) #13
  unreachable

79:                                               ; preds = %74
  %80 = trunc nsw i64 %indvars.iv.next177 to i32
  %81 = tail call ptr @fgets(ptr noundef nonnull %77, i32 noundef %80, ptr noundef nonnull %61)
  %.not134 = icmp eq ptr %81, null
  br i1 %.not134, label %82, label %70, !llvm.loop !15

82:                                               ; preds = %79
  tail call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.3, i32 noundef 99, ptr noundef nonnull @__PRETTY_FUNCTION__.file_read) #13
  unreachable

83:                                               ; preds = %70
  %84 = trunc nsw i64 %indvars.iv176 to i32
  %85 = tail call ptr @strtok(ptr noundef %.1105, ptr noundef nonnull @.str.12) #11
  %.not132 = icmp eq ptr %85, null
  br i1 %.not132, label %89, label %86

86:                                               ; preds = %83
  %87 = load i32, ptr %2, align 4, !tbaa !9
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %2, align 4, !tbaa !9
  br label %89

89:                                               ; preds = %86, %83
  %90 = tail call ptr @fgets(ptr noundef %.1105, i32 noundef %84, ptr noundef nonnull %61)
  %.not123 = icmp eq ptr %90, null
  br i1 %.not123, label %._crit_edge161, label %.preheader147, !llvm.loop !16

._crit_edge161:                                   ; preds = %89, %67
  %.0104.lcssa = phi ptr [ %65, %67 ], [ %.1105, %89 ]
  %.0.lcssa = phi i32 [ 128, %67 ], [ %84, %89 ]
  tail call void @rewind(ptr noundef nonnull %61)
  %91 = load i32, ptr @_debug, align 4, !tbaa !9
  %.not124 = icmp eq i32 %91, 0
  br i1 %.not124, label %94, label %92

92:                                               ; preds = %._crit_edge161
  %93 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef %.0.lcssa)
  br label %94

94:                                               ; preds = %92, %._crit_edge161
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %95

95:                                               ; preds = %97, %94
  %96 = tail call ptr @fgets(ptr noundef %.0104.lcssa, i32 noundef %.0.lcssa, ptr noundef nonnull %61)
  %.not125 = icmp eq ptr %96, null
  br i1 %.not125, label %.loopexit, label %97

97:                                               ; preds = %95
  %98 = tail call ptr @strtok(ptr noundef %.0104.lcssa, ptr noundef nonnull @.str.12) #11
  %.not126 = icmp eq ptr %98, null
  br i1 %.not126, label %95, label %.preheader145, !llvm.loop !17

.preheader145:                                    ; preds = %97
  %99 = tail call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str.14) #11
  %.not127163 = icmp eq ptr %99, null
  br i1 %.not127163, label %.loopexit, label %.lr.ph164

.lr.ph164:                                        ; preds = %.preheader145, %.lr.ph164
  %100 = load i32, ptr %3, align 4, !tbaa !9
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %3, align 4, !tbaa !9
  %102 = tail call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str.14) #11
  %.not127 = icmp eq ptr %102, null
  br i1 %.not127, label %.loopexit, label %.lr.ph164, !llvm.loop !18

.loopexit:                                        ; preds = %95, %.lr.ph164, %.preheader145
  tail call void @rewind(ptr noundef nonnull %61)
  %103 = load i32, ptr @_debug, align 4, !tbaa !9
  %.not128 = icmp eq i32 %103, 0
  br i1 %.not128, label %109, label %104

104:                                              ; preds = %.loopexit
  %105 = load i32, ptr %2, align 4, !tbaa !9
  %106 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, ptr noundef %1, i32 noundef %105)
  %107 = load i32, ptr %3, align 4, !tbaa !9
  %108 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, ptr noundef %1, i32 noundef %107)
  br label %109

109:                                              ; preds = %104, %.loopexit
  %110 = load i32, ptr %2, align 4, !tbaa !9
  %111 = load i32, ptr %3, align 4, !tbaa !9
  %112 = sext i32 %110 to i64
  %113 = shl nsw i64 %112, 3
  %114 = tail call noalias ptr @malloc(i64 noundef %113) #14
  %.not129 = icmp eq ptr %114, null
  br i1 %.not129, label %115, label %116

115:                                              ; preds = %109
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.3, i32 noundef 126, ptr noundef nonnull @__PRETTY_FUNCTION__.file_read) #13
  unreachable

116:                                              ; preds = %109
  %117 = mul nsw i32 %111, %110
  %118 = sext i32 %117 to i64
  %119 = shl nsw i64 %118, 2
  %120 = tail call noalias ptr @malloc(i64 noundef %119) #14
  store ptr %120, ptr %114, align 8, !tbaa !5
  %.not130 = icmp eq ptr %120, null
  br i1 %.not130, label %126, label %.preheader144

.preheader144:                                    ; preds = %116
  %121 = icmp sgt i32 %110, 1
  br i1 %121, label %.lr.ph166, label %.outer.preheader

.lr.ph166:                                        ; preds = %.preheader144
  %122 = sext i32 %111 to i64
  %wide.trip.count182 = zext nneg i32 %110 to i64
  %load_initial = load ptr, ptr %114, align 8
  %123 = add nsw i64 %wide.trip.count182, -1
  %124 = add nsw i64 %wide.trip.count182, -2
  %xtraiter208 = and i64 %123, 7
  %125 = icmp ult i64 %124, 7
  br i1 %125, label %.outer.preheader.loopexit.unr-lcssa, label %.lr.ph166.new

.lr.ph166.new:                                    ; preds = %.lr.ph166
  %unroll_iter211 = and i64 %123, -8
  %invariant.gep231 = getelementptr i8, ptr %114, i64 8
  %invariant.gep233 = getelementptr i8, ptr %114, i64 16
  %invariant.gep235 = getelementptr i8, ptr %114, i64 24
  %invariant.gep237 = getelementptr i8, ptr %114, i64 32
  %invariant.gep239 = getelementptr i8, ptr %114, i64 40
  %invariant.gep241 = getelementptr i8, ptr %114, i64 48
  %invariant.gep243 = getelementptr i8, ptr %114, i64 56
  br label %127

126:                                              ; preds = %116
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.3, i32 noundef 128, ptr noundef nonnull @__PRETTY_FUNCTION__.file_read) #13
  unreachable

127:                                              ; preds = %127, %.lr.ph166.new
  %store_forwarded = phi ptr [ %load_initial, %.lr.ph166.new ], [ %136, %127 ]
  %indvars.iv179 = phi i64 [ 1, %.lr.ph166.new ], [ %indvars.iv.next180.7, %127 ]
  %niter212 = phi i64 [ 0, %.lr.ph166.new ], [ %niter212.next.7, %127 ]
  %128 = getelementptr ptr, ptr %114, i64 %indvars.iv179
  %129 = getelementptr inbounds float, ptr %store_forwarded, i64 %122
  store ptr %129, ptr %128, align 8, !tbaa !5
  %gep232 = getelementptr ptr, ptr %invariant.gep231, i64 %indvars.iv179
  %130 = getelementptr inbounds float, ptr %129, i64 %122
  store ptr %130, ptr %gep232, align 8, !tbaa !5
  %gep234 = getelementptr ptr, ptr %invariant.gep233, i64 %indvars.iv179
  %131 = getelementptr inbounds float, ptr %130, i64 %122
  store ptr %131, ptr %gep234, align 8, !tbaa !5
  %gep236 = getelementptr ptr, ptr %invariant.gep235, i64 %indvars.iv179
  %132 = getelementptr inbounds float, ptr %131, i64 %122
  store ptr %132, ptr %gep236, align 8, !tbaa !5
  %gep238 = getelementptr ptr, ptr %invariant.gep237, i64 %indvars.iv179
  %133 = getelementptr inbounds float, ptr %132, i64 %122
  store ptr %133, ptr %gep238, align 8, !tbaa !5
  %gep240 = getelementptr ptr, ptr %invariant.gep239, i64 %indvars.iv179
  %134 = getelementptr inbounds float, ptr %133, i64 %122
  store ptr %134, ptr %gep240, align 8, !tbaa !5
  %gep242 = getelementptr ptr, ptr %invariant.gep241, i64 %indvars.iv179
  %135 = getelementptr inbounds float, ptr %134, i64 %122
  store ptr %135, ptr %gep242, align 8, !tbaa !5
  %gep244 = getelementptr ptr, ptr %invariant.gep243, i64 %indvars.iv179
  %136 = getelementptr inbounds float, ptr %135, i64 %122
  store ptr %136, ptr %gep244, align 8, !tbaa !5
  %indvars.iv.next180.7 = add nuw nsw i64 %indvars.iv179, 8
  %niter212.next.7 = add i64 %niter212, 8
  %niter212.ncmp.7 = icmp eq i64 %niter212.next.7, %unroll_iter211
  br i1 %niter212.ncmp.7, label %.outer.preheader.loopexit.unr-lcssa, label %127, !llvm.loop !19

.outer.preheader.loopexit.unr-lcssa:              ; preds = %127, %.lr.ph166
  %store_forwarded.unr = phi ptr [ %load_initial, %.lr.ph166 ], [ %136, %127 ]
  %indvars.iv179.unr = phi i64 [ 1, %.lr.ph166 ], [ %indvars.iv.next180.7, %127 ]
  %lcmp.mod210.not = icmp eq i64 %xtraiter208, 0
  br i1 %lcmp.mod210.not, label %.outer.preheader, label %.epil.preheader207

.epil.preheader207:                               ; preds = %.outer.preheader.loopexit.unr-lcssa, %.epil.preheader207
  %store_forwarded.epil = phi ptr [ %138, %.epil.preheader207 ], [ %store_forwarded.unr, %.outer.preheader.loopexit.unr-lcssa ]
  %indvars.iv179.epil = phi i64 [ %indvars.iv.next180.epil, %.epil.preheader207 ], [ %indvars.iv179.unr, %.outer.preheader.loopexit.unr-lcssa ]
  %epil.iter209 = phi i64 [ %epil.iter209.next, %.epil.preheader207 ], [ 0, %.outer.preheader.loopexit.unr-lcssa ]
  %137 = getelementptr ptr, ptr %114, i64 %indvars.iv179.epil
  %138 = getelementptr inbounds float, ptr %store_forwarded.epil, i64 %122
  store ptr %138, ptr %137, align 8, !tbaa !5
  %indvars.iv.next180.epil = add nuw nsw i64 %indvars.iv179.epil, 1
  %epil.iter209.next = add i64 %epil.iter209, 1
  %epil.iter209.cmp.not = icmp eq i64 %epil.iter209.next, %xtraiter208
  br i1 %epil.iter209.cmp.not, label %.outer.preheader, label %.epil.preheader207, !llvm.loop !20

.outer.preheader:                                 ; preds = %.outer.preheader.loopexit.unr-lcssa, %.epil.preheader207, %.preheader144
  br label %.outer

139:                                              ; preds = %.outer, %141
  %140 = tail call ptr @fgets(ptr noundef %.0104.lcssa, i32 noundef %.0.lcssa, ptr noundef nonnull %61)
  %.not131 = icmp eq ptr %140, null
  br i1 %.not131, label %156, label %141

141:                                              ; preds = %139
  %142 = tail call ptr @strtok(ptr noundef %.0104.lcssa, ptr noundef nonnull @.str.12) #11
  %143 = icmp eq ptr %142, null
  br i1 %143, label %139, label %.preheader, !llvm.loop !21

.preheader:                                       ; preds = %141
  %144 = load i32, ptr %3, align 4, !tbaa !9
  %145 = icmp sgt i32 %144, 0
  br i1 %145, label %.lr.ph168, label %._crit_edge169

.lr.ph168:                                        ; preds = %.preheader
  %146 = getelementptr inbounds ptr, ptr %114, i64 %indvars.iv187
  %147 = load ptr, ptr %146, align 8, !tbaa !5
  br label %148

148:                                              ; preds = %.lr.ph168, %148
  %indvars.iv184 = phi i64 [ 0, %.lr.ph168 ], [ %indvars.iv.next185, %148 ]
  %149 = tail call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str.14) #11
  %150 = tail call double @atof(ptr noundef %149) #15
  %151 = fptrunc double %150 to float
  %152 = getelementptr inbounds float, ptr %147, i64 %indvars.iv184
  store float %151, ptr %152, align 4, !tbaa !22
  %indvars.iv.next185 = add nuw nsw i64 %indvars.iv184, 1
  %153 = load i32, ptr %3, align 4, !tbaa !9
  %154 = sext i32 %153 to i64
  %155 = icmp slt i64 %indvars.iv.next185, %154
  br i1 %155, label %148, label %._crit_edge169, !llvm.loop !24

._crit_edge169:                                   ; preds = %148, %.preheader
  %indvars.iv.next188 = add nuw nsw i64 %indvars.iv187, 1
  br label %.outer, !llvm.loop !21

.outer:                                           ; preds = %.outer.preheader, %._crit_edge169
  %indvars.iv187 = phi i64 [ %indvars.iv.next188, %._crit_edge169 ], [ 0, %.outer.preheader ]
  br label %139

156:                                              ; preds = %139
  %157 = tail call i32 @fclose(ptr noundef nonnull %61)
  tail call void @free(ptr noundef %.0104.lcssa) #11
  br label %158

158:                                              ; preds = %58, %156, %.thread141, %.thread
  %.2 = phi ptr [ null, %.thread ], [ null, %.thread141 ], [ %114, %156 ], [ %29, %58 ]
  ret ptr %.2
}

; Function Attrs: nofree
declare noundef i32 @open(ptr nocapture noundef readonly, i32 noundef, ...) local_unnamed_addr #1

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

; Function Attrs: nofree
declare noundef i64 @read(i32 noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #1

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(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 #4

declare i32 @close(i32 noundef) local_unnamed_addr #5

; 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 ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #7

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

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

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare double @atof(ptr nocapture noundef nonnull) local_unnamed_addr #9

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #10

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

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

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


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