; LLVM IR from jingweizhanghuai/Morn :: src/util (morn_INI)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.__va_list_tag = type { i32, i32, ptr, ptr }
%struct.MHandle = type { i32, i32, ptr, ptr }
%struct.HandleINI = type { ptr }
%struct.MSheet = type { i32, ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@__FUNCTION__.mINILoad = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [12 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 ptr @GetHandle(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @mINILoad(ptr noundef %0, ptr noundef %1, ...) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [256 x i8], align 16
  %6 = alloca [1 x %struct.__va_list_tag], align 16
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %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
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 256, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #5
  %24 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %6, i64 0, i64 0
  call void @llvm.va_start.p0(ptr %24)
  %25 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %6, i64 0, i64 0
  %28 = call i32 @vsprintf(ptr noundef %25, ptr noundef %26, ptr noundef %27) #5
  %29 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %6, i64 0, i64 0
  call void @llvm.va_end.p0(ptr %29)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = call ptr @GetHandle(ptr noundef %30, i32 noundef 8, i32 noundef -2021989033, ptr noundef @endINI)
  store ptr %31, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.MHandle, ptr %32, i32 0, i32 3
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  store ptr %34, ptr %8, align 8, !tbaa !5
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  call void @endINI(ptr noundef %35)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %36 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  %37 = call noalias ptr @fopen(ptr noundef %36, ptr noundef @.str.3)
  store ptr %37, ptr %9, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = icmp eq ptr %39, null
  %41 = zext i1 %40 to i32
  store i32 %41, ptr %10, align 4, !tbaa !12
  %42 = load i32, ptr %10, align 4, !tbaa !12
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %47

44:                                               ; preds = %38
  %45 = load i32, ptr %10, align 4, !tbaa !12
  %46 = getelementptr inbounds [256 x i8], ptr %5, i64 0, i64 0
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %45, i32 noundef -1, ptr noundef @.str.1, i32 noundef 58, ptr noundef @__FUNCTION__.mINILoad, ptr noundef @.str.4, ptr noundef %46)
  br label %47

47:                                               ; preds = %44, %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %48

48:                                               ; preds = %47
  br label %49

49:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = call i32 @fsize(ptr noundef %50)
  store i32 %51, ptr %11, align 4, !tbaa !12
  %52 = load i32, ptr %11, align 4, !tbaa !12
  %53 = add nsw i32 %52, 2
  %54 = call ptr @m_Malloc(i32 noundef %53)
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.HandleINI, ptr %55, i32 0, i32 0
  store ptr %54, ptr %56, align 8, !tbaa !13
  br label %57

57:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.HandleINI, ptr %58, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !13
  %61 = load i32, ptr %11, align 4, !tbaa !12
  %62 = sext i32 %61 to i64
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = call i64 @fread(ptr noundef %60, i64 noundef 1, i64 noundef %62, ptr noundef %63)
  %65 = trunc i64 %64 to i32
  %66 = load i32, ptr %11, align 4, !tbaa !12
  %67 = icmp ne i32 %65, %66
  %68 = zext i1 %67 to i32
  store i32 %68, ptr %12, align 4, !tbaa !12
  %69 = load i32, ptr %12, align 4, !tbaa !12
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %71, label %73

71:                                               ; preds = %57
  %72 = load i32, ptr %12, align 4, !tbaa !12
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %72, i32 noundef -1, ptr noundef @.str.1, i32 noundef 61, ptr noundef @__FUNCTION__.mINILoad, ptr noundef @.str.5)
  br label %73

73:                                               ; preds = %71, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = call i32 @fclose(ptr noundef %76)
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.HandleINI, ptr %78, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8, !tbaa !13
  %81 = load i32, ptr %11, align 4, !tbaa !12
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i8, ptr %80, i64 %82
  store i8 10, ptr %83, align 1, !tbaa !15
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.HandleINI, ptr %84, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8, !tbaa !13
  %87 = load i32, ptr %11, align 4, !tbaa !12
  %88 = add nsw i32 %87, 1
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds i8, ptr %86, i64 %89
  store i8 0, ptr %90, align 1, !tbaa !15
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.MHandle, ptr %91, i32 0, i32 1
  store volatile i32 1, ptr %92, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 -1, ptr %14, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.HandleINI, ptr %93, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !13
  store ptr %95, ptr %17, align 8, !tbaa !5
  br label %96

96:                                               ; preds = %103, %75
  %97 = load ptr, ptr %17, align 8, !tbaa !5
  %98 = getelementptr inbounds i8, ptr %97, i64 0
  %99 = load i8, ptr %98, align 1, !tbaa !15
  %100 = sext i8 %99 to i32
  %101 = icmp ne i32 %100, 91
  br i1 %101, label %102, label %106

102:                                              ; preds = %96
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %17, align 8, !tbaa !5
  %105 = getelementptr inbounds i8, ptr %104, i32 1
  store ptr %105, ptr %17, align 8, !tbaa !5
  br label %96, !llvm.loop !17

106:                                              ; preds = %96
  br label %107

107:                                              ; preds = %389, %106
  %108 = load ptr, ptr %17, align 8, !tbaa !5
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.HandleINI, ptr %109, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8, !tbaa !13
  %112 = load i32, ptr %11, align 4, !tbaa !12
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds i8, ptr %111, i64 %113
  %115 = getelementptr inbounds i8, ptr %114, i64 1
  %116 = icmp ult ptr %108, %115
  br i1 %116, label %117, label %392

117:                                              ; preds = %107
  %118 = load ptr, ptr %17, align 8, !tbaa !5
  %119 = getelementptr inbounds i8, ptr %118, i64 0
  %120 = load i8, ptr %119, align 1, !tbaa !15
  %121 = sext i8 %120 to i32
  %122 = icmp eq i32 %121, 32
  br i1 %122, label %129, label %123

123:                                              ; preds = %117
  %124 = load ptr, ptr %17, align 8, !tbaa !5
  %125 = getelementptr inbounds i8, ptr %124, i64 0
  %126 = load i8, ptr %125, align 1, !tbaa !15
  %127 = sext i8 %126 to i32
  %128 = icmp eq i32 %127, 9
  br i1 %128, label %129, label %132

129:                                              ; preds = %123, %117
  %130 = load ptr, ptr %17, align 8, !tbaa !5
  %131 = getelementptr inbounds i8, ptr %130, i64 0
  store i8 0, ptr %131, align 1, !tbaa !15
  br label %388

132:                                              ; preds = %123
  %133 = load ptr, ptr %17, align 8, !tbaa !5
  %134 = getelementptr inbounds i8, ptr %133, i64 0
  %135 = load i8, ptr %134, align 1, !tbaa !15
  %136 = sext i8 %135 to i32
  %137 = icmp eq i32 %136, 10
  br i1 %137, label %144, label %138

138:                                              ; preds = %132
  %139 = load ptr, ptr %17, align 8, !tbaa !5
  %140 = getelementptr inbounds i8, ptr %139, i64 0
  %141 = load i8, ptr %140, align 1, !tbaa !15
  %142 = sext i8 %141 to i32
  %143 = icmp eq i32 %142, 13
  br i1 %143, label %144, label %158

144:                                              ; preds = %138, %132
  br label %145

145:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %146 = load i32, ptr %16, align 4, !tbaa !12
  %147 = icmp eq i32 %146, 3
  %148 = zext i1 %147 to i32
  store i32 %148, ptr %18, align 4, !tbaa !12
  %149 = load i32, ptr %18, align 4, !tbaa !12
  %150 = icmp ne i32 %149, 0
  br i1 %150, label %151, label %153

151:                                              ; preds = %145
  %152 = load i32, ptr %18, align 4, !tbaa !12
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %152, i32 noundef -1, ptr noundef @.str.1, i32 noundef 78, ptr noundef @__FUNCTION__.mINILoad, ptr noundef @.str.6)
  br label %153

153:                                              ; preds = %151, %145
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %154

154:                                              ; preds = %153
  br label %155

155:                                              ; preds = %154
  %156 = load ptr, ptr %17, align 8, !tbaa !5
  %157 = getelementptr inbounds i8, ptr %156, i64 0
  store i8 0, ptr %157, align 1, !tbaa !15
  br label %387

158:                                              ; preds = %138
  %159 = load ptr, ptr %17, align 8, !tbaa !5
  %160 = getelementptr inbounds i8, ptr %159, i64 0
  %161 = load i8, ptr %160, align 1, !tbaa !15
  %162 = sext i8 %161 to i32
  %163 = icmp eq i32 %162, 59
  br i1 %163, label %170, label %164

164:                                              ; preds = %158
  %165 = load ptr, ptr %17, align 8, !tbaa !5
  %166 = getelementptr inbounds i8, ptr %165, i64 0
  %167 = load i8, ptr %166, align 1, !tbaa !15
  %168 = sext i8 %167 to i32
  %169 = icmp eq i32 %168, 35
  br i1 %169, label %170, label %207

170:                                              ; preds = %164, %158
  br label %171

171:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %172 = load i32, ptr %16, align 4, !tbaa !12
  %173 = icmp eq i32 %172, 3
  %174 = zext i1 %173 to i32
  store i32 %174, ptr %19, align 4, !tbaa !12
  %175 = load i32, ptr %19, align 4, !tbaa !12
  %176 = icmp ne i32 %175, 0
  br i1 %176, label %177, label %179

177:                                              ; preds = %171
  %178 = load i32, ptr %19, align 4, !tbaa !12
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %178, i32 noundef -1, ptr noundef @.str.1, i32 noundef 79, ptr noundef @__FUNCTION__.mINILoad, ptr noundef @.str.6)
  br label %179

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

180:                                              ; preds = %179
  br label %181

181:                                              ; preds = %180
  %182 = load ptr, ptr %17, align 8, !tbaa !5
  %183 = getelementptr inbounds i8, ptr %182, i64 0
  store i8 0, ptr %183, align 1, !tbaa !15
  %184 = load ptr, ptr %17, align 8, !tbaa !5
  %185 = getelementptr inbounds i8, ptr %184, i64 1
  store ptr %185, ptr %17, align 8, !tbaa !5
  br label %186

186:                                              ; preds = %203, %181
  %187 = load ptr, ptr %17, align 8, !tbaa !5
  %188 = getelementptr inbounds i8, ptr %187, i64 0
  %189 = load i8, ptr %188, align 1, !tbaa !15
  %190 = sext i8 %189 to i32
  %191 = icmp ne i32 %190, 10
  br i1 %191, label %192, label %198

192:                                              ; preds = %186
  %193 = load ptr, ptr %17, align 8, !tbaa !5
  %194 = getelementptr inbounds i8, ptr %193, i64 0
  %195 = load i8, ptr %194, align 1, !tbaa !15
  %196 = sext i8 %195 to i32
  %197 = icmp ne i32 %196, 13
  br label %198

198:                                              ; preds = %192, %186
  %199 = phi i1 [ false, %186 ], [ %197, %192 ]
  br i1 %199, label %200, label %206

200:                                              ; preds = %198
  %201 = load ptr, ptr %17, align 8, !tbaa !5
  %202 = getelementptr inbounds i8, ptr %201, i64 0
  store i8 0, ptr %202, align 1, !tbaa !15
  br label %203

203:                                              ; preds = %200
  %204 = load ptr, ptr %17, align 8, !tbaa !5
  %205 = getelementptr inbounds i8, ptr %204, i32 1
  store ptr %205, ptr %17, align 8, !tbaa !5
  br label %186, !llvm.loop !19

206:                                              ; preds = %198
  br label %386

207:                                              ; preds = %164
  %208 = load ptr, ptr %17, align 8, !tbaa !5
  %209 = getelementptr inbounds i8, ptr %208, i64 0
  %210 = load i8, ptr %209, align 1, !tbaa !15
  %211 = sext i8 %210 to i32
  %212 = icmp eq i32 %211, 61
  br i1 %212, label %213, label %227

213:                                              ; preds = %207
  br label %214

214:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %215 = load i32, ptr %16, align 4, !tbaa !12
  %216 = icmp ne i32 %215, 1
  %217 = zext i1 %216 to i32
  store i32 %217, ptr %20, align 4, !tbaa !12
  %218 = load i32, ptr %20, align 4, !tbaa !12
  %219 = icmp ne i32 %218, 0
  br i1 %219, label %220, label %222

220:                                              ; preds = %214
  %221 = load i32, ptr %20, align 4, !tbaa !12
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %221, i32 noundef -1, ptr noundef @.str.1, i32 noundef 80, ptr noundef @__FUNCTION__.mINILoad, ptr noundef @.str.6)
  br label %222

222:                                              ; preds = %220, %214
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %223

223:                                              ; preds = %222
  br label %224

224:                                              ; preds = %223
  %225 = load ptr, ptr %17, align 8, !tbaa !5
  %226 = getelementptr inbounds i8, ptr %225, i64 0
  store i8 0, ptr %226, align 1, !tbaa !15
  store i32 2, ptr %16, align 4, !tbaa !12
  br label %385

227:                                              ; preds = %207
  %228 = load ptr, ptr %17, align 8, !tbaa !5
  %229 = getelementptr inbounds i8, ptr %228, i64 0
  %230 = load i8, ptr %229, align 1, !tbaa !15
  %231 = sext i8 %230 to i32
  %232 = icmp eq i32 %231, 91
  br i1 %232, label %233, label %245

233:                                              ; preds = %227
  br label %234

234:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %235 = load i32, ptr %16, align 4, !tbaa !12
  %236 = icmp ne i32 %235, 0
  %237 = zext i1 %236 to i32
  store i32 %237, ptr %21, align 4, !tbaa !12
  %238 = load i32, ptr %21, align 4, !tbaa !12
  %239 = icmp ne i32 %238, 0
  br i1 %239, label %240, label %242

240:                                              ; preds = %234
  %241 = load i32, ptr %21, align 4, !tbaa !12
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %241, i32 noundef -1, ptr noundef @.str.1, i32 noundef 81, ptr noundef @__FUNCTION__.mINILoad, ptr noundef @.str.6)
  br label %242

242:                                              ; preds = %240, %234
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %243

243:                                              ; preds = %242
  br label %244

244:                                              ; preds = %243
  store i32 3, ptr %16, align 4, !tbaa !12
  br label %384

245:                                              ; preds = %227
  %246 = load ptr, ptr %17, align 8, !tbaa !5
  %247 = getelementptr inbounds i8, ptr %246, i64 0
  %248 = load i8, ptr %247, align 1, !tbaa !15
  %249 = sext i8 %248 to i32
  %250 = icmp eq i32 %249, 93
  br i1 %250, label %251, label %265

251:                                              ; preds = %245
  br label %252

252:                                              ; preds = %251
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %253 = load i32, ptr %16, align 4, !tbaa !12
  %254 = icmp ne i32 %253, 4
  %255 = zext i1 %254 to i32
  store i32 %255, ptr %22, align 4, !tbaa !12
  %256 = load i32, ptr %22, align 4, !tbaa !12
  %257 = icmp ne i32 %256, 0
  br i1 %257, label %258, label %260

258:                                              ; preds = %252
  %259 = load i32, ptr %22, align 4, !tbaa !12
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %259, i32 noundef -1, ptr noundef @.str.1, i32 noundef 82, ptr noundef @__FUNCTION__.mINILoad, ptr noundef @.str.6)
  br label %260

260:                                              ; preds = %258, %252
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %261

261:                                              ; preds = %260
  br label %262

262:                                              ; preds = %261
  %263 = load ptr, ptr %17, align 8, !tbaa !5
  %264 = getelementptr inbounds i8, ptr %263, i64 0
  store i8 0, ptr %264, align 1, !tbaa !15
  store i32 0, ptr %16, align 4, !tbaa !12
  br label %383

265:                                              ; preds = %245
  %266 = load i32, ptr %16, align 4, !tbaa !12
  %267 = icmp eq i32 %266, 3
  br i1 %267, label %268, label %281

268:                                              ; preds = %265
  %269 = load i32, ptr %14, align 4, !tbaa !12
  %270 = add nsw i32 %269, 1
  store i32 %270, ptr %14, align 4, !tbaa !12
  store i32 -1, ptr %15, align 4, !tbaa !12
  %271 = load ptr, ptr %3, align 8, !tbaa !5
  %272 = load i32, ptr %14, align 4, !tbaa !12
  %273 = add nsw i32 %272, 1
  call void @mSheetRowAppend(ptr noundef %271, i32 noundef %273)
  %274 = load ptr, ptr %17, align 8, !tbaa !5
  %275 = load ptr, ptr %3, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.MSheet, ptr %275, i32 0, i32 1
  %277 = load ptr, ptr %276, align 8, !tbaa !20
  %278 = load i32, ptr %14, align 4, !tbaa !12
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds ptr, ptr %277, i64 %279
  store ptr %274, ptr %280, align 8, !tbaa !5
  store i32 4, ptr %16, align 4, !tbaa !12
  br label %382

281:                                              ; preds = %265
  %282 = load i32, ptr %16, align 4, !tbaa !12
  %283 = icmp eq i32 %282, 0
  br i1 %283, label %284, label %302

284:                                              ; preds = %281
  %285 = load i32, ptr %15, align 4, !tbaa !12
  %286 = add nsw i32 %285, 1
  store i32 %286, ptr %15, align 4, !tbaa !12
  %287 = load ptr, ptr %3, align 8, !tbaa !5
  %288 = load i32, ptr %14, align 4, !tbaa !12
  %289 = load i32, ptr %15, align 4, !tbaa !12
  %290 = add nsw i32 %289, 1
  call void @mSheetColAppend(ptr noundef %287, i32 noundef %288, i32 noundef %290)
  %291 = load ptr, ptr %17, align 8, !tbaa !5
  %292 = load ptr, ptr %3, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.MSheet, ptr %292, i32 0, i32 3
  %294 = load ptr, ptr %293, align 8, !tbaa !22
  %295 = load i32, ptr %14, align 4, !tbaa !12
  %296 = sext i32 %295 to i64
  %297 = getelementptr inbounds ptr, ptr %294, i64 %296
  %298 = load ptr, ptr %297, align 8, !tbaa !5
  %299 = load i32, ptr %15, align 4, !tbaa !12
  %300 = sext i32 %299 to i64
  %301 = getelementptr inbounds ptr, ptr %298, i64 %300
  store ptr %291, ptr %301, align 8, !tbaa !5
  store i32 1, ptr %16, align 4, !tbaa !12
  br label %381

302:                                              ; preds = %281
  %303 = load i32, ptr %16, align 4, !tbaa !12
  %304 = icmp eq i32 %303, 2
  br i1 %304, label %305, label %380

305:                                              ; preds = %302
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 0, ptr %23, align 4, !tbaa !12
  store i32 0, ptr %13, align 4, !tbaa !12
  br label %306

306:                                              ; preds = %368, %305
  %307 = load ptr, ptr %17, align 8, !tbaa !5
  %308 = load i32, ptr %13, align 4, !tbaa !12
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds i8, ptr %307, i64 %309
  %311 = load i8, ptr %310, align 1, !tbaa !15
  %312 = sext i8 %311 to i32
  %313 = icmp ne i32 %312, 35
  br i1 %313, label %314, label %338

314:                                              ; preds = %306
  %315 = load ptr, ptr %17, align 8, !tbaa !5
  %316 = load i32, ptr %13, align 4, !tbaa !12
  %317 = sext i32 %316 to i64
  %318 = getelementptr inbounds i8, ptr %315, i64 %317
  %319 = load i8, ptr %318, align 1, !tbaa !15
  %320 = sext i8 %319 to i32
  %321 = icmp ne i32 %320, 59
  br i1 %321, label %322, label %338

322:                                              ; preds = %314
  %323 = load ptr, ptr %17, align 8, !tbaa !5
  %324 = load i32, ptr %13, align 4, !tbaa !12
  %325 = sext i32 %324 to i64
  %326 = getelementptr inbounds i8, ptr %323, i64 %325
  %327 = load i8, ptr %326, align 1, !tbaa !15
  %328 = sext i8 %327 to i32
  %329 = icmp ne i32 %328, 10
  br i1 %329, label %330, label %338

330:                                              ; preds = %322
  %331 = load ptr, ptr %17, align 8, !tbaa !5
  %332 = load i32, ptr %13, align 4, !tbaa !12
  %333 = sext i32 %332 to i64
  %334 = getelementptr inbounds i8, ptr %331, i64 %333
  %335 = load i8, ptr %334, align 1, !tbaa !15
  %336 = sext i8 %335 to i32
  %337 = icmp ne i32 %336, 13
  br label %338

338:                                              ; preds = %330, %322, %314, %306
  %339 = phi i1 [ false, %322 ], [ false, %314 ], [ false, %306 ], [ %337, %330 ]
  br i1 %339, label %340, label %371

340:                                              ; preds = %338
  %341 = load ptr, ptr %17, align 8, !tbaa !5
  %342 = load i32, ptr %13, align 4, !tbaa !12
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds i8, ptr %341, i64 %343
  %345 = load i8, ptr %344, align 1, !tbaa !15
  %346 = sext i8 %345 to i32
  %347 = icmp ne i32 %346, 32
  br i1 %347, label %348, label %367

348:                                              ; preds = %340
  %349 = load ptr, ptr %17, align 8, !tbaa !5
  %350 = load i32, ptr %13, align 4, !tbaa !12
  %351 = sext i32 %350 to i64
  %352 = getelementptr inbounds i8, ptr %349, i64 %351
  %353 = load i8, ptr %352, align 1, !tbaa !15
  %354 = sext i8 %353 to i32
  %355 = icmp ne i32 %354, 9
  br i1 %355, label %356, label %367

356:                                              ; preds = %348
  %357 = load ptr, ptr %17, align 8, !tbaa !5
  %358 = load i32, ptr %13, align 4, !tbaa !12
  %359 = sext i32 %358 to i64
  %360 = getelementptr inbounds i8, ptr %357, i64 %359
  %361 = load i8, ptr %360, align 1, !tbaa !15
  %362 = load ptr, ptr %17, align 8, !tbaa !5
  %363 = load i32, ptr %23, align 4, !tbaa !12
  %364 = add nsw i32 %363, 1
  store i32 %364, ptr %23, align 4, !tbaa !12
  %365 = sext i32 %363 to i64
  %366 = getelementptr inbounds i8, ptr %362, i64 %365
  store i8 %361, ptr %366, align 1, !tbaa !15
  br label %367

367:                                              ; preds = %356, %348, %340
  br label %368

368:                                              ; preds = %367
  %369 = load i32, ptr %13, align 4, !tbaa !12
  %370 = add nsw i32 %369, 1
  store i32 %370, ptr %13, align 4, !tbaa !12
  br label %306, !llvm.loop !23

371:                                              ; preds = %338
  %372 = load ptr, ptr %17, align 8, !tbaa !5
  %373 = load i32, ptr %23, align 4, !tbaa !12
  %374 = sext i32 %373 to i64
  %375 = getelementptr inbounds i8, ptr %372, i64 %374
  store i8 0, ptr %375, align 1, !tbaa !15
  store i32 0, ptr %16, align 4, !tbaa !12
  %376 = load ptr, ptr %17, align 8, !tbaa !5
  %377 = load i32, ptr %13, align 4, !tbaa !12
  %378 = sext i32 %377 to i64
  %379 = getelementptr inbounds i8, ptr %376, i64 %378
  store ptr %379, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %380

380:                                              ; preds = %371, %302
  br label %381

381:                                              ; preds = %380, %284
  br label %382

382:                                              ; preds = %381, %268
  br label %383

383:                                              ; preds = %382, %262
  br label %384

384:                                              ; preds = %383, %244
  br label %385

385:                                              ; preds = %384, %224
  br label %386

386:                                              ; preds = %385, %206
  br label %387

387:                                              ; preds = %386, %155
  br label %388

388:                                              ; preds = %387, %129
  br label %389

389:                                              ; preds = %388
  %390 = load ptr, ptr %17, align 8, !tbaa !5
  %391 = getelementptr inbounds i8, ptr %390, i32 1
  store ptr %391, ptr %17, align 8, !tbaa !5
  br label %107, !llvm.loop !24

392:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr %5) #5
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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: nounwind uwtable
declare dso_local void @endINI(ptr noundef) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.va_start.p0(ptr) #3

; Function Attrs: nounwind
declare i32 @vsprintf(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.va_end.p0(ptr) #3

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

declare i32 @fsize(ptr noundef) #1

declare ptr @m_Malloc(i32 noundef) #1

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

declare i32 @fclose(ptr noundef) #1

declare void @mSheetRowAppend(ptr noundef, i32 noundef) #1

declare void @mSheetColAppend(ptr noundef, i32 noundef, i32 noundef) #1

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

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

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


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

%struct.__va_list_tag = type { i32, i32, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@__FUNCTION__.mINILoad = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [12 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 ptr @GetHandle(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @mINILoad(ptr noundef %0, ptr nocapture noundef readonly %1, ...) local_unnamed_addr #2 {
  %3 = alloca [256 x i8], align 16
  %4 = alloca [1 x %struct.__va_list_tag], align 16
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.va_start.p0(ptr nonnull %4)
  %5 = call i32 @vsprintf(ptr noundef nonnull %3, ptr noundef %1, ptr noundef nonnull %4) #5
  call void @llvm.va_end.p0(ptr nonnull %4)
  %6 = call ptr @GetHandle(ptr noundef %0, i32 noundef 8, i32 noundef -2021989033, ptr noundef nonnull @endINI) #5
  %7 = getelementptr inbounds i8, ptr %6, i64 16
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  call void @endINI(ptr noundef %8)
  %9 = call noalias ptr @fopen(ptr noundef nonnull %3, ptr noundef nonnull @.str.3)
  %10 = icmp eq ptr %9, null
  br i1 %10, label %11, label %12

11:                                               ; preds = %2
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str.1, i32 noundef 58, ptr noundef nonnull @__FUNCTION__.mINILoad, ptr noundef nonnull @.str.4, ptr noundef nonnull %3) #5
  br label %12

12:                                               ; preds = %11, %2
  %13 = call i32 @fsize(ptr noundef %9) #5
  %14 = add nsw i32 %13, 2
  %15 = call ptr @m_Malloc(i32 noundef %14) #5
  store ptr %15, ptr %8, align 8, !tbaa !11
  %16 = sext i32 %13 to i64
  %17 = call i64 @fread(ptr noundef %15, i64 noundef 1, i64 noundef %16, ptr noundef %9)
  %18 = trunc i64 %17 to i32
  %.not122 = icmp eq i32 %13, %18
  br i1 %.not122, label %20, label %19

19:                                               ; preds = %12
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str.1, i32 noundef 61, ptr noundef nonnull @__FUNCTION__.mINILoad, ptr noundef nonnull @.str.5) #5
  br label %20

20:                                               ; preds = %19, %12
  %21 = call i32 @fclose(ptr noundef %9)
  %22 = load ptr, ptr %8, align 8, !tbaa !11
  %23 = getelementptr inbounds i8, ptr %22, i64 %16
  store i8 10, ptr %23, align 1, !tbaa !13
  %24 = load ptr, ptr %8, align 8, !tbaa !11
  %25 = getelementptr i8, ptr %24, i64 %16
  %26 = getelementptr i8, ptr %25, i64 1
  store i8 0, ptr %26, align 1, !tbaa !13
  %27 = getelementptr inbounds i8, ptr %6, i64 4
  store volatile i32 1, ptr %27, align 4, !tbaa !14
  %28 = load ptr, ptr %8, align 8, !tbaa !11
  br label %29

29:                                               ; preds = %29, %20
  %.0109 = phi ptr [ %28, %20 ], [ %31, %29 ]
  %30 = load i8, ptr %.0109, align 1, !tbaa !13
  %.not = icmp eq i8 %30, 91
  %31 = getelementptr inbounds i8, ptr %.0109, i64 1
  br i1 %.not, label %.preheader126, label %29, !llvm.loop !15

.preheader126:                                    ; preds = %29
  %32 = getelementptr inbounds i8, ptr %28, i64 %16
  %33 = getelementptr inbounds i8, ptr %32, i64 1
  %34 = icmp ult ptr %.0109, %33
  br i1 %34, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader126
  %35 = getelementptr inbounds i8, ptr %0, i64 24
  %36 = getelementptr inbounds i8, ptr %0, i64 8
  br label %37

37:                                               ; preds = %.lr.ph, %.critedge
  %.0103131 = phi i32 [ -1, %.lr.ph ], [ %.1104, %.critedge ]
  %.0105130 = phi i32 [ 0, %.lr.ph ], [ %.1106, %.critedge ]
  %.0107129 = phi i32 [ 0, %.lr.ph ], [ %.1108, %.critedge ]
  %.1110128 = phi ptr [ %.0109, %.lr.ph ], [ %82, %.critedge ]
  %38 = load i8, ptr %.1110128, align 1, !tbaa !13
  switch i8 %38, label %57 [
    i8 32, label %39
    i8 9, label %39
    i8 10, label %40
    i8 13, label %40
    i8 59, label %44
    i8 35, label %44
    i8 61, label %49
    i8 91, label %52
    i8 93, label %54
  ]

39:                                               ; preds = %37, %37
  store i8 0, ptr %.1110128, align 1, !tbaa !13
  br label %.critedge

40:                                               ; preds = %37, %37
  %41 = icmp eq i32 %.0107129, 3
  br i1 %41, label %42, label %43

42:                                               ; preds = %40
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str.1, i32 noundef 78, ptr noundef nonnull @__FUNCTION__.mINILoad, ptr noundef nonnull @.str.6) #5
  br label %43

43:                                               ; preds = %42, %40
  store i8 0, ptr %.1110128, align 1, !tbaa !13
  br label %.critedge

44:                                               ; preds = %37, %37
  %45 = icmp eq i32 %.0107129, 3
  br i1 %45, label %46, label %.preheader133

46:                                               ; preds = %44
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str.1, i32 noundef 79, ptr noundef nonnull @__FUNCTION__.mINILoad, ptr noundef nonnull @.str.6) #5
  br label %.preheader133

.preheader133:                                    ; preds = %46, %44
  br label %47

47:                                               ; preds = %.preheader133, %47
  %.2.sink = phi ptr [ %.2, %47 ], [ %.1110128, %.preheader133 ]
  store i8 0, ptr %.2.sink, align 1, !tbaa !13
  %.2 = getelementptr inbounds i8, ptr %.2.sink, i64 1
  %48 = load i8, ptr %.2, align 1, !tbaa !13
  switch i8 %48, label %47 [
    i8 10, label %.critedge
    i8 13, label %.critedge
  ], !llvm.loop !17

49:                                               ; preds = %37
  %.not125 = icmp eq i32 %.0107129, 1
  br i1 %.not125, label %51, label %50

50:                                               ; preds = %49
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str.1, i32 noundef 80, ptr noundef nonnull @__FUNCTION__.mINILoad, ptr noundef nonnull @.str.6) #5
  br label %51

51:                                               ; preds = %50, %49
  store i8 0, ptr %.1110128, align 1, !tbaa !13
  br label %.critedge

52:                                               ; preds = %37
  %.not124 = icmp eq i32 %.0107129, 0
  br i1 %.not124, label %.critedge, label %53

53:                                               ; preds = %52
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str.1, i32 noundef 81, ptr noundef nonnull @__FUNCTION__.mINILoad, ptr noundef nonnull @.str.6) #5
  br label %.critedge

54:                                               ; preds = %37
  %.not123 = icmp eq i32 %.0107129, 4
  br i1 %.not123, label %56, label %55

55:                                               ; preds = %54
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str.1, i32 noundef 82, ptr noundef nonnull @__FUNCTION__.mINILoad, ptr noundef nonnull @.str.6) #5
  br label %56

56:                                               ; preds = %55, %54
  store i8 0, ptr %.1110128, align 1, !tbaa !13
  br label %.critedge

57:                                               ; preds = %37
  switch i32 %.0107129, label %.critedge [
    i32 3, label %58
    i32 0, label %64
    i32 2, label %.preheader
  ]

58:                                               ; preds = %57
  %59 = add nsw i32 %.0103131, 1
  %60 = add nsw i32 %.0103131, 2
  call void @mSheetRowAppend(ptr noundef %0, i32 noundef %60) #5
  %61 = load ptr, ptr %36, align 8, !tbaa !18
  %62 = sext i32 %59 to i64
  %63 = getelementptr inbounds ptr, ptr %61, i64 %62
  store ptr %.1110128, ptr %63, align 8, !tbaa !20
  br label %.critedge

64:                                               ; preds = %57
  %65 = add nsw i32 %.0105130, 1
  %66 = add nsw i32 %.0105130, 2
  call void @mSheetColAppend(ptr noundef %0, i32 noundef %.0103131, i32 noundef %66) #5
  %67 = load ptr, ptr %35, align 8, !tbaa !21
  %68 = sext i32 %.0103131 to i64
  %69 = getelementptr inbounds ptr, ptr %67, i64 %68
  %70 = load ptr, ptr %69, align 8, !tbaa !20
  %71 = sext i32 %65 to i64
  %72 = getelementptr inbounds ptr, ptr %70, i64 %71
  store ptr %.1110128, ptr %72, align 8, !tbaa !20
  br label %.critedge

.preheader:                                       ; preds = %57, %78
  %73 = phi i8 [ %.pre, %78 ], [ %38, %57 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %78 ], [ 0, %57 ]
  %.0 = phi i32 [ %.1, %78 ], [ 0, %57 ]
  switch i8 %73, label %74 [
    i8 35, label %.critedge2
    i8 59, label %.critedge2
    i8 10, label %.critedge2
    i8 13, label %.critedge2
    i8 32, label %78
    i8 9, label %78
  ]

74:                                               ; preds = %.preheader
  %75 = add nsw i32 %.0, 1
  %76 = sext i32 %.0 to i64
  %77 = getelementptr inbounds i8, ptr %.1110128, i64 %76
  store i8 %73, ptr %77, align 1, !tbaa !13
  br label %78

78:                                               ; preds = %.preheader, %.preheader, %74
  %.1 = phi i32 [ %75, %74 ], [ %.0, %.preheader ], [ %.0, %.preheader ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.phi.trans.insert = getelementptr inbounds i8, ptr %.1110128, i64 %indvars.iv.next
  %.pre = load i8, ptr %.phi.trans.insert, align 1, !tbaa !13
  br label %.preheader, !llvm.loop !22

.critedge2:                                       ; preds = %.preheader, %.preheader, %.preheader, %.preheader
  %79 = getelementptr inbounds i8, ptr %.1110128, i64 %indvars.iv
  %80 = sext i32 %.0 to i64
  %81 = getelementptr inbounds i8, ptr %.1110128, i64 %80
  store i8 0, ptr %81, align 1, !tbaa !13
  br label %.critedge

.critedge:                                        ; preds = %47, %47, %57, %52, %53, %39, %58, %.critedge2, %64, %56, %51, %43
  %.3 = phi ptr [ %.1110128, %39 ], [ %.1110128, %43 ], [ %.1110128, %51 ], [ %.1110128, %56 ], [ %.1110128, %58 ], [ %.1110128, %64 ], [ %79, %.critedge2 ], [ %.1110128, %53 ], [ %.1110128, %52 ], [ %.1110128, %57 ], [ %.2, %47 ], [ %.2, %47 ]
  %.1108 = phi i32 [ %.0107129, %39 ], [ %.0107129, %43 ], [ 2, %51 ], [ 0, %56 ], [ 4, %58 ], [ 1, %64 ], [ 0, %.critedge2 ], [ 3, %53 ], [ 3, %52 ], [ %.0107129, %57 ], [ %.0107129, %47 ], [ %.0107129, %47 ]
  %.1106 = phi i32 [ %.0105130, %39 ], [ %.0105130, %43 ], [ %.0105130, %51 ], [ %.0105130, %56 ], [ -1, %58 ], [ %65, %64 ], [ %.0105130, %.critedge2 ], [ %.0105130, %53 ], [ %.0105130, %52 ], [ %.0105130, %57 ], [ %.0105130, %47 ], [ %.0105130, %47 ]
  %.1104 = phi i32 [ %.0103131, %39 ], [ %.0103131, %43 ], [ %.0103131, %51 ], [ %.0103131, %56 ], [ %59, %58 ], [ %.0103131, %64 ], [ %.0103131, %.critedge2 ], [ %.0103131, %53 ], [ %.0103131, %52 ], [ %.0103131, %57 ], [ %.0103131, %47 ], [ %.0103131, %47 ]
  %82 = getelementptr inbounds i8, ptr %.3, i64 1
  %83 = load ptr, ptr %8, align 8, !tbaa !11
  %84 = getelementptr inbounds i8, ptr %83, i64 %16
  %85 = icmp ult ptr %.3, %84
  br i1 %85, label %37, label %._crit_edge, !llvm.loop !23

._crit_edge:                                      ; preds = %.critedge, %.preheader126
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %3) #5
  ret void
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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: nounwind uwtable
declare dso_local void @endINI(ptr noundef) #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.va_start.p0(ptr) #3

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.va_end.p0(ptr) #3

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

declare i32 @fsize(ptr noundef) local_unnamed_addr #1

declare ptr @m_Malloc(i32 noundef) local_unnamed_addr #1

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

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

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

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

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

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

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


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