; LLVM IR from niessner/Matterport :: code/gaps/apps/mpview/mp.ll (ZN7MPHouse16ReadCategoryFileEPKc)

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

%class.RNArray.23 = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }
%struct.MPCategory = type { ptr, i32, %class.RNArray.4, i32, ptr, i32, ptr }
%class.RNArray.4 = type { %class.RNVArray }

@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external global ptr, align 8
@.str.69 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.70 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.71 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [68 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #2

; Function Attrs: nounwind
declare noalias ptr @strdup(ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7MPHouse14InsertCategoryEP10MPCategory(ptr noundef nonnull align 8 dereferenceable(376), ptr noundef) #4 align 2

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

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

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

declare i32 @fclose(ptr noundef) #6

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #7

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7MPHouse16ReadCategoryFileEPKc(ptr noundef nonnull align 8 dereferenceable(376) %0, ptr noundef %1) #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %class.RNArray.23, align 8
  %9 = alloca [4096 x i8], align 16
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca 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 [4096 x i8], align 16
  %19 = alloca %class.RNArray.23, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %22 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = call noalias ptr @fopen(ptr noundef %23, ptr noundef @.str.4)
  store ptr %24, ptr %6, align 8, !tbaa !5
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = icmp ne ptr %25, null
  br i1 %26, label %31, label %27

27:                                               ; preds = %2
  %28 = load ptr, ptr @stderr, align 8, !tbaa !5
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef @.str.69, ptr noundef %29) #9
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %302

31:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #9
  call void @_ZN7RNArrayIPcEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8)
  call void @llvm.lifetime.start.p0(i64 4096, ptr %9) #9
  %32 = getelementptr inbounds [4096 x i8], ptr %9, i64 0, i64 0
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = invoke ptr @fgets(ptr noundef %32, i32 noundef 4096, ptr noundef %33)
          to label %35 unwind label %64

35:                                               ; preds = %31
  %36 = icmp ne ptr %34, null
  br i1 %36, label %37, label %104

37:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %38 = getelementptr inbounds [4096 x i8], ptr %9, i64 0, i64 0
  store ptr %38, ptr %12, align 8, !tbaa !5
  br label %39

39:                                               ; preds = %100, %37
  %40 = load ptr, ptr %12, align 8, !tbaa !5
  %41 = load i8, ptr %40, align 1, !tbaa !9
  %42 = icmp ne i8 %41, 0
  br i1 %42, label %43, label %53

43:                                               ; preds = %39
  %44 = load ptr, ptr %12, align 8, !tbaa !5
  %45 = load i8, ptr %44, align 1, !tbaa !9
  %46 = sext i8 %45 to i32
  %47 = icmp ne i32 %46, 13
  br i1 %47, label %48, label %53

48:                                               ; preds = %43
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  %50 = load i8, ptr %49, align 1, !tbaa !9
  %51 = sext i8 %50 to i32
  %52 = icmp ne i32 %51, 10
  br label %53

53:                                               ; preds = %48, %43, %39
  %54 = phi i1 [ false, %43 ], [ false, %39 ], [ %52, %48 ]
  br i1 %54, label %55, label %103

55:                                               ; preds = %53
  br label %56

56:                                               ; preds = %61, %55
  %57 = load ptr, ptr %12, align 8, !tbaa !5
  %58 = load i8, ptr %57, align 1, !tbaa !9
  %59 = sext i8 %58 to i32
  %60 = icmp eq i32 %59, 32
  br i1 %60, label %61, label %68

61:                                               ; preds = %56
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %62, i32 1
  store ptr %63, ptr %12, align 8, !tbaa !5
  br label %56, !llvm.loop !10

64:                                               ; preds = %31
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %10, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %11, align 4
  br label %301

68:                                               ; preds = %56
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  %70 = invoke noundef ptr @_ZN7RNArrayIPcE6InsertES0_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef %69)
          to label %71 unwind label %96

71:                                               ; preds = %68
  br label %72

72:                                               ; preds = %93, %71
  %73 = load ptr, ptr %12, align 8, !tbaa !5
  %74 = load i8, ptr %73, align 1, !tbaa !9
  %75 = icmp ne i8 %74, 0
  br i1 %75, label %76, label %91

76:                                               ; preds = %72
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = load i8, ptr %77, align 1, !tbaa !9
  %79 = sext i8 %78 to i32
  %80 = icmp ne i32 %79, 9
  br i1 %80, label %81, label %91

81:                                               ; preds = %76
  %82 = load ptr, ptr %12, align 8, !tbaa !5
  %83 = load i8, ptr %82, align 1, !tbaa !9
  %84 = sext i8 %83 to i32
  %85 = icmp ne i32 %84, 13
  br i1 %85, label %86, label %91

86:                                               ; preds = %81
  %87 = load ptr, ptr %12, align 8, !tbaa !5
  %88 = load i8, ptr %87, align 1, !tbaa !9
  %89 = sext i8 %88 to i32
  %90 = icmp ne i32 %89, 10
  br label %91

91:                                               ; preds = %86, %81, %76, %72
  %92 = phi i1 [ false, %81 ], [ false, %76 ], [ false, %72 ], [ %90, %86 ]
  br i1 %92, label %93, label %100

93:                                               ; preds = %91
  %94 = load ptr, ptr %12, align 8, !tbaa !5
  %95 = getelementptr inbounds i8, ptr %94, i32 1
  store ptr %95, ptr %12, align 8, !tbaa !5
  br label %72, !llvm.loop !12

96:                                               ; preds = %68
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %10, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  br label %301

100:                                              ; preds = %91
  %101 = load ptr, ptr %12, align 8, !tbaa !5
  %102 = getelementptr inbounds i8, ptr %101, i32 1
  store ptr %102, ptr %12, align 8, !tbaa !5
  store i8 0, ptr %101, align 1, !tbaa !9
  br label %39, !llvm.loop !13

103:                                              ; preds = %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  br label %104

104:                                              ; preds = %103, %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  store i32 -1, ptr %13, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  store i32 -1, ptr %14, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  store i32 -1, ptr %15, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  store i32 -1, ptr %16, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  store i32 0, ptr %17, align 4, !tbaa !14
  br label %105

105:                                              ; preds = %155, %104
  %106 = load i32, ptr %17, align 4, !tbaa !14
  %107 = invoke noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %108 unwind label %111

108:                                              ; preds = %105
  %109 = icmp slt i32 %106, %107
  br i1 %109, label %115, label %110

110:                                              ; preds = %108
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  br label %158

111:                                              ; preds = %142, %133, %124, %115, %105
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %10, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  br label %300

115:                                              ; preds = %108
  %116 = load i32, ptr %17, align 4, !tbaa !14
  %117 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIPcEixEi(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef %116)
          to label %118 unwind label %111

118:                                              ; preds = %115
  %119 = load ptr, ptr %117, align 8, !tbaa !5
  %120 = call i32 @strcmp(ptr noundef %119, ptr noundef @.str.70) #10
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %124, label %122

122:                                              ; preds = %118
  %123 = load i32, ptr %17, align 4, !tbaa !14
  store i32 %123, ptr %13, align 4, !tbaa !14
  br label %154

124:                                              ; preds = %118
  %125 = load i32, ptr %17, align 4, !tbaa !14
  %126 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIPcEixEi(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef %125)
          to label %127 unwind label %111

127:                                              ; preds = %124
  %128 = load ptr, ptr %126, align 8, !tbaa !5
  %129 = call i32 @strcmp(ptr noundef %128, ptr noundef @.str.71) #10
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %133, label %131

131:                                              ; preds = %127
  %132 = load i32, ptr %17, align 4, !tbaa !14
  store i32 %132, ptr %14, align 4, !tbaa !14
  br label %153

133:                                              ; preds = %127
  %134 = load i32, ptr %17, align 4, !tbaa !14
  %135 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIPcEixEi(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef %134)
          to label %136 unwind label %111

136:                                              ; preds = %133
  %137 = load ptr, ptr %135, align 8, !tbaa !5
  %138 = call i32 @strcmp(ptr noundef %137, ptr noundef @.str.72) #10
  %139 = icmp ne i32 %138, 0
  br i1 %139, label %142, label %140

140:                                              ; preds = %136
  %141 = load i32, ptr %17, align 4, !tbaa !14
  store i32 %141, ptr %15, align 4, !tbaa !14
  br label %152

142:                                              ; preds = %136
  %143 = load i32, ptr %17, align 4, !tbaa !14
  %144 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIPcEixEi(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef %143)
          to label %145 unwind label %111

145:                                              ; preds = %142
  %146 = load ptr, ptr %144, align 8, !tbaa !5
  %147 = call i32 @strcmp(ptr noundef %146, ptr noundef @.str.73) #10
  %148 = icmp ne i32 %147, 0
  br i1 %148, label %151, label %149

149:                                              ; preds = %145
  %150 = load i32, ptr %17, align 4, !tbaa !14
  store i32 %150, ptr %16, align 4, !tbaa !14
  br label %151

151:                                              ; preds = %149, %145
  br label %152

152:                                              ; preds = %151, %140
  br label %153

153:                                              ; preds = %152, %131
  br label %154

154:                                              ; preds = %153, %122
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %17, align 4, !tbaa !14
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %17, align 4, !tbaa !14
  br label %105, !llvm.loop !16

158:                                              ; preds = %110
  %159 = load i32, ptr %13, align 4, !tbaa !14
  %160 = icmp slt i32 %159, 0
  br i1 %160, label %167, label %161

161:                                              ; preds = %158
  %162 = load i32, ptr %14, align 4, !tbaa !14
  %163 = icmp slt i32 %162, 0
  br i1 %163, label %167, label %164

164:                                              ; preds = %161
  %165 = load i32, ptr %15, align 4, !tbaa !14
  %166 = icmp slt i32 %165, 0
  br i1 %166, label %167, label %171

167:                                              ; preds = %164, %161, %158
  %168 = load ptr, ptr @stderr, align 8, !tbaa !5
  %169 = load ptr, ptr %5, align 8, !tbaa !5
  %170 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %168, ptr noundef @.str.74, ptr noundef %169) #9
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %299

171:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 4096, ptr %18) #9
  br label %172

172:                                              ; preds = %282, %171
  %173 = getelementptr inbounds [4096 x i8], ptr %18, i64 0, i64 0
  %174 = load ptr, ptr %6, align 8, !tbaa !5
  %175 = invoke ptr @fgets(ptr noundef %173, i32 noundef 4096, ptr noundef %174)
          to label %176 unwind label %206

176:                                              ; preds = %172
  %177 = icmp ne ptr %175, null
  br i1 %177, label %178, label %294

178:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #9
  invoke void @_ZN7RNArrayIPcEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19)
          to label %179 unwind label %210

179:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %180 = getelementptr inbounds [4096 x i8], ptr %18, i64 0, i64 0
  store ptr %180, ptr %20, align 8, !tbaa !5
  br label %181

181:                                              ; preds = %246, %179
  %182 = load ptr, ptr %20, align 8, !tbaa !5
  %183 = load i8, ptr %182, align 1, !tbaa !9
  %184 = icmp ne i8 %183, 0
  br i1 %184, label %185, label %195

185:                                              ; preds = %181
  %186 = load ptr, ptr %20, align 8, !tbaa !5
  %187 = load i8, ptr %186, align 1, !tbaa !9
  %188 = sext i8 %187 to i32
  %189 = icmp ne i32 %188, 13
  br i1 %189, label %190, label %195

190:                                              ; preds = %185
  %191 = load ptr, ptr %20, align 8, !tbaa !5
  %192 = load i8, ptr %191, align 1, !tbaa !9
  %193 = sext i8 %192 to i32
  %194 = icmp ne i32 %193, 10
  br label %195

195:                                              ; preds = %190, %185, %181
  %196 = phi i1 [ false, %185 ], [ false, %181 ], [ %194, %190 ]
  br i1 %196, label %197, label %249

197:                                              ; preds = %195
  br label %198

198:                                              ; preds = %203, %197
  %199 = load ptr, ptr %20, align 8, !tbaa !5
  %200 = load i8, ptr %199, align 1, !tbaa !9
  %201 = sext i8 %200 to i32
  %202 = icmp eq i32 %201, 32
  br i1 %202, label %203, label %214

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

206:                                              ; preds = %294, %172
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %10, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %11, align 4
  br label %298

210:                                              ; preds = %178
  %211 = landingpad { ptr, i32 }
          cleanup
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %10, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %11, align 4
  br label %293

214:                                              ; preds = %198
  %215 = load ptr, ptr %20, align 8, !tbaa !5
  %216 = invoke noundef ptr @_ZN7RNArrayIPcE6InsertES0_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef %215)
          to label %217 unwind label %242

217:                                              ; preds = %214
  br label %218

218:                                              ; preds = %239, %217
  %219 = load ptr, ptr %20, align 8, !tbaa !5
  %220 = load i8, ptr %219, align 1, !tbaa !9
  %221 = icmp ne i8 %220, 0
  br i1 %221, label %222, label %237

222:                                              ; preds = %218
  %223 = load ptr, ptr %20, align 8, !tbaa !5
  %224 = load i8, ptr %223, align 1, !tbaa !9
  %225 = sext i8 %224 to i32
  %226 = icmp ne i32 %225, 9
  br i1 %226, label %227, label %237

227:                                              ; preds = %222
  %228 = load ptr, ptr %20, align 8, !tbaa !5
  %229 = load i8, ptr %228, align 1, !tbaa !9
  %230 = sext i8 %229 to i32
  %231 = icmp ne i32 %230, 13
  br i1 %231, label %232, label %237

232:                                              ; preds = %227
  %233 = load ptr, ptr %20, align 8, !tbaa !5
  %234 = load i8, ptr %233, align 1, !tbaa !9
  %235 = sext i8 %234 to i32
  %236 = icmp ne i32 %235, 10
  br label %237

237:                                              ; preds = %232, %227, %222, %218
  %238 = phi i1 [ false, %227 ], [ false, %222 ], [ false, %218 ], [ %236, %232 ]
  br i1 %238, label %239, label %246

239:                                              ; preds = %237
  %240 = load ptr, ptr %20, align 8, !tbaa !5
  %241 = getelementptr inbounds i8, ptr %240, i32 1
  store ptr %241, ptr %20, align 8, !tbaa !5
  br label %218, !llvm.loop !18

242:                                              ; preds = %214
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %10, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %11, align 4
  br label %292

246:                                              ; preds = %237
  %247 = load ptr, ptr %20, align 8, !tbaa !5
  %248 = getelementptr inbounds i8, ptr %247, i32 1
  store ptr %248, ptr %20, align 8, !tbaa !5
  store i8 0, ptr %247, align 1, !tbaa !9
  br label %181, !llvm.loop !19

249:                                              ; preds = %195
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %250 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 64) #11
          to label %251 unwind label %283

251:                                              ; preds = %249
  invoke void @_ZN10MPCategoryC1Ev(ptr noundef nonnull align 8 dereferenceable(64) %250)
          to label %252 unwind label %287

252:                                              ; preds = %251
  store ptr %250, ptr %21, align 8, !tbaa !5
  %253 = load i32, ptr %13, align 4, !tbaa !14
  %254 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIPcEixEi(ptr noundef nonnull align 8 dereferenceable(16) %19, i32 noundef %253)
          to label %255 unwind label %283

255:                                              ; preds = %252
  %256 = load ptr, ptr %254, align 8, !tbaa !5
  %257 = call i32 @atoi(ptr noundef %256) #10
  %258 = load ptr, ptr %21, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.MPCategory, ptr %258, i32 0, i32 3
  store i32 %257, ptr %259, align 8, !tbaa !20
  %260 = load i32, ptr %14, align 4, !tbaa !14
  %261 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIPcEixEi(ptr noundef nonnull align 8 dereferenceable(16) %19, i32 noundef %260)
          to label %262 unwind label %283

262:                                              ; preds = %255
  %263 = load ptr, ptr %261, align 8, !tbaa !5
  %264 = call noalias ptr @strdup(ptr noundef %263) #9
  %265 = load ptr, ptr %21, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.MPCategory, ptr %265, i32 0, i32 4
  store ptr %264, ptr %266, align 8, !tbaa !24
  %267 = load i32, ptr %15, align 4, !tbaa !14
  %268 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIPcEixEi(ptr noundef nonnull align 8 dereferenceable(16) %19, i32 noundef %267)
          to label %269 unwind label %283

269:                                              ; preds = %262
  %270 = load ptr, ptr %268, align 8, !tbaa !5
  %271 = call i32 @atoi(ptr noundef %270) #10
  %272 = load ptr, ptr %21, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.MPCategory, ptr %272, i32 0, i32 5
  store i32 %271, ptr %273, align 8, !tbaa !25
  %274 = load i32, ptr %16, align 4, !tbaa !14
  %275 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIPcEixEi(ptr noundef nonnull align 8 dereferenceable(16) %19, i32 noundef %274)
          to label %276 unwind label %283

276:                                              ; preds = %269
  %277 = load ptr, ptr %275, align 8, !tbaa !5
  %278 = call noalias ptr @strdup(ptr noundef %277) #9
  %279 = load ptr, ptr %21, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct.MPCategory, ptr %279, i32 0, i32 6
  store ptr %278, ptr %280, align 8, !tbaa !26
  %281 = load ptr, ptr %21, align 8, !tbaa !5
  invoke void @_ZN7MPHouse14InsertCategoryEP10MPCategory(ptr noundef nonnull align 8 dereferenceable(376) %22, ptr noundef %281)
          to label %282 unwind label %283

282:                                              ; preds = %276
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #9
  br label %172, !llvm.loop !27

283:                                              ; preds = %276, %269, %262, %255, %252, %249
  %284 = landingpad { ptr, i32 }
          cleanup
  %285 = extractvalue { ptr, i32 } %284, 0
  store ptr %285, ptr %10, align 8
  %286 = extractvalue { ptr, i32 } %284, 1
  store i32 %286, ptr %11, align 4
  br label %291

287:                                              ; preds = %251
  %288 = landingpad { ptr, i32 }
          cleanup
  %289 = extractvalue { ptr, i32 } %288, 0
  store ptr %289, ptr %10, align 8
  %290 = extractvalue { ptr, i32 } %288, 1
  store i32 %290, ptr %11, align 4
  call void @_ZdlPvm(ptr noundef %250, i64 noundef 64) #12
  br label %291

291:                                              ; preds = %287, %283
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  br label %292

292:                                              ; preds = %291, %242
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #9
  br label %293

293:                                              ; preds = %292, %210
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #9
  br label %298

294:                                              ; preds = %176
  %295 = load ptr, ptr %6, align 8, !tbaa !5
  %296 = invoke i32 @fclose(ptr noundef %295)
          to label %297 unwind label %206

297:                                              ; preds = %294
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4096, ptr %18) #9
  br label %299

298:                                              ; preds = %293, %206
  call void @llvm.lifetime.end.p0(i64 4096, ptr %18) #9
  br label %300

299:                                              ; preds = %297, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 4096, ptr %9) #9
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #9
  br label %302

300:                                              ; preds = %298, %111
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %301

301:                                              ; preds = %300, %96, %64
  call void @llvm.lifetime.end.p0(i64 4096, ptr %9) #9
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  br label %304

302:                                              ; preds = %299, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  %303 = load i32, ptr %3, align 4
  ret i32 %303

304:                                              ; preds = %301
  %305 = load ptr, ptr %10, align 8
  %306 = load i32, ptr %11, align 4
  %307 = insertvalue { ptr, i32 } poison, ptr %305, 0
  %308 = insertvalue { ptr, i32 } %307, i32 %306, 1
  resume { ptr, i32 } %308
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7RNArrayIPcEC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7RNArrayIPcE6InsertES0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIPcEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #8

; Function Attrs: nounwind
declare void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

declare void @_ZN10MPCategoryC1Ev(ptr)

attributes #0 = { inlinehint mustprogress 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 = { nobuiltin 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 = { 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 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 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 #6 = { "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 = { nobuiltin 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 #8 = { inlinehint mustprogress 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 = { nounwind willreturn memory(read) }
attributes #11 = { builtin allocsize(0) }
attributes #12 = { builtin 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++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}
!18 = distinct !{!18, !11}
!19 = distinct !{!19, !11}
!20 = !{!21, !15, i64 32}
!21 = !{!"_ZTS10MPCategory", !6, i64 0, !15, i64 8, !22, i64 16, !15, i64 32, !6, i64 40, !15, i64 48, !6, i64 56}
!22 = !{!"_ZTS7RNArrayIP8MPObjectE", !23, i64 0}
!23 = !{!"_ZTS8RNVArray", !6, i64 0, !15, i64 8, !15, i64 12}
!24 = !{!21, !6, i64 40}
!25 = !{!21, !15, i64 48}
!26 = !{!21, !6, i64 56}
!27 = distinct !{!27, !11}


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

%class.RNArray.23 = type { %class.RNVArray }
%class.RNVArray = type { ptr, i32, i32 }

@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.69 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.70 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.71 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [68 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias ptr @strdup(ptr nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7MPHouse14InsertCategoryEP10MPCategory(ptr noundef nonnull align 8 dereferenceable(376), ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture 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 #6

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN7MPHouse16ReadCategoryFileEPKc(ptr noundef nonnull align 8 dereferenceable(376) %0, ptr noundef %1) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.RNArray.23, align 8
  %4 = alloca [4096 x i8], align 16
  %5 = alloca [4096 x i8], align 16
  %6 = alloca %class.RNArray.23, align 8
  %7 = tail call noalias ptr @fopen(ptr noundef %1, ptr noundef nonnull @.str.4)
  %.not = icmp eq ptr %7, null
  br i1 %.not, label %8, label %11

8:                                                ; preds = %2
  %9 = load ptr, ptr @stderr, align 8, !tbaa !5
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.69, ptr noundef %1) #10
  br label %103

11:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #11
  call void @_ZN7RNArrayIPcEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3)
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %4) #11
  %12 = call ptr @fgets(ptr noundef nonnull %4, i32 noundef 4096, ptr noundef nonnull %7)
  %.not96 = icmp eq ptr %12, null
  br i1 %.not96, label %.critedge, label %.preheader129

.preheader129:                                    ; preds = %11, %.critedge2
  %.076 = phi ptr [ %22, %.critedge2 ], [ %4, %11 ]
  %13 = load i8, ptr %.076, align 1, !tbaa !9
  switch i8 %13, label %._crit_edge [
    i8 0, label %.critedge
    i8 13, label %.critedge
    i8 10, label %.critedge
    i8 32, label %.lr.ph
  ]

.lr.ph:                                           ; preds = %.preheader129, %.lr.ph
  %.177134 = phi ptr [ %14, %.lr.ph ], [ %.076, %.preheader129 ]
  %14 = getelementptr inbounds i8, ptr %.177134, i64 1
  %.pr = load i8, ptr %14, align 1, !tbaa !9
  %15 = icmp eq i8 %.pr, 32
  br i1 %15, label %.lr.ph, label %._crit_edge, !llvm.loop !10

._crit_edge:                                      ; preds = %.lr.ph, %.preheader129
  %.177.lcssa = phi ptr [ %.076, %.preheader129 ], [ %14, %.lr.ph ]
  %16 = invoke noundef ptr @_ZN7RNArrayIPcE6InsertES0_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull %.177.lcssa)
          to label %.preheader127 unwind label %20

.preheader127:                                    ; preds = %._crit_edge, %18
  %.278 = phi ptr [ %19, %18 ], [ %.177.lcssa, %._crit_edge ]
  %17 = load i8, ptr %.278, align 1, !tbaa !9
  switch i8 %17, label %18 [
    i8 0, label %.critedge2
    i8 9, label %.critedge2
    i8 13, label %.critedge2
    i8 10, label %.critedge2
  ]

18:                                               ; preds = %.preheader127
  %19 = getelementptr inbounds i8, ptr %.278, i64 1
  br label %.preheader127, !llvm.loop !12

20:                                               ; preds = %._crit_edge
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %102

.critedge2:                                       ; preds = %.preheader127, %.preheader127, %.preheader127, %.preheader127
  %22 = getelementptr inbounds i8, ptr %.278, i64 1
  store i8 0, ptr %.278, align 1, !tbaa !9
  br label %.preheader129, !llvm.loop !13

.critedge:                                        ; preds = %.preheader129, %.preheader129, %.preheader129, %11
  %23 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph140, label %._crit_edge141.thread

._crit_edge141:                                   ; preds = %49
  %25 = icmp slt i32 %.175, 0
  %26 = icmp slt i32 %.173, 0
  %or.cond = select i1 %25, i1 true, i1 %26
  %27 = icmp slt i32 %.171, 0
  %or.cond5 = select i1 %or.cond, i1 true, i1 %27
  br i1 %or.cond5, label %._crit_edge141.thread, label %55

28:                                               ; preds = %44, %39, %34, %.lr.ph140
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %102

.lr.ph140:                                        ; preds = %.critedge, %49
  %.067139 = phi i32 [ %50, %49 ], [ 0, %.critedge ]
  %.068138 = phi i32 [ %.169, %49 ], [ -1, %.critedge ]
  %.070137 = phi i32 [ %.171, %49 ], [ -1, %.critedge ]
  %.072136 = phi i32 [ %.173, %49 ], [ -1, %.critedge ]
  %.074135 = phi i32 [ %.175, %49 ], [ -1, %.critedge ]
  %30 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIPcEixEi(ptr noundef nonnull align 8 dereferenceable(16) %3, i32 noundef %.067139)
          to label %31 unwind label %28

31:                                               ; preds = %.lr.ph140
  %32 = load ptr, ptr %30, align 8, !tbaa !5
  %33 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %32, ptr noundef nonnull dereferenceable(1) @.str.70) #12
  %.not112 = icmp eq i32 %33, 0
  br i1 %.not112, label %49, label %34

34:                                               ; preds = %31
  %35 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIPcEixEi(ptr noundef nonnull align 8 dereferenceable(16) %3, i32 noundef %.067139)
          to label %36 unwind label %28

36:                                               ; preds = %34
  %37 = load ptr, ptr %35, align 8, !tbaa !5
  %38 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %37, ptr noundef nonnull dereferenceable(1) @.str.71) #12
  %.not113 = icmp eq i32 %38, 0
  br i1 %.not113, label %49, label %39

39:                                               ; preds = %36
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIPcEixEi(ptr noundef nonnull align 8 dereferenceable(16) %3, i32 noundef %.067139)
          to label %41 unwind label %28

41:                                               ; preds = %39
  %42 = load ptr, ptr %40, align 8, !tbaa !5
  %43 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %42, ptr noundef nonnull dereferenceable(1) @.str.72) #12
  %.not114 = icmp eq i32 %43, 0
  br i1 %.not114, label %49, label %44

44:                                               ; preds = %41
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIPcEixEi(ptr noundef nonnull align 8 dereferenceable(16) %3, i32 noundef %.067139)
          to label %46 unwind label %28

46:                                               ; preds = %44
  %47 = load ptr, ptr %45, align 8, !tbaa !5
  %48 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %47, ptr noundef nonnull dereferenceable(1) @.str.73) #12
  %.not117 = icmp eq i32 %48, 0
  %spec.select = select i1 %.not117, i32 %.067139, i32 %.068138
  br label %49

49:                                               ; preds = %46, %41, %36, %31
  %.175 = phi i32 [ %.067139, %31 ], [ %.074135, %36 ], [ %.074135, %41 ], [ %.074135, %46 ]
  %.173 = phi i32 [ %.072136, %31 ], [ %.067139, %36 ], [ %.072136, %41 ], [ %.072136, %46 ]
  %.171 = phi i32 [ %.070137, %31 ], [ %.070137, %36 ], [ %.067139, %41 ], [ %.070137, %46 ]
  %.169 = phi i32 [ %.068138, %31 ], [ %.068138, %36 ], [ %.068138, %41 ], [ %spec.select, %46 ]
  %50 = add nuw nsw i32 %.067139, 1
  %51 = call noundef i32 @_ZNK8RNVArray8NEntriesEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %.lr.ph140, label %._crit_edge141, !llvm.loop !14

._crit_edge141.thread:                            ; preds = %.critedge, %._crit_edge141
  %53 = load ptr, ptr @stderr, align 8, !tbaa !5
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef nonnull @.str.74, ptr noundef %1) #10
  br label %101

55:                                               ; preds = %._crit_edge141
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %5) #11
  %56 = call ptr @fgets(ptr noundef nonnull %5, i32 noundef 4096, ptr noundef nonnull %7)
  %.not100150 = icmp eq ptr %56, null
  br i1 %.not100150, label %._crit_edge153, label %.lr.ph152

.lr.ph152:                                        ; preds = %55, %92
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #11
  invoke void @_ZN7RNArrayIPcEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %.preheader126 unwind label %60

.preheader126:                                    ; preds = %.lr.ph152, %.critedge9
  %.065 = phi ptr [ %68, %.critedge9 ], [ %5, %.lr.ph152 ]
  %57 = load i8, ptr %.065, align 1, !tbaa !9
  switch i8 %57, label %._crit_edge148 [
    i8 0, label %.critedge7
    i8 13, label %.critedge7
    i8 10, label %.critedge7
    i8 32, label %.lr.ph147
  ]

.lr.ph147:                                        ; preds = %.preheader126, %.lr.ph147
  %.166146 = phi ptr [ %58, %.lr.ph147 ], [ %.065, %.preheader126 ]
  %58 = getelementptr inbounds i8, ptr %.166146, i64 1
  %.pr124 = load i8, ptr %58, align 1, !tbaa !9
  %59 = icmp eq i8 %.pr124, 32
  br i1 %59, label %.lr.ph147, label %._crit_edge148, !llvm.loop !15

60:                                               ; preds = %.lr.ph152
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %99

._crit_edge148:                                   ; preds = %.lr.ph147, %.preheader126
  %.166.lcssa = phi ptr [ %.065, %.preheader126 ], [ %58, %.lr.ph147 ]
  %62 = invoke noundef ptr @_ZN7RNArrayIPcE6InsertES0_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull %.166.lcssa)
          to label %.preheader unwind label %66

.preheader:                                       ; preds = %._crit_edge148, %64
  %.2 = phi ptr [ %65, %64 ], [ %.166.lcssa, %._crit_edge148 ]
  %63 = load i8, ptr %.2, align 1, !tbaa !9
  switch i8 %63, label %64 [
    i8 0, label %.critedge9
    i8 9, label %.critedge9
    i8 13, label %.critedge9
    i8 10, label %.critedge9
  ]

64:                                               ; preds = %.preheader
  %65 = getelementptr inbounds i8, ptr %.2, i64 1
  br label %.preheader, !llvm.loop !16

66:                                               ; preds = %._crit_edge148
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %98

.critedge9:                                       ; preds = %.preheader, %.preheader, %.preheader, %.preheader
  %68 = getelementptr inbounds i8, ptr %.2, i64 1
  store i8 0, ptr %.2, align 1, !tbaa !9
  br label %.preheader126, !llvm.loop !17

.critedge7:                                       ; preds = %.preheader126, %.preheader126, %.preheader126
  %69 = invoke noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #13
          to label %70 unwind label %94

70:                                               ; preds = %.critedge7
  invoke void @_ZN10MPCategoryC1Ev(ptr noundef nonnull align 8 dereferenceable(64) %69)
          to label %71 unwind label %96

71:                                               ; preds = %70
  %72 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIPcEixEi(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef %.175)
          to label %73 unwind label %94

73:                                               ; preds = %71
  %74 = load ptr, ptr %72, align 8, !tbaa !5
  %75 = call i32 @atoi(ptr nocapture noundef %74) #12
  %76 = getelementptr inbounds i8, ptr %69, i64 32
  store i32 %75, ptr %76, align 8, !tbaa !18
  %77 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIPcEixEi(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef %.173)
          to label %78 unwind label %94

78:                                               ; preds = %73
  %79 = load ptr, ptr %77, align 8, !tbaa !5
  %80 = call noalias ptr @strdup(ptr noundef %79) #11
  %81 = getelementptr inbounds i8, ptr %69, i64 40
  store ptr %80, ptr %81, align 8, !tbaa !23
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIPcEixEi(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef %.171)
          to label %83 unwind label %94

83:                                               ; preds = %78
  %84 = load ptr, ptr %82, align 8, !tbaa !5
  %85 = call i32 @atoi(ptr nocapture noundef %84) #12
  %86 = getelementptr inbounds i8, ptr %69, i64 48
  store i32 %85, ptr %86, align 8, !tbaa !24
  %87 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIPcEixEi(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef %.169)
          to label %88 unwind label %94

88:                                               ; preds = %83
  %89 = load ptr, ptr %87, align 8, !tbaa !5
  %90 = call noalias ptr @strdup(ptr noundef %89) #11
  %91 = getelementptr inbounds i8, ptr %69, i64 56
  store ptr %90, ptr %91, align 8, !tbaa !25
  invoke void @_ZN7MPHouse14InsertCategoryEP10MPCategory(ptr noundef nonnull align 8 dereferenceable(376) %0, ptr noundef nonnull %69)
          to label %92 unwind label %94

92:                                               ; preds = %88
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #11
  %93 = call ptr @fgets(ptr noundef nonnull %5, i32 noundef 4096, ptr noundef nonnull %7)
  %.not100 = icmp eq ptr %93, null
  br i1 %.not100, label %._crit_edge153, label %.lr.ph152, !llvm.loop !26

94:                                               ; preds = %88, %83, %78, %73, %71, %.critedge7
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %98

96:                                               ; preds = %70
  %97 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %69, i64 noundef 64) #14
  br label %98

98:                                               ; preds = %94, %96, %66
  %.pn105 = phi { ptr, i32 } [ %67, %66 ], [ %95, %94 ], [ %97, %96 ]
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #11
  br label %99

99:                                               ; preds = %98, %60
  %.pn105.pn = phi { ptr, i32 } [ %.pn105, %98 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #11
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %5) #11
  br label %102

._crit_edge153:                                   ; preds = %92, %55
  %100 = call i32 @fclose(ptr noundef nonnull %7)
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %5) #11
  br label %101

101:                                              ; preds = %._crit_edge153, %._crit_edge141.thread
  %.0 = phi i32 [ 0, %._crit_edge141.thread ], [ 1, %._crit_edge153 ]
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %4) #11
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #11
  br label %103

102:                                              ; preds = %28, %99, %20
  %.pn118 = phi { ptr, i32 } [ %21, %20 ], [ %29, %28 ], [ %.pn105.pn, %99 ]
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %4) #11
  call void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #11
  resume { ptr, i32 } %.pn118

103:                                              ; preds = %101, %8
  %.1 = phi i32 [ %.0, %101 ], [ 0, %8 ]
  ret i32 %.1
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7RNArrayIPcEC2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 align 2

; Function Attrs: nofree nounwind
declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7RNArrayIPcE6InsertES0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN7RNArrayIPcEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #8

; Function Attrs: nounwind
declare void @_ZN8RNVArrayD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #9

declare void @_ZN10MPCategoryC1Ev(ptr) local_unnamed_addr

attributes #0 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nobuiltin 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: 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 #4 = { mustprogress 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 = { 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 #6 = { 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 #7 = { nobuiltin 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 #8 = { 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 #9 = { 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 #10 = { cold nounwind }
attributes #11 = { nounwind }
attributes #12 = { nounwind willreturn memory(read) }
attributes #13 = { builtin allocsize(0) }
attributes #14 = { builtin 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++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}
!18 = !{!19, !20, i64 32}
!19 = !{!"_ZTS10MPCategory", !6, i64 0, !20, i64 8, !21, i64 16, !20, i64 32, !6, i64 40, !20, i64 48, !6, i64 56}
!20 = !{!"int", !7, i64 0}
!21 = !{!"_ZTS7RNArrayIP8MPObjectE", !22, i64 0}
!22 = !{!"_ZTS8RNVArray", !6, i64 0, !20, i64 8, !20, i64 12}
!23 = !{!19, !6, i64 40}
!24 = !{!19, !20, i64 48}
!25 = !{!19, !6, i64 56}
!26 = distinct !{!26, !11}


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