; LLVM IR from Tunghohin/Competitive_Coding :: Luogu (p1160)

; 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.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%struct.node = type { i32, ptr, ptr }

@list = external dso_local global [100010 x ptr], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  %13 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #7
  store ptr %13, ptr getelementptr inbounds ([100010 x ptr], ptr @list, i64 0, i64 1), align 8, !tbaa !9
  %14 = load ptr, ptr getelementptr inbounds ([100010 x ptr], ptr @list, i64 0, i64 1), align 8, !tbaa !9
  %15 = getelementptr inbounds %struct.node, ptr %14, i32 0, i32 0
  store i32 1, ptr %15, align 8, !tbaa !11
  %16 = load ptr, ptr getelementptr inbounds ([100010 x ptr], ptr @list, i64 0, i64 1), align 8, !tbaa !9
  %17 = getelementptr inbounds %struct.node, ptr %16, i32 0, i32 2
  store ptr null, ptr %17, align 8, !tbaa !13
  %18 = load ptr, ptr getelementptr inbounds ([100010 x ptr], ptr @list, i64 0, i64 1), align 8, !tbaa !9
  %19 = getelementptr inbounds %struct.node, ptr %18, i32 0, i32 1
  store ptr null, ptr %19, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 2, ptr %4, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %180, %0
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = icmp sle i32 %21, %22
  br i1 %23, label %25, label %24

24:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %183

25:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %28 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #7
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %30
  store ptr %28, ptr %31, align 8, !tbaa !9
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %34
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  %37 = getelementptr inbounds %struct.node, ptr %36, i32 0, i32 0
  store i32 %32, ptr %37, align 8, !tbaa !11
  %38 = load i32, ptr %6, align 4, !tbaa !5
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %40, label %110

40:                                               ; preds = %25
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %42
  %44 = load ptr, ptr %43, align 8, !tbaa !9
  %45 = getelementptr inbounds %struct.node, ptr %44, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8, !tbaa !14
  %47 = icmp ne ptr %46, null
  br i1 %47, label %48, label %89

48:                                               ; preds = %40
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %50
  %52 = load ptr, ptr %51, align 8, !tbaa !9
  %53 = getelementptr inbounds %struct.node, ptr %52, i32 0, i32 1
  %54 = load ptr, ptr %53, align 8, !tbaa !14
  %55 = load i32, ptr %4, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %56
  %58 = load ptr, ptr %57, align 8, !tbaa !9
  %59 = getelementptr inbounds %struct.node, ptr %58, i32 0, i32 1
  store ptr %54, ptr %59, align 8, !tbaa !14
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %61
  %63 = load ptr, ptr %62, align 8, !tbaa !9
  %64 = load i32, ptr %4, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %65
  %67 = load ptr, ptr %66, align 8, !tbaa !9
  %68 = getelementptr inbounds %struct.node, ptr %67, i32 0, i32 2
  store ptr %63, ptr %68, align 8, !tbaa !13
  %69 = load i32, ptr %4, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %70
  %72 = load ptr, ptr %71, align 8, !tbaa !9
  %73 = load i32, ptr %5, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %74
  %76 = load ptr, ptr %75, align 8, !tbaa !9
  %77 = getelementptr inbounds %struct.node, ptr %76, i32 0, i32 1
  %78 = load ptr, ptr %77, align 8, !tbaa !14
  %79 = getelementptr inbounds %struct.node, ptr %78, i32 0, i32 2
  store ptr %72, ptr %79, align 8, !tbaa !13
  %80 = load i32, ptr %4, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %81
  %83 = load ptr, ptr %82, align 8, !tbaa !9
  %84 = load i32, ptr %5, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %85
  %87 = load ptr, ptr %86, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct.node, ptr %87, i32 0, i32 1
  store ptr %83, ptr %88, align 8, !tbaa !14
  br label %109

89:                                               ; preds = %40
  %90 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %90, ptr %3, align 4, !tbaa !5
  %91 = load i32, ptr %5, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %92
  %94 = load ptr, ptr %93, align 8, !tbaa !9
  %95 = load i32, ptr %4, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %96
  %98 = load ptr, ptr %97, align 8, !tbaa !9
  %99 = getelementptr inbounds %struct.node, ptr %98, i32 0, i32 2
  store ptr %94, ptr %99, align 8, !tbaa !13
  %100 = load i32, ptr %4, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %101
  %103 = load ptr, ptr %102, align 8, !tbaa !9
  %104 = load i32, ptr %5, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %105
  %107 = load ptr, ptr %106, align 8, !tbaa !9
  %108 = getelementptr inbounds %struct.node, ptr %107, i32 0, i32 1
  store ptr %103, ptr %108, align 8, !tbaa !14
  br label %109

109:                                              ; preds = %89, %48
  br label %179

110:                                              ; preds = %25
  %111 = load i32, ptr %5, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %112
  %114 = load ptr, ptr %113, align 8, !tbaa !9
  %115 = getelementptr inbounds %struct.node, ptr %114, i32 0, i32 2
  %116 = load ptr, ptr %115, align 8, !tbaa !13
  %117 = icmp ne ptr %116, null
  br i1 %117, label %118, label %159

118:                                              ; preds = %110
  %119 = load i32, ptr %5, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %120
  %122 = load ptr, ptr %121, align 8, !tbaa !9
  %123 = getelementptr inbounds %struct.node, ptr %122, i32 0, i32 2
  %124 = load ptr, ptr %123, align 8, !tbaa !13
  %125 = load i32, ptr %4, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %126
  %128 = load ptr, ptr %127, align 8, !tbaa !9
  %129 = getelementptr inbounds %struct.node, ptr %128, i32 0, i32 2
  store ptr %124, ptr %129, align 8, !tbaa !13
  %130 = load i32, ptr %5, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %131
  %133 = load ptr, ptr %132, align 8, !tbaa !9
  %134 = load i32, ptr %4, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %135
  %137 = load ptr, ptr %136, align 8, !tbaa !9
  %138 = getelementptr inbounds %struct.node, ptr %137, i32 0, i32 1
  store ptr %133, ptr %138, align 8, !tbaa !14
  %139 = load i32, ptr %4, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %140
  %142 = load ptr, ptr %141, align 8, !tbaa !9
  %143 = load i32, ptr %5, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %144
  %146 = load ptr, ptr %145, align 8, !tbaa !9
  %147 = getelementptr inbounds %struct.node, ptr %146, i32 0, i32 2
  %148 = load ptr, ptr %147, align 8, !tbaa !13
  %149 = getelementptr inbounds %struct.node, ptr %148, i32 0, i32 1
  store ptr %142, ptr %149, align 8, !tbaa !14
  %150 = load i32, ptr %4, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %151
  %153 = load ptr, ptr %152, align 8, !tbaa !9
  %154 = load i32, ptr %5, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %155
  %157 = load ptr, ptr %156, align 8, !tbaa !9
  %158 = getelementptr inbounds %struct.node, ptr %157, i32 0, i32 2
  store ptr %153, ptr %158, align 8, !tbaa !13
  br label %178

159:                                              ; preds = %110
  %160 = load i32, ptr %4, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %161
  %163 = load ptr, ptr %162, align 8, !tbaa !9
  %164 = load i32, ptr %5, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %165
  %167 = load ptr, ptr %166, align 8, !tbaa !9
  %168 = getelementptr inbounds %struct.node, ptr %167, i32 0, i32 2
  store ptr %163, ptr %168, align 8, !tbaa !13
  %169 = load i32, ptr %5, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %170
  %172 = load ptr, ptr %171, align 8, !tbaa !9
  %173 = load i32, ptr %4, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %174
  %176 = load ptr, ptr %175, align 8, !tbaa !9
  %177 = getelementptr inbounds %struct.node, ptr %176, i32 0, i32 1
  store ptr %172, ptr %177, align 8, !tbaa !14
  br label %178

178:                                              ; preds = %159, %118
  br label %179

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

180:                                              ; preds = %179
  %181 = load i32, ptr %4, align 4, !tbaa !5
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %4, align 4, !tbaa !5
  br label %20, !llvm.loop !15

183:                                              ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %184 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %185

185:                                              ; preds = %266, %183
  %186 = load i32, ptr %8, align 4, !tbaa !5
  %187 = load i32, ptr %7, align 4, !tbaa !5
  %188 = icmp sle i32 %186, %187
  br i1 %188, label %190, label %189

189:                                              ; preds = %185
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %269

190:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %191 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %192 = load i32, ptr %10, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %193
  %195 = load ptr, ptr %194, align 8, !tbaa !9
  %196 = icmp eq ptr %195, null
  br i1 %196, label %197, label %198

197:                                              ; preds = %190
  store i32 7, ptr %9, align 4
  br label %263

198:                                              ; preds = %190
  %199 = load i32, ptr %10, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %200
  %202 = load ptr, ptr %201, align 8, !tbaa !9
  %203 = getelementptr inbounds %struct.node, ptr %202, i32 0, i32 1
  %204 = load ptr, ptr %203, align 8, !tbaa !14
  %205 = icmp ne ptr %204, null
  br i1 %205, label %206, label %220

206:                                              ; preds = %198
  %207 = load i32, ptr %10, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %208
  %210 = load ptr, ptr %209, align 8, !tbaa !9
  %211 = getelementptr inbounds %struct.node, ptr %210, i32 0, i32 2
  %212 = load ptr, ptr %211, align 8, !tbaa !13
  %213 = load i32, ptr %10, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %214
  %216 = load ptr, ptr %215, align 8, !tbaa !9
  %217 = getelementptr inbounds %struct.node, ptr %216, i32 0, i32 1
  %218 = load ptr, ptr %217, align 8, !tbaa !14
  %219 = getelementptr inbounds %struct.node, ptr %218, i32 0, i32 2
  store ptr %212, ptr %219, align 8, !tbaa !13
  br label %220

220:                                              ; preds = %206, %198
  %221 = load i32, ptr %10, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %222
  %224 = load ptr, ptr %223, align 8, !tbaa !9
  %225 = getelementptr inbounds %struct.node, ptr %224, i32 0, i32 2
  %226 = load ptr, ptr %225, align 8, !tbaa !13
  %227 = icmp ne ptr %226, null
  br i1 %227, label %228, label %242

228:                                              ; preds = %220
  %229 = load i32, ptr %10, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %230
  %232 = load ptr, ptr %231, align 8, !tbaa !9
  %233 = getelementptr inbounds %struct.node, ptr %232, i32 0, i32 1
  %234 = load ptr, ptr %233, align 8, !tbaa !14
  %235 = load i32, ptr %10, align 4, !tbaa !5
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %236
  %238 = load ptr, ptr %237, align 8, !tbaa !9
  %239 = getelementptr inbounds %struct.node, ptr %238, i32 0, i32 2
  %240 = load ptr, ptr %239, align 8, !tbaa !13
  %241 = getelementptr inbounds %struct.node, ptr %240, i32 0, i32 1
  store ptr %234, ptr %241, align 8, !tbaa !14
  br label %242

242:                                              ; preds = %228, %220
  %243 = load i32, ptr %10, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %244
  %246 = load ptr, ptr %245, align 8, !tbaa !9
  %247 = getelementptr inbounds %struct.node, ptr %246, i32 0, i32 1
  store ptr null, ptr %247, align 8, !tbaa !14
  %248 = load i32, ptr %10, align 4, !tbaa !5
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %249
  %251 = load ptr, ptr %250, align 8, !tbaa !9
  %252 = getelementptr inbounds %struct.node, ptr %251, i32 0, i32 2
  store ptr null, ptr %252, align 8, !tbaa !13
  %253 = load i32, ptr %10, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %254
  %256 = load ptr, ptr %255, align 8, !tbaa !9
  %257 = icmp eq ptr %256, null
  br i1 %257, label %259, label %258

258:                                              ; preds = %242
  call void @_ZdlPvm(ptr noundef %256, i64 noundef 24) #8
  br label %259

259:                                              ; preds = %258, %242
  %260 = load i32, ptr %10, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %261
  store ptr null, ptr %262, align 8, !tbaa !9
  store i32 0, ptr %9, align 4
  br label %263

263:                                              ; preds = %259, %197
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  %264 = load i32, ptr %9, align 4
  switch i32 %264, label %288 [
    i32 0, label %265
    i32 7, label %266
  ]

265:                                              ; preds = %263
  br label %266

266:                                              ; preds = %265, %263
  %267 = load i32, ptr %8, align 4, !tbaa !5
  %268 = add nsw i32 %267, 1
  store i32 %268, ptr %8, align 4, !tbaa !5
  br label %185, !llvm.loop !17

269:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %270 = load i32, ptr %3, align 4, !tbaa !5
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %271
  %273 = load ptr, ptr %272, align 8, !tbaa !9
  store ptr %273, ptr %11, align 8, !tbaa !9
  br label %274

274:                                              ; preds = %277, %269
  %275 = load ptr, ptr %11, align 8, !tbaa !9
  %276 = icmp ne ptr %275, null
  br i1 %276, label %277, label %286

277:                                              ; preds = %274
  %278 = load ptr, ptr %11, align 8, !tbaa !9
  %279 = getelementptr inbounds %struct.node, ptr %278, i32 0, i32 0
  %280 = load i32, ptr %279, align 8, !tbaa !11
  %281 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %280)
  %282 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %281, i8 noundef signext 32)
  %283 = load ptr, ptr %11, align 8, !tbaa !9
  %284 = getelementptr inbounds %struct.node, ptr %283, i32 0, i32 2
  %285 = load ptr, ptr %284, align 8, !tbaa !13
  store ptr %285, ptr %11, align 8, !tbaa !9
  br label %274, !llvm.loop !18

286:                                              ; preds = %274
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %287 = load i32, ptr %1, align 4
  ret i32 %287

288:                                              ; preds = %263
  unreachable
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

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

; 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) #4

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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 #5 = { inlinehint 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 #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS4node", !6, i64 0, !10, i64 8, !10, i64 16}
!13 = !{!12, !10, i64 16}
!14 = !{!12, !10, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}


; 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.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@list = external dso_local local_unnamed_addr global [100010 x ptr], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %7 = call noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #8
  store ptr %7, ptr getelementptr inbounds (i8, ptr @list, i64 8), align 8, !tbaa !5
  store i32 1, ptr %7, align 8, !tbaa !9
  %8 = getelementptr inbounds i8, ptr %7, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %8, i8 0, i64 16, i1 false)
  %9 = load i32, ptr %1, align 4, !tbaa !12
  %.not39 = icmp slt i32 %9, 2
  br i1 %.not39, label %._crit_edge, label %.lr.ph

._crit_edge.loopexit:                             ; preds = %52
  %10 = sext i32 %.1 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %0
  %.026.lcssa = phi i64 [ 1, %0 ], [ %10, %._crit_edge.loopexit ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %12 = load i32, ptr %4, align 4, !tbaa !12
  %.not3342 = icmp slt i32 %12, 1
  br i1 %.not3342, label %._crit_edge46, label %.lr.ph45

.lr.ph:                                           ; preds = %0, %52
  %indvars.iv = phi i64 [ %indvars.iv.next, %52 ], [ 2, %0 ]
  %.02640 = phi i32 [ %.1, %52 ], [ 1, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %15 = call noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #8
  %16 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %indvars.iv
  store ptr %15, ptr %16, align 8, !tbaa !5
  %17 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %17, ptr %15, align 8, !tbaa !9
  %18 = load i32, ptr %3, align 4, !tbaa !12
  %19 = icmp eq i32 %18, 0
  %20 = load i32, ptr %2, align 4, !tbaa !12
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %21
  %23 = load ptr, ptr %22, align 8, !tbaa !5
  br i1 %19, label %24, label %37

24:                                               ; preds = %.lr.ph
  %25 = getelementptr inbounds i8, ptr %23, i64 8
  %26 = load ptr, ptr %25, align 8, !tbaa !13
  %.not38 = icmp eq ptr %26, null
  br i1 %.not38, label %35, label %27

27:                                               ; preds = %24
  %28 = getelementptr inbounds i8, ptr %15, i64 8
  store ptr %26, ptr %28, align 8, !tbaa !13
  %29 = getelementptr inbounds i8, ptr %15, i64 16
  store ptr %23, ptr %29, align 8, !tbaa !14
  %30 = load ptr, ptr %25, align 8, !tbaa !13
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  store ptr %15, ptr %31, align 8, !tbaa !14
  %32 = load ptr, ptr %16, align 8, !tbaa !5
  %33 = load ptr, ptr %22, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %33, i64 8
  store ptr %32, ptr %34, align 8, !tbaa !13
  br label %52

35:                                               ; preds = %24
  %36 = getelementptr inbounds i8, ptr %15, i64 16
  store ptr %23, ptr %36, align 8, !tbaa !14
  store ptr %15, ptr %25, align 8, !tbaa !13
  br label %52

37:                                               ; preds = %.lr.ph
  %38 = getelementptr inbounds i8, ptr %23, i64 16
  %39 = load ptr, ptr %38, align 8, !tbaa !14
  %.not37 = icmp eq ptr %39, null
  br i1 %.not37, label %48, label %40

40:                                               ; preds = %37
  %41 = getelementptr inbounds i8, ptr %15, i64 16
  store ptr %39, ptr %41, align 8, !tbaa !14
  %42 = getelementptr inbounds i8, ptr %15, i64 8
  store ptr %23, ptr %42, align 8, !tbaa !13
  %43 = load ptr, ptr %38, align 8, !tbaa !14
  %44 = getelementptr inbounds i8, ptr %43, i64 8
  store ptr %15, ptr %44, align 8, !tbaa !13
  %45 = load ptr, ptr %16, align 8, !tbaa !5
  %46 = load ptr, ptr %22, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  store ptr %45, ptr %47, align 8, !tbaa !14
  br label %52

48:                                               ; preds = %37
  store ptr %15, ptr %38, align 8, !tbaa !14
  %49 = load ptr, ptr %22, align 8, !tbaa !5
  %50 = load ptr, ptr %16, align 8, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %50, i64 8
  store ptr %49, ptr %51, align 8, !tbaa !13
  br label %52

52:                                               ; preds = %40, %48, %27, %35
  %.1 = phi i32 [ %.02640, %27 ], [ %17, %35 ], [ %.02640, %40 ], [ %.02640, %48 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %53 = load i32, ptr %1, align 4, !tbaa !12
  %54 = sext i32 %53 to i64
  %.not.not = icmp slt i64 %indvars.iv, %54
  br i1 %.not.not, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !15

._crit_edge46:                                    ; preds = %87, %._crit_edge
  %55 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %.026.lcssa
  %.047 = load ptr, ptr %55, align 8, !tbaa !5
  %.not3448 = icmp eq ptr %.047, null
  br i1 %.not3448, label %._crit_edge52, label %.lr.ph51

.lr.ph45:                                         ; preds = %._crit_edge, %87
  %.02443 = phi i32 [ %88, %87 ], [ 1, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %57 = load i32, ptr %5, align 4, !tbaa !12
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %58
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  %61 = icmp eq ptr %60, null
  br i1 %61, label %87, label %62

62:                                               ; preds = %.lr.ph45
  %63 = getelementptr inbounds i8, ptr %60, i64 8
  %64 = load ptr, ptr %63, align 8, !tbaa !13
  %.not35 = icmp eq ptr %64, null
  br i1 %.not35, label %69, label %65

65:                                               ; preds = %62
  %66 = getelementptr inbounds i8, ptr %60, i64 16
  %67 = load ptr, ptr %66, align 8, !tbaa !14
  %68 = getelementptr inbounds i8, ptr %64, i64 16
  store ptr %67, ptr %68, align 8, !tbaa !14
  %.pre = load ptr, ptr %59, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %65, %62
  %70 = phi ptr [ %.pre, %65 ], [ %60, %62 ]
  %71 = getelementptr inbounds i8, ptr %70, i64 16
  %72 = load ptr, ptr %71, align 8, !tbaa !14
  %.not36 = icmp eq ptr %72, null
  br i1 %.not36, label %77, label %73

73:                                               ; preds = %69
  %74 = getelementptr inbounds i8, ptr %70, i64 8
  %75 = load ptr, ptr %74, align 8, !tbaa !13
  %76 = getelementptr inbounds i8, ptr %72, i64 8
  store ptr %75, ptr %76, align 8, !tbaa !13
  %.pre54 = load ptr, ptr %59, align 8, !tbaa !5
  br label %77

77:                                               ; preds = %73, %69
  %78 = phi ptr [ %.pre54, %73 ], [ %70, %69 ]
  %79 = getelementptr inbounds i8, ptr %78, i64 8
  store ptr null, ptr %79, align 8, !tbaa !13
  %80 = load ptr, ptr %59, align 8, !tbaa !5
  %81 = getelementptr inbounds i8, ptr %80, i64 16
  store ptr null, ptr %81, align 8, !tbaa !14
  %82 = load ptr, ptr %59, align 8, !tbaa !5
  %83 = icmp eq ptr %82, null
  br i1 %83, label %85, label %84

84:                                               ; preds = %77
  call void @_ZdlPvm(ptr noundef nonnull %82, i64 noundef 24) #9
  %.pre55 = load i32, ptr %5, align 4, !tbaa !12
  %.pre56 = sext i32 %.pre55 to i64
  br label %85

85:                                               ; preds = %84, %77
  %.pre-phi = phi i64 [ %.pre56, %84 ], [ %58, %77 ]
  %86 = getelementptr inbounds [100010 x ptr], ptr @list, i64 0, i64 %.pre-phi
  store ptr null, ptr %86, align 8, !tbaa !5
  br label %87

87:                                               ; preds = %.lr.ph45, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %88 = add nuw nsw i32 %.02443, 1
  %89 = load i32, ptr %4, align 4, !tbaa !12
  %.not33.not = icmp slt i32 %.02443, %89
  br i1 %.not33.not, label %.lr.ph45, label %._crit_edge46, !llvm.loop !17

.lr.ph51:                                         ; preds = %._crit_edge46, %.lr.ph51
  %.049 = phi ptr [ %.0, %.lr.ph51 ], [ %.047, %._crit_edge46 ]
  %90 = load i32, ptr %.049, align 8, !tbaa !9
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %90)
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %91, i8 noundef signext 32)
  %93 = getelementptr inbounds i8, ptr %.049, i64 16
  %.0 = load ptr, ptr %93, align 8, !tbaa !5
  %.not34 = icmp eq ptr %.0, null
  br i1 %.not34, label %._crit_edge52, label %.lr.ph51, !llvm.loop !18

._crit_edge52:                                    ; preds = %.lr.ph51, %._crit_edge46
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2

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

attributes #0 = { mustprogress norecurse 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 = { "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 = { 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 #4 = { 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 #5 = { inlinehint 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { 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 = !{!10, !11, i64 0}
!10 = !{!"_ZTS4node", !11, i64 0, !6, i64 8, !6, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!10, !6, i64 8}
!14 = !{!10, !6, i64 16}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}


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