; LLVM IR from upupming/algorithm :: CCCC-GPLT/L3-007. 天梯地图  (main)

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

@dis = external dso_local global [510 x i32], align 16
@Time = external dso_local global [510 x i32], align 16
@e = external dso_local global [510 x [510 x i32]], align 16
@w = external dso_local global [510 x [510 x i32]], align 16
@Timepre = external dso_local global [510 x i32], align 16
@weight = external dso_local global [510 x i32], align 16
@visit = external dso_local global [510 x i8], align 16
@Timepath = external dso_local global %"class.std::vector", align 8
@dispath = external dso_local global %"class.std::vector", align 8
@dispre = external dso_local global [510 x %"class.std::vector"], align 16
@st = external dso_local global i32, align 4
@fin = external dso_local global i32, align 4
@_ZL3inf = external hidden constant i32, align 4
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11dfsTimepathi(i32 noundef) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z10dfsdispathi(i32 noundef) #0

; 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 noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #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 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 i32, align 4
  %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 i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @dis, ptr noundef getelementptr inbounds (i32, ptr @dis, i64 510), ptr noundef nonnull align 4 dereferenceable(4) @_ZL3inf)
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @Time, ptr noundef getelementptr inbounds (i32, ptr @Time, i64 510), ptr noundef nonnull align 4 dereferenceable(4) @_ZL3inf)
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @weight, ptr noundef getelementptr inbounds (i32, ptr @weight, i64 510), ptr noundef nonnull align 4 dereferenceable(4) @_ZL3inf)
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @e, ptr noundef getelementptr inbounds (i32, ptr @e, i64 260100), ptr noundef nonnull align 4 dereferenceable(4) @_ZL3inf)
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @w, ptr noundef getelementptr inbounds (i32, ptr @w, i64 260100), ptr noundef nonnull align 4 dereferenceable(4) @_ZL3inf)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %65, %0
  %27 = load i32, ptr %9, align 4, !tbaa !5
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %68

31:                                               ; preds = %26
  %32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8)
  %33 = load i32, ptr %7, align 4, !tbaa !5
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [510 x [510 x i32]], ptr @e, i64 0, i64 %35
  %37 = load i32, ptr %5, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [510 x i32], ptr %36, i64 0, i64 %38
  store i32 %33, ptr %39, align 4, !tbaa !5
  %40 = load i32, ptr %8, align 4, !tbaa !5
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [510 x [510 x i32]], ptr @w, i64 0, i64 %42
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [510 x i32], ptr %43, i64 0, i64 %45
  store i32 %40, ptr %46, align 4, !tbaa !5
  %47 = load i32, ptr %6, align 4, !tbaa !5
  %48 = icmp ne i32 %47, 1
  br i1 %48, label %49, label %64

49:                                               ; preds = %31
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [510 x [510 x i32]], ptr @e, i64 0, i64 %52
  %54 = load i32, ptr %4, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [510 x i32], ptr %53, i64 0, i64 %55
  store i32 %50, ptr %56, align 4, !tbaa !5
  %57 = load i32, ptr %8, align 4, !tbaa !5
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [510 x [510 x i32]], ptr @w, i64 0, i64 %59
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [510 x i32], ptr %60, i64 0, i64 %62
  store i32 %57, ptr %63, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %49, %31
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %9, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %9, align 4, !tbaa !5
  br label %26, !llvm.loop !9

68:                                               ; preds = %30
  %69 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @st, ptr noundef @fin)
  %70 = load i32, ptr @st, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [510 x i32], ptr @Time, i64 0, i64 %71
  store i32 0, ptr %72, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %83, %68
  %74 = load i32, ptr %10, align 4, !tbaa !5
  %75 = load i32, ptr %2, align 4, !tbaa !5
  %76 = icmp slt i32 %74, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %86

78:                                               ; preds = %73
  %79 = load i32, ptr %10, align 4, !tbaa !5
  %80 = load i32, ptr %10, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [510 x i32], ptr @Timepre, i64 0, i64 %81
  store i32 %79, ptr %82, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %78
  %84 = load i32, ptr %10, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %10, align 4, !tbaa !5
  br label %73, !llvm.loop !11

86:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %272, %86
  %88 = load i32, ptr %11, align 4, !tbaa !5
  %89 = load i32, ptr %2, align 4, !tbaa !5
  %90 = icmp slt i32 %88, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %87
  store i32 8, ptr %12, align 4
  br label %275

92:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 -1, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 999999999, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %120, %92
  %94 = load i32, ptr %15, align 4, !tbaa !5
  %95 = load i32, ptr %2, align 4, !tbaa !5
  %96 = icmp slt i32 %94, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %93
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %123

98:                                               ; preds = %93
  %99 = load i32, ptr %15, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [510 x i8], ptr @visit, i64 0, i64 %100
  %102 = load i8, ptr %101, align 1, !tbaa !12, !range !14, !noundef !15
  %103 = trunc i8 %102 to i1
  %104 = zext i1 %103 to i32
  %105 = icmp eq i32 %104, 0
  br i1 %105, label %106, label %119

106:                                              ; preds = %98
  %107 = load i32, ptr %15, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [510 x i32], ptr @Time, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = load i32, ptr %14, align 4, !tbaa !5
  %112 = icmp slt i32 %110, %111
  br i1 %112, label %113, label %119

113:                                              ; preds = %106
  %114 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %114, ptr %13, align 4, !tbaa !5
  %115 = load i32, ptr %15, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [510 x i32], ptr @Time, i64 0, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !5
  store i32 %118, ptr %14, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %113, %106, %98
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %15, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %15, align 4, !tbaa !5
  br label %93, !llvm.loop !16

123:                                              ; preds = %97
  %124 = load i32, ptr %13, align 4, !tbaa !5
  %125 = icmp eq i32 %124, -1
  br i1 %125, label %126, label %127

126:                                              ; preds = %123
  store i32 8, ptr %12, align 4
  br label %269

127:                                              ; preds = %123
  %128 = load i32, ptr %13, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [510 x i8], ptr @visit, i64 0, i64 %129
  store i8 1, ptr %130, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %131

131:                                              ; preds = %265, %127
  %132 = load i32, ptr %16, align 4, !tbaa !5
  %133 = load i32, ptr %2, align 4, !tbaa !5
  %134 = icmp slt i32 %132, %133
  br i1 %134, label %136, label %135

135:                                              ; preds = %131
  store i32 14, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %268

136:                                              ; preds = %131
  %137 = load i32, ptr %16, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [510 x i8], ptr @visit, i64 0, i64 %138
  %140 = load i8, ptr %139, align 1, !tbaa !12, !range !14, !noundef !15
  %141 = trunc i8 %140 to i1
  %142 = zext i1 %141 to i32
  %143 = icmp eq i32 %142, 0
  br i1 %143, label %144, label %264

144:                                              ; preds = %136
  %145 = load i32, ptr %13, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [510 x [510 x i32]], ptr @w, i64 0, i64 %146
  %148 = load i32, ptr %16, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [510 x i32], ptr %147, i64 0, i64 %149
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = icmp ne i32 %151, 999999999
  br i1 %152, label %153, label %264

153:                                              ; preds = %144
  %154 = load i32, ptr %13, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [510 x [510 x i32]], ptr @w, i64 0, i64 %155
  %157 = load i32, ptr %16, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [510 x i32], ptr %156, i64 0, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !5
  %161 = load i32, ptr %13, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [510 x i32], ptr @Time, i64 0, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %165 = add nsw i32 %160, %164
  %166 = load i32, ptr %16, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [510 x i32], ptr @Time, i64 0, i64 %167
  %169 = load i32, ptr %168, align 4, !tbaa !5
  %170 = icmp slt i32 %165, %169
  br i1 %170, label %171, label %206

171:                                              ; preds = %153
  %172 = load i32, ptr %13, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [510 x [510 x i32]], ptr @w, i64 0, i64 %173
  %175 = load i32, ptr %16, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [510 x i32], ptr %174, i64 0, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !5
  %179 = load i32, ptr %13, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [510 x i32], ptr @Time, i64 0, i64 %180
  %182 = load i32, ptr %181, align 4, !tbaa !5
  %183 = add nsw i32 %178, %182
  %184 = load i32, ptr %16, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [510 x i32], ptr @Time, i64 0, i64 %185
  store i32 %183, ptr %186, align 4, !tbaa !5
  %187 = load i32, ptr %13, align 4, !tbaa !5
  %188 = load i32, ptr %16, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [510 x i32], ptr @Timepre, i64 0, i64 %189
  store i32 %187, ptr %190, align 4, !tbaa !5
  %191 = load i32, ptr %13, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [510 x i32], ptr @weight, i64 0, i64 %192
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = load i32, ptr %13, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [510 x [510 x i32]], ptr @e, i64 0, i64 %196
  %198 = load i32, ptr %16, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [510 x i32], ptr %197, i64 0, i64 %199
  %201 = load i32, ptr %200, align 4, !tbaa !5
  %202 = add nsw i32 %194, %201
  %203 = load i32, ptr %16, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [510 x i32], ptr @weight, i64 0, i64 %204
  store i32 %202, ptr %205, align 4, !tbaa !5
  br label %263

206:                                              ; preds = %153
  %207 = load i32, ptr %13, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [510 x [510 x i32]], ptr @w, i64 0, i64 %208
  %210 = load i32, ptr %16, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [510 x i32], ptr %209, i64 0, i64 %211
  %213 = load i32, ptr %212, align 4, !tbaa !5
  %214 = load i32, ptr %13, align 4, !tbaa !5
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [510 x i32], ptr @Time, i64 0, i64 %215
  %217 = load i32, ptr %216, align 4, !tbaa !5
  %218 = add nsw i32 %213, %217
  %219 = load i32, ptr %16, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [510 x i32], ptr @Time, i64 0, i64 %220
  %222 = load i32, ptr %221, align 4, !tbaa !5
  %223 = icmp eq i32 %218, %222
  br i1 %223, label %224, label %262

224:                                              ; preds = %206
  %225 = load i32, ptr %16, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [510 x i32], ptr @weight, i64 0, i64 %226
  %228 = load i32, ptr %227, align 4, !tbaa !5
  %229 = load i32, ptr %13, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [510 x i32], ptr @weight, i64 0, i64 %230
  %232 = load i32, ptr %231, align 4, !tbaa !5
  %233 = load i32, ptr %13, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [510 x [510 x i32]], ptr @e, i64 0, i64 %234
  %236 = load i32, ptr %16, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [510 x i32], ptr %235, i64 0, i64 %237
  %239 = load i32, ptr %238, align 4, !tbaa !5
  %240 = add nsw i32 %232, %239
  %241 = icmp sgt i32 %228, %240
  br i1 %241, label %242, label %262

242:                                              ; preds = %224
  %243 = load i32, ptr %13, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [510 x i32], ptr @weight, i64 0, i64 %244
  %246 = load i32, ptr %245, align 4, !tbaa !5
  %247 = load i32, ptr %13, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [510 x [510 x i32]], ptr @e, i64 0, i64 %248
  %250 = load i32, ptr %16, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [510 x i32], ptr %249, i64 0, i64 %251
  %253 = load i32, ptr %252, align 4, !tbaa !5
  %254 = add nsw i32 %246, %253
  %255 = load i32, ptr %16, align 4, !tbaa !5
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [510 x i32], ptr @weight, i64 0, i64 %256
  store i32 %254, ptr %257, align 4, !tbaa !5
  %258 = load i32, ptr %13, align 4, !tbaa !5
  %259 = load i32, ptr %16, align 4, !tbaa !5
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds [510 x i32], ptr @Timepre, i64 0, i64 %260
  store i32 %258, ptr %261, align 4, !tbaa !5
  br label %262

262:                                              ; preds = %242, %224, %206
  br label %263

263:                                              ; preds = %262, %171
  br label %264

264:                                              ; preds = %263, %144, %136
  br label %265

265:                                              ; preds = %264
  %266 = load i32, ptr %16, align 4, !tbaa !5
  %267 = add nsw i32 %266, 1
  store i32 %267, ptr %16, align 4, !tbaa !5
  br label %131, !llvm.loop !17

268:                                              ; preds = %135
  store i32 0, ptr %12, align 4
  br label %269

269:                                              ; preds = %268, %126
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  %270 = load i32, ptr %12, align 4
  switch i32 %270, label %275 [
    i32 0, label %271
  ]

271:                                              ; preds = %269
  br label %272

272:                                              ; preds = %271
  %273 = load i32, ptr %11, align 4, !tbaa !5
  %274 = add nsw i32 %273, 1
  store i32 %274, ptr %11, align 4, !tbaa !5
  br label %87, !llvm.loop !18

275:                                              ; preds = %269, %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %276

276:                                              ; preds = %275
  %277 = load i32, ptr @fin, align 4, !tbaa !5
  call void @_Z11dfsTimepathi(i32 noundef %277)
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  store i8 0, ptr %17, align 1, !tbaa !12
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef @visit, ptr noundef getelementptr inbounds (i8, ptr @visit, i64 510), ptr noundef nonnull align 1 dereferenceable(1) %17)
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  %278 = load i32, ptr @st, align 4, !tbaa !5
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [510 x i32], ptr @dis, i64 0, i64 %279
  store i32 0, ptr %280, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %281

281:                                              ; preds = %419, %276
  %282 = load i32, ptr %18, align 4, !tbaa !5
  %283 = load i32, ptr %2, align 4, !tbaa !5
  %284 = icmp slt i32 %282, %283
  br i1 %284, label %286, label %285

285:                                              ; preds = %281
  store i32 17, ptr %12, align 4
  br label %422

286:                                              ; preds = %281
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 -1, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 999999999, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %287

287:                                              ; preds = %314, %286
  %288 = load i32, ptr %21, align 4, !tbaa !5
  %289 = load i32, ptr %2, align 4, !tbaa !5
  %290 = icmp slt i32 %288, %289
  br i1 %290, label %292, label %291

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

292:                                              ; preds = %287
  %293 = load i32, ptr %21, align 4, !tbaa !5
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds [510 x i8], ptr @visit, i64 0, i64 %294
  %296 = load i8, ptr %295, align 1, !tbaa !12, !range !14, !noundef !15
  %297 = trunc i8 %296 to i1
  %298 = zext i1 %297 to i32
  %299 = icmp eq i32 %298, 0
  br i1 %299, label %300, label %313

300:                                              ; preds = %292
  %301 = load i32, ptr %20, align 4, !tbaa !5
  %302 = load i32, ptr %21, align 4, !tbaa !5
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds [510 x i32], ptr @dis, i64 0, i64 %303
  %305 = load i32, ptr %304, align 4, !tbaa !5
  %306 = icmp sgt i32 %301, %305
  br i1 %306, label %307, label %313

307:                                              ; preds = %300
  %308 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %308, ptr %19, align 4, !tbaa !5
  %309 = load i32, ptr %21, align 4, !tbaa !5
  %310 = sext i32 %309 to i64
  %311 = getelementptr inbounds [510 x i32], ptr @dis, i64 0, i64 %310
  %312 = load i32, ptr %311, align 4, !tbaa !5
  store i32 %312, ptr %20, align 4, !tbaa !5
  br label %313

313:                                              ; preds = %307, %300, %292
  br label %314

314:                                              ; preds = %313
  %315 = load i32, ptr %21, align 4, !tbaa !5
  %316 = add nsw i32 %315, 1
  store i32 %316, ptr %21, align 4, !tbaa !5
  br label %287, !llvm.loop !19

317:                                              ; preds = %291
  %318 = load i32, ptr %19, align 4, !tbaa !5
  %319 = icmp eq i32 %318, -1
  br i1 %319, label %320, label %321

320:                                              ; preds = %317
  store i32 17, ptr %12, align 4
  br label %416

321:                                              ; preds = %317
  %322 = load i32, ptr %19, align 4, !tbaa !5
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds [510 x i8], ptr @visit, i64 0, i64 %323
  store i8 1, ptr %324, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %325

325:                                              ; preds = %412, %321
  %326 = load i32, ptr %22, align 4, !tbaa !5
  %327 = load i32, ptr %2, align 4, !tbaa !5
  %328 = icmp slt i32 %326, %327
  br i1 %328, label %330, label %329

329:                                              ; preds = %325
  store i32 23, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %415

330:                                              ; preds = %325
  %331 = load i32, ptr %22, align 4, !tbaa !5
  %332 = sext i32 %331 to i64
  %333 = getelementptr inbounds [510 x i8], ptr @visit, i64 0, i64 %332
  %334 = load i8, ptr %333, align 1, !tbaa !12, !range !14, !noundef !15
  %335 = trunc i8 %334 to i1
  %336 = zext i1 %335 to i32
  %337 = icmp eq i32 %336, 0
  br i1 %337, label %338, label %411

338:                                              ; preds = %330
  %339 = load i32, ptr %19, align 4, !tbaa !5
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds [510 x [510 x i32]], ptr @e, i64 0, i64 %340
  %342 = load i32, ptr %22, align 4, !tbaa !5
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds [510 x i32], ptr %341, i64 0, i64 %343
  %345 = load i32, ptr %344, align 4, !tbaa !5
  %346 = icmp ne i32 %345, 999999999
  br i1 %346, label %347, label %411

347:                                              ; preds = %338
  %348 = load i32, ptr %19, align 4, !tbaa !5
  %349 = sext i32 %348 to i64
  %350 = getelementptr inbounds [510 x [510 x i32]], ptr @e, i64 0, i64 %349
  %351 = load i32, ptr %22, align 4, !tbaa !5
  %352 = sext i32 %351 to i64
  %353 = getelementptr inbounds [510 x i32], ptr %350, i64 0, i64 %352
  %354 = load i32, ptr %353, align 4, !tbaa !5
  %355 = load i32, ptr %19, align 4, !tbaa !5
  %356 = sext i32 %355 to i64
  %357 = getelementptr inbounds [510 x i32], ptr @dis, i64 0, i64 %356
  %358 = load i32, ptr %357, align 4, !tbaa !5
  %359 = add nsw i32 %354, %358
  %360 = load i32, ptr %22, align 4, !tbaa !5
  %361 = sext i32 %360 to i64
  %362 = getelementptr inbounds [510 x i32], ptr @dis, i64 0, i64 %361
  %363 = load i32, ptr %362, align 4, !tbaa !5
  %364 = icmp slt i32 %359, %363
  br i1 %364, label %365, label %387

365:                                              ; preds = %347
  %366 = load i32, ptr %19, align 4, !tbaa !5
  %367 = sext i32 %366 to i64
  %368 = getelementptr inbounds [510 x [510 x i32]], ptr @e, i64 0, i64 %367
  %369 = load i32, ptr %22, align 4, !tbaa !5
  %370 = sext i32 %369 to i64
  %371 = getelementptr inbounds [510 x i32], ptr %368, i64 0, i64 %370
  %372 = load i32, ptr %371, align 4, !tbaa !5
  %373 = load i32, ptr %19, align 4, !tbaa !5
  %374 = sext i32 %373 to i64
  %375 = getelementptr inbounds [510 x i32], ptr @dis, i64 0, i64 %374
  %376 = load i32, ptr %375, align 4, !tbaa !5
  %377 = add nsw i32 %372, %376
  %378 = load i32, ptr %22, align 4, !tbaa !5
  %379 = sext i32 %378 to i64
  %380 = getelementptr inbounds [510 x i32], ptr @dis, i64 0, i64 %379
  store i32 %377, ptr %380, align 4, !tbaa !5
  %381 = load i32, ptr %22, align 4, !tbaa !5
  %382 = sext i32 %381 to i64
  %383 = getelementptr inbounds [510 x %"class.std::vector"], ptr @dispre, i64 0, i64 %382
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %383) #6
  %384 = load i32, ptr %22, align 4, !tbaa !5
  %385 = sext i32 %384 to i64
  %386 = getelementptr inbounds [510 x %"class.std::vector"], ptr @dispre, i64 0, i64 %385
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %386, ptr noundef nonnull align 4 dereferenceable(4) %19)
  br label %410

387:                                              ; preds = %347
  %388 = load i32, ptr %19, align 4, !tbaa !5
  %389 = sext i32 %388 to i64
  %390 = getelementptr inbounds [510 x [510 x i32]], ptr @e, i64 0, i64 %389
  %391 = load i32, ptr %22, align 4, !tbaa !5
  %392 = sext i32 %391 to i64
  %393 = getelementptr inbounds [510 x i32], ptr %390, i64 0, i64 %392
  %394 = load i32, ptr %393, align 4, !tbaa !5
  %395 = load i32, ptr %19, align 4, !tbaa !5
  %396 = sext i32 %395 to i64
  %397 = getelementptr inbounds [510 x i32], ptr @dis, i64 0, i64 %396
  %398 = load i32, ptr %397, align 4, !tbaa !5
  %399 = add nsw i32 %394, %398
  %400 = load i32, ptr %22, align 4, !tbaa !5
  %401 = sext i32 %400 to i64
  %402 = getelementptr inbounds [510 x i32], ptr @dis, i64 0, i64 %401
  %403 = load i32, ptr %402, align 4, !tbaa !5
  %404 = icmp eq i32 %399, %403
  br i1 %404, label %405, label %409

405:                                              ; preds = %387
  %406 = load i32, ptr %22, align 4, !tbaa !5
  %407 = sext i32 %406 to i64
  %408 = getelementptr inbounds [510 x %"class.std::vector"], ptr @dispre, i64 0, i64 %407
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %408, ptr noundef nonnull align 4 dereferenceable(4) %19)
  br label %409

409:                                              ; preds = %405, %387
  br label %410

410:                                              ; preds = %409, %365
  br label %411

411:                                              ; preds = %410, %338, %330
  br label %412

412:                                              ; preds = %411
  %413 = load i32, ptr %22, align 4, !tbaa !5
  %414 = add nsw i32 %413, 1
  store i32 %414, ptr %22, align 4, !tbaa !5
  br label %325, !llvm.loop !20

415:                                              ; preds = %329
  store i32 0, ptr %12, align 4
  br label %416

416:                                              ; preds = %415, %320
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  %417 = load i32, ptr %12, align 4
  switch i32 %417, label %422 [
    i32 0, label %418
  ]

418:                                              ; preds = %416
  br label %419

419:                                              ; preds = %418
  %420 = load i32, ptr %18, align 4, !tbaa !5
  %421 = add nsw i32 %420, 1
  store i32 %421, ptr %18, align 4, !tbaa !5
  br label %281, !llvm.loop !21

422:                                              ; preds = %416, %285
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %423

423:                                              ; preds = %422
  %424 = load i32, ptr @fin, align 4, !tbaa !5
  call void @_Z10dfsdispathi(i32 noundef %424)
  %425 = load i32, ptr @fin, align 4, !tbaa !5
  %426 = sext i32 %425 to i64
  %427 = getelementptr inbounds [510 x i32], ptr @Time, i64 0, i64 %426
  %428 = load i32, ptr %427, align 4, !tbaa !5
  %429 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %428)
  %430 = call noundef zeroext i1 @_ZSteqIiSaIiEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) @dispath, ptr noundef nonnull align 8 dereferenceable(24) @Timepath)
  br i1 %430, label %431, label %437

431:                                              ; preds = %423
  %432 = load i32, ptr @fin, align 4, !tbaa !5
  %433 = sext i32 %432 to i64
  %434 = getelementptr inbounds [510 x i32], ptr @dis, i64 0, i64 %433
  %435 = load i32, ptr %434, align 4, !tbaa !5
  %436 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %435)
  br label %467

437:                                              ; preds = %423
  %438 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %439 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @Timepath) #6
  %440 = sub i64 %439, 1
  %441 = trunc i64 %440 to i32
  store i32 %441, ptr %23, align 4, !tbaa !5
  br label %442

442:                                              ; preds = %457, %437
  %443 = load i32, ptr %23, align 4, !tbaa !5
  %444 = icmp sge i32 %443, 0
  br i1 %444, label %446, label %445

445:                                              ; preds = %442
  store i32 26, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %460

446:                                              ; preds = %442
  %447 = load i32, ptr %23, align 4, !tbaa !5
  %448 = sext i32 %447 to i64
  %449 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Timepath, i64 noundef %448) #6
  %450 = load i32, ptr %449, align 4, !tbaa !5
  %451 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i32 noundef %450)
  %452 = load i32, ptr %23, align 4, !tbaa !5
  %453 = icmp ne i32 %452, 0
  br i1 %453, label %454, label %456

454:                                              ; preds = %446
  %455 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  br label %456

456:                                              ; preds = %454, %446
  br label %457

457:                                              ; preds = %456
  %458 = load i32, ptr %23, align 4, !tbaa !5
  %459 = add nsw i32 %458, -1
  store i32 %459, ptr %23, align 4, !tbaa !5
  br label %442, !llvm.loop !22

460:                                              ; preds = %445
  %461 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  %462 = load i32, ptr @fin, align 4, !tbaa !5
  %463 = sext i32 %462 to i64
  %464 = getelementptr inbounds [510 x i32], ptr @dis, i64 0, i64 %463
  %465 = load i32, ptr %464, align 4, !tbaa !5
  %466 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, i32 noundef %465)
  br label %467

467:                                              ; preds = %460, %431
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %468 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @dispath) #6
  %469 = sub i64 %468, 1
  %470 = trunc i64 %469 to i32
  store i32 %470, ptr %24, align 4, !tbaa !5
  br label %471

471:                                              ; preds = %486, %467
  %472 = load i32, ptr %24, align 4, !tbaa !5
  %473 = icmp sge i32 %472, 0
  br i1 %473, label %475, label %474

474:                                              ; preds = %471
  store i32 29, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %489

475:                                              ; preds = %471
  %476 = load i32, ptr %24, align 4, !tbaa !5
  %477 = sext i32 %476 to i64
  %478 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @dispath, i64 noundef %477) #6
  %479 = load i32, ptr %478, align 4, !tbaa !5
  %480 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i32 noundef %479)
  %481 = load i32, ptr %24, align 4, !tbaa !5
  %482 = icmp ne i32 %481, 0
  br i1 %482, label %483, label %485

483:                                              ; preds = %475
  %484 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  br label %485

485:                                              ; preds = %483, %475
  br label %486

486:                                              ; preds = %485
  %487 = load i32, ptr %24, align 4, !tbaa !5
  %488 = add nsw i32 %487, -1
  store i32 %488, ptr %24, align 4, !tbaa !5
  br label %471, !llvm.loop !23

489:                                              ; preds = %474
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %490 = load i32, ptr %1, align 4
  ret i32 %490
}

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSteqIiSaIiEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #4

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 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}


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

@dis = external dso_local global [510 x i32], align 16
@Time = external dso_local global [510 x i32], align 16
@e = external dso_local global [510 x [510 x i32]], align 16
@w = external dso_local global [510 x [510 x i32]], align 16
@Timepre = external dso_local local_unnamed_addr global [510 x i32], align 16
@weight = external dso_local global [510 x i32], align 16
@visit = external dso_local global [510 x i8], align 16
@Timepath = external dso_local global %"class.std::vector", align 8
@dispath = external dso_local global %"class.std::vector", align 8
@dispre = external dso_local global [510 x %"class.std::vector"], align 16
@st = external dso_local global i32, align 4
@fin = external dso_local global i32, align 4
@_ZL3inf = external hidden constant i32, align 4
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [16 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress 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 noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

; 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 i8, align 1
  %9 = alloca i32, align 4
  tail call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @dis, ptr noundef nonnull getelementptr inbounds (i8, ptr @dis, i64 2040), ptr noundef nonnull align 4 dereferenceable(4) @_ZL3inf)
  tail call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @Time, ptr noundef nonnull getelementptr inbounds (i8, ptr @Time, i64 2040), ptr noundef nonnull align 4 dereferenceable(4) @_ZL3inf)
  tail call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @weight, ptr noundef nonnull getelementptr inbounds (i8, ptr @weight, i64 2040), ptr noundef nonnull align 4 dereferenceable(4) @_ZL3inf)
  tail call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @e, ptr noundef nonnull getelementptr inbounds (i8, ptr @e, i64 1040400), ptr noundef nonnull align 4 dereferenceable(4) @_ZL3inf)
  tail call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @w, ptr noundef nonnull getelementptr inbounds (i8, ptr @w, i64 1040400), ptr noundef nonnull align 4 dereferenceable(4) @_ZL3inf)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %35, %0
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @st, ptr noundef nonnull @fin)
  %14 = load i32, ptr @st, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [510 x i32], ptr @Time, i64 0, i64 %15
  store i32 0, ptr %16, align 4, !tbaa !5
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph124.preheader, label %.critedge

.lr.ph124.preheader:                              ; preds = %._crit_edge
  %wide.trip.count = zext nneg i32 %17 to i64
  %min.iters.check = icmp ult i32 %17, 8
  br i1 %min.iters.check, label %.lr.ph124.preheader205, label %vector.ph

.lr.ph124.preheader205:                           ; preds = %middle.block, %.lr.ph124.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph124.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph124

vector.ph:                                        ; preds = %.lr.ph124.preheader
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %19 = getelementptr inbounds [510 x i32], ptr @Timepre, i64 0, i64 %index
  %20 = getelementptr inbounds i8, ptr %19, i64 16
  store <4 x i32> %vec.ind, ptr %19, align 16, !tbaa !5
  store <4 x i32> %step.add, ptr %20, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %21 = icmp eq i64 %index.next, %n.vec
  br i1 %21, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader120, label %.lr.ph124.preheader205

.lr.ph:                                           ; preds = %0, %35
  %.099121 = phi i32 [ %36, %35 ], [ 0, %0 ]
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %23 = load i32, ptr %6, align 4, !tbaa !5
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [510 x [510 x i32]], ptr @e, i64 0, i64 %25, i64 %27
  store i32 %23, ptr %28, align 4, !tbaa !5
  %29 = load i32, ptr %7, align 4, !tbaa !5
  %30 = getelementptr inbounds [510 x [510 x i32]], ptr @w, i64 0, i64 %25, i64 %27
  store i32 %29, ptr %30, align 4, !tbaa !5
  %31 = load i32, ptr %5, align 4, !tbaa !5
  %.not116 = icmp eq i32 %31, 1
  br i1 %.not116, label %35, label %32

32:                                               ; preds = %.lr.ph
  %33 = getelementptr inbounds [510 x [510 x i32]], ptr @e, i64 0, i64 %27, i64 %25
  store i32 %23, ptr %33, align 4, !tbaa !5
  %34 = getelementptr inbounds [510 x [510 x i32]], ptr @w, i64 0, i64 %27, i64 %25
  store i32 %29, ptr %34, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %.lr.ph, %32
  %36 = add nuw nsw i32 %.099121, 1
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %.lr.ph, label %._crit_edge, !llvm.loop !13

.preheader120:                                    ; preds = %.lr.ph124, %middle.block
  br i1 %18, label %.preheader.lr.ph, label %.critedge

.preheader.lr.ph:                                 ; preds = %.preheader120
  %wide.trip.count167 = zext nneg i32 %17 to i64
  %xtraiter = and i64 %wide.trip.count167, 1
  %39 = icmp eq i32 %17, 1
  %unroll_iter = and i64 %wide.trip.count167, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.lr.ph128.preheader

.lr.ph124:                                        ; preds = %.lr.ph124.preheader205, %.lr.ph124
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph124 ], [ %indvars.iv.ph, %.lr.ph124.preheader205 ]
  %40 = getelementptr inbounds [510 x i32], ptr @Timepre, i64 0, i64 %indvars.iv
  %41 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %41, ptr %40, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader120, label %.lr.ph124, !llvm.loop !14

.lr.ph128.preheader:                              ; preds = %._crit_edge134, %.preheader.lr.ph
  %.097135 = phi i32 [ 0, %.preheader.lr.ph ], [ %103, %._crit_edge134 ]
  br i1 %39, label %._crit_edge129.unr-lcssa, label %.lr.ph128

._crit_edge129.unr-lcssa:                         ; preds = %66, %.lr.ph128.preheader
  %.194.lcssa.ph = phi i32 [ poison, %.lr.ph128.preheader ], [ %.194.1, %66 ]
  %indvars.iv159.unr = phi i64 [ 0, %.lr.ph128.preheader ], [ %indvars.iv.next160.1, %66 ]
  %.091126.unr = phi i32 [ 999999999, %.lr.ph128.preheader ], [ %.192.1, %66 ]
  %.093125.unr = phi i32 [ -1, %.lr.ph128.preheader ], [ %.194.1, %66 ]
  br i1 %lcmp.mod.not, label %._crit_edge129, label %.lr.ph128.epil

.lr.ph128.epil:                                   ; preds = %._crit_edge129.unr-lcssa
  %42 = getelementptr inbounds [510 x i8], ptr @visit, i64 0, i64 %indvars.iv159.unr
  %43 = load i8, ptr %42, align 1, !tbaa !15, !range !17, !noundef !18
  %44 = icmp eq i8 %43, 0
  br i1 %44, label %45, label %._crit_edge129

45:                                               ; preds = %.lr.ph128.epil
  %46 = getelementptr inbounds [510 x i32], ptr @Time, i64 0, i64 %indvars.iv159.unr
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = icmp slt i32 %47, %.091126.unr
  %49 = trunc nuw nsw i64 %indvars.iv159.unr to i32
  %spec.select.epil = select i1 %48, i32 %49, i32 %.093125.unr
  br label %._crit_edge129

._crit_edge129:                                   ; preds = %.lr.ph128.epil, %45, %._crit_edge129.unr-lcssa
  %.194.lcssa = phi i32 [ %.194.lcssa.ph, %._crit_edge129.unr-lcssa ], [ %.093125.unr, %.lr.ph128.epil ], [ %spec.select.epil, %45 ]
  %.not111 = icmp eq i32 %.194.lcssa, -1
  br i1 %.not111, label %.critedge, label %.lr.ph133

.lr.ph128:                                        ; preds = %.lr.ph128.preheader, %66
  %indvars.iv159 = phi i64 [ %indvars.iv.next160.1, %66 ], [ 0, %.lr.ph128.preheader ]
  %.091126 = phi i32 [ %.192.1, %66 ], [ 999999999, %.lr.ph128.preheader ]
  %.093125 = phi i32 [ %.194.1, %66 ], [ -1, %.lr.ph128.preheader ]
  %niter = phi i64 [ %niter.next.1, %66 ], [ 0, %.lr.ph128.preheader ]
  %50 = getelementptr inbounds [510 x i8], ptr @visit, i64 0, i64 %indvars.iv159
  %51 = load i8, ptr %50, align 2, !tbaa !15, !range !17, !noundef !18
  %52 = icmp eq i8 %51, 0
  br i1 %52, label %53, label %.lr.ph128.1

53:                                               ; preds = %.lr.ph128
  %54 = getelementptr inbounds [510 x i32], ptr @Time, i64 0, i64 %indvars.iv159
  %55 = load i32, ptr %54, align 8, !tbaa !5
  %56 = icmp slt i32 %55, %.091126
  %57 = trunc nuw nsw i64 %indvars.iv159 to i32
  %spec.select = select i1 %56, i32 %57, i32 %.093125
  %spec.select117 = call i32 @llvm.smin.i32(i32 %55, i32 %.091126)
  br label %.lr.ph128.1

.lr.ph128.1:                                      ; preds = %53, %.lr.ph128
  %.194 = phi i32 [ %.093125, %.lr.ph128 ], [ %spec.select, %53 ]
  %.192 = phi i32 [ %.091126, %.lr.ph128 ], [ %spec.select117, %53 ]
  %indvars.iv.next160 = or disjoint i64 %indvars.iv159, 1
  %58 = getelementptr inbounds [510 x i8], ptr @visit, i64 0, i64 %indvars.iv.next160
  %59 = load i8, ptr %58, align 1, !tbaa !15, !range !17, !noundef !18
  %60 = icmp eq i8 %59, 0
  br i1 %60, label %61, label %66

61:                                               ; preds = %.lr.ph128.1
  %62 = getelementptr inbounds [510 x i32], ptr @Time, i64 0, i64 %indvars.iv.next160
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = icmp slt i32 %63, %.192
  %65 = trunc nuw nsw i64 %indvars.iv.next160 to i32
  %spec.select.1 = select i1 %64, i32 %65, i32 %.194
  %spec.select117.1 = call i32 @llvm.smin.i32(i32 %63, i32 %.192)
  br label %66

66:                                               ; preds = %61, %.lr.ph128.1
  %.194.1 = phi i32 [ %.194, %.lr.ph128.1 ], [ %spec.select.1, %61 ]
  %.192.1 = phi i32 [ %.192, %.lr.ph128.1 ], [ %spec.select117.1, %61 ]
  %indvars.iv.next160.1 = add nuw nsw i64 %indvars.iv159, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge129.unr-lcssa, label %.lr.ph128, !llvm.loop !19

.lr.ph133:                                        ; preds = %._crit_edge129
  %67 = sext i32 %.194.lcssa to i64
  %68 = getelementptr inbounds [510 x i8], ptr @visit, i64 0, i64 %67
  store i8 1, ptr %68, align 1, !tbaa !15
  %69 = getelementptr inbounds [510 x i32], ptr @Time, i64 0, i64 %67
  %70 = getelementptr inbounds [510 x i32], ptr @weight, i64 0, i64 %67
  br label %71

71:                                               ; preds = %.lr.ph133, %102
  %indvars.iv164 = phi i64 [ 0, %.lr.ph133 ], [ %indvars.iv.next165, %102 ]
  %72 = getelementptr inbounds [510 x i8], ptr @visit, i64 0, i64 %indvars.iv164
  %73 = load i8, ptr %72, align 1, !tbaa !15, !range !17, !noundef !18
  %74 = icmp eq i8 %73, 0
  br i1 %74, label %75, label %102

75:                                               ; preds = %71
  %76 = getelementptr inbounds [510 x [510 x i32]], ptr @w, i64 0, i64 %67, i64 %indvars.iv164
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %.not = icmp eq i32 %77, 999999999
  br i1 %.not, label %102, label %78

78:                                               ; preds = %75
  %79 = load i32, ptr %69, align 4, !tbaa !5
  %80 = add nsw i32 %79, %77
  %81 = getelementptr inbounds [510 x i32], ptr @Time, i64 0, i64 %indvars.iv164
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = icmp slt i32 %80, %82
  br i1 %83, label %84, label %90

84:                                               ; preds = %78
  store i32 %80, ptr %81, align 4, !tbaa !5
  %85 = getelementptr inbounds [510 x i32], ptr @Timepre, i64 0, i64 %indvars.iv164
  store i32 %.194.lcssa, ptr %85, align 4, !tbaa !5
  %86 = load i32, ptr %70, align 4, !tbaa !5
  %87 = getelementptr inbounds [510 x [510 x i32]], ptr @e, i64 0, i64 %67, i64 %indvars.iv164
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = add nsw i32 %88, %86
  br label %.sink.split

90:                                               ; preds = %78
  %91 = icmp eq i32 %80, %82
  br i1 %91, label %92, label %102

92:                                               ; preds = %90
  %93 = getelementptr inbounds [510 x i32], ptr @weight, i64 0, i64 %indvars.iv164
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = load i32, ptr %70, align 4, !tbaa !5
  %96 = getelementptr inbounds [510 x [510 x i32]], ptr @e, i64 0, i64 %67, i64 %indvars.iv164
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = add nsw i32 %97, %95
  %99 = icmp sgt i32 %94, %98
  br i1 %99, label %100, label %102

100:                                              ; preds = %92
  store i32 %98, ptr %93, align 4, !tbaa !5
  br label %.sink.split

.sink.split:                                      ; preds = %84, %100
  %Timepre.sink = phi ptr [ @Timepre, %100 ], [ @weight, %84 ]
  %.194.lcssa.sink = phi i32 [ %.194.lcssa, %100 ], [ %89, %84 ]
  %101 = getelementptr inbounds [510 x i32], ptr %Timepre.sink, i64 0, i64 %indvars.iv164
  store i32 %.194.lcssa.sink, ptr %101, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %.sink.split, %71, %75, %90, %92
  %indvars.iv.next165 = add nuw nsw i64 %indvars.iv164, 1
  %exitcond168.not = icmp eq i64 %indvars.iv.next165, %wide.trip.count167
  br i1 %exitcond168.not, label %._crit_edge134, label %71, !llvm.loop !20

._crit_edge134:                                   ; preds = %102
  %103 = add nuw nsw i32 %.097135, 1
  %exitcond169.not = icmp eq i32 %103, %17
  br i1 %exitcond169.not, label %.critedge, label %.lr.ph128.preheader, !llvm.loop !21

.critedge:                                        ; preds = %._crit_edge134, %._crit_edge129, %._crit_edge, %.preheader120
  %104 = load i32, ptr @fin, align 4, !tbaa !5
  call void @_Z11dfsTimepathi(i32 noundef %104)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #7
  store i8 0, ptr %8, align 1, !tbaa !15
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull @visit, ptr noundef nonnull getelementptr inbounds (i8, ptr @visit, i64 510), ptr noundef nonnull align 1 dereferenceable(1) %8)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #7
  %105 = load i32, ptr @st, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [510 x i32], ptr @dis, i64 0, i64 %106
  store i32 0, ptr %107, align 4, !tbaa !5
  %108 = load i32, ptr %1, align 4, !tbaa !5
  %109 = icmp sgt i32 %108, 0
  br i1 %109, label %.lr.ph147, label %.loopexit

.lr.ph147:                                        ; preds = %.critedge, %._crit_edge145
  %110 = phi i32 [ %172, %._crit_edge145 ], [ %108, %.critedge ]
  %.088146 = phi i32 [ %173, %._crit_edge145 ], [ 0, %.critedge ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  store i32 -1, ptr %9, align 4, !tbaa !5
  %111 = icmp sgt i32 %110, 0
  br i1 %111, label %.lr.ph140.preheader, label %.critedge119

.lr.ph140.preheader:                              ; preds = %.lr.ph147
  %wide.trip.count173 = zext nneg i32 %110 to i64
  %xtraiter207 = and i64 %wide.trip.count173, 1
  %112 = icmp eq i32 %110, 1
  br i1 %112, label %._crit_edge141.unr-lcssa, label %.lr.ph140.preheader.new

.lr.ph140.preheader.new:                          ; preds = %.lr.ph140.preheader
  %unroll_iter210 = and i64 %wide.trip.count173, 2147483646
  br label %.lr.ph140

._crit_edge141.unr-lcssa:                         ; preds = %142, %.lr.ph140.preheader
  %.lcssa.ph = phi i32 [ poison, %.lr.ph140.preheader ], [ %143, %142 ]
  %.unr = phi i32 [ -1, %.lr.ph140.preheader ], [ %143, %142 ]
  %indvars.iv170.unr = phi i64 [ 0, %.lr.ph140.preheader ], [ %indvars.iv.next171.1, %142 ]
  %.087137.unr = phi i32 [ 999999999, %.lr.ph140.preheader ], [ %.1.1, %142 ]
  %lcmp.mod208.not = icmp eq i64 %xtraiter207, 0
  br i1 %lcmp.mod208.not, label %._crit_edge141, label %.lr.ph140.epil

.lr.ph140.epil:                                   ; preds = %._crit_edge141.unr-lcssa
  %113 = getelementptr inbounds [510 x i8], ptr @visit, i64 0, i64 %indvars.iv170.unr
  %114 = load i8, ptr %113, align 1, !tbaa !15, !range !17, !noundef !18
  %115 = icmp eq i8 %114, 0
  br i1 %115, label %116, label %._crit_edge141

116:                                              ; preds = %.lr.ph140.epil
  %117 = getelementptr inbounds [510 x i32], ptr @dis, i64 0, i64 %indvars.iv170.unr
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = icmp sgt i32 %.087137.unr, %118
  br i1 %119, label %120, label %._crit_edge141

120:                                              ; preds = %116
  %121 = trunc nuw nsw i64 %indvars.iv170.unr to i32
  store i32 %121, ptr %9, align 4, !tbaa !5
  br label %._crit_edge141

._crit_edge141:                                   ; preds = %.lr.ph140.epil, %116, %120, %._crit_edge141.unr-lcssa
  %.lcssa = phi i32 [ %.lcssa.ph, %._crit_edge141.unr-lcssa ], [ %121, %120 ], [ %.unr, %116 ], [ %.unr, %.lr.ph140.epil ]
  %.not113 = icmp eq i32 %.lcssa, -1
  br i1 %.not113, label %.critedge119, label %144

.lr.ph140:                                        ; preds = %142, %.lr.ph140.preheader.new
  %122 = phi i32 [ -1, %.lr.ph140.preheader.new ], [ %143, %142 ]
  %indvars.iv170 = phi i64 [ 0, %.lr.ph140.preheader.new ], [ %indvars.iv.next171.1, %142 ]
  %.087137 = phi i32 [ 999999999, %.lr.ph140.preheader.new ], [ %.1.1, %142 ]
  %niter211 = phi i64 [ 0, %.lr.ph140.preheader.new ], [ %niter211.next.1, %142 ]
  %123 = getelementptr inbounds [510 x i8], ptr @visit, i64 0, i64 %indvars.iv170
  %124 = load i8, ptr %123, align 2, !tbaa !15, !range !17, !noundef !18
  %125 = icmp eq i8 %124, 0
  br i1 %125, label %126, label %.lr.ph140.1

126:                                              ; preds = %.lr.ph140
  %127 = getelementptr inbounds [510 x i32], ptr @dis, i64 0, i64 %indvars.iv170
  %128 = load i32, ptr %127, align 8, !tbaa !5
  %129 = icmp sgt i32 %.087137, %128
  br i1 %129, label %130, label %.lr.ph140.1

130:                                              ; preds = %126
  %131 = trunc nuw nsw i64 %indvars.iv170 to i32
  store i32 %131, ptr %9, align 4, !tbaa !5
  br label %.lr.ph140.1

.lr.ph140.1:                                      ; preds = %.lr.ph140, %126, %130
  %132 = phi i32 [ %131, %130 ], [ %122, %126 ], [ %122, %.lr.ph140 ]
  %.1 = phi i32 [ %128, %130 ], [ %.087137, %126 ], [ %.087137, %.lr.ph140 ]
  %indvars.iv.next171 = or disjoint i64 %indvars.iv170, 1
  %133 = getelementptr inbounds [510 x i8], ptr @visit, i64 0, i64 %indvars.iv.next171
  %134 = load i8, ptr %133, align 1, !tbaa !15, !range !17, !noundef !18
  %135 = icmp eq i8 %134, 0
  br i1 %135, label %136, label %142

136:                                              ; preds = %.lr.ph140.1
  %137 = getelementptr inbounds [510 x i32], ptr @dis, i64 0, i64 %indvars.iv.next171
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %139 = icmp sgt i32 %.1, %138
  br i1 %139, label %140, label %142

140:                                              ; preds = %136
  %141 = trunc nuw nsw i64 %indvars.iv.next171 to i32
  store i32 %141, ptr %9, align 4, !tbaa !5
  br label %142

142:                                              ; preds = %140, %136, %.lr.ph140.1
  %143 = phi i32 [ %141, %140 ], [ %132, %136 ], [ %132, %.lr.ph140.1 ]
  %.1.1 = phi i32 [ %138, %140 ], [ %.1, %136 ], [ %.1, %.lr.ph140.1 ]
  %indvars.iv.next171.1 = add nuw nsw i64 %indvars.iv170, 2
  %niter211.next.1 = add i64 %niter211, 2
  %niter211.ncmp.1 = icmp eq i64 %niter211.next.1, %unroll_iter210
  br i1 %niter211.ncmp.1, label %._crit_edge141.unr-lcssa, label %.lr.ph140, !llvm.loop !22

144:                                              ; preds = %._crit_edge141
  %145 = sext i32 %.lcssa to i64
  %146 = getelementptr inbounds [510 x i8], ptr @visit, i64 0, i64 %145
  store i8 1, ptr %146, align 1, !tbaa !15
  br i1 %111, label %.lr.ph144, label %._crit_edge145

.lr.ph144:                                        ; preds = %144, %168
  %indvars.iv175 = phi i64 [ %indvars.iv.next176, %168 ], [ 0, %144 ]
  %147 = getelementptr inbounds [510 x i8], ptr @visit, i64 0, i64 %indvars.iv175
  %148 = load i8, ptr %147, align 1, !tbaa !15, !range !17, !noundef !18
  %149 = icmp eq i8 %148, 0
  br i1 %149, label %150, label %168

150:                                              ; preds = %.lr.ph144
  %151 = load i32, ptr %9, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [510 x [510 x i32]], ptr @e, i64 0, i64 %152, i64 %indvars.iv175
  %154 = load i32, ptr %153, align 4, !tbaa !5
  %.not112 = icmp eq i32 %154, 999999999
  br i1 %.not112, label %168, label %155

155:                                              ; preds = %150
  %156 = getelementptr inbounds [510 x i32], ptr @dis, i64 0, i64 %152
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = add nsw i32 %157, %154
  %159 = getelementptr inbounds [510 x i32], ptr @dis, i64 0, i64 %indvars.iv175
  %160 = load i32, ptr %159, align 4, !tbaa !5
  %161 = icmp slt i32 %158, %160
  br i1 %161, label %162, label %164

162:                                              ; preds = %155
  store i32 %158, ptr %159, align 4, !tbaa !5
  %163 = getelementptr inbounds [510 x %"class.std::vector"], ptr @dispre, i64 0, i64 %indvars.iv175
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %163) #7
  br label %.sink.split189

164:                                              ; preds = %155
  %165 = icmp eq i32 %158, %160
  br i1 %165, label %166, label %168

166:                                              ; preds = %164
  %167 = getelementptr inbounds [510 x %"class.std::vector"], ptr @dispre, i64 0, i64 %indvars.iv175
  br label %.sink.split189

.sink.split189:                                   ; preds = %162, %166
  %.sink = phi ptr [ %167, %166 ], [ %163, %162 ]
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %.sink, ptr noundef nonnull align 4 dereferenceable(4) %9)
  br label %168

168:                                              ; preds = %.sink.split189, %.lr.ph144, %150, %164
  %indvars.iv.next176 = add nuw nsw i64 %indvars.iv175, 1
  %169 = load i32, ptr %1, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = icmp slt i64 %indvars.iv.next176, %170
  br i1 %171, label %.lr.ph144, label %._crit_edge145, !llvm.loop !23

._crit_edge145:                                   ; preds = %168, %144
  %172 = phi i32 [ %110, %144 ], [ %169, %168 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  %173 = add nuw nsw i32 %.088146, 1
  %174 = icmp slt i32 %173, %172
  br i1 %174, label %.lr.ph147, label %.loopexit, !llvm.loop !24

.critedge119:                                     ; preds = %.lr.ph147, %._crit_edge141
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  br label %.loopexit

.loopexit:                                        ; preds = %._crit_edge145, %.critedge, %.critedge119
  %175 = load i32, ptr @fin, align 4, !tbaa !5
  call void @_Z10dfsdispathi(i32 noundef %175)
  %176 = load i32, ptr @fin, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [510 x i32], ptr @Time, i64 0, i64 %177
  %179 = load i32, ptr %178, align 4, !tbaa !5
  %180 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %179)
  %181 = call noundef zeroext i1 @_ZSteqIiSaIiEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24) @dispath, ptr noundef nonnull align 8 dereferenceable(24) @Timepath)
  br i1 %181, label %196, label %182

182:                                              ; preds = %.loopexit
  %183 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %184 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @Timepath) #7
  %185 = trunc i64 %184 to i32
  %.084148 = add i32 %185, -1
  %186 = icmp sgt i32 %.084148, -1
  br i1 %186, label %.lr.ph151.preheader, label %._crit_edge152

.lr.ph151.preheader:                              ; preds = %182
  %187 = zext nneg i32 %.084148 to i64
  %188 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Timepath, i64 noundef %187) #7
  %189 = load i32, ptr %188, align 4, !tbaa !5
  %190 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %189)
  %.not114195 = icmp eq i32 %.084148, 0
  br i1 %.not114195, label %._crit_edge152, label %.lr.ph151

._crit_edge152:                                   ; preds = %.lr.ph151, %.lr.ph151.preheader, %182
  %191 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  br label %196

.lr.ph151:                                        ; preds = %.lr.ph151.preheader, %.lr.ph151
  %indvars.iv178196 = phi i64 [ %indvars.iv.next179, %.lr.ph151 ], [ %187, %.lr.ph151.preheader ]
  %192 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %indvars.iv.next179 = add nsw i64 %indvars.iv178196, -1
  %193 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @Timepath, i64 noundef %indvars.iv.next179) #7
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %194)
  %.not114 = icmp eq i64 %indvars.iv.next179, 0
  br i1 %.not114, label %._crit_edge152, label %.lr.ph151, !llvm.loop !25

196:                                              ; preds = %.loopexit, %._crit_edge152
  %.str.11.sink = phi ptr [ @.str.11, %._crit_edge152 ], [ @.str.6, %.loopexit ]
  %197 = load i32, ptr @fin, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [510 x i32], ptr @dis, i64 0, i64 %198
  %200 = load i32, ptr %199, align 4, !tbaa !5
  %201 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.11.sink, i32 noundef %200)
  %202 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @dispath) #7
  %203 = trunc i64 %202 to i32
  %.0153 = add i32 %203, -1
  %204 = icmp sgt i32 %.0153, -1
  br i1 %204, label %.lr.ph156.preheader, label %._crit_edge157

.lr.ph156.preheader:                              ; preds = %196
  %205 = zext nneg i32 %.0153 to i64
  %206 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @dispath, i64 noundef %205) #7
  %207 = load i32, ptr %206, align 4, !tbaa !5
  %208 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %207)
  %.not115198 = icmp eq i32 %.0153, 0
  br i1 %.not115198, label %._crit_edge157, label %.lr.ph156

._crit_edge157:                                   ; preds = %.lr.ph156, %.lr.ph156.preheader, %196
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

.lr.ph156:                                        ; preds = %.lr.ph156.preheader, %.lr.ph156
  %indvars.iv181199 = phi i64 [ %indvars.iv.next182, %.lr.ph156 ], [ %205, %.lr.ph156.preheader ]
  %209 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %indvars.iv.next182 = add nsw i64 %indvars.iv181199, -1
  %210 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @dispath, i64 noundef %indvars.iv.next182) #7
  %211 = load i32, ptr %210, align 4, !tbaa !5
  %212 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %211)
  %.not115 = icmp eq i64 %indvars.iv.next182, 0
  br i1 %.not115, label %._crit_edge157, label %.lr.ph156, !llvm.loop !26
}

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZSteqIiSaIiEEbRKSt6vectorIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #6

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10, !12, !11}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass