; LLVM IR from ShahjalalShohag/code-library :: Graph Theory (Minimum Weight Cycle For Each Vertex)

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

@g = external dso_local global [305 x [305 x i32]], align 16
@d = external dso_local global [305 x i32], align 16
@vis = external dso_local global [305 x i32], align 16
@par = external dso_local global [305 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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 i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %14 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %15 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %17
  %19 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %18, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %20 = 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)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 1, ptr %3, align 4, !tbaa !8
  br label %21

21:                                               ; preds = %60, %0
  %22 = load i32, ptr %3, align 4, !tbaa !8
  %23 = load i32, ptr %2, align 4, !tbaa !8
  %24 = icmp sle i32 %22, %23
  br i1 %24, label %26, label %25

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

26:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 1, ptr %5, align 4, !tbaa !8
  br label %27

27:                                               ; preds = %56, %26
  %28 = load i32, ptr %5, align 4, !tbaa !8
  %29 = load i32, ptr %2, align 4, !tbaa !8
  %30 = icmp sle i32 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %59

32:                                               ; preds = %27
  %33 = load i32, ptr %3, align 4, !tbaa !8
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [305 x [305 x i32]], ptr @g, i64 0, i64 %34
  %36 = load i32, ptr %5, align 4, !tbaa !8
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [305 x i32], ptr %35, i64 0, i64 %37
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %38)
  %40 = load i32, ptr %3, align 4, !tbaa !8
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [305 x [305 x i32]], ptr @g, i64 0, i64 %41
  %43 = load i32, ptr %5, align 4, !tbaa !8
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [305 x i32], ptr %42, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !8
  %47 = icmp eq i32 %46, -1
  br i1 %47, label %48, label %55

48:                                               ; preds = %32
  %49 = load i32, ptr %3, align 4, !tbaa !8
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [305 x [305 x i32]], ptr @g, i64 0, i64 %50
  %52 = load i32, ptr %5, align 4, !tbaa !8
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [305 x i32], ptr %51, i64 0, i64 %53
  store i32 1000000000, ptr %54, align 4, !tbaa !8
  br label %55

55:                                               ; preds = %48, %32
  br label %56

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

59:                                               ; preds = %31
  br label %60

60:                                               ; preds = %59
  %61 = load i32, ptr %3, align 4, !tbaa !8
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %3, align 4, !tbaa !8
  br label %21, !llvm.loop !13

63:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !8
  br label %64

64:                                               ; preds = %275, %63
  %65 = load i32, ptr %6, align 4, !tbaa !8
  %66 = load i32, ptr %2, align 4, !tbaa !8
  %67 = icmp sle i32 %65, %66
  br i1 %67, label %69, label %68

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

69:                                               ; preds = %64
  call void @llvm.memset.p0.i64(ptr align 16 @vis, i8 0, i64 1220, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !8
  br label %70

70:                                               ; preds = %83, %69
  %71 = load i32, ptr %7, align 4, !tbaa !8
  %72 = load i32, ptr %2, align 4, !tbaa !8
  %73 = icmp sle i32 %71, %72
  br i1 %73, label %75, label %74

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

75:                                               ; preds = %70
  %76 = load i32, ptr %7, align 4, !tbaa !8
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %77
  store i32 1000000000, ptr %78, align 4, !tbaa !8
  %79 = load i32, ptr %7, align 4, !tbaa !8
  %80 = load i32, ptr %7, align 4, !tbaa !8
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [305 x i32], ptr @par, i64 0, i64 %81
  store i32 %79, ptr %82, align 4, !tbaa !8
  br label %83

83:                                               ; preds = %75
  %84 = load i32, ptr %7, align 4, !tbaa !8
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %7, align 4, !tbaa !8
  br label %70, !llvm.loop !14

86:                                               ; preds = %74
  %87 = load i32, ptr %6, align 4, !tbaa !8
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %88
  store i32 0, ptr %89, align 4, !tbaa !8
  %90 = load i32, ptr %6, align 4, !tbaa !8
  %91 = load i32, ptr %6, align 4, !tbaa !8
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [305 x i32], ptr @par, i64 0, i64 %92
  store i32 %90, ptr %93, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1000000000, ptr %8, align 4, !tbaa !8
  br label %94

94:                                               ; preds = %266, %86
  br label %95

95:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !8
  br label %96

96:                                               ; preds = %120, %95
  %97 = load i32, ptr %10, align 4, !tbaa !8
  %98 = load i32, ptr %2, align 4, !tbaa !8
  %99 = icmp sle i32 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %96
  store i32 16, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %123

101:                                              ; preds = %96
  %102 = load i32, ptr %10, align 4, !tbaa !8
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [305 x i32], ptr @vis, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !8
  %106 = icmp ne i32 %105, 0
  br i1 %106, label %119, label %107

107:                                              ; preds = %101
  %108 = load i32, ptr %10, align 4, !tbaa !8
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !8
  %112 = load i32, ptr %9, align 4, !tbaa !8
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !8
  %116 = icmp slt i32 %111, %115
  br i1 %116, label %117, label %119

117:                                              ; preds = %107
  %118 = load i32, ptr %10, align 4, !tbaa !8
  store i32 %118, ptr %9, align 4, !tbaa !8
  br label %119

119:                                              ; preds = %117, %107, %101
  br label %120

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

123:                                              ; preds = %100
  %124 = load i32, ptr %9, align 4, !tbaa !8
  %125 = icmp eq i32 %124, 0
  br i1 %125, label %126, label %127

126:                                              ; preds = %123
  store i32 15, ptr %4, align 4
  br label %264

127:                                              ; preds = %123
  %128 = load i32, ptr %9, align 4, !tbaa !8
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [305 x i32], ptr @vis, i64 0, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !8
  %132 = icmp ne i32 %131, 0
  br i1 %132, label %133, label %134

133:                                              ; preds = %127
  store i32 15, ptr %4, align 4
  br label %264

134:                                              ; preds = %127
  %135 = load i32, ptr %9, align 4, !tbaa !8
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [305 x i32], ptr @vis, i64 0, i64 %136
  store i32 1, ptr %137, align 4, !tbaa !8
  %138 = load i32, ptr %9, align 4, !tbaa !8
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [305 x i32], ptr @par, i64 0, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !8
  %142 = load i32, ptr %9, align 4, !tbaa !8
  %143 = icmp ne i32 %141, %142
  br i1 %143, label %144, label %159

144:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %145 = load i32, ptr %9, align 4, !tbaa !8
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %146
  %148 = load i32, ptr %147, align 4, !tbaa !8
  %149 = load i32, ptr %9, align 4, !tbaa !8
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [305 x [305 x i32]], ptr @g, i64 0, i64 %150
  %152 = load i32, ptr %6, align 4, !tbaa !8
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [305 x i32], ptr %151, i64 0, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !8
  %156 = add nsw i32 %148, %155
  store i32 %156, ptr %11, align 4, !tbaa !8
  %157 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %158 = load i32, ptr %157, align 4, !tbaa !8
  store i32 %158, ptr %8, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %159

159:                                              ; preds = %144, %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 1, ptr %12, align 4, !tbaa !8
  br label %160

160:                                              ; preds = %260, %159
  %161 = load i32, ptr %12, align 4, !tbaa !8
  %162 = load i32, ptr %2, align 4, !tbaa !8
  %163 = icmp sle i32 %161, %162
  br i1 %163, label %165, label %164

164:                                              ; preds = %160
  store i32 19, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %263

165:                                              ; preds = %160
  %166 = load i32, ptr %12, align 4, !tbaa !8
  %167 = load i32, ptr %6, align 4, !tbaa !8
  %168 = icmp ne i32 %166, %167
  br i1 %168, label %169, label %259

169:                                              ; preds = %165
  %170 = load i32, ptr %12, align 4, !tbaa !8
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [305 x i32], ptr @vis, i64 0, i64 %171
  %173 = load i32, ptr %172, align 4, !tbaa !8
  %174 = icmp ne i32 %173, 0
  br i1 %174, label %175, label %206

175:                                              ; preds = %169
  %176 = load i32, ptr %12, align 4, !tbaa !8
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [305 x i32], ptr @par, i64 0, i64 %177
  %179 = load i32, ptr %178, align 4, !tbaa !8
  %180 = load i32, ptr %9, align 4, !tbaa !8
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [305 x i32], ptr @par, i64 0, i64 %181
  %183 = load i32, ptr %182, align 4, !tbaa !8
  %184 = icmp ne i32 %179, %183
  br i1 %184, label %185, label %205

185:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %186 = load i32, ptr %9, align 4, !tbaa !8
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %187
  %189 = load i32, ptr %188, align 4, !tbaa !8
  %190 = load i32, ptr %12, align 4, !tbaa !8
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %191
  %193 = load i32, ptr %192, align 4, !tbaa !8
  %194 = add nsw i32 %189, %193
  %195 = load i32, ptr %9, align 4, !tbaa !8
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [305 x [305 x i32]], ptr @g, i64 0, i64 %196
  %198 = load i32, ptr %12, align 4, !tbaa !8
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [305 x i32], ptr %197, i64 0, i64 %199
  %201 = load i32, ptr %200, align 4, !tbaa !8
  %202 = add nsw i32 %194, %201
  store i32 %202, ptr %13, align 4, !tbaa !8
  %203 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %204 = load i32, ptr %203, align 4, !tbaa !8
  store i32 %204, ptr %8, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %205

205:                                              ; preds = %185, %175
  br label %258

206:                                              ; preds = %169
  %207 = load i32, ptr %9, align 4, !tbaa !8
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %208
  %210 = load i32, ptr %209, align 4, !tbaa !8
  %211 = load i32, ptr %9, align 4, !tbaa !8
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [305 x [305 x i32]], ptr @g, i64 0, i64 %212
  %214 = load i32, ptr %12, align 4, !tbaa !8
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [305 x i32], ptr %213, i64 0, i64 %215
  %217 = load i32, ptr %216, align 4, !tbaa !8
  %218 = add nsw i32 %210, %217
  %219 = load i32, ptr %12, align 4, !tbaa !8
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %220
  %222 = load i32, ptr %221, align 4, !tbaa !8
  %223 = icmp slt i32 %218, %222
  br i1 %223, label %224, label %257

224:                                              ; preds = %206
  %225 = load i32, ptr %9, align 4, !tbaa !8
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %226
  %228 = load i32, ptr %227, align 4, !tbaa !8
  %229 = load i32, ptr %9, align 4, !tbaa !8
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [305 x [305 x i32]], ptr @g, i64 0, i64 %230
  %232 = load i32, ptr %12, align 4, !tbaa !8
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [305 x i32], ptr %231, i64 0, i64 %233
  %235 = load i32, ptr %234, align 4, !tbaa !8
  %236 = add nsw i32 %228, %235
  %237 = load i32, ptr %12, align 4, !tbaa !8
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %238
  store i32 %236, ptr %239, align 4, !tbaa !8
  %240 = load i32, ptr %9, align 4, !tbaa !8
  %241 = load i32, ptr %6, align 4, !tbaa !8
  %242 = icmp eq i32 %240, %241
  br i1 %242, label %243, label %248

243:                                              ; preds = %224
  %244 = load i32, ptr %12, align 4, !tbaa !8
  %245 = load i32, ptr %12, align 4, !tbaa !8
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [305 x i32], ptr @par, i64 0, i64 %246
  store i32 %244, ptr %247, align 4, !tbaa !8
  br label %256

248:                                              ; preds = %224
  %249 = load i32, ptr %9, align 4, !tbaa !8
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [305 x i32], ptr @par, i64 0, i64 %250
  %252 = load i32, ptr %251, align 4, !tbaa !8
  %253 = load i32, ptr %12, align 4, !tbaa !8
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [305 x i32], ptr @par, i64 0, i64 %254
  store i32 %252, ptr %255, align 4, !tbaa !8
  br label %256

256:                                              ; preds = %248, %243
  br label %257

257:                                              ; preds = %256, %206
  br label %258

258:                                              ; preds = %257, %205
  br label %259

259:                                              ; preds = %258, %165
  br label %260

260:                                              ; preds = %259
  %261 = load i32, ptr %12, align 4, !tbaa !8
  %262 = add nsw i32 %261, 1
  store i32 %262, ptr %12, align 4, !tbaa !8
  br label %160, !llvm.loop !16

263:                                              ; preds = %164
  store i32 0, ptr %4, align 4
  br label %264

264:                                              ; preds = %263, %133, %126
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  %265 = load i32, ptr %4, align 4
  switch i32 %265, label %280 [
    i32 0, label %266
    i32 15, label %267
  ]

266:                                              ; preds = %264
  br label %94, !llvm.loop !17

267:                                              ; preds = %264
  %268 = load i32, ptr %8, align 4, !tbaa !8
  %269 = icmp eq i32 %268, 1000000000
  br i1 %269, label %270, label %271

270:                                              ; preds = %267
  store i32 -1, ptr %8, align 4, !tbaa !8
  br label %271

271:                                              ; preds = %270, %267
  %272 = load i32, ptr %8, align 4, !tbaa !8
  %273 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %272)
  %274 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %273, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %275

275:                                              ; preds = %271
  %276 = load i32, ptr %6, align 4, !tbaa !8
  %277 = add nsw i32 %276, 1
  store i32 %277, ptr %6, align 4, !tbaa !8
  br label %64, !llvm.loop !18

278:                                              ; preds = %68
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %279 = load i32, ptr %1, align 4
  ret i32 %279

280:                                              ; preds = %264
  unreachable
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

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

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

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

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

; 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)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #6

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

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


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

%"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" }

@g = external dso_local global [305 x [305 x i32]], align 16
@d = external dso_local local_unnamed_addr global [305 x i32], align 16
@vis = external dso_local local_unnamed_addr global [305 x i32], align 16
@par = external dso_local local_unnamed_addr global [305 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %6 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %7 = getelementptr i8, ptr %6, i64 -24
  %8 = load i64, ptr %7, align 8
  %9 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %8
  %10 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %9, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %11 = 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)
  %12 = load i32, ptr %1, align 4, !tbaa !8
  %.not85 = icmp slt i32 %12, 1
  br i1 %.not85, label %._crit_edge105, label %.preheader82

.preheader82:                                     ; preds = %0, %._crit_edge
  %13 = phi i32 [ %14, %._crit_edge ], [ %12, %0 ]
  %indvars.iv108 = phi i64 [ %indvars.iv.next109, %._crit_edge ], [ 1, %0 ]
  %.not7983 = icmp slt i32 %13, 1
  br i1 %.not7983, label %.preheader82.._crit_edge_crit_edge, label %.lr.ph

.preheader82.._crit_edge_crit_edge:               ; preds = %.preheader82
  %.pre126 = sext i32 %13 to i64
  br label %._crit_edge

.preheader:                                       ; preds = %._crit_edge
  %.not69102 = icmp slt i32 %14, 1
  br i1 %.not69102, label %._crit_edge105, label %.lr.ph104

._crit_edge:                                      ; preds = %20, %.preheader82.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre126, %.preheader82.._crit_edge_crit_edge ], [ %22, %20 ]
  %14 = phi i32 [ %13, %.preheader82.._crit_edge_crit_edge ], [ %21, %20 ]
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %.not.not = icmp slt i64 %indvars.iv108, %.pre-phi
  br i1 %.not.not, label %.preheader82, label %.preheader, !llvm.loop !11

.lr.ph:                                           ; preds = %.preheader82, %20
  %indvars.iv = phi i64 [ %indvars.iv.next, %20 ], [ 1, %.preheader82 ]
  %15 = getelementptr inbounds [305 x [305 x i32]], ptr @g, i64 0, i64 %indvars.iv108, i64 %indvars.iv
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %17 = load i32, ptr %15, align 4, !tbaa !8
  %18 = icmp eq i32 %17, -1
  br i1 %18, label %19, label %20

19:                                               ; preds = %.lr.ph
  store i32 1000000000, ptr %15, align 4, !tbaa !8
  br label %20

20:                                               ; preds = %.lr.ph, %19
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %21 = load i32, ptr %1, align 4, !tbaa !8
  %22 = sext i32 %21 to i64
  %.not79.not = icmp slt i64 %indvars.iv, %22
  br i1 %.not79.not, label %.lr.ph, label %._crit_edge, !llvm.loop !14

._crit_edge105:                                   ; preds = %139, %0, %.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

.lr.ph104:                                        ; preds = %.preheader, %139
  %indvars.iv122 = phi i64 [ %indvars.iv.next123, %139 ], [ 1, %.preheader ]
  %23 = phi i32 [ %143, %139 ], [ %14, %.preheader ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1220) @vis, i8 0, i64 1220, i1 false)
  %.not7087 = icmp slt i32 %23, 0
  br i1 %.not7087, label %._crit_edge91, label %.lr.ph90.preheader

.lr.ph90.preheader:                               ; preds = %.lr.ph104
  %24 = add nuw i32 %23, 1
  %wide.trip.count = zext i32 %24 to i64
  %min.iters.check = icmp ult i32 %23, 7
  br i1 %min.iters.check, label %.lr.ph90.preheader144, label %vector.ph

.lr.ph90.preheader144:                            ; preds = %middle.block, %.lr.ph90.preheader
  %indvars.iv111.ph = phi i64 [ 0, %.lr.ph90.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph90

vector.ph:                                        ; preds = %.lr.ph90.preheader
  %n.vec = and i64 %wide.trip.count, 4294967288
  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>
  %25 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %index
  %26 = getelementptr inbounds i8, ptr %25, i64 16
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %25, align 16, !tbaa !8
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %26, align 16, !tbaa !8
  %27 = getelementptr inbounds [305 x i32], ptr @par, i64 0, i64 %index
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  store <4 x i32> %vec.ind, ptr %27, align 16, !tbaa !8
  store <4 x i32> %step.add, ptr %28, align 16, !tbaa !8
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %29 = icmp eq i64 %index.next, %n.vec
  br i1 %29, label %middle.block, label %vector.body, !llvm.loop !15

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

._crit_edge91:                                    ; preds = %.lr.ph90, %middle.block, %.lr.ph104
  %30 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %indvars.iv122
  store i32 0, ptr %30, align 4, !tbaa !8
  %31 = getelementptr inbounds [305 x i32], ptr @par, i64 0, i64 %indvars.iv122
  %32 = trunc nuw nsw i64 %indvars.iv122 to i32
  store i32 %32, ptr %31, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 1000000000, ptr %2, align 4, !tbaa !8
  %.not7192139 = icmp slt i32 %23, 1
  br i1 %.not7192139, label %._crit_edge97.thread, label %.lr.ph96.preheader

.lr.ph90:                                         ; preds = %.lr.ph90.preheader144, %.lr.ph90
  %indvars.iv111 = phi i64 [ %indvars.iv.next112, %.lr.ph90 ], [ %indvars.iv111.ph, %.lr.ph90.preheader144 ]
  %33 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %indvars.iv111
  store i32 1000000000, ptr %33, align 4, !tbaa !8
  %34 = getelementptr inbounds [305 x i32], ptr @par, i64 0, i64 %indvars.iv111
  %35 = trunc nuw nsw i64 %indvars.iv111 to i32
  store i32 %35, ptr %34, align 4, !tbaa !8
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next112, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge91, label %.lr.ph90, !llvm.loop !18

.loopexit:                                        ; preds = %133, %91
  %36 = phi i32 [ %92, %91 ], [ %134, %133 ]
  %37 = phi i32 [ %93, %91 ], [ %135, %133 ]
  %38 = phi i32 [ %94, %91 ], [ %135, %133 ]
  %.not7192 = icmp slt i32 %38, 1
  br i1 %.not7192, label %._crit_edge97.thread, label %.lr.ph96.preheader

.lr.ph96.preheader:                               ; preds = %._crit_edge91, %.loopexit
  %39 = phi i32 [ %38, %.loopexit ], [ %23, %._crit_edge91 ]
  %40 = phi i32 [ %37, %.loopexit ], [ %23, %._crit_edge91 ]
  %41 = phi i32 [ %36, %.loopexit ], [ 1000000000, %._crit_edge91 ]
  %42 = zext nneg i32 %39 to i64
  %xtraiter = and i64 %42, 1
  %43 = icmp eq i32 %39, 1
  br i1 %43, label %._crit_edge97.unr-lcssa, label %.lr.ph96.preheader.new

.lr.ph96.preheader.new:                           ; preds = %.lr.ph96.preheader
  %unroll_iter = and i64 %42, 2147483646
  br label %.lr.ph96

._crit_edge97.unr-lcssa:                          ; preds = %75, %.lr.ph96.preheader
  %.1.lcssa.ph = phi i32 [ poison, %.lr.ph96.preheader ], [ %.1.1, %75 ]
  %indvars.iv114.unr = phi i64 [ 1, %.lr.ph96.preheader ], [ %indvars.iv.next115.1, %75 ]
  %.06293.unr = phi i32 [ 0, %.lr.ph96.preheader ], [ %.1.1, %75 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge97, label %.lr.ph96.epil

.lr.ph96.epil:                                    ; preds = %._crit_edge97.unr-lcssa
  %44 = getelementptr inbounds [305 x i32], ptr @vis, i64 0, i64 %indvars.iv114.unr
  %45 = load i32, ptr %44, align 4, !tbaa !8
  %.not78.epil = icmp eq i32 %45, 0
  br i1 %.not78.epil, label %46, label %._crit_edge97

46:                                               ; preds = %.lr.ph96.epil
  %47 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %indvars.iv114.unr
  %48 = load i32, ptr %47, align 4, !tbaa !8
  %49 = sext i32 %.06293.unr to i64
  %50 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !8
  %52 = icmp slt i32 %48, %51
  %53 = trunc nuw nsw i64 %indvars.iv114.unr to i32
  %spec.select.epil = select i1 %52, i32 %53, i32 %.06293.unr
  br label %._crit_edge97

._crit_edge97:                                    ; preds = %.lr.ph96.epil, %46, %._crit_edge97.unr-lcssa
  %.1.lcssa = phi i32 [ %.1.lcssa.ph, %._crit_edge97.unr-lcssa ], [ %.06293.unr, %.lr.ph96.epil ], [ %spec.select.epil, %46 ]
  %54 = icmp eq i32 %.1.lcssa, 0
  br i1 %54, label %._crit_edge97.thread, label %76

.lr.ph96:                                         ; preds = %75, %.lr.ph96.preheader.new
  %indvars.iv114 = phi i64 [ 1, %.lr.ph96.preheader.new ], [ %indvars.iv.next115.1, %75 ]
  %.06293 = phi i32 [ 0, %.lr.ph96.preheader.new ], [ %.1.1, %75 ]
  %niter = phi i64 [ 0, %.lr.ph96.preheader.new ], [ %niter.next.1, %75 ]
  %55 = getelementptr inbounds [305 x i32], ptr @vis, i64 0, i64 %indvars.iv114
  %56 = load i32, ptr %55, align 4, !tbaa !8
  %.not78 = icmp eq i32 %56, 0
  br i1 %.not78, label %57, label %.lr.ph96.1

57:                                               ; preds = %.lr.ph96
  %58 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %indvars.iv114
  %59 = load i32, ptr %58, align 4, !tbaa !8
  %60 = sext i32 %.06293 to i64
  %61 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !8
  %63 = icmp slt i32 %59, %62
  %64 = trunc nuw nsw i64 %indvars.iv114 to i32
  %spec.select = select i1 %63, i32 %64, i32 %.06293
  br label %.lr.ph96.1

.lr.ph96.1:                                       ; preds = %57, %.lr.ph96
  %.1 = phi i32 [ %.06293, %.lr.ph96 ], [ %spec.select, %57 ]
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %65 = getelementptr inbounds [305 x i32], ptr @vis, i64 0, i64 %indvars.iv.next115
  %66 = load i32, ptr %65, align 4, !tbaa !8
  %.not78.1 = icmp eq i32 %66, 0
  br i1 %.not78.1, label %67, label %75

67:                                               ; preds = %.lr.ph96.1
  %68 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %indvars.iv.next115
  %69 = load i32, ptr %68, align 4, !tbaa !8
  %70 = sext i32 %.1 to i64
  %71 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !8
  %73 = icmp slt i32 %69, %72
  %74 = trunc nuw nsw i64 %indvars.iv.next115 to i32
  %spec.select.1 = select i1 %73, i32 %74, i32 %.1
  br label %75

75:                                               ; preds = %67, %.lr.ph96.1
  %.1.1 = phi i32 [ %.1, %.lr.ph96.1 ], [ %spec.select.1, %67 ]
  %indvars.iv.next115.1 = add nuw nsw i64 %indvars.iv114, 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_edge97.unr-lcssa, label %.lr.ph96, !llvm.loop !19

76:                                               ; preds = %._crit_edge97
  %77 = sext i32 %.1.lcssa to i64
  %78 = getelementptr inbounds [305 x i32], ptr @vis, i64 0, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !8
  %.not72 = icmp eq i32 %79, 0
  br i1 %.not72, label %80, label %._crit_edge97.thread

80:                                               ; preds = %76
  store i32 1, ptr %78, align 4, !tbaa !8
  %81 = getelementptr inbounds [305 x i32], ptr @par, i64 0, i64 %77
  %82 = load i32, ptr %81, align 4, !tbaa !8
  %.not73 = icmp eq i32 %82, %.1.lcssa
  br i1 %.not73, label %91, label %83

83:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %84 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %77
  %85 = load i32, ptr %84, align 4, !tbaa !8
  %86 = getelementptr inbounds [305 x [305 x i32]], ptr @g, i64 0, i64 %77, i64 %indvars.iv122
  %87 = load i32, ptr %86, align 4, !tbaa !8
  %88 = add nsw i32 %87, %85
  store i32 %88, ptr %3, align 4, !tbaa !8
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %90 = load i32, ptr %89, align 4, !tbaa !8
  store i32 %90, ptr %2, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  %.pre = load i32, ptr %1, align 4, !tbaa !8
  br label %91

91:                                               ; preds = %83, %80
  %92 = phi i32 [ %90, %83 ], [ %41, %80 ]
  %93 = phi i32 [ %.pre, %83 ], [ %40, %80 ]
  %94 = phi i32 [ %.pre, %83 ], [ %39, %80 ]
  %.not7498 = icmp slt i32 %94, 1
  br i1 %.not7498, label %.loopexit, label %.lr.ph101

.lr.ph101:                                        ; preds = %91
  %95 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %77
  %96 = zext i32 %.1.lcssa to i64
  %97 = icmp eq i64 %indvars.iv122, %96
  br label %98

98:                                               ; preds = %.lr.ph101, %133
  %99 = phi i32 [ %92, %.lr.ph101 ], [ %134, %133 ]
  %100 = phi i32 [ %93, %.lr.ph101 ], [ %135, %133 ]
  %indvars.iv119 = phi i64 [ 1, %.lr.ph101 ], [ %indvars.iv.next120, %133 ]
  %.not75 = icmp eq i64 %indvars.iv119, %indvars.iv122
  br i1 %.not75, label %133, label %101

101:                                              ; preds = %98
  %102 = getelementptr inbounds [305 x i32], ptr @vis, i64 0, i64 %indvars.iv119
  %103 = load i32, ptr %102, align 4, !tbaa !8
  %.not76 = icmp eq i32 %103, 0
  br i1 %.not76, label %118, label %104

104:                                              ; preds = %101
  %105 = getelementptr inbounds [305 x i32], ptr @par, i64 0, i64 %indvars.iv119
  %106 = load i32, ptr %105, align 4, !tbaa !8
  %107 = load i32, ptr %81, align 4, !tbaa !8
  %.not77 = icmp eq i32 %106, %107
  br i1 %.not77, label %133, label %108

108:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %109 = load i32, ptr %95, align 4, !tbaa !8
  %110 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %indvars.iv119
  %111 = load i32, ptr %110, align 4, !tbaa !8
  %112 = add nsw i32 %111, %109
  %113 = getelementptr inbounds [305 x [305 x i32]], ptr @g, i64 0, i64 %77, i64 %indvars.iv119
  %114 = load i32, ptr %113, align 4, !tbaa !8
  %115 = add nsw i32 %112, %114
  store i32 %115, ptr %4, align 4, !tbaa !8
  %116 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %117 = load i32, ptr %116, align 4, !tbaa !8
  store i32 %117, ptr %2, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  %.pre125 = load i32, ptr %1, align 4, !tbaa !8
  br label %133

118:                                              ; preds = %101
  %119 = load i32, ptr %95, align 4, !tbaa !8
  %120 = getelementptr inbounds [305 x [305 x i32]], ptr @g, i64 0, i64 %77, i64 %indvars.iv119
  %121 = load i32, ptr %120, align 4, !tbaa !8
  %122 = add nsw i32 %121, %119
  %123 = getelementptr inbounds [305 x i32], ptr @d, i64 0, i64 %indvars.iv119
  %124 = load i32, ptr %123, align 4, !tbaa !8
  %125 = icmp slt i32 %122, %124
  br i1 %125, label %126, label %133

126:                                              ; preds = %118
  store i32 %122, ptr %123, align 4, !tbaa !8
  br i1 %97, label %127, label %130

127:                                              ; preds = %126
  %128 = getelementptr inbounds [305 x i32], ptr @par, i64 0, i64 %indvars.iv119
  %129 = trunc nuw nsw i64 %indvars.iv119 to i32
  store i32 %129, ptr %128, align 4, !tbaa !8
  br label %133

130:                                              ; preds = %126
  %131 = load i32, ptr %81, align 4, !tbaa !8
  %132 = getelementptr inbounds [305 x i32], ptr @par, i64 0, i64 %indvars.iv119
  store i32 %131, ptr %132, align 4, !tbaa !8
  br label %133

133:                                              ; preds = %98, %118, %130, %127, %104, %108
  %134 = phi i32 [ %99, %98 ], [ %99, %118 ], [ %99, %130 ], [ %99, %127 ], [ %99, %104 ], [ %117, %108 ]
  %135 = phi i32 [ %100, %98 ], [ %100, %118 ], [ %100, %130 ], [ %100, %127 ], [ %100, %104 ], [ %.pre125, %108 ]
  %indvars.iv.next120 = add nuw nsw i64 %indvars.iv119, 1
  %136 = sext i32 %135 to i64
  %.not74.not = icmp slt i64 %indvars.iv119, %136
  br i1 %.not74.not, label %98, label %.loopexit, !llvm.loop !20

._crit_edge97.thread:                             ; preds = %76, %._crit_edge97, %.loopexit, %._crit_edge91
  %.lcssa135 = phi i32 [ 1000000000, %._crit_edge91 ], [ %41, %76 ], [ %41, %._crit_edge97 ], [ %36, %.loopexit ]
  %137 = icmp eq i32 %.lcssa135, 1000000000
  br i1 %137, label %138, label %139

138:                                              ; preds = %._crit_edge97.thread
  store i32 -1, ptr %2, align 4, !tbaa !8
  br label %139

139:                                              ; preds = %138, %._crit_edge97.thread
  %140 = phi i32 [ -1, %138 ], [ %.lcssa135, %._crit_edge97.thread ]
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %140)
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %141, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  %indvars.iv.next123 = add nuw nsw i64 %indvars.iv122, 1
  %143 = load i32, ptr %1, align 4, !tbaa !8
  %144 = sext i32 %143 to i64
  %.not69.not = icmp slt i64 %indvars.iv122, %144
  br i1 %.not69.not, label %.lr.ph104, label %._crit_edge105, !llvm.loop !21
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #2 align 2

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

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 #1

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

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

; 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 #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #6

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12, !13}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.unswitch.partial.disable"}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12, !16, !17}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !12, !17, !16}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}


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