; LLVM IR from tangjz/acm-icpc :: codeforces/gym/104068K.ll (Z5solvev)

; 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.Node = type { i32, i32, i32 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon = type { ptr, ptr }
%"class.std::function.0" = type { %"class.std::_Function_base", ptr }
%class.anon.2 = type { ptr, ptr, ptr }
%class.anon.3 = type { ptr, ptr }

@ptot = external dso_local global i32, align 4
@pool = external dso_local global [9000091 x %struct.Node], align 16
@_ZZ5solvevE1a = external hidden global [100001 x i32], align 16
@_ZZ5solvevE2rt = external hidden global [100001 x i32], align 16
@_ZZ5solvevE3stk = external hidden global [100001 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %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 i32, align 4
  %12 = alloca %"class.std::function", align 8
  %13 = alloca %class.anon, align 8
  %14 = alloca %"class.std::function.0", align 8
  %15 = alloca %class.anon.2, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %class.anon.3, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store i64 0, ptr %4, align 8, !tbaa !9
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %46, %0
  %24 = load i32, ptr %5, align 4, !tbaa !5
  %25 = load i32, ptr %1, align 4, !tbaa !5
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %49

28:                                               ; preds = %23
  %29 = load i32, ptr %5, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds i32, ptr @_ZZ5solvevE1a, i64 %30
  %32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %31)
  br label %33

33:                                               ; preds = %42, %28
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = shl i32 1, %34
  %36 = load i32, ptr %5, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = icmp sle i32 %35, %39
  br i1 %40, label %41, label %45

41:                                               ; preds = %33
  br label %42

42:                                               ; preds = %41
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %3, align 4, !tbaa !5
  br label %33, !llvm.loop !11

45:                                               ; preds = %33
  br label %46

46:                                               ; preds = %45
  %47 = load i32, ptr %5, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %5, align 4, !tbaa !5
  br label %23, !llvm.loop !13

49:                                               ; preds = %27
  store i32 1, ptr @ptot, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %108, %49
  %51 = load i32, ptr %6, align 4, !tbaa !5
  %52 = load i32, ptr %1, align 4, !tbaa !5
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %111

55:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %56 = call noundef i32 @_Z7newNodeii(i32 noundef 0, i32 noundef 0)
  %57 = load i32, ptr %6, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %58
  store i32 %56, ptr %59, align 4, !tbaa !5
  store i32 %56, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %60 = load i32, ptr %3, align 4, !tbaa !5
  %61 = sub nsw i32 %60, 1
  store i32 %61, ptr %9, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %98, %55
  %63 = load i32, ptr %9, align 4, !tbaa !5
  %64 = icmp sge i32 %63, 0
  br i1 %64, label %66, label %65

65:                                               ; preds = %62
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %101

66:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %67 = load i32, ptr %6, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = load i32, ptr %9, align 4, !tbaa !5
  %72 = ashr i32 %70, %71
  %73 = and i32 %72, 1
  store i32 %73, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %74 = call noundef i32 @_Z7newNodeii(i32 noundef 0, i32 noundef 0)
  store i32 %74, ptr %11, align 4, !tbaa !5
  %75 = load i32, ptr %8, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [9000091 x %struct.Node], ptr @pool, i64 0, i64 %76
  %78 = getelementptr inbounds %struct.Node, ptr %77, i32 0, i32 0
  %79 = load i32, ptr %78, align 4, !tbaa !14
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %78, align 4, !tbaa !14
  %81 = load i32, ptr %11, align 4, !tbaa !5
  %82 = load i32, ptr %10, align 4, !tbaa !5
  %83 = and i32 %82, 1
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %85, label %90

85:                                               ; preds = %66
  %86 = load i32, ptr %8, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [9000091 x %struct.Node], ptr @pool, i64 0, i64 %87
  %89 = getelementptr inbounds %struct.Node, ptr %88, i32 0, i32 2
  br label %95

90:                                               ; preds = %66
  %91 = load i32, ptr %8, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [9000091 x %struct.Node], ptr @pool, i64 0, i64 %92
  %94 = getelementptr inbounds %struct.Node, ptr %93, i32 0, i32 1
  br label %95

95:                                               ; preds = %90, %85
  %96 = phi ptr [ %89, %85 ], [ %94, %90 ]
  store i32 %81, ptr %96, align 4, !tbaa !16
  %97 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %97, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %98

98:                                               ; preds = %95
  %99 = load i32, ptr %9, align 4, !tbaa !5
  %100 = add nsw i32 %99, -1
  store i32 %100, ptr %9, align 4, !tbaa !5
  br label %62, !llvm.loop !17

101:                                              ; preds = %65
  %102 = load i32, ptr %8, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [9000091 x %struct.Node], ptr @pool, i64 0, i64 %103
  %105 = getelementptr inbounds %struct.Node, ptr %104, i32 0, i32 0
  %106 = load i32, ptr %105, align 4, !tbaa !14
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %105, align 4, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %108

108:                                              ; preds = %101
  %109 = load i32, ptr %6, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %6, align 4, !tbaa !5
  br label %50, !llvm.loop !18

111:                                              ; preds = %54
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  %112 = getelementptr inbounds %class.anon, ptr %13, i32 0, i32 0
  store ptr %4, ptr %112, align 8, !tbaa !19
  %113 = getelementptr inbounds %class.anon, ptr %13, i32 0, i32 1
  store ptr %12, ptr %113, align 8, !tbaa !19
  call void @"_ZNSt8functionIFviiiiEEC2IZ5solvevE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(16) %13) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  %114 = getelementptr inbounds %class.anon.2, ptr %15, i32 0, i32 0
  store ptr %12, ptr %114, align 8, !tbaa !19
  %115 = getelementptr inbounds %class.anon.2, ptr %15, i32 0, i32 1
  store ptr %4, ptr %115, align 8, !tbaa !19
  %116 = getelementptr inbounds %class.anon.2, ptr %15, i32 0, i32 2
  store ptr %14, ptr %116, align 8, !tbaa !19
  invoke void @"_ZNSt8functionIFiiiiiiEEC2IZ5solvevE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %117 unwind label %125

117:                                              ; preds = %111
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  %118 = getelementptr inbounds %class.anon.3, ptr %18, i32 0, i32 0
  store ptr %14, ptr %118, align 8, !tbaa !19
  %119 = getelementptr inbounds %class.anon.3, ptr %18, i32 0, i32 1
  store ptr %3, ptr %119, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %186, %117
  %121 = load i32, ptr %19, align 4, !tbaa !5
  %122 = load i32, ptr %1, align 4, !tbaa !5
  %123 = icmp slt i32 %121, %122
  br i1 %123, label %129, label %124

124:                                              ; preds = %120
  store i32 14, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %189

125:                                              ; preds = %111
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %16, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  br label %227

129:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 -1, ptr %20, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %170, %129
  %131 = load i32, ptr %2, align 4, !tbaa !5
  %132 = icmp sgt i32 %131, 0
  br i1 %132, label %133, label %147

133:                                              ; preds = %130
  %134 = load i32, ptr %2, align 4, !tbaa !5
  %135 = sub nsw i32 %134, 1
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3stk, i64 0, i64 %136
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !5
  %142 = load i32, ptr %19, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = icmp slt i32 %141, %145
  br label %147

147:                                              ; preds = %133, %130
  %148 = phi i1 [ false, %130 ], [ %146, %133 ]
  br i1 %148, label %149, label %173

149:                                              ; preds = %147
  %150 = load i32, ptr %20, align 4, !tbaa !5
  %151 = icmp ne i32 %150, -1
  br i1 %151, label %152, label %164

152:                                              ; preds = %149
  %153 = load i32, ptr %2, align 4, !tbaa !5
  %154 = sub nsw i32 %153, 1
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3stk, i64 0, i64 %155
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = load i32, ptr %20, align 4, !tbaa !5
  invoke void @"_ZZ5solvevENK3$_2clEii"(ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef %157, i32 noundef %158)
          to label %159 unwind label %160

159:                                              ; preds = %152
  br label %164

160:                                              ; preds = %176, %152
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %16, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %226

164:                                              ; preds = %159, %149
  %165 = load i32, ptr %2, align 4, !tbaa !5
  %166 = sub nsw i32 %165, 1
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3stk, i64 0, i64 %167
  %169 = load i32, ptr %168, align 4, !tbaa !5
  store i32 %169, ptr %20, align 4, !tbaa !5
  br label %170

170:                                              ; preds = %164
  %171 = load i32, ptr %2, align 4, !tbaa !5
  %172 = add nsw i32 %171, -1
  store i32 %172, ptr %2, align 4, !tbaa !5
  br label %130, !llvm.loop !21

173:                                              ; preds = %147
  %174 = load i32, ptr %20, align 4, !tbaa !5
  %175 = icmp ne i32 %174, -1
  br i1 %175, label %176, label %180

176:                                              ; preds = %173
  %177 = load i32, ptr %19, align 4, !tbaa !5
  %178 = load i32, ptr %20, align 4, !tbaa !5
  invoke void @"_ZZ5solvevENK3$_2clEii"(ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef %177, i32 noundef %178)
          to label %179 unwind label %160

179:                                              ; preds = %176
  br label %180

180:                                              ; preds = %179, %173
  %181 = load i32, ptr %19, align 4, !tbaa !5
  %182 = load i32, ptr %2, align 4, !tbaa !5
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %2, align 4, !tbaa !5
  %184 = sext i32 %182 to i64
  %185 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3stk, i64 0, i64 %184
  store i32 %181, ptr %185, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %186

186:                                              ; preds = %180
  %187 = load i32, ptr %19, align 4, !tbaa !5
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %19, align 4, !tbaa !5
  br label %120, !llvm.loop !22

189:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 -1, ptr %21, align 4, !tbaa !5
  br label %190

190:                                              ; preds = %215, %189
  %191 = load i32, ptr %2, align 4, !tbaa !5
  %192 = icmp sgt i32 %191, 0
  br i1 %192, label %194, label %193

193:                                              ; preds = %190
  store i32 20, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %218

194:                                              ; preds = %190
  %195 = load i32, ptr %21, align 4, !tbaa !5
  %196 = icmp ne i32 %195, -1
  br i1 %196, label %197, label %209

197:                                              ; preds = %194
  %198 = load i32, ptr %2, align 4, !tbaa !5
  %199 = sub nsw i32 %198, 1
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3stk, i64 0, i64 %200
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = load i32, ptr %21, align 4, !tbaa !5
  invoke void @"_ZZ5solvevENK3$_2clEii"(ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef %202, i32 noundef %203)
          to label %204 unwind label %205

204:                                              ; preds = %197
  br label %209

205:                                              ; preds = %197
  %206 = landingpad { ptr, i32 }
          cleanup
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %16, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %226

209:                                              ; preds = %204, %194
  %210 = load i32, ptr %2, align 4, !tbaa !5
  %211 = sub nsw i32 %210, 1
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3stk, i64 0, i64 %212
  %214 = load i32, ptr %213, align 4, !tbaa !5
  store i32 %214, ptr %21, align 4, !tbaa !5
  br label %215

215:                                              ; preds = %209
  %216 = load i32, ptr %2, align 4, !tbaa !5
  %217 = add nsw i32 %216, -1
  store i32 %217, ptr %2, align 4, !tbaa !5
  br label %190, !llvm.loop !23

218:                                              ; preds = %193
  %219 = load i64, ptr %4, align 8, !tbaa !9
  %220 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %219)
          to label %221 unwind label %222

221:                                              ; preds = %218
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret void

222:                                              ; preds = %218
  %223 = landingpad { ptr, i32 }
          cleanup
  %224 = extractvalue { ptr, i32 } %223, 0
  store ptr %224, ptr %16, align 8
  %225 = extractvalue { ptr, i32 } %223, 1
  store i32 %225, ptr %17, align 4
  br label %226

226:                                              ; preds = %222, %205, %160
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  br label %227

227:                                              ; preds = %226, %125
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  br label %228

228:                                              ; preds = %227
  %229 = load ptr, ptr %16, align 8
  %230 = load i32, ptr %17, align 4
  %231 = insertvalue { ptr, i32 } poison, ptr %229, 0
  %232 = insertvalue { ptr, i32 } %231, i32 %230, 1
  resume { ptr, i32 } %232
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7newNodeii(i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFviiiiEEC2IZ5solvevE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIFiiiiiiEEC2IZ5solvevE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZ5solvevENK3$_2clEii"(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i32 noundef) #5 align 2

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

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

attributes #0 = { 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 #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 = { 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 #4 = { 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 #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 }

!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 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !6, i64 0}
!15 = !{!"_ZTS4Node", !6, i64 0, !6, i64 4, !6, i64 8}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = !{!20, !20, i64 0}
!20 = !{!"any pointer", !7, i64 0}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}


; 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.Node = type { i32, i32, i32 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon = type { ptr, ptr }
%"class.std::function.0" = type { %"class.std::_Function_base", ptr }
%class.anon.2 = type { ptr, ptr, ptr }
%class.anon.3 = type { ptr, ptr }

@ptot = external dso_local local_unnamed_addr global i32, align 4
@pool = external dso_local local_unnamed_addr global [9000091 x %struct.Node], align 16
@_ZZ5solvevE1a = external hidden global [100001 x i32], align 16
@_ZZ5solvevE2rt = external hidden local_unnamed_addr global [100001 x i32], align 16
@_ZZ5solvevE3stk = external hidden local_unnamed_addr global [100001 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::function", align 8
  %5 = alloca %class.anon, align 8
  %6 = alloca %"class.std::function.0", align 8
  %7 = alloca %class.anon.2, align 8
  %8 = alloca %class.anon.3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  store i64 0, ptr %3, align 8, !tbaa !9
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %10 = load i32, ptr %1, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %0
  store i32 1, ptr @ptot, align 4, !tbaa !5
  br label %._crit_edge71

._crit_edge:                                      ; preds = %21
  %12 = icmp sgt i32 %22, 0
  store i32 1, ptr @ptot, align 4, !tbaa !5
  br i1 %12, label %.lr.ph70.preheader, label %._crit_edge71

.lr.ph70.preheader:                               ; preds = %._crit_edge
  %13 = icmp sgt i32 %18, 0
  br label %.lr.ph70

.lr.ph:                                           ; preds = %0, %21
  %.promoted = phi i32 [ %18, %21 ], [ 0, %0 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %21 ], [ 0, %0 ]
  %14 = getelementptr inbounds i32, ptr @_ZZ5solvevE1a, i64 %indvars.iv
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %14)
  %16 = load i32, ptr %14, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %17, %.lr.ph
  %18 = phi i32 [ %20, %17 ], [ %.promoted, %.lr.ph ]
  %19 = shl nuw i32 1, %18
  %.not56 = icmp sgt i32 %19, %16
  %20 = add nsw i32 %18, 1
  br i1 %.not56, label %21, label %17, !llvm.loop !11

21:                                               ; preds = %17
  store i32 %18, ptr %2, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %22 = load i32, ptr %1, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = icmp slt i64 %indvars.iv.next, %23
  br i1 %24, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge71:                                    ; preds = %._crit_edge67, %._crit_edge.thread, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  store ptr %3, ptr %5, align 8, !tbaa !14
  %25 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr %4, ptr %25, align 8, !tbaa !14
  call void @"_ZNSt8functionIFviiiiEEC2IZ5solvevE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  store ptr %4, ptr %7, align 8, !tbaa !14
  %26 = getelementptr inbounds i8, ptr %7, i64 8
  store ptr %3, ptr %26, align 8, !tbaa !14
  %27 = getelementptr inbounds i8, ptr %7, i64 16
  store ptr %6, ptr %27, align 8, !tbaa !14
  invoke void @"_ZNSt8functionIFiiiiiiEEC2IZ5solvevE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %49 unwind label %58

.lr.ph70:                                         ; preds = %.lr.ph70.preheader, %._crit_edge67
  %indvars.iv90 = phi i64 [ 0, %.lr.ph70.preheader ], [ %indvars.iv.next91, %._crit_edge67 ]
  %28 = call noundef i32 @_Z7newNodeii(i32 noundef 0, i32 noundef 0)
  %29 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE2rt, i64 0, i64 %indvars.iv90
  store i32 %28, ptr %29, align 4, !tbaa !5
  br i1 %13, label %.lr.ph66, label %._crit_edge67

.lr.ph66:                                         ; preds = %.lr.ph70
  %30 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %indvars.iv90
  br label %38

._crit_edge67:                                    ; preds = %38, %.lr.ph70
  %.049.lcssa = phi i32 [ %28, %.lr.ph70 ], [ %40, %38 ]
  %31 = sext i32 %.049.lcssa to i64
  %32 = getelementptr inbounds [9000091 x %struct.Node], ptr @pool, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !16
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %32, align 4, !tbaa !16
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %35 = load i32, ptr %1, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = icmp slt i64 %indvars.iv.next91, %36
  br i1 %37, label %.lr.ph70, label %._crit_edge71, !llvm.loop !18

38:                                               ; preds = %.lr.ph66, %38
  %.048.in64 = phi i32 [ %18, %.lr.ph66 ], [ %.048, %38 ]
  %.04963 = phi i32 [ %28, %.lr.ph66 ], [ %40, %38 ]
  %.048 = add nsw i32 %.048.in64, -1
  %39 = load i32, ptr %30, align 4, !tbaa !5
  %40 = call noundef i32 @_Z7newNodeii(i32 noundef 0, i32 noundef 0)
  %41 = sext i32 %.04963 to i64
  %42 = getelementptr inbounds [9000091 x %struct.Node], ptr @pool, i64 0, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !16
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %42, align 4, !tbaa !16
  %45 = shl nuw i32 1, %.048
  %46 = and i32 %39, %45
  %.not55 = icmp eq i32 %46, 0
  %.v = select i1 %.not55, i64 4, i64 8
  %47 = getelementptr inbounds i8, ptr %42, i64 %.v
  store i32 %40, ptr %47, align 4, !tbaa !19
  %48 = icmp ugt i32 %.048.in64, 1
  br i1 %48, label %38, label %._crit_edge67, !llvm.loop !20

49:                                               ; preds = %._crit_edge71
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  store ptr %6, ptr %8, align 8, !tbaa !14
  %50 = getelementptr inbounds i8, ptr %8, i64 8
  store ptr %2, ptr %50, align 8, !tbaa !14
  %51 = load i32, ptr %1, align 4, !tbaa !5
  %52 = icmp sgt i32 %51, 0
  br i1 %52, label %.preheader57, label %._crit_edge86

.preheader57:                                     ; preds = %49, %76
  %indvars.iv96 = phi i64 [ %indvars.iv.next97, %76 ], [ 0, %49 ]
  %.04580 = phi i32 [ %77, %76 ], [ 0, %49 ]
  %53 = icmp sgt i32 %.04580, 0
  br i1 %53, label %.lr.ph74, label %.critedge._crit_edge

.lr.ph74:                                         ; preds = %.preheader57
  %54 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %indvars.iv96
  %55 = zext nneg i32 %.04580 to i64
  br label %60

.preheader:                                       ; preds = %76
  %56 = icmp sgt i32 %.146.lcssa110, -1
  br i1 %56, label %.lr.ph85.preheader, label %._crit_edge86

.lr.ph85.preheader:                               ; preds = %.preheader
  %57 = zext nneg i32 %77 to i64
  br label %.lr.ph85

58:                                               ; preds = %._crit_edge71
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %94

60:                                               ; preds = %.lr.ph74, %70
  %indvars.iv93 = phi i64 [ %55, %.lr.ph74 ], [ %indvars.iv.next94, %70 ]
  %.04073 = phi i32 [ -1, %.lr.ph74 ], [ %71, %70 ]
  %indvars.iv.next94 = add nsw i64 %indvars.iv93, -1
  %61 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3stk, i64 0, i64 %indvars.iv.next94
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = load i32, ptr %54, align 4, !tbaa !5
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %68, label %.critedge.split.loop.exit

68:                                               ; preds = %60
  %.not52 = icmp eq i32 %.04073, -1
  br i1 %.not52, label %70, label %69

69:                                               ; preds = %68
  invoke void @"_ZZ5solvevENK3$_2clEii"(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef %62, i32 noundef %.04073)
          to label %._crit_edge103 unwind label %.loopexit

._crit_edge103:                                   ; preds = %69
  %.pre = load i32, ptr %61, align 4, !tbaa !5
  br label %70

.loopexit:                                        ; preds = %69
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %93

.loopexit.split-lp:                               ; preds = %74
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %93

70:                                               ; preds = %._crit_edge103, %68
  %71 = phi i32 [ %.pre, %._crit_edge103 ], [ %62, %68 ]
  %72 = icmp ugt i64 %indvars.iv93, 1
  br i1 %72, label %60, label %.critedge, !llvm.loop !21

.critedge.split.loop.exit:                        ; preds = %60
  %73 = trunc nuw nsw i64 %indvars.iv93 to i32
  br label %.critedge

.critedge:                                        ; preds = %70, %.critedge.split.loop.exit
  %.146.lcssa = phi i32 [ %73, %.critedge.split.loop.exit ], [ 0, %70 ]
  %.040.lcssa = phi i32 [ %.04073, %.critedge.split.loop.exit ], [ %71, %70 ]
  %.not51 = icmp eq i32 %.040.lcssa, -1
  br i1 %.not51, label %.critedge._crit_edge, label %74

.critedge._crit_edge:                             ; preds = %.preheader57, %.critedge
  %.146.lcssa111 = phi i32 [ %.146.lcssa, %.critedge ], [ %.04580, %.preheader57 ]
  %.pre104 = trunc nuw nsw i64 %indvars.iv96 to i32
  br label %76

74:                                               ; preds = %.critedge
  %75 = trunc nuw nsw i64 %indvars.iv96 to i32
  invoke void @"_ZZ5solvevENK3$_2clEii"(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef %75, i32 noundef %.040.lcssa)
          to label %76 unwind label %.loopexit.split-lp

76:                                               ; preds = %.critedge._crit_edge, %74
  %.146.lcssa110 = phi i32 [ %.146.lcssa111, %.critedge._crit_edge ], [ %.146.lcssa, %74 ]
  %.pre-phi = phi i32 [ %.pre104, %.critedge._crit_edge ], [ %75, %74 ]
  %77 = add nsw i32 %.146.lcssa110, 1
  %78 = sext i32 %.146.lcssa110 to i64
  %79 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3stk, i64 0, i64 %78
  store i32 %.pre-phi, ptr %79, align 4, !tbaa !5
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %80 = load i32, ptr %1, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = icmp slt i64 %indvars.iv.next97, %81
  br i1 %82, label %.preheader57, label %.preheader, !llvm.loop !22

._crit_edge86:                                    ; preds = %.lr.ph85._crit_edge, %49, %.preheader
  %83 = load i64, ptr %3, align 8, !tbaa !9
  %84 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %83)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret void

.lr.ph85:                                         ; preds = %.lr.ph85.preheader, %.lr.ph85._crit_edge
  %indvars.iv99 = phi i64 [ %57, %.lr.ph85.preheader ], [ %.pre105, %.lr.ph85._crit_edge ]
  %.084 = phi i32 [ -1, %.lr.ph85.preheader ], [ %91, %.lr.ph85._crit_edge ]
  %.not = icmp eq i32 %.084, -1
  %.pre105 = add nsw i64 %indvars.iv99, -1
  br i1 %.not, label %.lr.ph85._crit_edge, label %85

85:                                               ; preds = %.lr.ph85
  %86 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3stk, i64 0, i64 %.pre105
  %87 = load i32, ptr %86, align 4, !tbaa !5
  invoke void @"_ZZ5solvevENK3$_2clEii"(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef %87, i32 noundef %.084)
          to label %.lr.ph85._crit_edge unwind label %88

88:                                               ; preds = %85
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %93

.lr.ph85._crit_edge:                              ; preds = %.lr.ph85, %85
  %90 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3stk, i64 0, i64 %.pre105
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = icmp sgt i64 %indvars.iv99, 1
  br i1 %92, label %.lr.ph85, label %._crit_edge86, !llvm.loop !23

93:                                               ; preds = %.loopexit, %.loopexit.split-lp, %88
  %.pn = phi { ptr, i32 } [ %89, %88 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  br label %94

94:                                               ; preds = %93, %58
  %.pn.pn = phi { ptr, i32 } [ %.pn, %93 ], [ %59, %58 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn.pn
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7newNodeii(i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFviiiiEEC2IZ5solvevE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIFiiiiiiEEC2IZ5solvevE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZ5solvevENK3$_2clEii"(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i32 noundef) local_unnamed_addr #5 align 2

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

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

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

!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 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTS4Node", !6, i64 0, !6, i64 4, !6, i64 8}
!18 = distinct !{!18, !12}
!19 = !{!7, !7, i64 0}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}


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