; LLVM IR from abeaumont/competitive-programming :: kattis (settlers2)

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

@value = external dso_local global [400 x [400 x i32]], align 16
@cachev = external dso_local global [20000 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 nounwind uwtable
declare dso_local noundef i32 @_Z8smallestii(i32 noundef, i32 noundef) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca 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
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %19

19:                                               ; preds = %39, %0
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = icmp slt i32 %20, 400
  br i1 %21, label %23, label %22

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

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

24:                                               ; preds = %35, %23
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = icmp slt i32 %25, 400
  br i1 %26, label %28, label %27

27:                                               ; preds = %24
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %38

28:                                               ; preds = %24
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %30
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [400 x i32], ptr %31, i64 0, i64 %33
  store i32 0, ptr %34, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %28
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %4, align 4, !tbaa !5
  br label %24, !llvm.loop !9

38:                                               ; preds = %27
  br label %39

39:                                               ; preds = %38
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %2, align 4, !tbaa !5
  br label %19, !llvm.loop !11

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

43:                                               ; preds = %51, %42
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = icmp slt i32 %44, 20000
  br i1 %45, label %47, label %46

46:                                               ; preds = %43
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %54

47:                                               ; preds = %43
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [20000 x i32], ptr @cachev, i64 0, i64 %49
  store i32 0, ptr %50, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %47
  %52 = load i32, ptr %5, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %5, align 4, !tbaa !5
  br label %43, !llvm.loop !12

54:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %55 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 200, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 200, ptr %10, align 4, !tbaa !5
  %56 = load i32, ptr %9, align 4, !tbaa !5
  %57 = load i32, ptr %10, align 4, !tbaa !5
  %58 = call noundef i32 @_Z8smallestii(i32 noundef %56, i32 noundef %57)
  %59 = load i32, ptr %9, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %60
  %62 = load i32, ptr %10, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [400 x i32], ptr %61, i64 0, i64 %63
  store i32 %58, ptr %64, align 4, !tbaa !5
  %65 = load i32, ptr %9, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %66
  %68 = load i32, ptr %10, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [400 x i32], ptr %67, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = load i32, ptr %8, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [20000 x i32], ptr @cachev, i64 0, i64 %73
  store i32 %71, ptr %74, align 4, !tbaa !5
  %75 = load i32, ptr %8, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %301, %54
  %78 = load i32, ptr %11, align 4, !tbaa !5
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %304

82:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %83 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %12)
  br label %84

84:                                               ; preds = %290, %82
  %85 = load i32, ptr %8, align 4, !tbaa !5
  %86 = load i32, ptr %12, align 4, !tbaa !5
  %87 = icmp slt i32 %85, %86
  br i1 %87, label %88, label %293

88:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %118, %88
  %90 = load i32, ptr %13, align 4, !tbaa !5
  %91 = load i32, ptr %7, align 4, !tbaa !5
  %92 = icmp slt i32 %90, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %89
  store i32 16, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %121

94:                                               ; preds = %89
  %95 = load i32, ptr %9, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %9, align 4, !tbaa !5
  %97 = load i32, ptr %9, align 4, !tbaa !5
  %98 = load i32, ptr %10, align 4, !tbaa !5
  %99 = call noundef i32 @_Z8smallestii(i32 noundef %97, i32 noundef %98)
  %100 = load i32, ptr %9, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %101
  %103 = load i32, ptr %10, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [400 x i32], ptr %102, i64 0, i64 %104
  store i32 %99, ptr %105, align 4, !tbaa !5
  %106 = load i32, ptr %9, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %107
  %109 = load i32, ptr %10, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [400 x i32], ptr %108, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = load i32, ptr %8, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [20000 x i32], ptr @cachev, i64 0, i64 %114
  store i32 %112, ptr %115, align 4, !tbaa !5
  %116 = load i32, ptr %8, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %8, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %94
  %119 = load i32, ptr %13, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %13, align 4, !tbaa !5
  br label %89, !llvm.loop !13

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

122:                                              ; preds = %153, %121
  %123 = load i32, ptr %14, align 4, !tbaa !5
  %124 = load i32, ptr %7, align 4, !tbaa !5
  %125 = icmp slt i32 %123, %124
  br i1 %125, label %127, label %126

126:                                              ; preds = %122
  store i32 19, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %156

127:                                              ; preds = %122
  %128 = load i32, ptr %9, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %9, align 4, !tbaa !5
  %130 = load i32, ptr %10, align 4, !tbaa !5
  %131 = add nsw i32 %130, -1
  store i32 %131, ptr %10, align 4, !tbaa !5
  %132 = load i32, ptr %9, align 4, !tbaa !5
  %133 = load i32, ptr %10, align 4, !tbaa !5
  %134 = call noundef i32 @_Z8smallestii(i32 noundef %132, i32 noundef %133)
  %135 = load i32, ptr %9, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %136
  %138 = load i32, ptr %10, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [400 x i32], ptr %137, i64 0, i64 %139
  store i32 %134, ptr %140, align 4, !tbaa !5
  %141 = load i32, ptr %9, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %142
  %144 = load i32, ptr %10, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [400 x i32], ptr %143, i64 0, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = load i32, ptr %8, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [20000 x i32], ptr @cachev, i64 0, i64 %149
  store i32 %147, ptr %150, align 4, !tbaa !5
  %151 = load i32, ptr %8, align 4, !tbaa !5
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %8, align 4, !tbaa !5
  br label %153

153:                                              ; preds = %127
  %154 = load i32, ptr %14, align 4, !tbaa !5
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %14, align 4, !tbaa !5
  br label %122, !llvm.loop !14

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

157:                                              ; preds = %186, %156
  %158 = load i32, ptr %15, align 4, !tbaa !5
  %159 = load i32, ptr %7, align 4, !tbaa !5
  %160 = icmp slt i32 %158, %159
  br i1 %160, label %162, label %161

161:                                              ; preds = %157
  store i32 22, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %189

162:                                              ; preds = %157
  %163 = load i32, ptr %10, align 4, !tbaa !5
  %164 = add nsw i32 %163, -1
  store i32 %164, ptr %10, align 4, !tbaa !5
  %165 = load i32, ptr %9, align 4, !tbaa !5
  %166 = load i32, ptr %10, align 4, !tbaa !5
  %167 = call noundef i32 @_Z8smallestii(i32 noundef %165, i32 noundef %166)
  %168 = load i32, ptr %9, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %169
  %171 = load i32, ptr %10, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [400 x i32], ptr %170, i64 0, i64 %172
  store i32 %167, ptr %173, align 4, !tbaa !5
  %174 = load i32, ptr %9, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %175
  %177 = load i32, ptr %10, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [400 x i32], ptr %176, i64 0, i64 %178
  %180 = load i32, ptr %179, align 4, !tbaa !5
  %181 = load i32, ptr %8, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [20000 x i32], ptr @cachev, i64 0, i64 %182
  store i32 %180, ptr %183, align 4, !tbaa !5
  %184 = load i32, ptr %8, align 4, !tbaa !5
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %8, align 4, !tbaa !5
  br label %186

186:                                              ; preds = %162
  %187 = load i32, ptr %15, align 4, !tbaa !5
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %15, align 4, !tbaa !5
  br label %157, !llvm.loop !15

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

190:                                              ; preds = %219, %189
  %191 = load i32, ptr %16, align 4, !tbaa !5
  %192 = load i32, ptr %7, align 4, !tbaa !5
  %193 = icmp slt i32 %191, %192
  br i1 %193, label %195, label %194

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

195:                                              ; preds = %190
  %196 = load i32, ptr %9, align 4, !tbaa !5
  %197 = add nsw i32 %196, -1
  store i32 %197, ptr %9, align 4, !tbaa !5
  %198 = load i32, ptr %9, align 4, !tbaa !5
  %199 = load i32, ptr %10, align 4, !tbaa !5
  %200 = call noundef i32 @_Z8smallestii(i32 noundef %198, i32 noundef %199)
  %201 = load i32, ptr %9, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %202
  %204 = load i32, ptr %10, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [400 x i32], ptr %203, i64 0, i64 %205
  store i32 %200, ptr %206, align 4, !tbaa !5
  %207 = load i32, ptr %9, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %208
  %210 = load i32, ptr %10, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [400 x i32], ptr %209, i64 0, i64 %211
  %213 = load i32, ptr %212, align 4, !tbaa !5
  %214 = load i32, ptr %8, align 4, !tbaa !5
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [20000 x i32], ptr @cachev, i64 0, i64 %215
  store i32 %213, ptr %216, align 4, !tbaa !5
  %217 = load i32, ptr %8, align 4, !tbaa !5
  %218 = add nsw i32 %217, 1
  store i32 %218, ptr %8, align 4, !tbaa !5
  br label %219

219:                                              ; preds = %195
  %220 = load i32, ptr %16, align 4, !tbaa !5
  %221 = add nsw i32 %220, 1
  store i32 %221, ptr %16, align 4, !tbaa !5
  br label %190, !llvm.loop !16

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

223:                                              ; preds = %254, %222
  %224 = load i32, ptr %17, align 4, !tbaa !5
  %225 = load i32, ptr %7, align 4, !tbaa !5
  %226 = icmp slt i32 %224, %225
  br i1 %226, label %228, label %227

227:                                              ; preds = %223
  store i32 28, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %257

228:                                              ; preds = %223
  %229 = load i32, ptr %9, align 4, !tbaa !5
  %230 = add nsw i32 %229, -1
  store i32 %230, ptr %9, align 4, !tbaa !5
  %231 = load i32, ptr %10, align 4, !tbaa !5
  %232 = add nsw i32 %231, 1
  store i32 %232, ptr %10, align 4, !tbaa !5
  %233 = load i32, ptr %9, align 4, !tbaa !5
  %234 = load i32, ptr %10, align 4, !tbaa !5
  %235 = call noundef i32 @_Z8smallestii(i32 noundef %233, i32 noundef %234)
  %236 = load i32, ptr %9, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %237
  %239 = load i32, ptr %10, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [400 x i32], ptr %238, i64 0, i64 %240
  store i32 %235, ptr %241, align 4, !tbaa !5
  %242 = load i32, ptr %9, align 4, !tbaa !5
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %243
  %245 = load i32, ptr %10, align 4, !tbaa !5
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [400 x i32], ptr %244, i64 0, i64 %246
  %248 = load i32, ptr %247, align 4, !tbaa !5
  %249 = load i32, ptr %8, align 4, !tbaa !5
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [20000 x i32], ptr @cachev, i64 0, i64 %250
  store i32 %248, ptr %251, align 4, !tbaa !5
  %252 = load i32, ptr %8, align 4, !tbaa !5
  %253 = add nsw i32 %252, 1
  store i32 %253, ptr %8, align 4, !tbaa !5
  br label %254

254:                                              ; preds = %228
  %255 = load i32, ptr %17, align 4, !tbaa !5
  %256 = add nsw i32 %255, 1
  store i32 %256, ptr %17, align 4, !tbaa !5
  br label %223, !llvm.loop !17

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

258:                                              ; preds = %287, %257
  %259 = load i32, ptr %18, align 4, !tbaa !5
  %260 = load i32, ptr %7, align 4, !tbaa !5
  %261 = icmp sle i32 %259, %260
  br i1 %261, label %263, label %262

262:                                              ; preds = %258
  store i32 31, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %290

263:                                              ; preds = %258
  %264 = load i32, ptr %10, align 4, !tbaa !5
  %265 = add nsw i32 %264, 1
  store i32 %265, ptr %10, align 4, !tbaa !5
  %266 = load i32, ptr %9, align 4, !tbaa !5
  %267 = load i32, ptr %10, align 4, !tbaa !5
  %268 = call noundef i32 @_Z8smallestii(i32 noundef %266, i32 noundef %267)
  %269 = load i32, ptr %9, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %270
  %272 = load i32, ptr %10, align 4, !tbaa !5
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds [400 x i32], ptr %271, i64 0, i64 %273
  store i32 %268, ptr %274, align 4, !tbaa !5
  %275 = load i32, ptr %9, align 4, !tbaa !5
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %276
  %278 = load i32, ptr %10, align 4, !tbaa !5
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [400 x i32], ptr %277, i64 0, i64 %279
  %281 = load i32, ptr %280, align 4, !tbaa !5
  %282 = load i32, ptr %8, align 4, !tbaa !5
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [20000 x i32], ptr @cachev, i64 0, i64 %283
  store i32 %281, ptr %284, align 4, !tbaa !5
  %285 = load i32, ptr %8, align 4, !tbaa !5
  %286 = add nsw i32 %285, 1
  store i32 %286, ptr %8, align 4, !tbaa !5
  br label %287

287:                                              ; preds = %263
  %288 = load i32, ptr %18, align 4, !tbaa !5
  %289 = add nsw i32 %288, 1
  store i32 %289, ptr %18, align 4, !tbaa !5
  br label %258, !llvm.loop !18

290:                                              ; preds = %262
  %291 = load i32, ptr %7, align 4, !tbaa !5
  %292 = add nsw i32 %291, 1
  store i32 %292, ptr %7, align 4, !tbaa !5
  br label %84, !llvm.loop !19

293:                                              ; preds = %84
  %294 = load i32, ptr %12, align 4, !tbaa !5
  %295 = sub nsw i32 %294, 1
  %296 = sext i32 %295 to i64
  %297 = getelementptr inbounds [20000 x i32], ptr @cachev, i64 0, i64 %296
  %298 = load i32, ptr %297, align 4, !tbaa !5
  %299 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %298)
  %300 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %299, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %301

301:                                              ; preds = %293
  %302 = load i32, ptr %11, align 4, !tbaa !5
  %303 = add nsw i32 %302, 1
  store i32 %303, ptr %11, align 4, !tbaa !5
  br label %77, !llvm.loop !20

304:                                              ; preds = %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %305 = load i32, ptr %1, align 4
  ret i32 %305
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

@value = external dso_local local_unnamed_addr global [400 x [400 x i32]], align 16
@cachev = external dso_local local_unnamed_addr global [20000 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 nounwind uwtable
declare dso_local noundef i32 @_Z8smallestii(i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
.preheader126.preheader:
  %0 = alloca i32, align 4
  %1 = alloca i32, align 4
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(640000) @value, i8 0, i64 640000, i1 false), !tbaa !5
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(80000) @cachev, i8 0, i64 80000, i1 false), !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %0) #7
  %2 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %0)
  %3 = call noundef i32 @_Z8smallestii(i32 noundef 200, i32 noundef 200)
  store i32 %3, ptr getelementptr inbounds (i8, ptr @value, i64 320800), align 16, !tbaa !5
  store i32 %3, ptr @cachev, align 16, !tbaa !5
  %4 = load i32, ptr %0, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph186, label %._crit_edge187

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

.lr.ph186:                                        ; preds = %.preheader126.preheader, %._crit_edge174
  %.0101184 = phi i32 [ %80, %._crit_edge174 ], [ 0, %.preheader126.preheader ]
  %.0102183 = phi i32 [ %.1.lcssa, %._crit_edge174 ], [ 200, %.preheader126.preheader ]
  %.0103182 = phi i32 [ %.1104.lcssa, %._crit_edge174 ], [ 200, %.preheader126.preheader ]
  %.0109181 = phi i32 [ %.1110.lcssa, %._crit_edge174 ], [ 1, %.preheader126.preheader ]
  %.0115180 = phi i32 [ %.1116.lcssa, %._crit_edge174 ], [ 0, %.preheader126.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #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 = load i32, ptr %1, align 4, !tbaa !5
  %8 = icmp slt i32 %.0109181, %7
  br i1 %8, label %.preheader125, label %._crit_edge174

.preheader125:                                    ; preds = %.lr.ph186, %._crit_edge
  %indvars.iv259.in = phi i32 [ %indvars.iv259, %._crit_edge ], [ %.0115180, %.lr.ph186 ]
  %.1173 = phi i32 [ %.5.lcssa, %._crit_edge ], [ %.0102183, %.lr.ph186 ]
  %.1104172 = phi i32 [ %.5108.lcssa277, %._crit_edge ], [ %.0103182, %.lr.ph186 ]
  %.1110171 = phi i32 [ %.7.lcssa, %._crit_edge ], [ %.0109181, %.lr.ph186 ]
  %.1116170 = phi i32 [ %65, %._crit_edge ], [ %.0115180, %.lr.ph186 ]
  %indvars.iv259 = add i32 %indvars.iv259.in, 1
  %9 = icmp sgt i32 %.1116170, 1
  br i1 %9, label %.lr.ph, label %.preheader124

.lr.ph:                                           ; preds = %.preheader125
  %10 = sext i32 %.1173 to i64
  %11 = sext i32 %.1104172 to i64
  %12 = sext i32 %.1110171 to i64
  br label %18

.preheader124.loopexit:                           ; preds = %18
  %13 = trunc nsw i64 %indvars.iv.next208 to i32
  br label %.preheader124

.preheader124:                                    ; preds = %.preheader124.loopexit, %.preheader125
  %.2111.lcssa = phi i32 [ %.1110171, %.preheader125 ], [ %13, %.preheader124.loopexit ]
  %.2105.lcssa = phi i32 [ %.1104172, %.preheader125 ], [ %19, %.preheader124.loopexit ]
  %14 = icmp sgt i32 %.1116170, 0
  br i1 %14, label %.lr.ph139.preheader, label %.preheader

.lr.ph139.preheader:                              ; preds = %.preheader124
  %15 = sext i32 %.1173 to i64
  %16 = sext i32 %.2105.lcssa to i64
  %17 = sext i32 %.2111.lcssa to i64
  br label %.lr.ph139

18:                                               ; preds = %.lr.ph, %18
  %indvars.iv207 = phi i64 [ %12, %.lr.ph ], [ %indvars.iv.next208, %18 ]
  %indvars.iv = phi i64 [ %11, %.lr.ph ], [ %indvars.iv.next, %18 ]
  %.0100133 = phi i32 [ 1, %.lr.ph ], [ %23, %18 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %19 = trunc nsw i64 %indvars.iv.next to i32
  %20 = call noundef i32 @_Z8smallestii(i32 noundef %19, i32 noundef %.1173)
  %21 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %indvars.iv.next, i64 %10
  store i32 %20, ptr %21, align 4, !tbaa !5
  %22 = getelementptr inbounds [20000 x i32], ptr @cachev, i64 0, i64 %indvars.iv207
  store i32 %20, ptr %22, align 4, !tbaa !5
  %indvars.iv.next208 = add nsw i64 %indvars.iv207, 1
  %23 = add nuw nsw i32 %.0100133, 1
  %exitcond.not = icmp eq i32 %23, %.1116170
  br i1 %exitcond.not, label %.preheader124.loopexit, label %18, !llvm.loop !9

.preheader123:                                    ; preds = %.lr.ph139
  %24 = trunc nsw i64 %indvars.iv.next217 to i32
  br i1 %14, label %.lr.ph146, label %._crit_edge

.lr.ph146:                                        ; preds = %.preheader123
  %sext = shl i64 %indvars.iv.next215, 32
  %25 = ashr exact i64 %sext, 32
  %sext293 = shl i64 %indvars.iv.next213, 32
  %26 = ashr exact i64 %sext293, 32
  %sext294 = shl i64 %indvars.iv.next217, 32
  %27 = ashr exact i64 %sext294, 32
  br label %38

.lr.ph139:                                        ; preds = %.lr.ph139.preheader, %.lr.ph139
  %indvars.iv216 = phi i64 [ %17, %.lr.ph139.preheader ], [ %indvars.iv.next217, %.lr.ph139 ]
  %indvars.iv214 = phi i64 [ %16, %.lr.ph139.preheader ], [ %indvars.iv.next215, %.lr.ph139 ]
  %indvars.iv212 = phi i64 [ %15, %.lr.ph139.preheader ], [ %indvars.iv.next213, %.lr.ph139 ]
  %.099138 = phi i32 [ 0, %.lr.ph139.preheader ], [ %33, %.lr.ph139 ]
  %indvars.iv.next215 = add nsw i64 %indvars.iv214, 1
  %indvars.iv.next213 = add nsw i64 %indvars.iv212, -1
  %28 = trunc nsw i64 %indvars.iv.next213 to i32
  %29 = trunc nsw i64 %indvars.iv.next215 to i32
  %30 = call noundef i32 @_Z8smallestii(i32 noundef %29, i32 noundef %28)
  %31 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %indvars.iv.next215, i64 %indvars.iv.next213
  store i32 %30, ptr %31, align 4, !tbaa !5
  %32 = getelementptr inbounds [20000 x i32], ptr @cachev, i64 0, i64 %indvars.iv216
  store i32 %30, ptr %32, align 4, !tbaa !5
  %indvars.iv.next217 = add nsw i64 %indvars.iv216, 1
  %33 = add nuw nsw i32 %.099138, 1
  %exitcond223.not = icmp eq i32 %33, %.1116170
  br i1 %exitcond223.not, label %.preheader123, label %.lr.ph139, !llvm.loop !11

.preheader122:                                    ; preds = %38
  %34 = trunc nsw i64 %indvars.iv.next227 to i32
  br i1 %14, label %.lr.ph152, label %._crit_edge

.lr.ph152:                                        ; preds = %.preheader122
  %sext295 = shl i64 %indvars.iv.next225, 32
  %35 = ashr exact i64 %sext295, 32
  %sext296 = shl i64 %indvars.iv.next215, 32
  %36 = ashr exact i64 %sext296, 32
  %sext297 = shl i64 %indvars.iv.next227, 32
  %37 = ashr exact i64 %sext297, 32
  br label %48

38:                                               ; preds = %.lr.ph146, %38
  %indvars.iv226 = phi i64 [ %27, %.lr.ph146 ], [ %indvars.iv.next227, %38 ]
  %indvars.iv224 = phi i64 [ %26, %.lr.ph146 ], [ %indvars.iv.next225, %38 ]
  %.098145 = phi i32 [ 0, %.lr.ph146 ], [ %43, %38 ]
  %indvars.iv.next225 = add nsw i64 %indvars.iv224, -1
  %39 = trunc nsw i64 %indvars.iv.next225 to i32
  %40 = call noundef i32 @_Z8smallestii(i32 noundef %29, i32 noundef %39)
  %41 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %25, i64 %indvars.iv.next225
  store i32 %40, ptr %41, align 4, !tbaa !5
  %42 = getelementptr inbounds [20000 x i32], ptr @cachev, i64 0, i64 %indvars.iv226
  store i32 %40, ptr %42, align 4, !tbaa !5
  %indvars.iv.next227 = add nsw i64 %indvars.iv226, 1
  %43 = add nuw nsw i32 %.098145, 1
  %exitcond231.not = icmp eq i32 %43, %.1116170
  br i1 %exitcond231.not, label %.preheader122, label %38, !llvm.loop !12

.preheader121:                                    ; preds = %48
  %44 = trunc nsw i64 %indvars.iv.next235 to i32
  br i1 %14, label %.lr.ph159.preheader, label %._crit_edge

.lr.ph159.preheader:                              ; preds = %.preheader121
  %sext298 = shl i64 %indvars.iv.next225, 32
  %45 = ashr exact i64 %sext298, 32
  %sext299 = shl i64 %indvars.iv.next233, 32
  %46 = ashr exact i64 %sext299, 32
  %sext300 = shl i64 %indvars.iv.next235, 32
  %47 = ashr exact i64 %sext300, 32
  br label %.lr.ph159

48:                                               ; preds = %.lr.ph152, %48
  %indvars.iv234 = phi i64 [ %37, %.lr.ph152 ], [ %indvars.iv.next235, %48 ]
  %indvars.iv232 = phi i64 [ %36, %.lr.ph152 ], [ %indvars.iv.next233, %48 ]
  %.097151 = phi i32 [ 0, %.lr.ph152 ], [ %53, %48 ]
  %indvars.iv.next233 = add nsw i64 %indvars.iv232, -1
  %49 = trunc nsw i64 %indvars.iv.next233 to i32
  %50 = call noundef i32 @_Z8smallestii(i32 noundef %49, i32 noundef %39)
  %51 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %indvars.iv.next233, i64 %35
  store i32 %50, ptr %51, align 4, !tbaa !5
  %52 = getelementptr inbounds [20000 x i32], ptr @cachev, i64 0, i64 %indvars.iv234
  store i32 %50, ptr %52, align 4, !tbaa !5
  %indvars.iv.next235 = add nsw i64 %indvars.iv234, 1
  %53 = add nuw nsw i32 %.097151, 1
  %exitcond239.not = icmp eq i32 %53, %.1116170
  br i1 %exitcond239.not, label %.preheader121, label %48, !llvm.loop !13

.preheader.loopexit:                              ; preds = %.lr.ph159
  %54 = trunc nsw i64 %indvars.iv.next245 to i32
  br label %.preheader

.preheader:                                       ; preds = %.preheader124, %.preheader.loopexit
  %.6.lcssa = phi i32 [ %54, %.preheader.loopexit ], [ %.2111.lcssa, %.preheader124 ]
  %.5108.lcssa = phi i32 [ %59, %.preheader.loopexit ], [ %.2105.lcssa, %.preheader124 ]
  %.4.lcssa = phi i32 [ %58, %.preheader.loopexit ], [ %.1173, %.preheader124 ]
  %.not163 = icmp slt i32 %.1116170, 0
  br i1 %.not163, label %._crit_edge, label %.lr.ph167

.lr.ph167:                                        ; preds = %.preheader
  %55 = sext i32 %.5108.lcssa to i64
  %56 = sext i32 %.4.lcssa to i64
  %57 = sext i32 %.6.lcssa to i64
  br label %68

.lr.ph159:                                        ; preds = %.lr.ph159.preheader, %.lr.ph159
  %indvars.iv244 = phi i64 [ %47, %.lr.ph159.preheader ], [ %indvars.iv.next245, %.lr.ph159 ]
  %indvars.iv242 = phi i64 [ %46, %.lr.ph159.preheader ], [ %indvars.iv.next243, %.lr.ph159 ]
  %indvars.iv240 = phi i64 [ %45, %.lr.ph159.preheader ], [ %indvars.iv.next241, %.lr.ph159 ]
  %.096158 = phi i32 [ 0, %.lr.ph159.preheader ], [ %63, %.lr.ph159 ]
  %indvars.iv.next243 = add nsw i64 %indvars.iv242, -1
  %indvars.iv.next241 = add nsw i64 %indvars.iv240, 1
  %58 = trunc nsw i64 %indvars.iv.next241 to i32
  %59 = trunc nsw i64 %indvars.iv.next243 to i32
  %60 = call noundef i32 @_Z8smallestii(i32 noundef %59, i32 noundef %58)
  %61 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %indvars.iv.next243, i64 %indvars.iv.next241
  store i32 %60, ptr %61, align 4, !tbaa !5
  %62 = getelementptr inbounds [20000 x i32], ptr @cachev, i64 0, i64 %indvars.iv244
  store i32 %60, ptr %62, align 4, !tbaa !5
  %indvars.iv.next245 = add nsw i64 %indvars.iv244, 1
  %63 = add nuw nsw i32 %.096158, 1
  %exitcond251.not = icmp eq i32 %63, %.1116170
  br i1 %exitcond251.not, label %.preheader.loopexit, label %.lr.ph159, !llvm.loop !14

._crit_edge.loopexit:                             ; preds = %68
  %64 = trunc nsw i64 %indvars.iv.next255 to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %.preheader122, %.preheader123, %.preheader121, %._crit_edge.loopexit, %.preheader
  %.5108.lcssa277 = phi i32 [ %.5108.lcssa, %.preheader ], [ %.5108.lcssa, %._crit_edge.loopexit ], [ %49, %.preheader121 ], [ %29, %.preheader123 ], [ %29, %.preheader122 ]
  %.7.lcssa = phi i32 [ %.6.lcssa, %.preheader ], [ %64, %._crit_edge.loopexit ], [ %44, %.preheader121 ], [ %24, %.preheader123 ], [ %34, %.preheader122 ]
  %.5.lcssa = phi i32 [ %.4.lcssa, %.preheader ], [ %69, %._crit_edge.loopexit ], [ %39, %.preheader121 ], [ %28, %.preheader123 ], [ %39, %.preheader122 ]
  %65 = add nsw i32 %.1116170, 1
  %66 = load i32, ptr %1, align 4, !tbaa !5
  %67 = icmp slt i32 %.7.lcssa, %66
  br i1 %67, label %.preheader125, label %._crit_edge174, !llvm.loop !15

68:                                               ; preds = %.lr.ph167, %68
  %indvars.iv254 = phi i64 [ %57, %.lr.ph167 ], [ %indvars.iv.next255, %68 ]
  %indvars.iv252 = phi i64 [ %56, %.lr.ph167 ], [ %indvars.iv.next253, %68 ]
  %.0166 = phi i32 [ 0, %.lr.ph167 ], [ %73, %68 ]
  %indvars.iv.next253 = add nsw i64 %indvars.iv252, 1
  %69 = trunc nsw i64 %indvars.iv.next253 to i32
  %70 = call noundef i32 @_Z8smallestii(i32 noundef %.5108.lcssa, i32 noundef %69)
  %71 = getelementptr inbounds [400 x [400 x i32]], ptr @value, i64 0, i64 %55, i64 %indvars.iv.next253
  store i32 %70, ptr %71, align 4, !tbaa !5
  %72 = getelementptr inbounds [20000 x i32], ptr @cachev, i64 0, i64 %indvars.iv254
  store i32 %70, ptr %72, align 4, !tbaa !5
  %indvars.iv.next255 = add nsw i64 %indvars.iv254, 1
  %73 = add nuw i32 %.0166, 1
  %exitcond261.not = icmp eq i32 %.0166, %indvars.iv259.in
  br i1 %exitcond261.not, label %._crit_edge.loopexit, label %68, !llvm.loop !16

._crit_edge174:                                   ; preds = %._crit_edge, %.lr.ph186
  %.1116.lcssa = phi i32 [ %.0115180, %.lr.ph186 ], [ %65, %._crit_edge ]
  %.1110.lcssa = phi i32 [ %.0109181, %.lr.ph186 ], [ %.7.lcssa, %._crit_edge ]
  %.1104.lcssa = phi i32 [ %.0103182, %.lr.ph186 ], [ %.5108.lcssa277, %._crit_edge ]
  %.1.lcssa = phi i32 [ %.0102183, %.lr.ph186 ], [ %.5.lcssa, %._crit_edge ]
  %.lcssa = phi i32 [ %7, %.lr.ph186 ], [ %66, %._crit_edge ]
  %74 = add nsw i32 %.lcssa, -1
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [20000 x i32], ptr @cachev, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %77)
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %78, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %80 = add nuw nsw i32 %.0101184, 1
  %81 = load i32, ptr %0, align 4, !tbaa !5
  %82 = icmp slt i32 %80, %81
  br i1 %82, label %.lr.ph186, label %._crit_edge187, !llvm.loop !17
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass