; LLVM IR from eyangch/competitive-programming :: USACOcontests/platinum/2019.12 (pieaters)

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

@N = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@W = external dso_local global [100000 x i64], align 16
@L = external dso_local global [100000 x i64], align 16
@R = external dso_local global [100000 x i64], align 16
@dp = external dso_local global [300 x [300 x i64]], align 16
@C = external dso_local global [300 x [300 x [300 x i64]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, 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 i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %18 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %19 = getelementptr i8, ptr %18, i64 -24
  %20 = load i64, ptr %19, align 8
  %21 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %20
  %22 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %21, ptr noundef null)
  %23 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %24 = load ptr, ptr @stdin, align 8, !tbaa !8
  %25 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %24)
  %26 = load ptr, ptr @stdout, align 8, !tbaa !8
  %27 = call ptr @freopen(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %26)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(8) @M)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store i64 0, ptr %2, align 8, !tbaa !11
  br label %30

30:                                               ; preds = %103, %0
  %31 = load i64, ptr %2, align 8, !tbaa !11
  %32 = load i64, ptr @M, align 8, !tbaa !11
  %33 = icmp slt i64 %31, %32
  br i1 %33, label %35, label %34

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

35:                                               ; preds = %30
  %36 = load i64, ptr %2, align 8, !tbaa !11
  %37 = getelementptr inbounds [100000 x i64], ptr @W, i64 0, i64 %36
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %37)
  %39 = load i64, ptr %2, align 8, !tbaa !11
  %40 = getelementptr inbounds [100000 x i64], ptr @L, i64 0, i64 %39
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 8 dereferenceable(8) %40)
  %42 = load i64, ptr %2, align 8, !tbaa !11
  %43 = getelementptr inbounds [100000 x i64], ptr @R, i64 0, i64 %42
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 8 dereferenceable(8) %43)
  %45 = load i64, ptr %2, align 8, !tbaa !11
  %46 = getelementptr inbounds [100000 x i64], ptr @L, i64 0, i64 %45
  %47 = load i64, ptr %46, align 8, !tbaa !11
  %48 = add nsw i64 %47, -1
  store i64 %48, ptr %46, align 8, !tbaa !11
  %49 = load i64, ptr %2, align 8, !tbaa !11
  %50 = getelementptr inbounds [100000 x i64], ptr @R, i64 0, i64 %49
  %51 = load i64, ptr %50, align 8, !tbaa !11
  %52 = add nsw i64 %51, -1
  store i64 %52, ptr %50, align 8, !tbaa !11
  %53 = load i64, ptr %2, align 8, !tbaa !11
  %54 = getelementptr inbounds [100000 x i64], ptr @W, i64 0, i64 %53
  %55 = load i64, ptr %54, align 8, !tbaa !11
  %56 = load i64, ptr %2, align 8, !tbaa !11
  %57 = getelementptr inbounds [100000 x i64], ptr @L, i64 0, i64 %56
  %58 = load i64, ptr %57, align 8, !tbaa !11
  %59 = getelementptr inbounds [300 x [300 x i64]], ptr @dp, i64 0, i64 %58
  %60 = load i64, ptr %2, align 8, !tbaa !11
  %61 = getelementptr inbounds [100000 x i64], ptr @R, i64 0, i64 %60
  %62 = load i64, ptr %61, align 8, !tbaa !11
  %63 = getelementptr inbounds [300 x i64], ptr %59, i64 0, i64 %62
  store i64 %55, ptr %63, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %64 = load i64, ptr %2, align 8, !tbaa !11
  %65 = getelementptr inbounds [100000 x i64], ptr @L, i64 0, i64 %64
  %66 = load i64, ptr %65, align 8, !tbaa !11
  store i64 %66, ptr %4, align 8, !tbaa !11
  br label %67

67:                                               ; preds = %99, %35
  %68 = load i64, ptr %4, align 8, !tbaa !11
  %69 = load i64, ptr %2, align 8, !tbaa !11
  %70 = getelementptr inbounds [100000 x i64], ptr @R, i64 0, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !11
  %72 = icmp sle i64 %68, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %67
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %102

74:                                               ; preds = %67
  %75 = load i64, ptr %4, align 8, !tbaa !11
  %76 = getelementptr inbounds [300 x [300 x [300 x i64]]], ptr @C, i64 0, i64 %75
  %77 = load i64, ptr %2, align 8, !tbaa !11
  %78 = getelementptr inbounds [100000 x i64], ptr @L, i64 0, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !11
  %80 = getelementptr inbounds [300 x [300 x i64]], ptr %76, i64 0, i64 %79
  %81 = load i64, ptr %2, align 8, !tbaa !11
  %82 = getelementptr inbounds [100000 x i64], ptr @R, i64 0, i64 %81
  %83 = load i64, ptr %82, align 8, !tbaa !11
  %84 = getelementptr inbounds [300 x i64], ptr %80, i64 0, i64 %83
  %85 = load i64, ptr %2, align 8, !tbaa !11
  %86 = getelementptr inbounds [100000 x i64], ptr @W, i64 0, i64 %85
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef nonnull align 8 dereferenceable(8) %86)
  %88 = load i64, ptr %87, align 8, !tbaa !11
  %89 = load i64, ptr %4, align 8, !tbaa !11
  %90 = getelementptr inbounds [300 x [300 x [300 x i64]]], ptr @C, i64 0, i64 %89
  %91 = load i64, ptr %2, align 8, !tbaa !11
  %92 = getelementptr inbounds [100000 x i64], ptr @L, i64 0, i64 %91
  %93 = load i64, ptr %92, align 8, !tbaa !11
  %94 = getelementptr inbounds [300 x [300 x i64]], ptr %90, i64 0, i64 %93
  %95 = load i64, ptr %2, align 8, !tbaa !11
  %96 = getelementptr inbounds [100000 x i64], ptr @R, i64 0, i64 %95
  %97 = load i64, ptr %96, align 8, !tbaa !11
  %98 = getelementptr inbounds [300 x i64], ptr %94, i64 0, i64 %97
  store i64 %88, ptr %98, align 8, !tbaa !11
  br label %99

99:                                               ; preds = %74
  %100 = load i64, ptr %4, align 8, !tbaa !11
  %101 = add nsw i64 %100, 1
  store i64 %101, ptr %4, align 8, !tbaa !11
  br label %67, !llvm.loop !13

102:                                              ; preds = %73
  br label %103

103:                                              ; preds = %102
  %104 = load i64, ptr %2, align 8, !tbaa !11
  %105 = add nsw i64 %104, 1
  store i64 %105, ptr %2, align 8, !tbaa !11
  br label %30, !llvm.loop !15

106:                                              ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store i64 1, ptr %5, align 8, !tbaa !11
  br label %107

107:                                              ; preds = %182, %106
  %108 = load i64, ptr %5, align 8, !tbaa !11
  %109 = load i64, ptr @N, align 8, !tbaa !11
  %110 = icmp slt i64 %108, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %107
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %185

112:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store i64 0, ptr %6, align 8, !tbaa !11
  br label %113

113:                                              ; preds = %178, %112
  %114 = load i64, ptr %5, align 8, !tbaa !11
  %115 = load i64, ptr %6, align 8, !tbaa !11
  %116 = add nsw i64 %114, %115
  %117 = load i64, ptr @N, align 8, !tbaa !11
  %118 = icmp slt i64 %116, %117
  br i1 %118, label %120, label %119

119:                                              ; preds = %113
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %181

120:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %121 = load i64, ptr %6, align 8, !tbaa !11
  store i64 %121, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %122 = load i64, ptr %5, align 8, !tbaa !11
  %123 = load i64, ptr %6, align 8, !tbaa !11
  %124 = add nsw i64 %122, %123
  store i64 %124, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %125 = load i64, ptr %7, align 8, !tbaa !11
  store i64 %125, ptr %9, align 8, !tbaa !11
  br label %126

126:                                              ; preds = %174, %120
  %127 = load i64, ptr %9, align 8, !tbaa !11
  %128 = load i64, ptr %8, align 8, !tbaa !11
  %129 = icmp sle i64 %127, %128
  br i1 %129, label %131, label %130

130:                                              ; preds = %126
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %177

131:                                              ; preds = %126
  %132 = load i64, ptr %9, align 8, !tbaa !11
  %133 = getelementptr inbounds [300 x [300 x [300 x i64]]], ptr @C, i64 0, i64 %132
  %134 = load i64, ptr %7, align 8, !tbaa !11
  %135 = getelementptr inbounds [300 x [300 x i64]], ptr %133, i64 0, i64 %134
  %136 = load i64, ptr %8, align 8, !tbaa !11
  %137 = getelementptr inbounds [300 x i64], ptr %135, i64 0, i64 %136
  %138 = load i64, ptr %9, align 8, !tbaa !11
  %139 = getelementptr inbounds [300 x [300 x [300 x i64]]], ptr @C, i64 0, i64 %138
  %140 = load i64, ptr %7, align 8, !tbaa !11
  %141 = add nsw i64 %140, 1
  %142 = getelementptr inbounds [300 x [300 x i64]], ptr %139, i64 0, i64 %141
  %143 = load i64, ptr %8, align 8, !tbaa !11
  %144 = getelementptr inbounds [300 x i64], ptr %142, i64 0, i64 %143
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %137, ptr noundef nonnull align 8 dereferenceable(8) %144)
  %146 = load i64, ptr %145, align 8, !tbaa !11
  %147 = load i64, ptr %9, align 8, !tbaa !11
  %148 = getelementptr inbounds [300 x [300 x [300 x i64]]], ptr @C, i64 0, i64 %147
  %149 = load i64, ptr %7, align 8, !tbaa !11
  %150 = getelementptr inbounds [300 x [300 x i64]], ptr %148, i64 0, i64 %149
  %151 = load i64, ptr %8, align 8, !tbaa !11
  %152 = getelementptr inbounds [300 x i64], ptr %150, i64 0, i64 %151
  store i64 %146, ptr %152, align 8, !tbaa !11
  %153 = load i64, ptr %9, align 8, !tbaa !11
  %154 = getelementptr inbounds [300 x [300 x [300 x i64]]], ptr @C, i64 0, i64 %153
  %155 = load i64, ptr %7, align 8, !tbaa !11
  %156 = getelementptr inbounds [300 x [300 x i64]], ptr %154, i64 0, i64 %155
  %157 = load i64, ptr %8, align 8, !tbaa !11
  %158 = getelementptr inbounds [300 x i64], ptr %156, i64 0, i64 %157
  %159 = load i64, ptr %9, align 8, !tbaa !11
  %160 = getelementptr inbounds [300 x [300 x [300 x i64]]], ptr @C, i64 0, i64 %159
  %161 = load i64, ptr %7, align 8, !tbaa !11
  %162 = getelementptr inbounds [300 x [300 x i64]], ptr %160, i64 0, i64 %161
  %163 = load i64, ptr %8, align 8, !tbaa !11
  %164 = sub nsw i64 %163, 1
  %165 = getelementptr inbounds [300 x i64], ptr %162, i64 0, i64 %164
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %158, ptr noundef nonnull align 8 dereferenceable(8) %165)
  %167 = load i64, ptr %166, align 8, !tbaa !11
  %168 = load i64, ptr %9, align 8, !tbaa !11
  %169 = getelementptr inbounds [300 x [300 x [300 x i64]]], ptr @C, i64 0, i64 %168
  %170 = load i64, ptr %7, align 8, !tbaa !11
  %171 = getelementptr inbounds [300 x [300 x i64]], ptr %169, i64 0, i64 %170
  %172 = load i64, ptr %8, align 8, !tbaa !11
  %173 = getelementptr inbounds [300 x i64], ptr %171, i64 0, i64 %172
  store i64 %167, ptr %173, align 8, !tbaa !11
  br label %174

174:                                              ; preds = %131
  %175 = load i64, ptr %9, align 8, !tbaa !11
  %176 = add nsw i64 %175, 1
  store i64 %176, ptr %9, align 8, !tbaa !11
  br label %126, !llvm.loop !16

177:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %178

178:                                              ; preds = %177
  %179 = load i64, ptr %6, align 8, !tbaa !11
  %180 = add nsw i64 %179, 1
  store i64 %180, ptr %6, align 8, !tbaa !11
  br label %113, !llvm.loop !17

181:                                              ; preds = %119
  br label %182

182:                                              ; preds = %181
  %183 = load i64, ptr %5, align 8, !tbaa !11
  %184 = add nsw i64 %183, 1
  store i64 %184, ptr %5, align 8, !tbaa !11
  br label %107, !llvm.loop !18

185:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 1, ptr %10, align 8, !tbaa !11
  br label %186

186:                                              ; preds = %299, %185
  %187 = load i64, ptr %10, align 8, !tbaa !11
  %188 = load i64, ptr @N, align 8, !tbaa !11
  %189 = icmp slt i64 %187, %188
  br i1 %189, label %191, label %190

190:                                              ; preds = %186
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %302

191:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 0, ptr %11, align 8, !tbaa !11
  br label %192

192:                                              ; preds = %295, %191
  %193 = load i64, ptr %11, align 8, !tbaa !11
  %194 = load i64, ptr %10, align 8, !tbaa !11
  %195 = add nsw i64 %193, %194
  %196 = load i64, ptr @N, align 8, !tbaa !11
  %197 = icmp slt i64 %195, %196
  br i1 %197, label %199, label %198

198:                                              ; preds = %192
  store i32 20, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %298

199:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %200 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %200, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %201 = load i64, ptr %10, align 8, !tbaa !11
  %202 = load i64, ptr %11, align 8, !tbaa !11
  %203 = add nsw i64 %201, %202
  store i64 %203, ptr %13, align 8, !tbaa !11
  %204 = load i64, ptr %12, align 8, !tbaa !11
  %205 = getelementptr inbounds [300 x [300 x i64]], ptr @dp, i64 0, i64 %204
  %206 = load i64, ptr %13, align 8, !tbaa !11
  %207 = getelementptr inbounds [300 x i64], ptr %205, i64 0, i64 %206
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %208 = load i64, ptr %12, align 8, !tbaa !11
  %209 = getelementptr inbounds [300 x [300 x [300 x i64]]], ptr @C, i64 0, i64 %208
  %210 = load i64, ptr %12, align 8, !tbaa !11
  %211 = getelementptr inbounds [300 x [300 x i64]], ptr %209, i64 0, i64 %210
  %212 = load i64, ptr %13, align 8, !tbaa !11
  %213 = getelementptr inbounds [300 x i64], ptr %211, i64 0, i64 %212
  %214 = load i64, ptr %213, align 8, !tbaa !11
  %215 = load i64, ptr %12, align 8, !tbaa !11
  %216 = add nsw i64 %215, 1
  %217 = getelementptr inbounds [300 x [300 x i64]], ptr @dp, i64 0, i64 %216
  %218 = load i64, ptr %13, align 8, !tbaa !11
  %219 = getelementptr inbounds [300 x i64], ptr %217, i64 0, i64 %218
  %220 = load i64, ptr %219, align 8, !tbaa !11
  %221 = add nsw i64 %214, %220
  store i64 %221, ptr %14, align 8, !tbaa !11
  %222 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %207, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %223 = load i64, ptr %222, align 8, !tbaa !11
  %224 = load i64, ptr %12, align 8, !tbaa !11
  %225 = getelementptr inbounds [300 x [300 x i64]], ptr @dp, i64 0, i64 %224
  %226 = load i64, ptr %13, align 8, !tbaa !11
  %227 = getelementptr inbounds [300 x i64], ptr %225, i64 0, i64 %226
  store i64 %223, ptr %227, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  %228 = load i64, ptr %12, align 8, !tbaa !11
  %229 = getelementptr inbounds [300 x [300 x i64]], ptr @dp, i64 0, i64 %228
  %230 = load i64, ptr %13, align 8, !tbaa !11
  %231 = getelementptr inbounds [300 x i64], ptr %229, i64 0, i64 %230
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %232 = load i64, ptr %13, align 8, !tbaa !11
  %233 = getelementptr inbounds [300 x [300 x [300 x i64]]], ptr @C, i64 0, i64 %232
  %234 = load i64, ptr %12, align 8, !tbaa !11
  %235 = getelementptr inbounds [300 x [300 x i64]], ptr %233, i64 0, i64 %234
  %236 = load i64, ptr %13, align 8, !tbaa !11
  %237 = getelementptr inbounds [300 x i64], ptr %235, i64 0, i64 %236
  %238 = load i64, ptr %237, align 8, !tbaa !11
  %239 = load i64, ptr %12, align 8, !tbaa !11
  %240 = getelementptr inbounds [300 x [300 x i64]], ptr @dp, i64 0, i64 %239
  %241 = load i64, ptr %13, align 8, !tbaa !11
  %242 = sub nsw i64 %241, 1
  %243 = getelementptr inbounds [300 x i64], ptr %240, i64 0, i64 %242
  %244 = load i64, ptr %243, align 8, !tbaa !11
  %245 = add nsw i64 %238, %244
  store i64 %245, ptr %15, align 8, !tbaa !11
  %246 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %231, ptr noundef nonnull align 8 dereferenceable(8) %15)
  %247 = load i64, ptr %246, align 8, !tbaa !11
  %248 = load i64, ptr %12, align 8, !tbaa !11
  %249 = getelementptr inbounds [300 x [300 x i64]], ptr @dp, i64 0, i64 %248
  %250 = load i64, ptr %13, align 8, !tbaa !11
  %251 = getelementptr inbounds [300 x i64], ptr %249, i64 0, i64 %250
  store i64 %247, ptr %251, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %252 = load i64, ptr %12, align 8, !tbaa !11
  %253 = add nsw i64 %252, 1
  store i64 %253, ptr %16, align 8, !tbaa !11
  br label %254

254:                                              ; preds = %291, %199
  %255 = load i64, ptr %16, align 8, !tbaa !11
  %256 = load i64, ptr %13, align 8, !tbaa !11
  %257 = icmp slt i64 %255, %256
  br i1 %257, label %259, label %258

258:                                              ; preds = %254
  store i32 23, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %294

259:                                              ; preds = %254
  %260 = load i64, ptr %12, align 8, !tbaa !11
  %261 = getelementptr inbounds [300 x [300 x i64]], ptr @dp, i64 0, i64 %260
  %262 = load i64, ptr %13, align 8, !tbaa !11
  %263 = getelementptr inbounds [300 x i64], ptr %261, i64 0, i64 %262
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %264 = load i64, ptr %12, align 8, !tbaa !11
  %265 = getelementptr inbounds [300 x [300 x i64]], ptr @dp, i64 0, i64 %264
  %266 = load i64, ptr %16, align 8, !tbaa !11
  %267 = sub nsw i64 %266, 1
  %268 = getelementptr inbounds [300 x i64], ptr %265, i64 0, i64 %267
  %269 = load i64, ptr %268, align 8, !tbaa !11
  %270 = load i64, ptr %16, align 8, !tbaa !11
  %271 = add nsw i64 %270, 1
  %272 = getelementptr inbounds [300 x [300 x i64]], ptr @dp, i64 0, i64 %271
  %273 = load i64, ptr %13, align 8, !tbaa !11
  %274 = getelementptr inbounds [300 x i64], ptr %272, i64 0, i64 %273
  %275 = load i64, ptr %274, align 8, !tbaa !11
  %276 = add nsw i64 %269, %275
  %277 = load i64, ptr %16, align 8, !tbaa !11
  %278 = getelementptr inbounds [300 x [300 x [300 x i64]]], ptr @C, i64 0, i64 %277
  %279 = load i64, ptr %12, align 8, !tbaa !11
  %280 = getelementptr inbounds [300 x [300 x i64]], ptr %278, i64 0, i64 %279
  %281 = load i64, ptr %13, align 8, !tbaa !11
  %282 = getelementptr inbounds [300 x i64], ptr %280, i64 0, i64 %281
  %283 = load i64, ptr %282, align 8, !tbaa !11
  %284 = add nsw i64 %276, %283
  store i64 %284, ptr %17, align 8, !tbaa !11
  %285 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %263, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %286 = load i64, ptr %285, align 8, !tbaa !11
  %287 = load i64, ptr %12, align 8, !tbaa !11
  %288 = getelementptr inbounds [300 x [300 x i64]], ptr @dp, i64 0, i64 %287
  %289 = load i64, ptr %13, align 8, !tbaa !11
  %290 = getelementptr inbounds [300 x i64], ptr %288, i64 0, i64 %289
  store i64 %286, ptr %290, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %291

291:                                              ; preds = %259
  %292 = load i64, ptr %16, align 8, !tbaa !11
  %293 = add nsw i64 %292, 1
  store i64 %293, ptr %16, align 8, !tbaa !11
  br label %254, !llvm.loop !19

294:                                              ; preds = %258
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %295

295:                                              ; preds = %294
  %296 = load i64, ptr %11, align 8, !tbaa !11
  %297 = add nsw i64 %296, 1
  store i64 %297, ptr %11, align 8, !tbaa !11
  br label %192, !llvm.loop !20

298:                                              ; preds = %198
  br label %299

299:                                              ; preds = %298
  %300 = load i64, ptr %10, align 8, !tbaa !11
  %301 = add nsw i64 %300, 1
  store i64 %301, ptr %10, align 8, !tbaa !11
  br label %186, !llvm.loop !21

302:                                              ; preds = %190
  %303 = load i64, ptr @N, align 8, !tbaa !11
  %304 = sub nsw i64 %303, 1
  %305 = getelementptr inbounds [300 x i64], ptr @dp, i64 0, i64 %304
  %306 = load i64, ptr %305, align 8, !tbaa !11
  %307 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %306)
  %308 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %307, i8 noundef signext 10)
  %309 = load i32, ptr %1, align 4
  ret i32 %309
}

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

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

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

; 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

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

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


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

@N = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@W = external dso_local global [100000 x i64], align 16
@L = external dso_local global [100000 x i64], align 16
@R = external dso_local global [100000 x i64], align 16
@dp = external dso_local global [300 x [300 x i64]], align 16
@C = external dso_local global [300 x [300 x [300 x i64]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, 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 i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %5 = getelementptr i8, ptr %4, i64 -24
  %6 = load i64, ptr %5, align 8
  %7 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %6
  %8 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %7, ptr noundef null)
  %9 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %10 = load ptr, ptr @stdin, align 8, !tbaa !8
  %11 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %10)
  %12 = load ptr, ptr @stdout, align 8, !tbaa !8
  %13 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %12)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(8) @M)
  %16 = load i64, ptr @M, align 8, !tbaa !11
  %17 = icmp sgt i64 %16, 0
  br i1 %17, label %.lr.ph113, label %.preheader108

.preheader108:                                    ; preds = %._crit_edge, %0
  %18 = load i64, ptr @N, align 8, !tbaa !11
  %19 = icmp sgt i64 %18, 1
  br i1 %19, label %.preheader107, label %._crit_edge125

.lr.ph113:                                        ; preds = %0, %._crit_edge
  %.093111 = phi i64 [ %32, %._crit_edge ], [ 0, %0 ]
  %20 = getelementptr inbounds [100000 x i64], ptr @W, i64 0, i64 %.093111
  %21 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %22 = getelementptr inbounds [100000 x i64], ptr @L, i64 0, i64 %.093111
  %23 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(8) %22)
  %24 = getelementptr inbounds [100000 x i64], ptr @R, i64 0, i64 %.093111
  %25 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(8) %24)
  %26 = load i64, ptr %22, align 8, !tbaa !11
  %27 = add nsw i64 %26, -1
  store i64 %27, ptr %22, align 8, !tbaa !11
  %28 = load i64, ptr %24, align 8, !tbaa !11
  %29 = add nsw i64 %28, -1
  store i64 %29, ptr %24, align 8, !tbaa !11
  %30 = load i64, ptr %20, align 8, !tbaa !11
  %31 = getelementptr inbounds [300 x [300 x i64]], ptr @dp, i64 0, i64 %27, i64 %29
  store i64 %30, ptr %31, align 8, !tbaa !11
  %.not104109 = icmp sgt i64 %26, %28
  br i1 %.not104109, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph113
  %32 = add nuw nsw i64 %.093111, 1
  %33 = load i64, ptr @M, align 8, !tbaa !11
  %34 = icmp slt i64 %32, %33
  br i1 %34, label %.lr.ph113, label %.preheader108, !llvm.loop !13

.lr.ph:                                           ; preds = %.lr.ph113, %.lr.ph
  %35 = phi i64 [ %40, %.lr.ph ], [ %27, %.lr.ph113 ]
  %36 = phi i64 [ %41, %.lr.ph ], [ %29, %.lr.ph113 ]
  %.097110 = phi i64 [ %43, %.lr.ph ], [ %27, %.lr.ph113 ]
  %37 = getelementptr inbounds [300 x [300 x [300 x i64]]], ptr @C, i64 0, i64 %.097110, i64 %35, i64 %36
  %38 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %39 = load i64, ptr %38, align 8, !tbaa !11
  %40 = load i64, ptr %22, align 8, !tbaa !11
  %41 = load i64, ptr %24, align 8, !tbaa !11
  %42 = getelementptr inbounds [300 x [300 x [300 x i64]]], ptr @C, i64 0, i64 %.097110, i64 %40, i64 %41
  store i64 %39, ptr %42, align 8, !tbaa !11
  %43 = add nsw i64 %.097110, 1
  %.not104.not = icmp slt i64 %.097110, %41
  br i1 %.not104.not, label %.lr.ph, label %._crit_edge, !llvm.loop !15

.preheader107:                                    ; preds = %.preheader108, %._crit_edge116
  %44 = phi i64 [ %50, %._crit_edge116 ], [ %18, %.preheader108 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge116 ], [ 2, %.preheader108 ]
  %.098117 = phi i64 [ %51, %._crit_edge116 ], [ 1, %.preheader108 ]
  %45 = icmp slt i64 %.098117, %44
  br i1 %45, label %.preheader106, label %._crit_edge116

.preheader105:                                    ; preds = %._crit_edge116
  %46 = icmp sgt i64 %50, 1
  br i1 %46, label %.preheader, label %._crit_edge125

.preheader106:                                    ; preds = %.preheader107, %53
  %indvars.iv127 = phi i64 [ %indvars.iv.next128, %53 ], [ %indvars.iv, %.preheader107 ]
  %.099115 = phi i64 [ %48, %53 ], [ 0, %.preheader107 ]
  %47 = add nuw nsw i64 %.099115, %.098117
  %48 = add nuw nsw i64 %.099115, 1
  %49 = add nsw i64 %47, -1
  br label %57

._crit_edge116:                                   ; preds = %53, %.preheader107
  %50 = phi i64 [ %44, %.preheader107 ], [ %55, %53 ]
  %51 = add nuw nsw i64 %.098117, 1
  %52 = icmp slt i64 %51, %50
  %indvars.iv.next = add nuw i64 %indvars.iv, 1
  br i1 %52, label %.preheader107, label %.preheader105, !llvm.loop !16

53:                                               ; preds = %57
  %54 = add nuw nsw i64 %48, %.098117
  %55 = load i64, ptr @N, align 8, !tbaa !11
  %56 = icmp slt i64 %54, %55
  %indvars.iv.next128 = add nuw i64 %indvars.iv127, 1
  br i1 %56, label %.preheader106, label %._crit_edge116, !llvm.loop !17

57:                                               ; preds = %.preheader106, %57
  %.096114 = phi i64 [ %.099115, %.preheader106 ], [ %65, %57 ]
  %58 = getelementptr inbounds [300 x [300 x [300 x i64]]], ptr @C, i64 0, i64 %.096114, i64 %.099115, i64 %47
  %59 = getelementptr inbounds [300 x [300 x [300 x i64]]], ptr @C, i64 0, i64 %.096114, i64 %48, i64 %47
  %60 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull align 8 dereferenceable(8) %59)
  %61 = load i64, ptr %60, align 8, !tbaa !11
  store i64 %61, ptr %58, align 8, !tbaa !11
  %62 = getelementptr inbounds [300 x [300 x [300 x i64]]], ptr @C, i64 0, i64 %.096114, i64 %.099115, i64 %49
  %63 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull align 8 dereferenceable(8) %62)
  %64 = load i64, ptr %63, align 8, !tbaa !11
  store i64 %64, ptr %58, align 8, !tbaa !11
  %65 = add nuw i64 %.096114, 1
  %exitcond.not = icmp eq i64 %65, %indvars.iv127
  br i1 %exitcond.not, label %53, label %57, !llvm.loop !18

.preheader:                                       ; preds = %.preheader105, %._crit_edge123
  %66 = phi i64 [ %77, %._crit_edge123 ], [ %50, %.preheader105 ]
  %.095124 = phi i64 [ %78, %._crit_edge123 ], [ 1, %.preheader105 ]
  %67 = icmp slt i64 %.095124, %66
  br i1 %67, label %.lr.ph122.preheader, label %._crit_edge123

.lr.ph122.preheader:                              ; preds = %.preheader
  %68 = icmp ugt i64 %.095124, 1
  br label %.lr.ph122

._crit_edge125:                                   ; preds = %._crit_edge123, %.preheader108, %.preheader105
  %.lcssa = phi i64 [ %50, %.preheader105 ], [ %18, %.preheader108 ], [ %77, %._crit_edge123 ]
  %69 = add nsw i64 %.lcssa, -1
  %70 = getelementptr inbounds [300 x i64], ptr @dp, i64 0, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !11
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %71)
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %72, i8 noundef signext 10)
  ret i32 0

.loopexit:                                        ; preds = %.lr.ph120, %.lr.ph122
  %74 = add nuw nsw i64 %84, %.095124
  %75 = load i64, ptr @N, align 8, !tbaa !11
  %76 = icmp slt i64 %74, %75
  br i1 %76, label %.lr.ph122, label %._crit_edge123, !llvm.loop !19

._crit_edge123:                                   ; preds = %.loopexit, %.preheader
  %77 = phi i64 [ %66, %.preheader ], [ %75, %.loopexit ]
  %78 = add nuw nsw i64 %.095124, 1
  %79 = icmp slt i64 %78, %77
  br i1 %79, label %.preheader, label %._crit_edge125, !llvm.loop !20

.lr.ph122:                                        ; preds = %.lr.ph122.preheader, %.loopexit
  %.094121 = phi i64 [ %84, %.loopexit ], [ 0, %.lr.ph122.preheader ]
  %80 = add nuw nsw i64 %.094121, %.095124
  %81 = getelementptr inbounds [300 x [300 x i64]], ptr @dp, i64 0, i64 %.094121, i64 %80
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %82 = getelementptr inbounds [300 x [300 x [300 x i64]]], ptr @C, i64 0, i64 %.094121, i64 %.094121, i64 %80
  %83 = load i64, ptr %82, align 8, !tbaa !11
  %84 = add nuw nsw i64 %.094121, 1
  %85 = getelementptr inbounds [300 x [300 x i64]], ptr @dp, i64 0, i64 %84, i64 %80
  %86 = load i64, ptr %85, align 8, !tbaa !11
  %87 = add nsw i64 %86, %83
  store i64 %87, ptr %1, align 8, !tbaa !11
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %89 = load i64, ptr %88, align 8, !tbaa !11
  store i64 %89, ptr %81, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %90 = getelementptr inbounds [300 x [300 x [300 x i64]]], ptr @C, i64 0, i64 %80, i64 %.094121, i64 %80
  %91 = load i64, ptr %90, align 8, !tbaa !11
  %92 = add nsw i64 %80, -1
  %93 = getelementptr inbounds [300 x [300 x i64]], ptr @dp, i64 0, i64 %.094121, i64 %92
  %94 = load i64, ptr %93, align 8, !tbaa !11
  %95 = add nsw i64 %94, %91
  store i64 %95, ptr %2, align 8, !tbaa !11
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %97 = load i64, ptr %96, align 8, !tbaa !11
  store i64 %97, ptr %81, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  br i1 %68, label %.lr.ph120, label %.loopexit

.lr.ph120:                                        ; preds = %.lr.ph122, %.lr.ph120
  %.0118 = phi i64 [ %101, %.lr.ph120 ], [ %84, %.lr.ph122 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %98 = add nsw i64 %.0118, -1
  %99 = getelementptr inbounds [300 x [300 x i64]], ptr @dp, i64 0, i64 %.094121, i64 %98
  %100 = load i64, ptr %99, align 8, !tbaa !11
  %101 = add nuw nsw i64 %.0118, 1
  %102 = getelementptr inbounds [300 x [300 x i64]], ptr @dp, i64 0, i64 %101, i64 %80
  %103 = load i64, ptr %102, align 8, !tbaa !11
  %104 = add nsw i64 %103, %100
  %105 = getelementptr inbounds [300 x [300 x [300 x i64]]], ptr @C, i64 0, i64 %.0118, i64 %.094121, i64 %80
  %106 = load i64, ptr %105, align 8, !tbaa !11
  %107 = add nsw i64 %104, %106
  store i64 %107, ptr %3, align 8, !tbaa !11
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %109 = load i64, ptr %108, align 8, !tbaa !11
  store i64 %109, ptr %81, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %110 = icmp ult i64 %101, %80
  br i1 %110, label %.lr.ph120, label %.loopexit, !llvm.loop !21
}

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

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

; 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

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

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


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