; LLVM IR from tangjz/acm-icpc :: TDL_training/2016-07-08/G - Voting - tjz.ll (Z3dfsi)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Status = type { i32, i32, i32 }
%struct.Node = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@p = external dso_local global i32, align 4
@f = external dso_local global [10010 x [4 x i32]], align 16
@e = external dso_local global [10010 x %"class.std::vector"], align 16
@idx = external dso_local global [21 x [21 x [21 x i32]]], align 16
@status = external dso_local global [1771 x %struct.Status], align 16
@tot = external dso_local global i32, align 4
@lnk = external dso_local global [10010 x i32], align 16
@nxt = external dso_local global [10010 x i32], align 16
@h = external dso_local global [10010 x [1771 x %struct.Node]], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3dfsi(i32 noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %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 ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [10010 x %"class.std::vector"], ptr @e, i64 0, i64 %21
  %23 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #4
  %24 = icmp ne i64 %23, 0
  br i1 %24, label %26, label %25

25:                                               ; preds = %1
  br label %359

26:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [10010 x %"class.std::vector"], ptr @e, i64 0, i64 %28
  %30 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #4
  %31 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %3, i32 0, i32 0
  store ptr %30, ptr %31, align 8
  br label %32

32:                                               ; preds = %228, %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [10010 x %"class.std::vector"], ptr @e, i64 0, i64 %34
  %36 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #4
  %37 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %4, i32 0, i32 0
  store ptr %36, ptr %37, align 8
  %38 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br i1 %38, label %40, label %39

39:                                               ; preds = %32
  store i32 2, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %230

40:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  store ptr %41, ptr %6, align 8, !tbaa !9
  %42 = load ptr, ptr %6, align 8, !tbaa !9
  %43 = load i32, ptr %42, align 4, !tbaa !5
  call void @_Z3dfsi(i32 noundef %43)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [10010 x i32], ptr @lnk, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [10010 x [1771 x %struct.Node]], ptr @h, i64 0, i64 %48
  %50 = getelementptr inbounds [1771 x %struct.Node], ptr %49, i64 0, i64 0
  store ptr %50, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %51 = load i32, ptr @tot, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [10010 x [1771 x %struct.Node]], ptr @h, i64 0, i64 %52
  %54 = getelementptr inbounds [1771 x %struct.Node], ptr %53, i64 0, i64 0
  store ptr %54, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %212, %40
  %56 = load i32, ptr %9, align 4, !tbaa !5
  %57 = icmp slt i32 %56, 1771
  br i1 %57, label %59, label %58

58:                                               ; preds = %55
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %215

59:                                               ; preds = %55
  %60 = load ptr, ptr %7, align 8, !tbaa !9
  %61 = load i32, ptr %9, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds %struct.Node, ptr %60, i64 %62
  %64 = getelementptr inbounds %struct.Node, ptr %63, i32 0, i32 1
  %65 = load i32, ptr %64, align 4, !tbaa !11
  %66 = icmp eq i32 %65, -1
  br i1 %66, label %77, label %67

67:                                               ; preds = %59
  %68 = load i32, ptr @p, align 4, !tbaa !5
  %69 = icmp eq i32 %68, 2
  br i1 %69, label %70, label %78

70:                                               ; preds = %67
  %71 = load i32, ptr %9, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [1771 x %struct.Status], ptr @status, i64 0, i64 %72
  %74 = getelementptr inbounds %struct.Status, ptr %73, i32 0, i32 2
  %75 = load i32, ptr %74, align 4, !tbaa !13
  %76 = icmp sgt i32 %75, 0
  br i1 %76, label %77, label %78

77:                                               ; preds = %70, %59
  br label %212

78:                                               ; preds = %70, %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %79 = load i32, ptr %9, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [1771 x %struct.Status], ptr @status, i64 0, i64 %80
  %82 = getelementptr inbounds %struct.Status, ptr %81, i32 0, i32 0
  %83 = load i32, ptr %82, align 4, !tbaa !15
  store i32 %83, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %84 = load i32, ptr %9, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [1771 x %struct.Status], ptr @status, i64 0, i64 %85
  %87 = getelementptr inbounds %struct.Status, ptr %86, i32 0, i32 1
  %88 = load i32, ptr %87, align 4, !tbaa !16
  store i32 %88, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %89 = load i32, ptr %9, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [1771 x %struct.Status], ptr @status, i64 0, i64 %90
  %92 = getelementptr inbounds %struct.Status, ptr %91, i32 0, i32 2
  %93 = load i32, ptr %92, align 4, !tbaa !13
  store i32 %93, ptr %12, align 4, !tbaa !5
  %94 = load ptr, ptr %6, align 8, !tbaa !9
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %96
  %98 = getelementptr inbounds [4 x i32], ptr %97, i64 0, i64 0
  %99 = load i32, ptr %98, align 16, !tbaa !5
  %100 = icmp ne i32 %99, -1
  br i1 %100, label %101, label %121

101:                                              ; preds = %78
  %102 = load ptr, ptr %8, align 8, !tbaa !9
  %103 = load i32, ptr %10, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [21 x [21 x [21 x i32]]], ptr @idx, i64 0, i64 %104
  %106 = load i32, ptr %11, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [21 x [21 x i32]], ptr %105, i64 0, i64 %107
  %109 = load i32, ptr %12, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [21 x i32], ptr %108, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = load ptr, ptr %7, align 8, !tbaa !9
  %114 = load i32, ptr %9, align 4, !tbaa !5
  %115 = load ptr, ptr %6, align 8, !tbaa !9
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %117
  %119 = getelementptr inbounds [4 x i32], ptr %118, i64 0, i64 0
  %120 = load i32, ptr %119, align 16, !tbaa !5
  call void @_Z3updP4NodeiS0_ii(ptr noundef %102, i32 noundef %112, ptr noundef %113, i32 noundef %114, i32 noundef %120)
  br label %121

121:                                              ; preds = %101, %78
  %122 = load ptr, ptr %6, align 8, !tbaa !9
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %124
  %126 = getelementptr inbounds [4 x i32], ptr %125, i64 0, i64 1
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %128 = icmp ne i32 %127, -1
  br i1 %128, label %129, label %150

129:                                              ; preds = %121
  %130 = load ptr, ptr %8, align 8, !tbaa !9
  %131 = load i32, ptr %10, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [21 x [21 x [21 x i32]]], ptr @idx, i64 0, i64 %133
  %135 = load i32, ptr %11, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [21 x [21 x i32]], ptr %134, i64 0, i64 %136
  %138 = load i32, ptr %12, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [21 x i32], ptr %137, i64 0, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !5
  %142 = load ptr, ptr %7, align 8, !tbaa !9
  %143 = load i32, ptr %9, align 4, !tbaa !5
  %144 = load ptr, ptr %6, align 8, !tbaa !9
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %146
  %148 = getelementptr inbounds [4 x i32], ptr %147, i64 0, i64 1
  %149 = load i32, ptr %148, align 4, !tbaa !5
  call void @_Z3updP4NodeiS0_ii(ptr noundef %130, i32 noundef %141, ptr noundef %142, i32 noundef %143, i32 noundef %149)
  br label %150

150:                                              ; preds = %129, %121
  %151 = load ptr, ptr %6, align 8, !tbaa !9
  %152 = load i32, ptr %151, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %153
  %155 = getelementptr inbounds [4 x i32], ptr %154, i64 0, i64 2
  %156 = load i32, ptr %155, align 8, !tbaa !5
  %157 = icmp ne i32 %156, -1
  br i1 %157, label %158, label %179

158:                                              ; preds = %150
  %159 = load ptr, ptr %8, align 8, !tbaa !9
  %160 = load i32, ptr %10, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [21 x [21 x [21 x i32]]], ptr @idx, i64 0, i64 %161
  %163 = load i32, ptr %11, align 4, !tbaa !5
  %164 = add nsw i32 %163, 1
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [21 x [21 x i32]], ptr %162, i64 0, i64 %165
  %167 = load i32, ptr %12, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [21 x i32], ptr %166, i64 0, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = load ptr, ptr %7, align 8, !tbaa !9
  %172 = load i32, ptr %9, align 4, !tbaa !5
  %173 = load ptr, ptr %6, align 8, !tbaa !9
  %174 = load i32, ptr %173, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %175
  %177 = getelementptr inbounds [4 x i32], ptr %176, i64 0, i64 2
  %178 = load i32, ptr %177, align 8, !tbaa !5
  call void @_Z3updP4NodeiS0_ii(ptr noundef %159, i32 noundef %170, ptr noundef %171, i32 noundef %172, i32 noundef %178)
  br label %179

179:                                              ; preds = %158, %150
  %180 = load i32, ptr @p, align 4, !tbaa !5
  %181 = icmp eq i32 %180, 3
  br i1 %181, label %182, label %211

182:                                              ; preds = %179
  %183 = load ptr, ptr %6, align 8, !tbaa !9
  %184 = load i32, ptr %183, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %185
  %187 = getelementptr inbounds [4 x i32], ptr %186, i64 0, i64 3
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = icmp ne i32 %188, -1
  br i1 %189, label %190, label %211

190:                                              ; preds = %182
  %191 = load ptr, ptr %8, align 8, !tbaa !9
  %192 = load i32, ptr %10, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [21 x [21 x [21 x i32]]], ptr @idx, i64 0, i64 %193
  %195 = load i32, ptr %11, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [21 x [21 x i32]], ptr %194, i64 0, i64 %196
  %198 = load i32, ptr %12, align 4, !tbaa !5
  %199 = add nsw i32 %198, 1
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [21 x i32], ptr %197, i64 0, i64 %200
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = load ptr, ptr %7, align 8, !tbaa !9
  %204 = load i32, ptr %9, align 4, !tbaa !5
  %205 = load ptr, ptr %6, align 8, !tbaa !9
  %206 = load i32, ptr %205, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %207
  %209 = getelementptr inbounds [4 x i32], ptr %208, i64 0, i64 3
  %210 = load i32, ptr %209, align 4, !tbaa !5
  call void @_Z3updP4NodeiS0_ii(ptr noundef %191, i32 noundef %202, ptr noundef %203, i32 noundef %204, i32 noundef %210)
  br label %211

211:                                              ; preds = %190, %182, %179
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %212

212:                                              ; preds = %211, %77
  %213 = load i32, ptr %9, align 4, !tbaa !5
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %9, align 4, !tbaa !5
  br label %55, !llvm.loop !17

215:                                              ; preds = %58
  %216 = load i32, ptr %2, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [10010 x i32], ptr @lnk, i64 0, i64 %217
  %219 = load i32, ptr %218, align 4, !tbaa !5
  %220 = load i32, ptr @tot, align 4, !tbaa !5
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [10010 x i32], ptr @nxt, i64 0, i64 %221
  store i32 %219, ptr %222, align 4, !tbaa !5
  %223 = load i32, ptr @tot, align 4, !tbaa !5
  %224 = add nsw i32 %223, 1
  store i32 %224, ptr @tot, align 4, !tbaa !5
  %225 = load i32, ptr %2, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [10010 x i32], ptr @lnk, i64 0, i64 %226
  store i32 %223, ptr %227, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %228

228:                                              ; preds = %215
  %229 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  br label %32, !llvm.loop !19

230:                                              ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %231 = load i32, ptr %2, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [10010 x i32], ptr @lnk, i64 0, i64 %232
  %234 = load i32, ptr %233, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [10010 x [1771 x %struct.Node]], ptr @h, i64 0, i64 %235
  %237 = getelementptr inbounds [1771 x %struct.Node], ptr %236, i64 0, i64 0
  store ptr %237, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %238

238:                                              ; preds = %355, %230
  %239 = load i32, ptr %14, align 4, !tbaa !5
  %240 = icmp slt i32 %239, 1771
  br i1 %240, label %242, label %241

241:                                              ; preds = %238
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %358

242:                                              ; preds = %238
  %243 = load ptr, ptr %13, align 8, !tbaa !9
  %244 = load i32, ptr %14, align 4, !tbaa !5
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds %struct.Node, ptr %243, i64 %245
  %247 = getelementptr inbounds %struct.Node, ptr %246, i32 0, i32 1
  %248 = load i32, ptr %247, align 4, !tbaa !11
  %249 = icmp eq i32 %248, -1
  br i1 %249, label %260, label %250

250:                                              ; preds = %242
  %251 = load i32, ptr @p, align 4, !tbaa !5
  %252 = icmp eq i32 %251, 2
  br i1 %252, label %253, label %261

253:                                              ; preds = %250
  %254 = load i32, ptr %14, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [1771 x %struct.Status], ptr @status, i64 0, i64 %255
  %257 = getelementptr inbounds %struct.Status, ptr %256, i32 0, i32 2
  %258 = load i32, ptr %257, align 4, !tbaa !13
  %259 = icmp sgt i32 %258, 0
  br i1 %259, label %260, label %261

260:                                              ; preds = %253, %242
  br label %355

261:                                              ; preds = %253, %250
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %262 = load i32, ptr %14, align 4, !tbaa !5
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [1771 x %struct.Status], ptr @status, i64 0, i64 %263
  %265 = getelementptr inbounds %struct.Status, ptr %264, i32 0, i32 0
  %266 = load i32, ptr %265, align 4, !tbaa !15
  store i32 %266, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %267 = load i32, ptr %14, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [1771 x %struct.Status], ptr @status, i64 0, i64 %268
  %270 = getelementptr inbounds %struct.Status, ptr %269, i32 0, i32 1
  %271 = load i32, ptr %270, align 4, !tbaa !16
  store i32 %271, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %272 = load i32, ptr %14, align 4, !tbaa !5
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds [1771 x %struct.Status], ptr @status, i64 0, i64 %273
  %275 = getelementptr inbounds %struct.Status, ptr %274, i32 0, i32 2
  %276 = load i32, ptr %275, align 4, !tbaa !13
  store i32 %276, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %277 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %278 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %277)
  %279 = load i32, ptr %278, align 4, !tbaa !5
  store i32 %279, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %280 = load i32, ptr %18, align 4, !tbaa !5
  %281 = load i32, ptr %15, align 4, !tbaa !5
  %282 = icmp eq i32 %280, %281
  %283 = zext i1 %282 to i32
  %284 = load i32, ptr %18, align 4, !tbaa !5
  %285 = load i32, ptr %16, align 4, !tbaa !5
  %286 = icmp eq i32 %284, %285
  %287 = zext i1 %286 to i32
  %288 = add nsw i32 %283, %287
  %289 = load i32, ptr %18, align 4, !tbaa !5
  %290 = load i32, ptr %17, align 4, !tbaa !5
  %291 = icmp eq i32 %289, %290
  %292 = zext i1 %291 to i32
  %293 = add nsw i32 %288, %292
  store i32 %293, ptr %19, align 4, !tbaa !5
  %294 = load i32, ptr %19, align 4, !tbaa !5
  %295 = icmp sgt i32 %294, 1
  br i1 %295, label %296, label %307

296:                                              ; preds = %261
  %297 = load i32, ptr %2, align 4, !tbaa !5
  %298 = sext i32 %297 to i64
  %299 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %298
  %300 = getelementptr inbounds [4 x i32], ptr %299, i64 0, i64 0
  %301 = load ptr, ptr %13, align 8, !tbaa !9
  %302 = load i32, ptr %14, align 4, !tbaa !5
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds %struct.Node, ptr %301, i64 %303
  %305 = getelementptr inbounds %struct.Node, ptr %304, i32 0, i32 1
  %306 = load i32, ptr %305, align 4, !tbaa !11
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %300, i32 noundef %306)
  br label %354

307:                                              ; preds = %261
  %308 = load i32, ptr %18, align 4, !tbaa !5
  %309 = load i32, ptr %15, align 4, !tbaa !5
  %310 = icmp eq i32 %308, %309
  br i1 %310, label %311, label %322

311:                                              ; preds = %307
  %312 = load i32, ptr %2, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %313
  %315 = getelementptr inbounds [4 x i32], ptr %314, i64 0, i64 1
  %316 = load ptr, ptr %13, align 8, !tbaa !9
  %317 = load i32, ptr %14, align 4, !tbaa !5
  %318 = sext i32 %317 to i64
  %319 = getelementptr inbounds %struct.Node, ptr %316, i64 %318
  %320 = getelementptr inbounds %struct.Node, ptr %319, i32 0, i32 1
  %321 = load i32, ptr %320, align 4, !tbaa !11
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %315, i32 noundef %321)
  br label %353

322:                                              ; preds = %307
  %323 = load i32, ptr %18, align 4, !tbaa !5
  %324 = load i32, ptr %16, align 4, !tbaa !5
  %325 = icmp eq i32 %323, %324
  br i1 %325, label %326, label %337

326:                                              ; preds = %322
  %327 = load i32, ptr %2, align 4, !tbaa !5
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %328
  %330 = getelementptr inbounds [4 x i32], ptr %329, i64 0, i64 2
  %331 = load ptr, ptr %13, align 8, !tbaa !9
  %332 = load i32, ptr %14, align 4, !tbaa !5
  %333 = sext i32 %332 to i64
  %334 = getelementptr inbounds %struct.Node, ptr %331, i64 %333
  %335 = getelementptr inbounds %struct.Node, ptr %334, i32 0, i32 1
  %336 = load i32, ptr %335, align 4, !tbaa !11
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %330, i32 noundef %336)
  br label %352

337:                                              ; preds = %322
  %338 = load i32, ptr @p, align 4, !tbaa !5
  %339 = icmp eq i32 %338, 3
  br i1 %339, label %340, label %351

340:                                              ; preds = %337
  %341 = load i32, ptr %2, align 4, !tbaa !5
  %342 = sext i32 %341 to i64
  %343 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %342
  %344 = getelementptr inbounds [4 x i32], ptr %343, i64 0, i64 3
  %345 = load ptr, ptr %13, align 8, !tbaa !9
  %346 = load i32, ptr %14, align 4, !tbaa !5
  %347 = sext i32 %346 to i64
  %348 = getelementptr inbounds %struct.Node, ptr %345, i64 %347
  %349 = getelementptr inbounds %struct.Node, ptr %348, i32 0, i32 1
  %350 = load i32, ptr %349, align 4, !tbaa !11
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %344, i32 noundef %350)
  br label %351

351:                                              ; preds = %340, %337
  br label %352

352:                                              ; preds = %351, %326
  br label %353

353:                                              ; preds = %352, %311
  br label %354

354:                                              ; preds = %353, %296
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %355

355:                                              ; preds = %354, %260
  %356 = load i32, ptr %14, align 4, !tbaa !5
  %357 = add nsw i32 %356, 1
  store i32 %357, ptr %14, align 4, !tbaa !5
  br label %238, !llvm.loop !20

358:                                              ; preds = %241
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %359

359:                                              ; preds = %358, %25
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #3

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 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"_ZTS4Node", !6, i64 0, !6, i64 4}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTS6Status", !6, i64 0, !6, i64 4, !6, i64 8}
!15 = !{!14, !6, i64 0}
!16 = !{!14, !6, i64 4}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Status = type { i32, i32, i32 }
%struct.Node = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@p = external dso_local local_unnamed_addr global i32, align 4
@f = external dso_local global [10010 x [4 x i32]], align 16
@e = external dso_local global [10010 x %"class.std::vector"], align 16
@idx = external dso_local local_unnamed_addr global [21 x [21 x [21 x i32]]], align 16
@status = external dso_local local_unnamed_addr global [1771 x %struct.Status], align 16
@tot = external dso_local local_unnamed_addr global i32, align 4
@lnk = external dso_local local_unnamed_addr global [10010 x i32], align 16
@nxt = external dso_local local_unnamed_addr global [10010 x i32], align 16
@h = external dso_local global [10010 x [1771 x %struct.Node]], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z3dfsi(i32 noundef %0) local_unnamed_addr #0 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = sext i32 %0 to i64
  %8 = getelementptr inbounds [10010 x %"class.std::vector"], ptr @e, i64 0, i64 %7
  %9 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #3
  %.not = icmp eq i64 %9, 0
  br i1 %.not, label %.loopexit, label %10

10:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #3
  %11 = tail call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #3
  store ptr %11, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  %12 = tail call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #3
  store ptr %12, ptr %3, align 8
  %13 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  br i1 %13, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %10
  %14 = getelementptr inbounds [10010 x i32], ptr @lnk, i64 0, i64 %7
  br label %23

._crit_edge:                                      ; preds = %32, %10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #3
  %15 = getelementptr inbounds [10010 x i32], ptr @lnk, i64 0, i64 %7
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [10010 x [1771 x %struct.Node]], ptr @h, i64 0, i64 %17
  %19 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %7, i64 3
  %20 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %7, i64 2
  %21 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %7, i64 1
  %22 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %7
  br label %105

23:                                               ; preds = %.lr.ph, %32
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #3
  %25 = load i32, ptr %24, align 4, !tbaa !5
  call void @_Z3dfsi(i32 noundef %25)
  %26 = load i32, ptr %14, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [10010 x [1771 x %struct.Node]], ptr @h, i64 0, i64 %27
  %29 = load i32, ptr @tot, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [10010 x [1771 x %struct.Node]], ptr @h, i64 0, i64 %30
  br label %41

32:                                               ; preds = %104
  %33 = load i32, ptr %14, align 4, !tbaa !5
  %34 = load i32, ptr @tot, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [10010 x i32], ptr @nxt, i64 0, i64 %35
  store i32 %33, ptr %36, align 4, !tbaa !5
  %37 = add nsw i32 %34, 1
  store i32 %37, ptr @tot, align 4, !tbaa !5
  store i32 %34, ptr %14, align 4, !tbaa !5
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  %39 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #3
  store ptr %39, ptr %3, align 8
  %40 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  br i1 %40, label %23, label %._crit_edge, !llvm.loop !9

41:                                               ; preds = %23, %104
  %indvars.iv = phi i64 [ 0, %23 ], [ %indvars.iv.next, %104 ]
  %42 = getelementptr inbounds %struct.Node, ptr %28, i64 %indvars.iv, i32 1
  %43 = load i32, ptr %42, align 4, !tbaa !11
  %44 = icmp eq i32 %43, -1
  br i1 %44, label %104, label %45

45:                                               ; preds = %41
  %46 = load i32, ptr @p, align 4, !tbaa !5
  %47 = icmp eq i32 %46, 2
  %48 = getelementptr inbounds [1771 x %struct.Status], ptr @status, i64 0, i64 %indvars.iv, i32 2
  %49 = load i32, ptr %48, align 4, !tbaa !13
  %50 = icmp sgt i32 %49, 0
  %or.cond = select i1 %47, i1 %50, i1 false
  br i1 %or.cond, label %104, label %._crit_edge89

._crit_edge89:                                    ; preds = %45
  %51 = getelementptr inbounds [1771 x %struct.Status], ptr @status, i64 0, i64 %indvars.iv
  %52 = load i32, ptr %51, align 4, !tbaa !15
  %53 = getelementptr inbounds i8, ptr %51, i64 4
  %54 = load i32, ptr %53, align 4, !tbaa !16
  %55 = load i32, ptr %24, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %56
  %58 = load i32, ptr %57, align 16, !tbaa !5
  %.not78 = icmp eq i32 %58, -1
  br i1 %.not78, label %66, label %59

59:                                               ; preds = %._crit_edge89
  %60 = sext i32 %52 to i64
  %61 = sext i32 %54 to i64
  %62 = sext i32 %49 to i64
  %63 = getelementptr inbounds [21 x [21 x [21 x i32]]], ptr @idx, i64 0, i64 %60, i64 %61, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = trunc nuw nsw i64 %indvars.iv to i32
  call void @_Z3updP4NodeiS0_ii(ptr noundef nonnull %31, i32 noundef %64, ptr noundef nonnull %28, i32 noundef %65, i32 noundef %58)
  %.pre91 = load i32, ptr %24, align 4, !tbaa !5
  %.pre97 = sext i32 %.pre91 to i64
  br label %66

66:                                               ; preds = %59, %._crit_edge89
  %.pre-phi = phi i64 [ %.pre97, %59 ], [ %56, %._crit_edge89 ]
  %67 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %.pre-phi, i64 1
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %.not79 = icmp eq i32 %68, -1
  br i1 %.not79, label %77, label %69

69:                                               ; preds = %66
  %70 = add nsw i32 %52, 1
  %71 = sext i32 %70 to i64
  %72 = sext i32 %54 to i64
  %73 = sext i32 %49 to i64
  %74 = getelementptr inbounds [21 x [21 x [21 x i32]]], ptr @idx, i64 0, i64 %71, i64 %72, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = trunc nuw nsw i64 %indvars.iv to i32
  call void @_Z3updP4NodeiS0_ii(ptr noundef nonnull %31, i32 noundef %75, ptr noundef nonnull %28, i32 noundef %76, i32 noundef %68)
  %.pre92 = load i32, ptr %24, align 4, !tbaa !5
  %.pre98 = sext i32 %.pre92 to i64
  br label %77

77:                                               ; preds = %69, %66
  %.pre-phi99 = phi i64 [ %.pre98, %69 ], [ %.pre-phi, %66 ]
  %78 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %.pre-phi99, i64 2
  %79 = load i32, ptr %78, align 8, !tbaa !5
  %.not80 = icmp eq i32 %79, -1
  br i1 %.not80, label %88, label %80

80:                                               ; preds = %77
  %81 = sext i32 %52 to i64
  %82 = add nsw i32 %54, 1
  %83 = sext i32 %82 to i64
  %84 = sext i32 %49 to i64
  %85 = getelementptr inbounds [21 x [21 x [21 x i32]]], ptr @idx, i64 0, i64 %81, i64 %83, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = trunc nuw nsw i64 %indvars.iv to i32
  call void @_Z3updP4NodeiS0_ii(ptr noundef nonnull %31, i32 noundef %86, ptr noundef nonnull %28, i32 noundef %87, i32 noundef %79)
  br label %88

88:                                               ; preds = %80, %77
  %89 = load i32, ptr @p, align 4, !tbaa !5
  %90 = icmp eq i32 %89, 3
  br i1 %90, label %91, label %104

91:                                               ; preds = %88
  %92 = load i32, ptr %24, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [10010 x [4 x i32]], ptr @f, i64 0, i64 %93, i64 3
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %.not81 = icmp eq i32 %95, -1
  br i1 %.not81, label %104, label %96

96:                                               ; preds = %91
  %97 = sext i32 %52 to i64
  %98 = sext i32 %54 to i64
  %99 = add nsw i32 %49, 1
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [21 x [21 x [21 x i32]]], ptr @idx, i64 0, i64 %97, i64 %98, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = trunc nuw nsw i64 %indvars.iv to i32
  call void @_Z3updP4NodeiS0_ii(ptr noundef nonnull %31, i32 noundef %102, ptr noundef nonnull %28, i32 noundef %103, i32 noundef %95)
  br label %104

104:                                              ; preds = %45, %88, %91, %96, %41
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 1771
  br i1 %exitcond.not, label %32, label %41, !llvm.loop !17

105:                                              ; preds = %._crit_edge, %139
  %indvars.iv85 = phi i64 [ 0, %._crit_edge ], [ %indvars.iv.next86, %139 ]
  %106 = getelementptr inbounds %struct.Node, ptr %18, i64 %indvars.iv85, i32 1
  %107 = load i32, ptr %106, align 4, !tbaa !11
  %108 = icmp eq i32 %107, -1
  br i1 %108, label %139, label %109

109:                                              ; preds = %105
  %110 = load i32, ptr @p, align 4, !tbaa !5
  %111 = icmp eq i32 %110, 2
  %112 = getelementptr inbounds [1771 x %struct.Status], ptr @status, i64 0, i64 %indvars.iv85, i32 2
  %113 = load i32, ptr %112, align 4, !tbaa !13
  %114 = icmp sgt i32 %113, 0
  %or.cond100 = select i1 %111, i1 %114, i1 false
  br i1 %or.cond100, label %139, label %._crit_edge93

._crit_edge93:                                    ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  %115 = getelementptr inbounds [1771 x %struct.Status], ptr @status, i64 0, i64 %indvars.iv85
  %116 = load i32, ptr %115, align 4, !tbaa !15
  store i32 %116, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  %117 = getelementptr inbounds i8, ptr %115, i64 4
  %118 = load i32, ptr %117, align 4, !tbaa !16
  store i32 %118, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  store i32 %113, ptr %6, align 4, !tbaa !5
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %120 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %119)
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = load i32, ptr %4, align 4, !tbaa !5
  %123 = icmp eq i32 %121, %122
  %124 = zext i1 %123 to i32
  %125 = load i32, ptr %5, align 4, !tbaa !5
  %126 = icmp eq i32 %121, %125
  %127 = zext i1 %126 to i32
  %128 = add nuw nsw i32 %127, %124
  %129 = load i32, ptr %6, align 4, !tbaa !5
  %130 = icmp eq i32 %121, %129
  %131 = zext i1 %130 to i32
  %132 = add nuw nsw i32 %128, %131
  %133 = icmp ugt i32 %132, 1
  %brmerge = or i1 %133, %123
  %brmerge102 = or i1 %brmerge, %126
  %.mux = select i1 %123, ptr %21, ptr %20
  %.mux.mux = select i1 %133, ptr %22, ptr %.mux
  br i1 %brmerge102, label %.sink.split, label %134

134:                                              ; preds = %._crit_edge93
  %135 = load i32, ptr @p, align 4, !tbaa !5
  %136 = icmp eq i32 %135, 3
  br i1 %136, label %.sink.split, label %138

.sink.split:                                      ; preds = %._crit_edge93, %134
  %.sink = phi ptr [ %.mux.mux, %._crit_edge93 ], [ %19, %134 ]
  %137 = load i32, ptr %106, align 4, !tbaa !11
  call void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4) %.sink, i32 noundef %137)
  br label %138

138:                                              ; preds = %.sink.split, %134
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  br label %139

139:                                              ; preds = %109, %105, %138
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %exitcond88.not = icmp eq i64 %indvars.iv.next86, 1771
  br i1 %exitcond88.not, label %.loopexit, label %105, !llvm.loop !18

.loopexit:                                        ; preds = %139, %1
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z3updP4NodeiS0_ii(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z3updRii(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #2

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


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