; LLVM IR from bqi343/cp-notebook :: Contests/USACO Training/Ch 4/4.2 stall4 (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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@rate = external dso_local global [402 x [402 x i32]], align 16
@prevnode = external dso_local global [402 x i32], align 16
@flow = external dso_local global [402 x i32], align 16
@visit = external dso_local global [402 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %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 i32, align 4
  %18 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %31, %0
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  %25 = icmp slt i32 %22, %24
  br i1 %25, label %27, label %26

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

27:                                               ; preds = %21
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [402 x i32], ptr @rate, i64 0, i64 %29
  store i32 1, ptr %30, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %27
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %4, align 4, !tbaa !5
  br label %21, !llvm.loop !9

34:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %5, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %55, %34
  %38 = load i32, ptr %5, align 4, !tbaa !5
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = add nsw i32 %39, %40
  %42 = add nsw i32 %41, 1
  %43 = icmp slt i32 %38, %42
  br i1 %43, label %45, label %44

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

45:                                               ; preds = %37
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [402 x [402 x i32]], ptr @rate, i64 0, i64 %47
  %49 = load i32, ptr %2, align 4, !tbaa !5
  %50 = load i32, ptr %3, align 4, !tbaa !5
  %51 = add nsw i32 %49, %50
  %52 = add nsw i32 %51, 1
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [402 x i32], ptr %48, i64 0, i64 %53
  store i32 1, ptr %54, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %45
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %5, align 4, !tbaa !5
  br label %37, !llvm.loop !11

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

59:                                               ; preds = %86, %58
  %60 = load i32, ptr %6, align 4, !tbaa !5
  %61 = load i32, ptr %2, align 4, !tbaa !5
  %62 = icmp slt i32 %60, %61
  br i1 %62, label %64, label %63

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

64:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %65 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %66

66:                                               ; preds = %82, %64
  %67 = load i32, ptr %9, align 4, !tbaa !5
  %68 = load i32, ptr %8, align 4, !tbaa !5
  %69 = icmp slt i32 %67, %68
  br i1 %69, label %71, label %70

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

71:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %72 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %73 = load i32, ptr %6, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [402 x [402 x i32]], ptr @rate, i64 0, i64 %75
  %77 = load i32, ptr %10, align 4, !tbaa !5
  %78 = load i32, ptr %2, align 4, !tbaa !5
  %79 = add nsw i32 %77, %78
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [402 x i32], ptr %76, i64 0, i64 %80
  store i32 1, ptr %81, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %82

82:                                               ; preds = %71
  %83 = load i32, ptr %9, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %9, align 4, !tbaa !5
  br label %66, !llvm.loop !12

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

86:                                               ; preds = %85
  %87 = load i32, ptr %6, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %6, align 4, !tbaa !5
  br label %59, !llvm.loop !13

89:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 0, ptr %11, align 8, !tbaa !14
  br label %90

90:                                               ; preds = %266, %89
  br label %91

91:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %110, %91
  %93 = load i32, ptr %12, align 4, !tbaa !5
  %94 = load i32, ptr %2, align 4, !tbaa !5
  %95 = load i32, ptr %3, align 4, !tbaa !5
  %96 = add nsw i32 %94, %95
  %97 = add nsw i32 %96, 2
  %98 = icmp slt i32 %93, %97
  br i1 %98, label %100, label %99

99:                                               ; preds = %92
  store i32 16, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %113

100:                                              ; preds = %92
  %101 = load i32, ptr %12, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [402 x i32], ptr @prevnode, i64 0, i64 %102
  store i32 0, ptr %103, align 4, !tbaa !5
  %104 = load i32, ptr %12, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [402 x i8], ptr @visit, i64 0, i64 %105
  store i8 0, ptr %106, align 1, !tbaa !16
  %107 = load i32, ptr %12, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [402 x i32], ptr @flow, i64 0, i64 %108
  store i32 0, ptr %109, align 4, !tbaa !5
  br label %110

110:                                              ; preds = %100
  %111 = load i32, ptr %12, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %12, align 4, !tbaa !5
  br label %92, !llvm.loop !18

113:                                              ; preds = %99
  store i32 1000000007, ptr @flow, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  br label %114

114:                                              ; preds = %204, %113
  br label %115

115:                                              ; preds = %114
  store i32 0, ptr %13, align 4, !tbaa !5
  store i32 -1, 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 %116

116:                                              ; preds = %144, %115
  %117 = load i32, ptr %15, align 4, !tbaa !5
  %118 = load i32, ptr %2, align 4, !tbaa !5
  %119 = load i32, ptr %3, align 4, !tbaa !5
  %120 = add nsw i32 %118, %119
  %121 = add nsw i32 %120, 2
  %122 = icmp slt i32 %117, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %116
  store i32 21, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %147

124:                                              ; preds = %116
  %125 = load i32, ptr %15, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [402 x i8], ptr @visit, i64 0, i64 %126
  %128 = load i8, ptr %127, align 1, !tbaa !16, !range !19, !noundef !20
  %129 = trunc i8 %128 to i1
  br i1 %129, label %143, label %130

130:                                              ; preds = %124
  %131 = load i32, ptr %15, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [402 x i32], ptr @flow, i64 0, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = load i32, ptr %13, align 4, !tbaa !5
  %136 = icmp sgt i32 %134, %135
  br i1 %136, label %137, label %143

137:                                              ; preds = %130
  %138 = load i32, ptr %15, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [402 x i32], ptr @flow, i64 0, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !5
  store i32 %141, ptr %13, align 4, !tbaa !5
  %142 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %142, ptr %14, align 4, !tbaa !5
  br label %143

143:                                              ; preds = %137, %130, %124
  br label %144

144:                                              ; preds = %143
  %145 = load i32, ptr %15, align 4, !tbaa !5
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %15, align 4, !tbaa !5
  br label %116, !llvm.loop !21

147:                                              ; preds = %123
  %148 = load i32, ptr %14, align 4, !tbaa !5
  %149 = icmp eq i32 %148, -1
  br i1 %149, label %157, label %150

150:                                              ; preds = %147
  %151 = load i32, ptr %14, align 4, !tbaa !5
  %152 = load i32, ptr %2, align 4, !tbaa !5
  %153 = load i32, ptr %3, align 4, !tbaa !5
  %154 = add nsw i32 %152, %153
  %155 = add nsw i32 %154, 1
  %156 = icmp eq i32 %151, %155
  br i1 %156, label %157, label %158

157:                                              ; preds = %150, %147
  br label %205

158:                                              ; preds = %150
  %159 = load i32, ptr %14, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [402 x i8], ptr @visit, i64 0, i64 %160
  store i8 1, ptr %161, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %162

162:                                              ; preds = %201, %158
  %163 = load i32, ptr %16, align 4, !tbaa !5
  %164 = load i32, ptr %2, align 4, !tbaa !5
  %165 = load i32, ptr %3, align 4, !tbaa !5
  %166 = add nsw i32 %164, %165
  %167 = add nsw i32 %166, 2
  %168 = icmp slt i32 %163, %167
  br i1 %168, label %170, label %169

169:                                              ; preds = %162
  store i32 24, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %204

170:                                              ; preds = %162
  %171 = load i32, ptr %16, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [402 x i32], ptr @flow, i64 0, i64 %172
  %174 = load i32, ptr %173, align 4, !tbaa !5
  %175 = load i32, ptr %14, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [402 x [402 x i32]], ptr @rate, i64 0, i64 %176
  %178 = load i32, ptr %16, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [402 x i32], ptr %177, i64 0, i64 %179
  %181 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %180)
  %182 = load i32, ptr %181, align 4, !tbaa !5
  %183 = icmp slt i32 %174, %182
  br i1 %183, label %184, label %200

184:                                              ; preds = %170
  %185 = load i32, ptr %14, align 4, !tbaa !5
  %186 = load i32, ptr %16, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [402 x i32], ptr @prevnode, i64 0, i64 %187
  store i32 %185, ptr %188, align 4, !tbaa !5
  %189 = load i32, ptr %14, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [402 x [402 x i32]], ptr @rate, i64 0, i64 %190
  %192 = load i32, ptr %16, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [402 x i32], ptr %191, i64 0, i64 %193
  %195 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %194)
  %196 = load i32, ptr %195, align 4, !tbaa !5
  %197 = load i32, ptr %16, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [402 x i32], ptr @flow, i64 0, i64 %198
  store i32 %196, ptr %199, align 4, !tbaa !5
  br label %200

200:                                              ; preds = %184, %170
  br label %201

201:                                              ; preds = %200
  %202 = load i32, ptr %16, align 4, !tbaa !5
  %203 = add nsw i32 %202, 1
  store i32 %203, ptr %16, align 4, !tbaa !5
  br label %162, !llvm.loop !22

204:                                              ; preds = %169
  br label %114, !llvm.loop !23

205:                                              ; preds = %157
  %206 = load i32, ptr %14, align 4, !tbaa !5
  %207 = icmp eq i32 %206, -1
  br i1 %207, label %208, label %209

208:                                              ; preds = %205
  store i32 15, ptr %7, align 4
  br label %264

209:                                              ; preds = %205
  %210 = load i64, ptr %11, align 8, !tbaa !14
  %211 = load i32, ptr %2, align 4, !tbaa !5
  %212 = load i32, ptr %3, align 4, !tbaa !5
  %213 = add nsw i32 %211, %212
  %214 = add nsw i32 %213, 1
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [402 x i32], ptr @flow, i64 0, i64 %215
  %217 = load i32, ptr %216, align 4, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = add nsw i64 %210, %218
  store i64 %219, ptr %11, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %220 = load i32, ptr %2, align 4, !tbaa !5
  %221 = load i32, ptr %3, align 4, !tbaa !5
  %222 = add nsw i32 %220, %221
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %17, align 4, !tbaa !5
  br label %224

224:                                              ; preds = %227, %209
  %225 = load i32, ptr %17, align 4, !tbaa !5
  %226 = icmp ne i32 %225, 0
  br i1 %226, label %227, label %263

227:                                              ; preds = %224
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %228 = load i32, ptr %17, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [402 x i32], ptr @prevnode, i64 0, i64 %229
  %231 = load i32, ptr %230, align 4, !tbaa !5
  store i32 %231, ptr %18, align 4, !tbaa !5
  %232 = load i32, ptr %2, align 4, !tbaa !5
  %233 = load i32, ptr %3, align 4, !tbaa !5
  %234 = add nsw i32 %232, %233
  %235 = add nsw i32 %234, 1
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [402 x i32], ptr @flow, i64 0, i64 %236
  %238 = load i32, ptr %237, align 4, !tbaa !5
  %239 = load i32, ptr %18, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [402 x [402 x i32]], ptr @rate, i64 0, i64 %240
  %242 = load i32, ptr %17, align 4, !tbaa !5
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [402 x i32], ptr %241, i64 0, i64 %243
  %245 = load i32, ptr %244, align 4, !tbaa !5
  %246 = sub nsw i32 %245, %238
  store i32 %246, ptr %244, align 4, !tbaa !5
  %247 = load i32, ptr %2, align 4, !tbaa !5
  %248 = load i32, ptr %3, align 4, !tbaa !5
  %249 = add nsw i32 %247, %248
  %250 = add nsw i32 %249, 1
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [402 x i32], ptr @flow, i64 0, i64 %251
  %253 = load i32, ptr %252, align 4, !tbaa !5
  %254 = load i32, ptr %17, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [402 x [402 x i32]], ptr @rate, i64 0, i64 %255
  %257 = load i32, ptr %18, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds [402 x i32], ptr %256, i64 0, i64 %258
  %260 = load i32, ptr %259, align 4, !tbaa !5
  %261 = add nsw i32 %260, %253
  store i32 %261, ptr %259, align 4, !tbaa !5
  %262 = load i32, ptr %18, align 4, !tbaa !5
  store i32 %262, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %224, !llvm.loop !24

263:                                              ; preds = %224
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  store i32 0, ptr %7, align 4
  br label %264

264:                                              ; preds = %263, %208
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  %265 = load i32, ptr %7, align 4
  switch i32 %265, label %272 [
    i32 0, label %266
    i32 15, label %267
  ]

266:                                              ; preds = %264
  br label %90, !llvm.loop !25

267:                                              ; preds = %264
  %268 = load i64, ptr %11, align 8, !tbaa !14
  %269 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %268)
  %270 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %269, ptr noundef @.str)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %271 = load i32, ptr %1, align 4
  ret i32 %271

272:                                              ; preds = %264
  unreachable
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #5 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = !{!15, !15, i64 0}
!15 = !{!"long long", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = distinct !{!18, !10}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@rate = external dso_local global [402 x [402 x i32]], align 16
@prevnode = external dso_local local_unnamed_addr global [402 x i32], align 16
@flow = external dso_local local_unnamed_addr global [402 x i32], align 16
@visit = external dso_local local_unnamed_addr global [402 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %.not72 = icmp slt i32 %8, 1
  br i1 %.not72, label %.preheader68, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %9 = add nuw i32 %8, 1
  %wide.trip.count = zext i32 %9 to i64
  %10 = zext nneg i32 %8 to i64
  %min.iters.check = icmp ult i32 %8, 8
  br i1 %min.iters.check, label %.lr.ph.preheader177, label %vector.ph

.lr.ph.preheader177:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 1, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %10, 2147483640
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %11 = getelementptr inbounds [402 x i32], ptr @rate, i64 0, i64 %offset.idx
  %12 = getelementptr inbounds i8, ptr %11, i64 16
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %11, align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %12, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %13 = icmp eq i64 %index.next, %n.vec
  br i1 %13, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %10
  br i1 %cmp.n, label %.preheader68, label %.lr.ph.preheader177

.preheader68:                                     ; preds = %.lr.ph, %middle.block, %0
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph75, label %.preheader67

.lr.ph75:                                         ; preds = %.preheader68
  %16 = add nsw i32 %14, %8
  %17 = add nsw i32 %16, 1
  %18 = sext i32 %17 to i64
  %19 = sext i32 %8 to i64
  %20 = sext i32 %16 to i64
  br label %23

.lr.ph:                                           ; preds = %.lr.ph.preheader177, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader177 ]
  %21 = getelementptr inbounds [402 x i32], ptr @rate, i64 0, i64 %indvars.iv
  store i32 1, ptr %21, 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 %.preheader68, label %.lr.ph, !llvm.loop !13

.preheader67:                                     ; preds = %23, %.preheader68
  %22 = icmp sgt i32 %8, 0
  br i1 %22, label %.lr.ph79, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader.loopexit, %.preheader67
  %.ph157 = phi i32 [ %14, %.preheader67 ], [ %.pre118.pre, %.preheader.loopexit ]
  %.ph158 = phi i32 [ %8, %.preheader67 ], [ %30, %.preheader.loopexit ]
  br label %.preheader

23:                                               ; preds = %.lr.ph75, %23
  %indvars.iv101 = phi i64 [ %19, %.lr.ph75 ], [ %indvars.iv.next102, %23 ]
  %indvars.iv.next102 = add nsw i64 %indvars.iv101, 1
  %24 = getelementptr inbounds [402 x [402 x i32]], ptr @rate, i64 0, i64 %indvars.iv.next102, i64 %18
  store i32 1, ptr %24, align 4, !tbaa !5
  %25 = icmp slt i64 %indvars.iv.next102, %20
  br i1 %25, label %23, label %.preheader67, !llvm.loop !14

.preheader.loopexit:                              ; preds = %._crit_edge
  %.pre118.pre = load i32, ptr %2, align 4, !tbaa !5
  br label %.preheader.preheader

.lr.ph79:                                         ; preds = %.preheader67, %._crit_edge
  %indvars.iv104 = phi i64 [ %indvars.iv.next105.pre-phi, %._crit_edge ], [ 0, %.preheader67 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph77, label %.lr.ph79.._crit_edge_crit_edge

.lr.ph79.._crit_edge_crit_edge:                   ; preds = %.lr.ph79
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  %.pre120 = add nuw nsw i64 %indvars.iv104, 1
  br label %._crit_edge

.lr.ph77:                                         ; preds = %.lr.ph79
  %29 = add nuw nsw i64 %indvars.iv104, 1
  br label %33

._crit_edge:                                      ; preds = %33, %.lr.ph79.._crit_edge_crit_edge
  %indvars.iv.next105.pre-phi = phi i64 [ %.pre120, %.lr.ph79.._crit_edge_crit_edge ], [ %29, %33 ]
  %30 = phi i32 [ %.pre, %.lr.ph79.._crit_edge_crit_edge ], [ %36, %33 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  %31 = sext i32 %30 to i64
  %32 = icmp slt i64 %indvars.iv.next105.pre-phi, %31
  br i1 %32, label %.lr.ph79, label %.preheader.loopexit, !llvm.loop !15

33:                                               ; preds = %.lr.ph77, %33
  %.05476 = phi i32 [ 0, %.lr.ph77 ], [ %40, %33 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = load i32, ptr %1, align 4, !tbaa !5
  %37 = add nsw i32 %36, %35
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [402 x [402 x i32]], ptr @rate, i64 0, i64 %29, i64 %38
  store i32 1, ptr %39, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  %40 = add nuw nsw i32 %.05476, 1
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %33, label %._crit_edge, !llvm.loop !16

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge98
  %43 = phi i32 [ %66, %._crit_edge98 ], [ %.ph157, %.preheader.preheader ]
  %44 = phi i32 [ %65, %._crit_edge98 ], [ %.ph158, %.preheader.preheader ]
  %45 = phi i32 [ %64, %._crit_edge98 ], [ %.ph157, %.preheader.preheader ]
  %46 = phi i32 [ %63, %._crit_edge98 ], [ %.ph158, %.preheader.preheader ]
  %.052 = phi i64 [ %133, %._crit_edge98 ], [ 0, %.preheader.preheader ]
  %47 = add i32 %46, 2
  %48 = add i32 %47, %45
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %.lr.ph82.preheader, label %._crit_edge83

.lr.ph82.preheader:                               ; preds = %.preheader
  %50 = add i32 %46, 1
  %51 = add i32 %50, %45
  %52 = zext i32 %51 to i64
  %53 = shl nuw nsw i64 %52, 2
  %54 = add nuw nsw i64 %53, 4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) @prevnode, i8 0, i64 %54, i1 false), !tbaa !5
  %55 = add nuw nsw i64 %52, 1
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) @visit, i8 0, i64 %55, i1 false), !tbaa !17
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) @flow, i8 0, i64 %54, i1 false), !tbaa !5
  br label %._crit_edge83

._crit_edge83:                                    ; preds = %.lr.ph82.preheader, %.preheader
  store i32 1000000007, ptr @flow, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  %56 = add nsw i32 %45, %46
  %57 = icmp sgt i32 %56, -2
  br i1 %57, label %.lr.ph87.preheader, label %.thread

.loopexit:                                        ; preds = %120, %104
  %58 = phi i32 [ %66, %104 ], [ %122, %120 ]
  %59 = phi i32 [ %65, %104 ], [ %121, %120 ]
  store i32 0, ptr %5, align 4, !tbaa !5
  %60 = add nsw i32 %58, %59
  %61 = icmp sgt i32 %60, -2
  br i1 %61, label %.lr.ph87.preheader, label %.thread, !llvm.loop !19

.lr.ph87.preheader:                               ; preds = %._crit_edge83, %.loopexit
  %62 = phi i32 [ %60, %.loopexit ], [ %56, %._crit_edge83 ]
  %63 = phi i32 [ %59, %.loopexit ], [ %46, %._crit_edge83 ]
  %64 = phi i32 [ %58, %.loopexit ], [ %45, %._crit_edge83 ]
  %65 = phi i32 [ %59, %.loopexit ], [ %44, %._crit_edge83 ]
  %66 = phi i32 [ %58, %.loopexit ], [ %43, %._crit_edge83 ]
  %67 = add i32 %63, 2
  %68 = add i32 %67, %64
  %wide.trip.count113 = zext i32 %68 to i64
  %xtraiter = and i64 %wide.trip.count113, 1
  %69 = icmp eq i32 %68, 1
  br i1 %69, label %._crit_edge88.unr-lcssa, label %.lr.ph87.preheader.new

.lr.ph87.preheader.new:                           ; preds = %.lr.ph87.preheader
  %unroll_iter = and i64 %wide.trip.count113, 4294967294
  br label %.lr.ph87

._crit_edge88.unr-lcssa:                          ; preds = %102, %.lr.ph87.preheader
  %.1.lcssa.ph = phi i32 [ poison, %.lr.ph87.preheader ], [ %.1.1, %102 ]
  %indvars.iv110.unr = phi i64 [ 0, %.lr.ph87.preheader ], [ %indvars.iv.next111.1, %102 ]
  %.05084.unr = phi i32 [ -1, %.lr.ph87.preheader ], [ %.1.1, %102 ]
  %.unr = phi i32 [ 0, %.lr.ph87.preheader ], [ %103, %102 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge88, label %.lr.ph87.epil

.lr.ph87.epil:                                    ; preds = %._crit_edge88.unr-lcssa
  %70 = getelementptr inbounds [402 x i8], ptr @visit, i64 0, i64 %indvars.iv110.unr
  %71 = load i8, ptr %70, align 1, !tbaa !17, !range !20, !noundef !21
  %72 = trunc nuw i8 %71 to i1
  br i1 %72, label %._crit_edge88, label %73

73:                                               ; preds = %.lr.ph87.epil
  %74 = getelementptr inbounds [402 x i32], ptr @flow, i64 0, i64 %indvars.iv110.unr
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = icmp sgt i32 %75, %.unr
  br i1 %76, label %77, label %._crit_edge88

77:                                               ; preds = %73
  store i32 %75, ptr %5, align 4, !tbaa !5
  %78 = trunc nuw nsw i64 %indvars.iv110.unr to i32
  br label %._crit_edge88

._crit_edge88:                                    ; preds = %.lr.ph87.epil, %73, %77, %._crit_edge88.unr-lcssa
  %.1.lcssa = phi i32 [ %.1.lcssa.ph, %._crit_edge88.unr-lcssa ], [ %.05084.unr, %.lr.ph87.epil ], [ %78, %77 ], [ %.05084.unr, %73 ]
  %79 = icmp eq i32 %.1.lcssa, -1
  %80 = add nsw i32 %62, 1
  %81 = icmp eq i32 %.1.lcssa, %80
  %or.cond = select i1 %79, i1 true, i1 %81
  br i1 %or.cond, label %127, label %104

.lr.ph87:                                         ; preds = %102, %.lr.ph87.preheader.new
  %indvars.iv110 = phi i64 [ 0, %.lr.ph87.preheader.new ], [ %indvars.iv.next111.1, %102 ]
  %.05084 = phi i32 [ -1, %.lr.ph87.preheader.new ], [ %.1.1, %102 ]
  %82 = phi i32 [ 0, %.lr.ph87.preheader.new ], [ %103, %102 ]
  %niter = phi i64 [ 0, %.lr.ph87.preheader.new ], [ %niter.next.1, %102 ]
  %83 = getelementptr inbounds [402 x i8], ptr @visit, i64 0, i64 %indvars.iv110
  %84 = load i8, ptr %83, align 2, !tbaa !17, !range !20, !noundef !21
  %85 = trunc nuw i8 %84 to i1
  br i1 %85, label %.lr.ph87.1, label %86

86:                                               ; preds = %.lr.ph87
  %87 = getelementptr inbounds [402 x i32], ptr @flow, i64 0, i64 %indvars.iv110
  %88 = load i32, ptr %87, align 8, !tbaa !5
  %89 = icmp sgt i32 %88, %82
  br i1 %89, label %90, label %.lr.ph87.1

90:                                               ; preds = %86
  store i32 %88, ptr %5, align 4, !tbaa !5
  %91 = trunc nuw nsw i64 %indvars.iv110 to i32
  br label %.lr.ph87.1

.lr.ph87.1:                                       ; preds = %.lr.ph87, %86, %90
  %92 = phi i32 [ %82, %.lr.ph87 ], [ %88, %90 ], [ %82, %86 ]
  %.1 = phi i32 [ %.05084, %.lr.ph87 ], [ %91, %90 ], [ %.05084, %86 ]
  %indvars.iv.next111 = or disjoint i64 %indvars.iv110, 1
  %93 = getelementptr inbounds [402 x i8], ptr @visit, i64 0, i64 %indvars.iv.next111
  %94 = load i8, ptr %93, align 1, !tbaa !17, !range !20, !noundef !21
  %95 = trunc nuw i8 %94 to i1
  br i1 %95, label %102, label %96

96:                                               ; preds = %.lr.ph87.1
  %97 = getelementptr inbounds [402 x i32], ptr @flow, i64 0, i64 %indvars.iv.next111
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = icmp sgt i32 %98, %92
  br i1 %99, label %100, label %102

100:                                              ; preds = %96
  store i32 %98, ptr %5, align 4, !tbaa !5
  %101 = trunc nuw nsw i64 %indvars.iv.next111 to i32
  br label %102

102:                                              ; preds = %100, %96, %.lr.ph87.1
  %103 = phi i32 [ %92, %.lr.ph87.1 ], [ %98, %100 ], [ %92, %96 ]
  %.1.1 = phi i32 [ %.1, %.lr.ph87.1 ], [ %101, %100 ], [ %.1, %96 ]
  %indvars.iv.next111.1 = add nuw nsw i64 %indvars.iv110, 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_edge88.unr-lcssa, label %.lr.ph87, !llvm.loop !22

104:                                              ; preds = %._crit_edge88
  %105 = sext i32 %.1.lcssa to i64
  %106 = getelementptr inbounds [402 x i8], ptr @visit, i64 0, i64 %105
  store i8 1, ptr %106, align 1, !tbaa !17
  %107 = add i32 %65, 2
  %108 = add i32 %107, %66
  %109 = icmp sgt i32 %108, 0
  br i1 %109, label %.lr.ph93, label %.loopexit

.lr.ph93:                                         ; preds = %104, %120
  %indvars.iv115 = phi i64 [ %indvars.iv.next116, %120 ], [ 0, %104 ]
  %110 = getelementptr inbounds [402 x i32], ptr @flow, i64 0, i64 %indvars.iv115
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = getelementptr inbounds [402 x [402 x i32]], ptr @rate, i64 0, i64 %105, i64 %indvars.iv115
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %112)
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = icmp slt i32 %111, %114
  br i1 %115, label %116, label %120

116:                                              ; preds = %.lr.ph93
  %117 = getelementptr inbounds [402 x i32], ptr @prevnode, i64 0, i64 %indvars.iv115
  store i32 %.1.lcssa, ptr %117, align 4, !tbaa !5
  %118 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %112)
  %119 = load i32, ptr %118, align 4, !tbaa !5
  store i32 %119, ptr %110, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %.lr.ph93, %116
  %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1
  %121 = load i32, ptr %1, align 4, !tbaa !5
  %122 = load i32, ptr %2, align 4, !tbaa !5
  %123 = add i32 %121, 2
  %124 = add i32 %123, %122
  %125 = sext i32 %124 to i64
  %126 = icmp slt i64 %indvars.iv.next116, %125
  br i1 %126, label %.lr.ph93, label %.loopexit, !llvm.loop !23

127:                                              ; preds = %._crit_edge88
  br i1 %79, label %.thread, label %128

128:                                              ; preds = %127
  %129 = sext i32 %80 to i64
  %130 = getelementptr inbounds [402 x i32], ptr @flow, i64 0, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = add nsw i64 %.052, %132
  %.not6194 = icmp eq i32 %80, 0
  br i1 %.not6194, label %._crit_edge98, label %.lr.ph97

.lr.ph97:                                         ; preds = %128, %.lr.ph97
  %.04795 = phi i32 [ %136, %.lr.ph97 ], [ %80, %128 ]
  %134 = sext i32 %.04795 to i64
  %135 = getelementptr inbounds [402 x i32], ptr @prevnode, i64 0, i64 %134
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [402 x [402 x i32]], ptr @rate, i64 0, i64 %137, i64 %134
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = sub nsw i32 %139, %131
  store i32 %140, ptr %138, align 4, !tbaa !5
  %141 = getelementptr inbounds [402 x [402 x i32]], ptr @rate, i64 0, i64 %134, i64 %137
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = add nsw i32 %142, %131
  store i32 %143, ptr %141, align 4, !tbaa !5
  %.not61 = icmp eq i32 %136, 0
  br i1 %.not61, label %._crit_edge98, label %.lr.ph97, !llvm.loop !24

._crit_edge98:                                    ; preds = %.lr.ph97, %128
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  br label %.preheader

.thread:                                          ; preds = %127, %._crit_edge83, %.loopexit
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.052)
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %144, ptr noundef nonnull @.str)
  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
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #5 align 2

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

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

!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, !12, !11}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = !{!18, !18, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = distinct !{!19, !10}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}


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