; LLVM IR from bqi343/cp-notebook :: Implementations/content/graphs (12)/Advanced (DMOJdynamicTreeTest)

; 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.info = type { i32, i32, i32, i32 }
%struct.snode = type <{ i32, i32, ptr, [5 x ptr], i8, [3 x i8], [2 x %struct.info], [2 x i32], [2 x i32], [4 x i8] }>

@M = external dso_local global i32, align 4
@root = external dso_local global i32, align 4
@LCT = external dso_local global [100001 x ptr], align 16

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z6getParP5snode(ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5snode6accessEv(ptr noundef nonnull align 8 dereferenceable(108)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5snode4propEv(ptr noundef nonnull align 8 dereferenceable(108)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7pathIncii(i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7pathModii(i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4initv() #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5input2reIiJiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4)) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z4linkP5snodeS0_(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2PSi(i32 noundef) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %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 ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.info, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %struct.info, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @_Z4initv()
  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
  br label %21

21:                                               ; preds = %284, %0
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = load i32, ptr @M, align 4, !tbaa !5
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %287

26:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) %5)
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %32, label %29

29:                                               ; preds = %26
  %30 = load i32, ptr %5, align 4, !tbaa !5
  %31 = icmp eq i32 %30, 5
  br i1 %31, label %32, label %95

32:                                               ; preds = %29, %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @_ZN5input2reIiJiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %33 = load i32, ptr @root, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %34
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  call void @_ZN5snode8makeRootEv(ptr noundef nonnull align 8 dereferenceable(108) %36)
  %37 = load i32, ptr %6, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %38
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  call void @_ZN5snode6accessEv(ptr noundef nonnull align 8 dereferenceable(108) %40)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %42
  %44 = load ptr, ptr %43, align 8, !tbaa !9
  %45 = getelementptr inbounds %struct.snode, ptr %44, i32 0, i32 3
  %46 = getelementptr inbounds [5 x ptr], ptr %45, i64 0, i64 4
  %47 = load ptr, ptr %46, align 8, !tbaa !9
  store ptr %47, ptr %8, align 8, !tbaa !9
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %69

50:                                               ; preds = %32
  %51 = load ptr, ptr %8, align 8, !tbaa !9
  %52 = icmp ne ptr %51, null
  br i1 %52, label %53, label %62

53:                                               ; preds = %50
  %54 = load ptr, ptr %8, align 8, !tbaa !9
  call void @_ZN5snode4propEv(ptr noundef nonnull align 8 dereferenceable(108) %54)
  %55 = load i32, ptr %7, align 4, !tbaa !5
  %56 = load ptr, ptr %8, align 8, !tbaa !9
  %57 = getelementptr inbounds %struct.snode, ptr %56, i32 0, i32 7
  %58 = getelementptr inbounds [2 x i32], ptr %57, i64 0, i64 1
  store i32 %55, ptr %58, align 4, !tbaa !5
  %59 = load ptr, ptr %8, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct.snode, ptr %59, i32 0, i32 7
  %61 = getelementptr inbounds [2 x i32], ptr %60, i64 0, i64 0
  store i32 %55, ptr %61, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %53, %50
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %65
  %67 = load ptr, ptr %66, align 8, !tbaa !9
  %68 = getelementptr inbounds %struct.snode, ptr %67, i32 0, i32 1
  store i32 %63, ptr %68, align 4, !tbaa !11
  br label %90

69:                                               ; preds = %32
  %70 = load ptr, ptr %8, align 8, !tbaa !9
  %71 = icmp ne ptr %70, null
  br i1 %71, label %72, label %81

72:                                               ; preds = %69
  %73 = load ptr, ptr %8, align 8, !tbaa !9
  call void @_ZN5snode4propEv(ptr noundef nonnull align 8 dereferenceable(108) %73)
  %74 = load i32, ptr %7, align 4, !tbaa !5
  %75 = load ptr, ptr %8, align 8, !tbaa !9
  %76 = getelementptr inbounds %struct.snode, ptr %75, i32 0, i32 8
  %77 = getelementptr inbounds [2 x i32], ptr %76, i64 0, i64 1
  store i32 %74, ptr %77, align 4, !tbaa !5
  %78 = load ptr, ptr %8, align 8, !tbaa !9
  %79 = getelementptr inbounds %struct.snode, ptr %78, i32 0, i32 8
  %80 = getelementptr inbounds [2 x i32], ptr %79, i64 0, i64 0
  store i32 %74, ptr %80, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %72, %69
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = load i32, ptr %6, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %84
  %86 = load ptr, ptr %85, align 8, !tbaa !9
  %87 = getelementptr inbounds %struct.snode, ptr %86, i32 0, i32 1
  %88 = load i32, ptr %87, align 4, !tbaa !11
  %89 = add nsw i32 %88, %82
  store i32 %89, ptr %87, align 4, !tbaa !11
  br label %90

90:                                               ; preds = %81, %62
  %91 = load i32, ptr %6, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %92
  %94 = load ptr, ptr %93, align 8, !tbaa !9
  call void @_ZN5snode4calcEv(ptr noundef nonnull align 8 dereferenceable(108) %94)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %280

95:                                               ; preds = %29
  %96 = load i32, ptr %5, align 4, !tbaa !5
  %97 = icmp eq i32 %96, 1
  br i1 %97, label %98, label %100

98:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) %9)
  %99 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %99, ptr @root, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %279

100:                                              ; preds = %95
  %101 = load i32, ptr %5, align 4, !tbaa !5
  %102 = icmp eq i32 %101, 2
  br i1 %102, label %106, label %103

103:                                              ; preds = %100
  %104 = load i32, ptr %5, align 4, !tbaa !5
  %105 = icmp eq i32 %104, 6
  br i1 %105, label %106, label %120

106:                                              ; preds = %103, %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @_ZN5input2reIiJiiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %107 = load i32, ptr %10, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %108
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  call void @_ZN5snode8makeRootEv(ptr noundef nonnull align 8 dereferenceable(108) %110)
  %111 = load i32, ptr %5, align 4, !tbaa !5
  %112 = icmp eq i32 %111, 2
  br i1 %112, label %113, label %116

113:                                              ; preds = %106
  %114 = load i32, ptr %11, align 4, !tbaa !5
  %115 = load i32, ptr %12, align 4, !tbaa !5
  call void @_Z7pathModii(i32 noundef %114, i32 noundef %115)
  br label %119

116:                                              ; preds = %106
  %117 = load i32, ptr %11, align 4, !tbaa !5
  %118 = load i32, ptr %12, align 4, !tbaa !5
  call void @_Z7pathIncii(i32 noundef %117, i32 noundef %118)
  br label %119

119:                                              ; preds = %116, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %278

120:                                              ; preds = %103
  %121 = load i32, ptr %5, align 4, !tbaa !5
  %122 = icmp eq i32 %121, 3
  br i1 %122, label %129, label %123

123:                                              ; preds = %120
  %124 = load i32, ptr %5, align 4, !tbaa !5
  %125 = icmp eq i32 %124, 4
  br i1 %125, label %129, label %126

126:                                              ; preds = %123
  %127 = load i32, ptr %5, align 4, !tbaa !5
  %128 = icmp eq i32 %127, 11
  br i1 %128, label %129, label %186

129:                                              ; preds = %126, %123, %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  call void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) %13)
  %130 = load i32, ptr @root, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %131
  %133 = load ptr, ptr %132, align 8, !tbaa !9
  call void @_ZN5snode8makeRootEv(ptr noundef nonnull align 8 dereferenceable(108) %133)
  %134 = load i32, ptr %13, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %135
  %137 = load ptr, ptr %136, align 8, !tbaa !9
  call void @_ZN5snode6accessEv(ptr noundef nonnull align 8 dereferenceable(108) %137)
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  %138 = load i32, ptr %13, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %139
  %141 = load ptr, ptr %140, align 8, !tbaa !9
  %142 = getelementptr inbounds %struct.snode, ptr %141, i32 0, i32 1
  %143 = load i32, ptr %142, align 4, !tbaa !11
  call void @_ZN4infoC2Ei(ptr noundef nonnull align 4 dereferenceable(16) %14, i32 noundef %143)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %144 = load i32, ptr %13, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %145
  %147 = load ptr, ptr %146, align 8, !tbaa !9
  %148 = getelementptr inbounds %struct.snode, ptr %147, i32 0, i32 3
  %149 = getelementptr inbounds [5 x ptr], ptr %148, i64 0, i64 4
  %150 = load ptr, ptr %149, align 8, !tbaa !9
  store ptr %150, ptr %15, align 8, !tbaa !9
  %151 = load ptr, ptr %15, align 8, !tbaa !9
  %152 = icmp ne ptr %151, null
  br i1 %152, label %153, label %163

153:                                              ; preds = %129
  %154 = load ptr, ptr %15, align 8, !tbaa !9
  call void @_ZN5snode4propEv(ptr noundef nonnull align 8 dereferenceable(108) %154)
  %155 = load ptr, ptr %15, align 8, !tbaa !9
  %156 = getelementptr inbounds %struct.snode, ptr %155, i32 0, i32 6
  %157 = getelementptr inbounds [2 x %struct.info], ptr %156, i64 0, i64 0
  %158 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZpLR4infoRKS_(ptr noundef nonnull align 4 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(16) %157)
  %159 = load ptr, ptr %15, align 8, !tbaa !9
  %160 = getelementptr inbounds %struct.snode, ptr %159, i32 0, i32 6
  %161 = getelementptr inbounds [2 x %struct.info], ptr %160, i64 0, i64 1
  %162 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZpLR4infoRKS_(ptr noundef nonnull align 4 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(16) %161)
  br label %163

163:                                              ; preds = %153, %129
  %164 = load i32, ptr %2, align 4, !tbaa !5
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %2, align 4, !tbaa !5
  %166 = load i32, ptr %5, align 4, !tbaa !5
  %167 = icmp eq i32 %166, 3
  br i1 %167, label %168, label %171

168:                                              ; preds = %163
  %169 = getelementptr inbounds %struct.info, ptr %14, i32 0, i32 2
  %170 = load i32, ptr %169, align 4, !tbaa !14
  call void @_Z2PSi(i32 noundef %170)
  br label %185

171:                                              ; preds = %163
  %172 = load i32, ptr %5, align 4, !tbaa !5
  %173 = icmp eq i32 %172, 4
  br i1 %173, label %174, label %177

174:                                              ; preds = %171
  %175 = getelementptr inbounds %struct.info, ptr %14, i32 0, i32 3
  %176 = load i32, ptr %175, align 4, !tbaa !16
  call void @_Z2PSi(i32 noundef %176)
  br label %184

177:                                              ; preds = %171
  %178 = load i32, ptr %5, align 4, !tbaa !5
  %179 = icmp eq i32 %178, 11
  br i1 %179, label %180, label %183

180:                                              ; preds = %177
  %181 = getelementptr inbounds %struct.info, ptr %14, i32 0, i32 1
  %182 = load i32, ptr %181, align 4, !tbaa !17
  call void @_Z2PSi(i32 noundef %182)
  br label %183

183:                                              ; preds = %180, %177
  br label %184

184:                                              ; preds = %183, %174
  br label %185

185:                                              ; preds = %184, %168
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %277

186:                                              ; preds = %126
  %187 = load i32, ptr %5, align 4, !tbaa !5
  %188 = icmp eq i32 %187, 7
  br i1 %188, label %195, label %189

189:                                              ; preds = %186
  %190 = load i32, ptr %5, align 4, !tbaa !5
  %191 = icmp eq i32 %190, 8
  br i1 %191, label %195, label %192

192:                                              ; preds = %189
  %193 = load i32, ptr %5, align 4, !tbaa !5
  %194 = icmp eq i32 %193, 10
  br i1 %194, label %195, label %228

195:                                              ; preds = %192, %189, %186
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  call void @_ZN5input2reIiJiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %196 = load i32, ptr %16, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %197
  %199 = load ptr, ptr %198, align 8, !tbaa !9
  call void @_ZN5snode8makeRootEv(ptr noundef nonnull align 8 dereferenceable(108) %199)
  %200 = load i32, ptr %17, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %201
  %203 = load ptr, ptr %202, align 8, !tbaa !9
  call void @_ZN5snode6accessEv(ptr noundef nonnull align 8 dereferenceable(108) %203)
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  %204 = load i32, ptr %17, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %205
  %207 = load ptr, ptr %206, align 8, !tbaa !9
  %208 = getelementptr inbounds %struct.snode, ptr %207, i32 0, i32 6
  %209 = getelementptr inbounds [2 x %struct.info], ptr %208, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %209, i64 16, i1 false), !tbaa.struct !18
  %210 = load i32, ptr %2, align 4, !tbaa !5
  %211 = add nsw i32 %210, 1
  store i32 %211, ptr %2, align 4, !tbaa !5
  %212 = load i32, ptr %5, align 4, !tbaa !5
  %213 = icmp eq i32 %212, 7
  br i1 %213, label %214, label %217

214:                                              ; preds = %195
  %215 = getelementptr inbounds %struct.info, ptr %18, i32 0, i32 2
  %216 = load i32, ptr %215, align 4, !tbaa !14
  call void @_Z2PSi(i32 noundef %216)
  br label %227

217:                                              ; preds = %195
  %218 = load i32, ptr %5, align 4, !tbaa !5
  %219 = icmp eq i32 %218, 8
  br i1 %219, label %220, label %223

220:                                              ; preds = %217
  %221 = getelementptr inbounds %struct.info, ptr %18, i32 0, i32 3
  %222 = load i32, ptr %221, align 4, !tbaa !16
  call void @_Z2PSi(i32 noundef %222)
  br label %226

223:                                              ; preds = %217
  %224 = getelementptr inbounds %struct.info, ptr %18, i32 0, i32 1
  %225 = load i32, ptr %224, align 4, !tbaa !17
  call void @_Z2PSi(i32 noundef %225)
  br label %226

226:                                              ; preds = %223, %220
  br label %227

227:                                              ; preds = %226, %214
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %276

228:                                              ; preds = %192
  %229 = load i32, ptr %5, align 4, !tbaa !5
  %230 = icmp eq i32 %229, 9
  br i1 %230, label %231, label %274

231:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  call void @_ZN5input2reIiJiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %232 = load i32, ptr @root, align 4, !tbaa !5
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %233
  %235 = load ptr, ptr %234, align 8, !tbaa !9
  call void @_ZN5snode8makeRootEv(ptr noundef nonnull align 8 dereferenceable(108) %235)
  %236 = load i32, ptr %19, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %237
  %239 = load ptr, ptr %238, align 8, !tbaa !9
  %240 = load i32, ptr %20, align 4, !tbaa !5
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %241
  %243 = load ptr, ptr %242, align 8, !tbaa !9
  %244 = call noundef ptr @_Z3lcaP5snodeS0_(ptr noundef %239, ptr noundef %243)
  %245 = load i32, ptr %19, align 4, !tbaa !5
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %246
  %248 = load ptr, ptr %247, align 8, !tbaa !9
  %249 = icmp eq ptr %244, %248
  br i1 %249, label %250, label %251

250:                                              ; preds = %231
  store i32 4, ptr %4, align 4
  br label %271

251:                                              ; preds = %231
  %252 = load i32, ptr %19, align 4, !tbaa !5
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %253
  %255 = load ptr, ptr %254, align 8, !tbaa !9
  %256 = call noundef ptr @_Z6getParP5snode(ptr noundef %255)
  %257 = load i32, ptr %19, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %258
  %260 = load ptr, ptr %259, align 8, !tbaa !9
  %261 = call noundef zeroext i1 @_Z3cutP5snodeS0_(ptr noundef %256, ptr noundef %260)
  %262 = load i32, ptr %19, align 4, !tbaa !5
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %263
  %265 = load ptr, ptr %264, align 8, !tbaa !9
  %266 = load i32, ptr %20, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %267
  %269 = load ptr, ptr %268, align 8, !tbaa !9
  %270 = call noundef zeroext i1 @_Z4linkP5snodeS0_(ptr noundef %265, ptr noundef %269)
  store i32 0, ptr %4, align 4
  br label %271

271:                                              ; preds = %251, %250
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  %272 = load i32, ptr %4, align 4
  switch i32 %272, label %281 [
    i32 0, label %273
  ]

273:                                              ; preds = %271
  br label %275

274:                                              ; preds = %228
  call void @exit(i32 noundef 5) #7
  unreachable

275:                                              ; preds = %273
  br label %276

276:                                              ; preds = %275, %227
  br label %277

277:                                              ; preds = %276, %185
  br label %278

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

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

280:                                              ; preds = %279, %90
  store i32 0, ptr %4, align 4
  br label %281

281:                                              ; preds = %280, %271
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  %282 = load i32, ptr %4, align 4
  switch i32 %282, label %289 [
    i32 0, label %283
    i32 4, label %284
  ]

283:                                              ; preds = %281
  br label %284

284:                                              ; preds = %283, %281
  %285 = load i32, ptr %3, align 4, !tbaa !5
  %286 = add nsw i32 %285, 1
  store i32 %286, ptr %3, align 4, !tbaa !5
  br label %21, !llvm.loop !19

287:                                              ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %288 = load i32, ptr %1, align 4
  ret i32 %288

289:                                              ; preds = %281
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5snode8makeRootEv(ptr noundef nonnull align 8 dereferenceable(108)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5snode4calcEv(ptr noundef nonnull align 8 dereferenceable(108)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5input2reIiJiiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4infoC2Ei(ptr noundef nonnull align 4 dereferenceable(16), i32 noundef) unnamed_addr #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z3lcaP5snodeS0_(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z3cutP5snodeS0_(ptr noundef, ptr noundef) #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { noreturn 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 #6 = { nounwind }
attributes #7 = { noreturn 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 4}
!12 = !{!"_ZTS5snode", !6, i64 0, !6, i64 4, !10, i64 8, !7, i64 16, !13, i64 56, !7, i64 60, !7, i64 92, !7, i64 100}
!13 = !{!"bool", !7, i64 0}
!14 = !{!15, !6, i64 8}
!15 = !{!"_ZTS4info", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!16 = !{!15, !6, i64 12}
!17 = !{!15, !6, i64 4}
!18 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5, i64 12, i64 4, !5}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; 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.info = type { i32, i32, i32, i32 }

@M = external dso_local local_unnamed_addr global i32, align 4
@root = external dso_local local_unnamed_addr global i32, align 4
@LCT = external dso_local local_unnamed_addr global [100001 x ptr], align 16

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z6getParP5snode(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5snode6accessEv(ptr noundef nonnull align 8 dereferenceable(108)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5snode4propEv(ptr noundef nonnull align 8 dereferenceable(108)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7pathIncii(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7pathModii(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4initv() local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5input2reIiJiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z4linkP5snodeS0_(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2PSi(i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %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 %struct.info, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  tail call void @_Z4initv()
  %14 = load i32, ptr @M, align 4, !tbaa !5
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0
  %16 = getelementptr inbounds i8, ptr %9, i64 4
  %17 = getelementptr inbounds i8, ptr %9, i64 12
  %18 = getelementptr inbounds i8, ptr %9, i64 8
  br label %19

._crit_edge:                                      ; preds = %158, %0
  ret i32 0

19:                                               ; preds = %.lr.ph, %158
  %.02840 = phi i32 [ 0, %.lr.ph ], [ %159, %158 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) %1)
  %20 = load i32, ptr %1, align 4
  switch i32 %20, label %62 [
    i32 5, label %21
    i32 0, label %21
    i32 1, label %60
  ]

21:                                               ; preds = %19, %19
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @_ZN5input2reIiJiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %22 = load i32, ptr @root, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %23
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  call void @_ZN5snode8makeRootEv(ptr noundef nonnull align 8 dereferenceable(108) %25)
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %27
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  call void @_ZN5snode6accessEv(ptr noundef nonnull align 8 dereferenceable(108) %29)
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %31
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  %34 = getelementptr inbounds i8, ptr %33, i64 48
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  %36 = load i32, ptr %1, align 4, !tbaa !5
  %37 = icmp eq i32 %36, 0
  %.not39 = icmp eq ptr %35, null
  br i1 %37, label %38, label %47

38:                                               ; preds = %21
  br i1 %.not39, label %._crit_edge46, label %39

._crit_edge46:                                    ; preds = %38
  %.pre47 = load i32, ptr %3, align 4, !tbaa !5
  br label %43

39:                                               ; preds = %38
  call void @_ZN5snode4propEv(ptr noundef nonnull align 8 dereferenceable(108) %35)
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %35, i64 92
  %42 = getelementptr inbounds i8, ptr %35, i64 96
  store i32 %40, ptr %42, align 4, !tbaa !5
  store i32 %40, ptr %41, align 4, !tbaa !5
  %.pre48 = load i32, ptr %2, align 4, !tbaa !5
  %.phi.trans.insert49 = sext i32 %.pre48 to i64
  %.phi.trans.insert50 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %.phi.trans.insert49
  %.pre51 = load ptr, ptr %.phi.trans.insert50, align 8, !tbaa !9
  br label %43

43:                                               ; preds = %._crit_edge46, %39
  %44 = phi ptr [ %33, %._crit_edge46 ], [ %.pre51, %39 ]
  %45 = phi i32 [ %.pre47, %._crit_edge46 ], [ %40, %39 ]
  %46 = getelementptr inbounds i8, ptr %44, i64 4
  store i32 %45, ptr %46, align 4, !tbaa !11
  br label %58

47:                                               ; preds = %21
  br i1 %.not39, label %._crit_edge42, label %48

._crit_edge42:                                    ; preds = %47
  %.pre = load i32, ptr %3, align 4, !tbaa !5
  br label %52

48:                                               ; preds = %47
  call void @_ZN5snode4propEv(ptr noundef nonnull align 8 dereferenceable(108) %35)
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %35, i64 100
  %51 = getelementptr inbounds i8, ptr %35, i64 104
  store i32 %49, ptr %51, align 4, !tbaa !5
  store i32 %49, ptr %50, align 4, !tbaa !5
  %.pre43 = load i32, ptr %2, align 4, !tbaa !5
  %.phi.trans.insert = sext i32 %.pre43 to i64
  %.phi.trans.insert44 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %.phi.trans.insert
  %.pre45 = load ptr, ptr %.phi.trans.insert44, align 8, !tbaa !9
  br label %52

52:                                               ; preds = %._crit_edge42, %48
  %53 = phi ptr [ %33, %._crit_edge42 ], [ %.pre45, %48 ]
  %54 = phi i32 [ %.pre, %._crit_edge42 ], [ %49, %48 ]
  %55 = getelementptr inbounds i8, ptr %53, i64 4
  %56 = load i32, ptr %55, align 4, !tbaa !11
  %57 = add nsw i32 %56, %54
  store i32 %57, ptr %55, align 4, !tbaa !11
  br label %58

58:                                               ; preds = %52, %43
  %59 = phi ptr [ %53, %52 ], [ %44, %43 ]
  call void @_ZN5snode4calcEv(ptr noundef nonnull align 8 dereferenceable(108) %59)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  br label %158

60:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  call void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) %4)
  %61 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %61, ptr @root, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %158

62:                                               ; preds = %19
  %63 = and i32 %20, -5
  %or.cond3 = icmp eq i32 %63, 2
  br i1 %or.cond3, label %64, label %76

64:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  call void @_ZN5input2reIiJiiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %66
  %68 = load ptr, ptr %67, align 8, !tbaa !9
  call void @_ZN5snode8makeRootEv(ptr noundef nonnull align 8 dereferenceable(108) %68)
  %69 = load i32, ptr %1, align 4, !tbaa !5
  %70 = icmp eq i32 %69, 2
  %71 = load i32, ptr %6, align 4, !tbaa !5
  %72 = load i32, ptr %7, align 4, !tbaa !5
  br i1 %70, label %73, label %74

73:                                               ; preds = %64
  call void @_Z7pathModii(i32 noundef %71, i32 noundef %72)
  br label %75

74:                                               ; preds = %64
  call void @_Z7pathIncii(i32 noundef %71, i32 noundef %72)
  br label %75

75:                                               ; preds = %74, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %158

76:                                               ; preds = %62
  switch i32 %20, label %157 [
    i32 11, label %77
    i32 4, label %77
    i32 3, label %77
    i32 10, label %109
    i32 8, label %109
    i32 7, label %109
    i32 9, label %123
  ]

77:                                               ; preds = %76, %76, %76
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  call void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) %8)
  %78 = load i32, ptr @root, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !9
  call void @_ZN5snode8makeRootEv(ptr noundef nonnull align 8 dereferenceable(108) %81)
  %82 = load i32, ptr %8, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %83
  %85 = load ptr, ptr %84, align 8, !tbaa !9
  call void @_ZN5snode6accessEv(ptr noundef nonnull align 8 dereferenceable(108) %85)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  %86 = load i32, ptr %8, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %87
  %89 = load ptr, ptr %88, align 8, !tbaa !9
  %90 = getelementptr inbounds i8, ptr %89, i64 4
  %91 = load i32, ptr %90, align 4, !tbaa !11
  call void @_ZN4infoC2Ei(ptr noundef nonnull align 4 dereferenceable(16) %9, i32 noundef %91)
  %92 = load i32, ptr %8, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %93
  %95 = load ptr, ptr %94, align 8, !tbaa !9
  %96 = getelementptr inbounds i8, ptr %95, i64 48
  %97 = load ptr, ptr %96, align 8, !tbaa !9
  %.not37 = icmp eq ptr %97, null
  br i1 %.not37, label %103, label %98

98:                                               ; preds = %77
  call void @_ZN5snode4propEv(ptr noundef nonnull align 8 dereferenceable(108) %97)
  %99 = getelementptr inbounds i8, ptr %97, i64 60
  %100 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZpLR4infoRKS_(ptr noundef nonnull align 4 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(16) %99)
  %101 = getelementptr inbounds i8, ptr %97, i64 76
  %102 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZpLR4infoRKS_(ptr noundef nonnull align 4 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(16) %101)
  br label %103

103:                                              ; preds = %98, %77
  %104 = load i32, ptr %1, align 4, !tbaa !5
  switch i32 %104, label %108 [
    i32 3, label %.sink.split
    i32 4, label %105
    i32 11, label %106
  ]

105:                                              ; preds = %103
  br label %.sink.split

106:                                              ; preds = %103
  br label %.sink.split

.sink.split:                                      ; preds = %103, %106, %105
  %.sink54 = phi ptr [ %17, %105 ], [ %16, %106 ], [ %18, %103 ]
  %107 = load i32, ptr %.sink54, align 4, !tbaa !5
  call void @_Z2PSi(i32 noundef %107)
  br label %108

108:                                              ; preds = %.sink.split, %103
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  br label %158

109:                                              ; preds = %76, %76, %76
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  call void @_ZN5input2reIiJiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %110 = load i32, ptr %10, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %111
  %113 = load ptr, ptr %112, align 8, !tbaa !9
  call void @_ZN5snode8makeRootEv(ptr noundef nonnull align 8 dereferenceable(108) %113)
  %114 = load i32, ptr %11, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %115
  %117 = load ptr, ptr %116, align 8, !tbaa !9
  call void @_ZN5snode6accessEv(ptr noundef nonnull align 8 dereferenceable(108) %117)
  %118 = load i32, ptr %11, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %119
  %121 = load ptr, ptr %120, align 8, !tbaa !9
  %122 = load i32, ptr %1, align 4, !tbaa !5
  %switch.selectcmp = icmp eq i32 %122, 8
  %switch.select = select i1 %switch.selectcmp, i64 72, i64 64
  %switch.selectcmp55 = icmp eq i32 %122, 7
  %switch.select56 = select i1 %switch.selectcmp55, i64 68, i64 %switch.select
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %121, i64 %switch.select56
  %.sroa.5.0.copyload = load i32, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !5
  call void @_Z2PSi(i32 noundef %.sroa.5.0.copyload)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  br label %158

123:                                              ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #5
  call void @_ZN5input2reIiJiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %124 = load i32, ptr @root, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %125
  %127 = load ptr, ptr %126, align 8, !tbaa !9
  call void @_ZN5snode8makeRootEv(ptr noundef nonnull align 8 dereferenceable(108) %127)
  %128 = load i32, ptr %12, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %129
  %131 = load ptr, ptr %130, align 8, !tbaa !9
  %132 = load i32, ptr %13, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %133
  %135 = load ptr, ptr %134, align 8, !tbaa !9
  %136 = call noundef ptr @_Z3lcaP5snodeS0_(ptr noundef %131, ptr noundef %135)
  %137 = load i32, ptr %12, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %138
  %140 = load ptr, ptr %139, align 8, !tbaa !9
  %.not = icmp eq ptr %136, %140
  br i1 %.not, label %.critedge, label %141

141:                                              ; preds = %123
  %142 = call noundef ptr @_Z6getParP5snode(ptr noundef %140)
  %143 = load i32, ptr %12, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %144
  %146 = load ptr, ptr %145, align 8, !tbaa !9
  %147 = call noundef zeroext i1 @_Z3cutP5snodeS0_(ptr noundef %142, ptr noundef %146)
  %148 = load i32, ptr %12, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %149
  %151 = load ptr, ptr %150, align 8, !tbaa !9
  %152 = load i32, ptr %13, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [100001 x ptr], ptr @LCT, i64 0, i64 %153
  %155 = load ptr, ptr %154, align 8, !tbaa !9
  %156 = call noundef zeroext i1 @_Z4linkP5snodeS0_(ptr noundef %151, ptr noundef %155)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  br label %158

157:                                              ; preds = %76
  call void @exit(i32 noundef 5) #6
  unreachable

.critedge:                                        ; preds = %123
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  br label %158

158:                                              ; preds = %141, %58, %75, %109, %108, %60, %.critedge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  %159 = add nuw nsw i32 %.02840, 1
  %160 = load i32, ptr @M, align 4, !tbaa !5
  %161 = icmp slt i32 %159, %160
  br i1 %161, label %19, label %._crit_edge, !llvm.loop !14
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5snode8makeRootEv(ptr noundef nonnull align 8 dereferenceable(108)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5snode4calcEv(ptr noundef nonnull align 8 dereferenceable(108)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5input2reIiJiiEEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4infoC2Ei(ptr noundef nonnull align 4 dereferenceable(16), i32 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z3lcaP5snodeS0_(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z3cutP5snodeS0_(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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 4}
!12 = !{!"_ZTS5snode", !6, i64 0, !6, i64 4, !10, i64 8, !7, i64 16, !13, i64 56, !7, i64 60, !7, i64 92, !7, i64 100}
!13 = !{!"bool", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass