; LLVM IR from jingweizhanghuai/Morn :: src/math (morn_MAT_file)

; 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 [80 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@__FUNCTION__.MATSearch = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1

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

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) #1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @MATSearch(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #3 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca [256 x i8], align 16
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca [2 x i32], align 4
  %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 i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 256, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  br label %33

33:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = icmp eq ptr %34, null
  br i1 %35, label %49, label %36

36:                                               ; preds = %33
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = ptrtoint ptr %37 to i64
  %39 = icmp eq i64 %38, -1
  br i1 %39, label %49, label %40

40:                                               ; preds = %36
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = icmp eq ptr %41, null
  br i1 %42, label %47, label %43

43:                                               ; preds = %40
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = ptrtoint ptr %44 to i64
  %46 = icmp eq i64 %45, -1
  br label %47

47:                                               ; preds = %43, %40
  %48 = phi i1 [ true, %40 ], [ %46, %43 ]
  br label %49

49:                                               ; preds = %47, %36, %33
  %50 = phi i1 [ true, %36 ], [ true, %33 ], [ %48, %47 ]
  %51 = zext i1 %50 to i32
  store i32 %51, ptr %15, align 4, !tbaa !9
  %52 = load i32, ptr %15, align 4, !tbaa !9
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %56

54:                                               ; preds = %49
  %55 = load i32, ptr %15, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %55, i32 noundef -1, ptr noundef @.str, i32 noundef 154, ptr noundef @__FUNCTION__.MATSearch, ptr noundef @.str.1)
  br label %56

56:                                               ; preds = %54, %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %57

57:                                               ; preds = %56
  br label %58

58:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = icmp eq ptr %59, null
  br i1 %60, label %65, label %61

61:                                               ; preds = %58
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = ptrtoint ptr %62 to i64
  %64 = icmp eq i64 %63, -1
  br i1 %64, label %65, label %66

65:                                               ; preds = %61, %58
  store ptr %17, ptr %8, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %65, %61
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = icmp eq ptr %67, null
  br i1 %68, label %73, label %69

69:                                               ; preds = %66
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = ptrtoint ptr %70 to i64
  %72 = icmp eq i64 %71, -1
  br i1 %72, label %73, label %74

73:                                               ; preds = %69, %66
  store ptr %16, ptr %9, align 8, !tbaa !5
  br label %74

74:                                               ; preds = %73, %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = call i64 @strlen(ptr noundef %75) #5
  %77 = trunc i64 %76 to i32
  store i32 %77, ptr %18, align 4, !tbaa !9
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = call i32 @fseek(ptr noundef %78, i64 noundef 0, i32 noundef 2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = call i64 @ftell(ptr noundef %80)
  %82 = trunc i64 %81 to i32
  store i32 %82, ptr %19, align 4, !tbaa !9
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = call i32 @fseek(ptr noundef %83, i64 noundef 128, i32 noundef 0)
  br label %85

85:                                               ; preds = %289, %120, %74
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = call i64 @ftell(ptr noundef %86)
  %88 = load i32, ptr %19, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = icmp slt i64 %87, %89
  br i1 %90, label %91, label %301

91:                                               ; preds = %85
  br label %92

92:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = call i64 @fread(ptr noundef %11, i64 noundef 4, i64 noundef 1, ptr noundef %93)
  %95 = trunc i64 %94 to i32
  %96 = icmp ne i32 %95, 1
  %97 = zext i1 %96 to i32
  store i32 %97, ptr %20, align 4, !tbaa !9
  %98 = load i32, ptr %20, align 4, !tbaa !9
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %100, label %102

100:                                              ; preds = %92
  %101 = load i32, ptr %20, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %101, i32 noundef -1, ptr noundef @.str, i32 noundef 173, ptr noundef @__FUNCTION__.MATSearch, ptr noundef @.str.5)
  br label %102

102:                                              ; preds = %100, %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %103

103:                                              ; preds = %102
  br label %104

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = call i64 @fread(ptr noundef %12, i64 noundef 4, i64 noundef 1, ptr noundef %106)
  %108 = trunc i64 %107 to i32
  %109 = icmp ne i32 %108, 1
  %110 = zext i1 %109 to i32
  store i32 %110, ptr %21, align 4, !tbaa !9
  %111 = load i32, ptr %21, align 4, !tbaa !9
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %115

113:                                              ; preds = %105
  %114 = load i32, ptr %21, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %114, i32 noundef -1, ptr noundef @.str, i32 noundef 174, ptr noundef @__FUNCTION__.MATSearch, ptr noundef @.str.5)
  br label %115

115:                                              ; preds = %113, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  br label %116

116:                                              ; preds = %115
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %11, align 4, !tbaa !9
  %119 = icmp ne i32 %118, 14
  br i1 %119, label %120, label %125

120:                                              ; preds = %117
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = load i32, ptr %12, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = call i32 @fseek(ptr noundef %121, i64 noundef %123, i32 noundef 1)
  br label %85, !llvm.loop !11

125:                                              ; preds = %117
  br label %126

126:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %127 = getelementptr inbounds [2 x i32], ptr %13, i64 0, i64 0
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = call i64 @fread(ptr noundef %127, i64 noundef 1, i64 noundef 8, ptr noundef %128)
  %130 = trunc i64 %129 to i32
  %131 = icmp ne i32 %130, 8
  %132 = zext i1 %131 to i32
  store i32 %132, ptr %22, align 4, !tbaa !9
  %133 = load i32, ptr %22, align 4, !tbaa !9
  %134 = icmp ne i32 %133, 0
  br i1 %134, label %135, label %137

135:                                              ; preds = %126
  %136 = load i32, ptr %22, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %136, i32 noundef -1, ptr noundef @.str, i32 noundef 183, ptr noundef @__FUNCTION__.MATSearch, ptr noundef @.str.5)
  br label %137

137:                                              ; preds = %135, %126
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  br label %138

138:                                              ; preds = %137
  br label %139

139:                                              ; preds = %138
  br label %140

140:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  %141 = getelementptr inbounds [2 x i32], ptr %13, i64 0, i64 0
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = call i64 @fread(ptr noundef %141, i64 noundef 1, i64 noundef 8, ptr noundef %142)
  %144 = trunc i64 %143 to i32
  %145 = icmp ne i32 %144, 8
  %146 = zext i1 %145 to i32
  store i32 %146, ptr %23, align 4, !tbaa !9
  %147 = load i32, ptr %23, align 4, !tbaa !9
  %148 = icmp ne i32 %147, 0
  br i1 %148, label %149, label %151

149:                                              ; preds = %140
  %150 = load i32, ptr %23, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %150, i32 noundef -1, ptr noundef @.str, i32 noundef 184, ptr noundef @__FUNCTION__.MATSearch, ptr noundef @.str.5)
  br label %151

151:                                              ; preds = %149, %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  br label %152

152:                                              ; preds = %151
  br label %153

153:                                              ; preds = %152
  br label %154

154:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  %155 = getelementptr inbounds [2 x i32], ptr %13, i64 0, i64 0
  %156 = load ptr, ptr %6, align 8, !tbaa !5
  %157 = call i64 @fread(ptr noundef %155, i64 noundef 1, i64 noundef 8, ptr noundef %156)
  %158 = trunc i64 %157 to i32
  %159 = icmp ne i32 %158, 8
  %160 = zext i1 %159 to i32
  store i32 %160, ptr %24, align 4, !tbaa !9
  %161 = load i32, ptr %24, align 4, !tbaa !9
  %162 = icmp ne i32 %161, 0
  br i1 %162, label %163, label %165

163:                                              ; preds = %154
  %164 = load i32, ptr %24, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %164, i32 noundef -1, ptr noundef @.str, i32 noundef 185, ptr noundef @__FUNCTION__.MATSearch, ptr noundef @.str.5)
  br label %165

165:                                              ; preds = %163, %154
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  br label %166

166:                                              ; preds = %165
  br label %167

167:                                              ; preds = %166
  br label %168

168:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  %169 = load ptr, ptr %8, align 8, !tbaa !5
  %170 = load ptr, ptr %6, align 8, !tbaa !5
  %171 = call i64 @fread(ptr noundef %169, i64 noundef 4, i64 noundef 1, ptr noundef %170)
  %172 = trunc i64 %171 to i32
  %173 = icmp ne i32 %172, 1
  %174 = zext i1 %173 to i32
  store i32 %174, ptr %25, align 4, !tbaa !9
  %175 = load i32, ptr %25, align 4, !tbaa !9
  %176 = icmp ne i32 %175, 0
  br i1 %176, label %177, label %179

177:                                              ; preds = %168
  %178 = load i32, ptr %25, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %178, i32 noundef -1, ptr noundef @.str, i32 noundef 187, ptr noundef @__FUNCTION__.MATSearch, ptr noundef @.str.5)
  br label %179

179:                                              ; preds = %177, %168
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  br label %180

180:                                              ; preds = %179
  br label %181

181:                                              ; preds = %180
  br label %182

182:                                              ; preds = %181
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  %183 = load ptr, ptr %9, align 8, !tbaa !5
  %184 = load ptr, ptr %6, align 8, !tbaa !5
  %185 = call i64 @fread(ptr noundef %183, i64 noundef 4, i64 noundef 1, ptr noundef %184)
  %186 = trunc i64 %185 to i32
  %187 = icmp ne i32 %186, 1
  %188 = zext i1 %187 to i32
  store i32 %188, ptr %26, align 4, !tbaa !9
  %189 = load i32, ptr %26, align 4, !tbaa !9
  %190 = icmp ne i32 %189, 0
  br i1 %190, label %191, label %193

191:                                              ; preds = %182
  %192 = load i32, ptr %26, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %192, i32 noundef -1, ptr noundef @.str, i32 noundef 188, ptr noundef @__FUNCTION__.MATSearch, ptr noundef @.str.5)
  br label %193

193:                                              ; preds = %191, %182
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  br label %194

194:                                              ; preds = %193
  br label %195

195:                                              ; preds = %194
  %196 = load i32, ptr %18, align 4, !tbaa !9
  %197 = icmp sle i32 %196, 4
  br i1 %197, label %198, label %227

198:                                              ; preds = %195
  br label %199

199:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  %200 = getelementptr inbounds [2 x i32], ptr %13, i64 0, i64 0
  %201 = load ptr, ptr %6, align 8, !tbaa !5
  %202 = call i64 @fread(ptr noundef %200, i64 noundef 4, i64 noundef 1, ptr noundef %201)
  %203 = trunc i64 %202 to i32
  %204 = icmp ne i32 %203, 1
  %205 = zext i1 %204 to i32
  store i32 %205, ptr %27, align 4, !tbaa !9
  %206 = load i32, ptr %27, align 4, !tbaa !9
  %207 = icmp ne i32 %206, 0
  br i1 %207, label %208, label %210

208:                                              ; preds = %199
  %209 = load i32, ptr %27, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %209, i32 noundef -1, ptr noundef @.str, i32 noundef 192, ptr noundef @__FUNCTION__.MATSearch, ptr noundef @.str.5)
  br label %210

210:                                              ; preds = %208, %199
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  br label %211

211:                                              ; preds = %210
  br label %212

212:                                              ; preds = %211
  br label %213

213:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  %214 = getelementptr inbounds [256 x i8], ptr %10, i64 0, i64 0
  %215 = load ptr, ptr %6, align 8, !tbaa !5
  %216 = call i64 @fread(ptr noundef %214, i64 noundef 1, i64 noundef 4, ptr noundef %215)
  %217 = trunc i64 %216 to i32
  %218 = icmp ne i32 %217, 4
  %219 = zext i1 %218 to i32
  store i32 %219, ptr %28, align 4, !tbaa !9
  %220 = load i32, ptr %28, align 4, !tbaa !9
  %221 = icmp ne i32 %220, 0
  br i1 %221, label %222, label %224

222:                                              ; preds = %213
  %223 = load i32, ptr %28, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %223, i32 noundef -1, ptr noundef @.str, i32 noundef 193, ptr noundef @__FUNCTION__.MATSearch, ptr noundef @.str.5)
  br label %224

224:                                              ; preds = %222, %213
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  br label %225

225:                                              ; preds = %224
  br label %226

226:                                              ; preds = %225
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %280

227:                                              ; preds = %195
  br label %228

228:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  %229 = load ptr, ptr %6, align 8, !tbaa !5
  %230 = call i64 @fread(ptr noundef %11, i64 noundef 4, i64 noundef 1, ptr noundef %229)
  %231 = trunc i64 %230 to i32
  %232 = icmp ne i32 %231, 1
  %233 = zext i1 %232 to i32
  store i32 %233, ptr %29, align 4, !tbaa !9
  %234 = load i32, ptr %29, align 4, !tbaa !9
  %235 = icmp ne i32 %234, 0
  br i1 %235, label %236, label %238

236:                                              ; preds = %228
  %237 = load i32, ptr %29, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %237, i32 noundef -1, ptr noundef @.str, i32 noundef 198, ptr noundef @__FUNCTION__.MATSearch, ptr noundef @.str.5)
  br label %238

238:                                              ; preds = %236, %228
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  br label %239

239:                                              ; preds = %238
  br label %240

240:                                              ; preds = %239
  br label %241

241:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #4
  %242 = load ptr, ptr %6, align 8, !tbaa !5
  %243 = call i64 @fread(ptr noundef %14, i64 noundef 4, i64 noundef 1, ptr noundef %242)
  %244 = trunc i64 %243 to i32
  %245 = icmp ne i32 %244, 1
  %246 = zext i1 %245 to i32
  store i32 %246, ptr %30, align 4, !tbaa !9
  %247 = load i32, ptr %30, align 4, !tbaa !9
  %248 = icmp ne i32 %247, 0
  br i1 %248, label %249, label %251

249:                                              ; preds = %241
  %250 = load i32, ptr %30, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %250, i32 noundef -1, ptr noundef @.str, i32 noundef 199, ptr noundef @__FUNCTION__.MATSearch, ptr noundef @.str.5)
  br label %251

251:                                              ; preds = %249, %241
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #4
  br label %252

252:                                              ; preds = %251
  br label %253

253:                                              ; preds = %252
  %254 = load i32, ptr %14, align 4, !tbaa !9
  %255 = load i32, ptr %18, align 4, !tbaa !9
  %256 = icmp eq i32 %254, %255
  br i1 %256, label %257, label %278

257:                                              ; preds = %253
  %258 = load i32, ptr %14, align 4, !tbaa !9
  %259 = add nsw i32 %258, 7
  %260 = and i32 %259, -8
  store i32 %260, ptr %14, align 4, !tbaa !9
  br label %261

261:                                              ; preds = %257
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #4
  %262 = getelementptr inbounds [256 x i8], ptr %10, i64 0, i64 0
  %263 = load i32, ptr %14, align 4, !tbaa !9
  %264 = sext i32 %263 to i64
  %265 = load ptr, ptr %6, align 8, !tbaa !5
  %266 = call i64 @fread(ptr noundef %262, i64 noundef 1, i64 noundef %264, ptr noundef %265)
  %267 = trunc i64 %266 to i32
  %268 = load i32, ptr %14, align 4, !tbaa !9
  %269 = icmp ne i32 %267, %268
  %270 = zext i1 %269 to i32
  store i32 %270, ptr %31, align 4, !tbaa !9
  %271 = load i32, ptr %31, align 4, !tbaa !9
  %272 = icmp ne i32 %271, 0
  br i1 %272, label %273, label %275

273:                                              ; preds = %261
  %274 = load i32, ptr %31, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %274, i32 noundef -1, ptr noundef @.str, i32 noundef 204, ptr noundef @__FUNCTION__.MATSearch, ptr noundef @.str.5)
  br label %275

275:                                              ; preds = %273, %261
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #4
  br label %276

276:                                              ; preds = %275
  br label %277

277:                                              ; preds = %276
  br label %279

278:                                              ; preds = %253
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %279

279:                                              ; preds = %278, %277
  br label %280

280:                                              ; preds = %279, %226
  %281 = load i32, ptr %18, align 4, !tbaa !9
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [256 x i8], ptr %10, i64 0, i64 %282
  store i8 0, ptr %283, align 1, !tbaa !13
  %284 = getelementptr inbounds [256 x i8], ptr %10, i64 0, i64 0
  %285 = load ptr, ptr %7, align 8, !tbaa !5
  %286 = call i32 @strcmp(ptr noundef %284, ptr noundef %285) #5
  %287 = icmp eq i32 %286, 0
  br i1 %287, label %288, label %289

288:                                              ; preds = %280
  br label %301

289:                                              ; preds = %280
  %290 = load ptr, ptr %6, align 8, !tbaa !5
  %291 = load i32, ptr %12, align 4, !tbaa !9
  %292 = sub nsw i32 %291, 8
  %293 = sub nsw i32 %292, 8
  %294 = sub nsw i32 %293, 8
  %295 = sub nsw i32 %294, 8
  %296 = sub nsw i32 %295, 8
  %297 = load i32, ptr %14, align 4, !tbaa !9
  %298 = sub nsw i32 %296, %297
  %299 = sext i32 %298 to i64
  %300 = call i32 @fseek(ptr noundef %290, i64 noundef %299, i32 noundef 1)
  br label %85, !llvm.loop !11

301:                                              ; preds = %288, %85
  %302 = load ptr, ptr %6, align 8, !tbaa !5
  %303 = call i64 @ftell(ptr noundef %302)
  %304 = load i32, ptr %19, align 4, !tbaa !9
  %305 = sext i32 %304 to i64
  %306 = icmp sge i64 %303, %305
  br i1 %306, label %307, label %310

307:                                              ; preds = %301
  %308 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %308, align 4, !tbaa !9
  %309 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %309, align 4, !tbaa !9
  store i32 0, ptr %5, align 4
  store i32 1, ptr %32, align 4
  br label %311

310:                                              ; preds = %301
  store i32 1, ptr %5, align 4
  store i32 1, ptr %32, align 4
  br label %311

311:                                              ; preds = %310, %307
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %10) #4
  %312 = load i32, ptr %5, align 4
  ret i32 %312
}

declare i64 @ftell(ptr noundef) #1

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

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

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

!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 = !{!7, !7, i64 0}


; 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 [80 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@__FUNCTION__.MATSearch = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1

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

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @MATSearch(ptr noundef %0, ptr noundef readonly %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #4 {
  %5 = alloca [256 x i8], align 16
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [2 x i32], align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  %magicptr = ptrtoint ptr %0 to i64
  switch i64 %magicptr, label %12 [
    i64 -1, label %.thread
    i64 0, label %.thread
  ]

12:                                               ; preds = %4
  %magicptr77 = ptrtoint ptr %1 to i64
  switch i64 %magicptr77, label %13 [
    i64 -1, label %.thread
    i64 0, label %.thread
  ]

.thread:                                          ; preds = %12, %12, %4, %4
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 154, ptr noundef nonnull @__FUNCTION__.MATSearch, ptr noundef nonnull @.str.1) #5
  br label %13

13:                                               ; preds = %12, %.thread
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  %14 = icmp eq ptr %2, null
  %15 = icmp eq ptr %2, inttoptr (i64 -1 to ptr)
  %or.cond5 = or i1 %14, %15
  %spec.store.select = select i1 %or.cond5, ptr %11, ptr %2
  %16 = icmp eq ptr %3, null
  %17 = icmp eq ptr %3, inttoptr (i64 -1 to ptr)
  %or.cond8 = or i1 %16, %17
  %spec.store.select9 = select i1 %or.cond8, ptr %10, ptr %3
  %18 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #6
  %19 = trunc i64 %18 to i32
  %20 = tail call i32 @fseek(ptr noundef %0, i64 noundef 0, i32 noundef 2)
  %21 = tail call i64 @ftell(ptr noundef %0)
  %22 = tail call i32 @fseek(ptr noundef %0, i64 noundef 128, i32 noundef 0)
  %23 = tail call i64 @ftell(ptr noundef %0)
  %sext = shl i64 %21, 32
  %24 = ashr exact i64 %sext, 32
  %25 = icmp slt i64 %23, %24
  br i1 %25, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %13
  %26 = icmp slt i32 %19, 5
  %sext75 = shl i64 %18, 32
  %27 = ashr exact i64 %sext75, 32
  %28 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 %27
  %29 = add nuw nsw i32 %19, 7
  %30 = and i32 %29, 2147483640
  %31 = zext nneg i32 %30 to i64
  br label %32

32:                                               ; preds = %.lr.ph, %.backedge
  %33 = call i64 @fread(ptr noundef nonnull %6, i64 noundef 4, i64 noundef 1, ptr noundef %0)
  %34 = and i64 %33, 4294967295
  %.not78 = icmp eq i64 %34, 1
  br i1 %.not78, label %36, label %35

35:                                               ; preds = %32
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 173, ptr noundef nonnull @__FUNCTION__.MATSearch, ptr noundef nonnull @.str.5) #5
  br label %36

36:                                               ; preds = %35, %32
  %37 = call i64 @fread(ptr noundef nonnull %7, i64 noundef 4, i64 noundef 1, ptr noundef %0)
  %38 = and i64 %37, 4294967295
  %.not79 = icmp eq i64 %38, 1
  br i1 %.not79, label %40, label %39

39:                                               ; preds = %36
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 174, ptr noundef nonnull @__FUNCTION__.MATSearch, ptr noundef nonnull @.str.5) #5
  br label %40

40:                                               ; preds = %39, %36
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %.not = icmp eq i32 %41, 14
  br i1 %.not, label %48, label %42

42:                                               ; preds = %40
  %43 = load i32, ptr %7, align 4, !tbaa !5
  br label %.backedge

.backedge:                                        ; preds = %42, %98
  %.sink92 = phi i32 [ %43, %42 ], [ %101, %98 ]
  %44 = sext i32 %.sink92 to i64
  %45 = tail call i32 @fseek(ptr noundef %0, i64 noundef %44, i32 noundef 1)
  %46 = tail call i64 @ftell(ptr noundef %0)
  %47 = icmp slt i64 %46, %24
  br i1 %47, label %32, label %._crit_edge, !llvm.loop !9

48:                                               ; preds = %40
  %49 = call i64 @fread(ptr noundef nonnull %8, i64 noundef 1, i64 noundef 8, ptr noundef %0)
  %50 = and i64 %49, 4294967295
  %.not80 = icmp eq i64 %50, 8
  br i1 %.not80, label %52, label %51

51:                                               ; preds = %48
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 183, ptr noundef nonnull @__FUNCTION__.MATSearch, ptr noundef nonnull @.str.5) #5
  br label %52

52:                                               ; preds = %51, %48
  %53 = call i64 @fread(ptr noundef nonnull %8, i64 noundef 1, i64 noundef 8, ptr noundef %0)
  %54 = and i64 %53, 4294967295
  %.not81 = icmp eq i64 %54, 8
  br i1 %.not81, label %56, label %55

55:                                               ; preds = %52
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 184, ptr noundef nonnull @__FUNCTION__.MATSearch, ptr noundef nonnull @.str.5) #5
  br label %56

56:                                               ; preds = %55, %52
  %57 = call i64 @fread(ptr noundef nonnull %8, i64 noundef 1, i64 noundef 8, ptr noundef %0)
  %58 = and i64 %57, 4294967295
  %.not82 = icmp eq i64 %58, 8
  br i1 %.not82, label %60, label %59

59:                                               ; preds = %56
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 185, ptr noundef nonnull @__FUNCTION__.MATSearch, ptr noundef nonnull @.str.5) #5
  br label %60

60:                                               ; preds = %59, %56
  %61 = call i64 @fread(ptr noundef %spec.store.select, i64 noundef 4, i64 noundef 1, ptr noundef %0)
  %62 = and i64 %61, 4294967295
  %.not83 = icmp eq i64 %62, 1
  br i1 %.not83, label %64, label %63

63:                                               ; preds = %60
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 187, ptr noundef nonnull @__FUNCTION__.MATSearch, ptr noundef nonnull @.str.5) #5
  br label %64

64:                                               ; preds = %63, %60
  %65 = call i64 @fread(ptr noundef %spec.store.select9, i64 noundef 4, i64 noundef 1, ptr noundef %0)
  %66 = and i64 %65, 4294967295
  %.not84 = icmp eq i64 %66, 1
  br i1 %.not84, label %68, label %67

67:                                               ; preds = %64
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 188, ptr noundef nonnull @__FUNCTION__.MATSearch, ptr noundef nonnull @.str.5) #5
  br label %68

68:                                               ; preds = %67, %64
  br i1 %26, label %69, label %78

69:                                               ; preds = %68
  %70 = call i64 @fread(ptr noundef nonnull %8, i64 noundef 4, i64 noundef 1, ptr noundef %0)
  %71 = and i64 %70, 4294967295
  %.not88 = icmp eq i64 %71, 1
  br i1 %.not88, label %73, label %72

72:                                               ; preds = %69
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 192, ptr noundef nonnull @__FUNCTION__.MATSearch, ptr noundef nonnull @.str.5) #5
  br label %73

73:                                               ; preds = %72, %69
  %74 = call i64 @fread(ptr noundef nonnull %5, i64 noundef 1, i64 noundef 4, ptr noundef %0)
  %75 = and i64 %74, 4294967295
  %.not89 = icmp eq i64 %75, 4
  br i1 %.not89, label %77, label %76

76:                                               ; preds = %73
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 193, ptr noundef nonnull @__FUNCTION__.MATSearch, ptr noundef nonnull @.str.5) #5
  br label %77

77:                                               ; preds = %76, %73
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %94

78:                                               ; preds = %68
  %79 = call i64 @fread(ptr noundef nonnull %6, i64 noundef 4, i64 noundef 1, ptr noundef %0)
  %80 = and i64 %79, 4294967295
  %.not85 = icmp eq i64 %80, 1
  br i1 %.not85, label %82, label %81

81:                                               ; preds = %78
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 198, ptr noundef nonnull @__FUNCTION__.MATSearch, ptr noundef nonnull @.str.5) #5
  br label %82

82:                                               ; preds = %81, %78
  %83 = call i64 @fread(ptr noundef nonnull %9, i64 noundef 4, i64 noundef 1, ptr noundef %0)
  %84 = and i64 %83, 4294967295
  %.not86 = icmp eq i64 %84, 1
  br i1 %.not86, label %86, label %85

85:                                               ; preds = %82
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 199, ptr noundef nonnull @__FUNCTION__.MATSearch, ptr noundef nonnull @.str.5) #5
  br label %86

86:                                               ; preds = %85, %82
  %87 = load i32, ptr %9, align 4, !tbaa !5
  %88 = icmp eq i32 %87, %19
  br i1 %88, label %89, label %93

89:                                               ; preds = %86
  store i32 %30, ptr %9, align 4, !tbaa !5
  %90 = call i64 @fread(ptr noundef nonnull %5, i64 noundef 1, i64 noundef %31, ptr noundef %0)
  %91 = trunc i64 %90 to i32
  %.not87 = icmp eq i32 %30, %91
  br i1 %.not87, label %94, label %92

92:                                               ; preds = %89
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 204, ptr noundef nonnull @__FUNCTION__.MATSearch, ptr noundef nonnull @.str.5) #5
  br label %94

93:                                               ; preds = %86
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %89, %92, %93, %77
  %95 = phi i32 [ %30, %89 ], [ %30, %92 ], [ 0, %93 ], [ 0, %77 ]
  store i8 0, ptr %28, align 1, !tbaa !11
  %96 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) %1) #6
  %97 = icmp eq i32 %96, 0
  br i1 %97, label %._crit_edge, label %98

98:                                               ; preds = %94
  %99 = load i32, ptr %7, align 4, !tbaa !5
  %100 = add nsw i32 %99, -40
  %101 = sub i32 %100, %95
  br label %.backedge

._crit_edge:                                      ; preds = %.backedge, %94, %13
  %102 = tail call i64 @ftell(ptr noundef %0)
  %.not76 = icmp slt i64 %102, %24
  br i1 %.not76, label %104, label %103

103:                                              ; preds = %._crit_edge
  store i32 0, ptr %spec.store.select9, align 4, !tbaa !5
  store i32 0, ptr %spec.store.select, align 4, !tbaa !5
  br label %104

104:                                              ; preds = %._crit_edge, %103
  %.0 = phi i32 [ 0, %103 ], [ 1, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %5) #5
  ret i32 %.0
}

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

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

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

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

!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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}


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