; LLVM IR from upupming/algorithm :: acwing/算法竞赛进阶指南/0x52-背包/280. 陪审团 (main)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@p = external dso_local global [210 x i32], align 16
@d = external dso_local global [210 x i32], align 16
@f = external dso_local global [210 x [21 x [810 x i32]]], align 16
@ans = external dso_local global [210 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [66 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

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

19:                                               ; preds = %333, %0
  %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) @n)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %22 = load i32, ptr @n, align 4, !tbaa !5
  %23 = icmp ne i32 %22, 0
  br i1 %23, label %27, label %24

24:                                               ; preds = %19
  %25 = load i32, ptr @m, align 4, !tbaa !5
  %26 = icmp ne i32 %25, 0
  br label %27

27:                                               ; preds = %24, %19
  %28 = phi i1 [ true, %19 ], [ %26, %24 ]
  br i1 %28, label %29, label %336

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

30:                                               ; preds = %44, %29
  %31 = load i32, ptr %3, align 4, !tbaa !5
  %32 = load i32, ptr @n, align 4, !tbaa !5
  %33 = icmp sle i32 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %47

35:                                               ; preds = %30
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [210 x i32], ptr @p, 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 !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [210 x i32], ptr @d, i64 0, i64 %41
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 4 dereferenceable(4) %42)
  br label %44

44:                                               ; preds = %35
  %45 = load i32, ptr %3, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %3, align 4, !tbaa !5
  br label %30, !llvm.loop !9

47:                                               ; preds = %34
  call void @llvm.memset.p0.i64(ptr align 16 @f, i8 -63, i64 14288400, i1 false)
  store i32 0, ptr getelementptr inbounds ([810 x i32], ptr @f, i64 0, i64 400), align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %160, %47
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = load i32, ptr @n, align 4, !tbaa !5
  %51 = icmp sle i32 %49, %50
  br i1 %51, label %53, label %52

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

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

54:                                               ; preds = %156, %53
  %55 = load i32, ptr %6, align 4, !tbaa !5
  %56 = load i32, ptr @m, align 4, !tbaa !5
  %57 = icmp sle i32 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  store i32 10, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %159

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

60:                                               ; preds = %152, %59
  %61 = load i32, ptr %7, align 4, !tbaa !5
  %62 = icmp slt i32 %61, 810
  br i1 %62, label %64, label %63

63:                                               ; preds = %60
  store i32 13, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %155

64:                                               ; preds = %60
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = sub nsw i32 %65, 1
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %67
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [21 x [810 x i32]], ptr %68, i64 0, i64 %70
  %72 = load i32, ptr %7, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [810 x i32], ptr %71, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = load i32, ptr %4, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %77
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [21 x [810 x i32]], ptr %78, i64 0, i64 %80
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [810 x i32], ptr %81, i64 0, i64 %83
  store i32 %75, ptr %84, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %85 = load i32, ptr %7, align 4, !tbaa !5
  %86 = load i32, ptr %4, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [210 x i32], ptr @p, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = load i32, ptr %4, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [210 x i32], ptr @d, i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = sub nsw i32 %89, %93
  %95 = sub nsw i32 %85, %94
  store i32 %95, ptr %8, align 4, !tbaa !5
  %96 = load i32, ptr %8, align 4, !tbaa !5
  %97 = icmp slt i32 %96, 0
  br i1 %97, label %101, label %98

98:                                               ; preds = %64
  %99 = load i32, ptr %8, align 4, !tbaa !5
  %100 = icmp sge i32 %99, 810
  br i1 %100, label %101, label %102

101:                                              ; preds = %98, %64
  store i32 15, ptr %5, align 4
  br label %149

102:                                              ; preds = %98
  %103 = load i32, ptr %6, align 4, !tbaa !5
  %104 = icmp slt i32 %103, 1
  br i1 %104, label %105, label %106

105:                                              ; preds = %102
  store i32 15, ptr %5, align 4
  br label %149

106:                                              ; preds = %102
  %107 = load i32, ptr %4, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %108
  %110 = load i32, ptr %6, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [21 x [810 x i32]], ptr %109, i64 0, i64 %111
  %113 = load i32, ptr %7, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [810 x i32], ptr %112, i64 0, i64 %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %116 = load i32, ptr %4, align 4, !tbaa !5
  %117 = sub nsw i32 %116, 1
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %118
  %120 = load i32, ptr %6, align 4, !tbaa !5
  %121 = sub nsw i32 %120, 1
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [21 x [810 x i32]], ptr %119, i64 0, i64 %122
  %124 = load i32, ptr %8, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [810 x i32], ptr %123, i64 0, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %128 = load i32, ptr %4, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [210 x i32], ptr @p, i64 0, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = add nsw i32 %127, %131
  %133 = load i32, ptr %4, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [210 x i32], ptr @d, i64 0, i64 %134
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %137 = add nsw i32 %132, %136
  store i32 %137, ptr %9, align 4, !tbaa !5
  %138 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %115, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = load i32, ptr %4, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %141
  %143 = load i32, ptr %6, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [21 x [810 x i32]], ptr %142, i64 0, i64 %144
  %146 = load i32, ptr %7, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [810 x i32], ptr %145, i64 0, i64 %147
  store i32 %139, ptr %148, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  store i32 0, ptr %5, align 4
  br label %149

149:                                              ; preds = %106, %105, %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  %150 = load i32, ptr %5, align 4
  switch i32 %150, label %338 [
    i32 0, label %151
    i32 15, label %152
  ]

151:                                              ; preds = %149
  br label %152

152:                                              ; preds = %151, %149
  %153 = load i32, ptr %7, align 4, !tbaa !5
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %7, align 4, !tbaa !5
  br label %60, !llvm.loop !11

155:                                              ; preds = %63
  br label %156

156:                                              ; preds = %155
  %157 = load i32, ptr %6, align 4, !tbaa !5
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %6, align 4, !tbaa !5
  br label %54, !llvm.loop !12

159:                                              ; preds = %58
  br label %160

160:                                              ; preds = %159
  %161 = load i32, ptr %4, align 4, !tbaa !5
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %4, align 4, !tbaa !5
  br label %48, !llvm.loop !13

163:                                              ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %164

164:                                              ; preds = %192, %163
  %165 = load i32, ptr @n, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %166
  %168 = load i32, ptr @m, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [21 x [810 x i32]], ptr %167, i64 0, i64 %169
  %171 = load i32, ptr %10, align 4, !tbaa !5
  %172 = sub nsw i32 400, %171
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [810 x i32], ptr %170, i64 0, i64 %173
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = icmp slt i32 %175, 0
  br i1 %176, label %177, label %190

177:                                              ; preds = %164
  %178 = load i32, ptr @n, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %179
  %181 = load i32, ptr @m, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [21 x [810 x i32]], ptr %180, i64 0, i64 %182
  %184 = load i32, ptr %10, align 4, !tbaa !5
  %185 = add nsw i32 400, %184
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [810 x i32], ptr %183, i64 0, i64 %186
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = icmp slt i32 %188, 0
  br label %190

190:                                              ; preds = %177, %164
  %191 = phi i1 [ false, %164 ], [ %189, %177 ]
  br i1 %191, label %192, label %195

192:                                              ; preds = %190
  %193 = load i32, ptr %10, align 4, !tbaa !5
  %194 = add nsw i32 %193, 1
  store i32 %194, ptr %10, align 4, !tbaa !5
  br label %164, !llvm.loop !14

195:                                              ; preds = %190
  %196 = load i32, ptr @n, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %197
  %199 = load i32, ptr @m, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [21 x [810 x i32]], ptr %198, i64 0, i64 %200
  %202 = load i32, ptr %10, align 4, !tbaa !5
  %203 = sub nsw i32 400, %202
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [810 x i32], ptr %201, i64 0, i64 %204
  %206 = load i32, ptr %205, align 4, !tbaa !5
  %207 = load i32, ptr @n, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %208
  %210 = load i32, ptr @m, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [21 x [810 x i32]], ptr %209, i64 0, i64 %211
  %213 = load i32, ptr %10, align 4, !tbaa !5
  %214 = add nsw i32 400, %213
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [810 x i32], ptr %212, i64 0, i64 %215
  %217 = load i32, ptr %216, align 4, !tbaa !5
  %218 = icmp sgt i32 %206, %217
  br i1 %218, label %219, label %222

219:                                              ; preds = %195
  %220 = load i32, ptr %10, align 4, !tbaa !5
  %221 = sub nsw i32 400, %220
  store i32 %221, ptr %10, align 4, !tbaa !5
  br label %225

222:                                              ; preds = %195
  %223 = load i32, ptr %10, align 4, !tbaa !5
  %224 = add nsw i32 400, %223
  store i32 %224, ptr %10, align 4, !tbaa !5
  br label %225

225:                                              ; preds = %222, %219
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %226 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %226, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %227 = load i32, ptr @m, align 4, !tbaa !5
  store i32 %227, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %228 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %228, ptr %14, align 4, !tbaa !5
  br label %229

229:                                              ; preds = %279, %225
  %230 = load i32, ptr %13, align 4, !tbaa !5
  %231 = icmp ne i32 %230, 0
  br i1 %231, label %232, label %280

232:                                              ; preds = %229
  %233 = load i32, ptr %12, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %234
  %236 = load i32, ptr %13, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [21 x [810 x i32]], ptr %235, i64 0, i64 %237
  %239 = load i32, ptr %14, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [810 x i32], ptr %238, i64 0, i64 %240
  %242 = load i32, ptr %241, align 4, !tbaa !5
  %243 = load i32, ptr %12, align 4, !tbaa !5
  %244 = sub nsw i32 %243, 1
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %245
  %247 = load i32, ptr %13, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [21 x [810 x i32]], ptr %246, i64 0, i64 %248
  %250 = load i32, ptr %14, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [810 x i32], ptr %249, i64 0, i64 %251
  %253 = load i32, ptr %252, align 4, !tbaa !5
  %254 = icmp eq i32 %242, %253
  br i1 %254, label %255, label %258

255:                                              ; preds = %232
  %256 = load i32, ptr %12, align 4, !tbaa !5
  %257 = add nsw i32 %256, -1
  store i32 %257, ptr %12, align 4, !tbaa !5
  br label %279

258:                                              ; preds = %232
  %259 = load i32, ptr %12, align 4, !tbaa !5
  %260 = load i32, ptr %11, align 4, !tbaa !5
  %261 = add nsw i32 %260, 1
  store i32 %261, ptr %11, align 4, !tbaa !5
  %262 = sext i32 %260 to i64
  %263 = getelementptr inbounds [210 x i32], ptr @ans, i64 0, i64 %262
  store i32 %259, ptr %263, align 4, !tbaa !5
  %264 = load i32, ptr %12, align 4, !tbaa !5
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds [210 x i32], ptr @p, i64 0, i64 %265
  %267 = load i32, ptr %266, align 4, !tbaa !5
  %268 = load i32, ptr %12, align 4, !tbaa !5
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [210 x i32], ptr @d, i64 0, i64 %269
  %271 = load i32, ptr %270, align 4, !tbaa !5
  %272 = sub nsw i32 %267, %271
  %273 = load i32, ptr %14, align 4, !tbaa !5
  %274 = sub nsw i32 %273, %272
  store i32 %274, ptr %14, align 4, !tbaa !5
  %275 = load i32, ptr %12, align 4, !tbaa !5
  %276 = add nsw i32 %275, -1
  store i32 %276, ptr %12, align 4, !tbaa !5
  %277 = load i32, ptr %13, align 4, !tbaa !5
  %278 = add nsw i32 %277, -1
  store i32 %278, ptr %13, align 4, !tbaa !5
  br label %279

279:                                              ; preds = %258, %255
  br label %229, !llvm.loop !15

280:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %281

281:                                              ; preds = %305, %280
  %282 = load i32, ptr %17, align 4, !tbaa !5
  %283 = load i32, ptr %11, align 4, !tbaa !5
  %284 = icmp slt i32 %282, %283
  br i1 %284, label %286, label %285

285:                                              ; preds = %281
  store i32 20, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %308

286:                                              ; preds = %281
  %287 = load i32, ptr %17, align 4, !tbaa !5
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds [210 x i32], ptr @ans, i64 0, i64 %288
  %290 = load i32, ptr %289, align 4, !tbaa !5
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds [210 x i32], ptr @p, i64 0, i64 %291
  %293 = load i32, ptr %292, align 4, !tbaa !5
  %294 = load i32, ptr %15, align 4, !tbaa !5
  %295 = add nsw i32 %294, %293
  store i32 %295, ptr %15, align 4, !tbaa !5
  %296 = load i32, ptr %17, align 4, !tbaa !5
  %297 = sext i32 %296 to i64
  %298 = getelementptr inbounds [210 x i32], ptr @ans, i64 0, i64 %297
  %299 = load i32, ptr %298, align 4, !tbaa !5
  %300 = sext i32 %299 to i64
  %301 = getelementptr inbounds [210 x i32], ptr @d, i64 0, i64 %300
  %302 = load i32, ptr %301, align 4, !tbaa !5
  %303 = load i32, ptr %16, align 4, !tbaa !5
  %304 = add nsw i32 %303, %302
  store i32 %304, ptr %16, align 4, !tbaa !5
  br label %305

305:                                              ; preds = %286
  %306 = load i32, ptr %17, align 4, !tbaa !5
  %307 = add nsw i32 %306, 1
  store i32 %307, ptr %17, align 4, !tbaa !5
  br label %281, !llvm.loop !16

308:                                              ; preds = %285
  %309 = load i32, ptr %2, align 4, !tbaa !5
  %310 = add nsw i32 %309, 1
  store i32 %310, ptr %2, align 4, !tbaa !5
  %311 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %309)
  %312 = load i32, ptr %15, align 4, !tbaa !5
  %313 = load i32, ptr %16, align 4, !tbaa !5
  %314 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %312, i32 noundef %313)
  %315 = load i32, ptr %11, align 4, !tbaa !5
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds i32, ptr @ans, i64 %316
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef @ans, ptr noundef %317)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %318

318:                                              ; preds = %330, %308
  %319 = load i32, ptr %18, align 4, !tbaa !5
  %320 = load i32, ptr %11, align 4, !tbaa !5
  %321 = icmp slt i32 %319, %320
  br i1 %321, label %323, label %322

322:                                              ; preds = %318
  store i32 23, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %333

323:                                              ; preds = %318
  %324 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  %325 = load i32, ptr %18, align 4, !tbaa !5
  %326 = sext i32 %325 to i64
  %327 = getelementptr inbounds [210 x i32], ptr @ans, i64 0, i64 %326
  %328 = load i32, ptr %327, align 4, !tbaa !5
  %329 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %324, i32 noundef %328)
  br label %330

330:                                              ; preds = %323
  %331 = load i32, ptr %18, align 4, !tbaa !5
  %332 = add nsw i32 %331, 1
  store i32 %332, ptr %18, align 4, !tbaa !5
  br label %318, !llvm.loop !17

333:                                              ; preds = %322
  %334 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %335 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %334, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %19, !llvm.loop !18

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

338:                                              ; preds = %149
  unreachable
}

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) #5

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

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

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


; 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 i32, align 4
@m = external dso_local global i32, align 4
@p = external dso_local global [210 x i32], align 16
@d = external dso_local global [210 x i32], align 16
@f = external dso_local global [210 x [21 x [810 x i32]]], align 16
@ans = external dso_local global [210 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [66 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %3 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %4 = load i32, ptr @n, align 4, !tbaa !5
  %5 = icmp ne i32 %4, 0
  %6 = load i32, ptr @m, align 4
  %7 = icmp ne i32 %6, 0
  %8 = select i1 %5, i1 true, i1 %7
  br i1 %8, label %.preheader100, label %._crit_edge148

.preheader100:                                    ; preds = %0, %._crit_edge146
  %.pre187189 = phi i32 [ %166, %._crit_edge146 ], [ %6, %0 ]
  %9 = phi i32 [ %164, %._crit_edge146 ], [ %4, %0 ]
  %.089147 = phi i32 [ %119, %._crit_edge146 ], [ 1, %0 ]
  %.not106 = icmp slt i32 %9, 1
  br i1 %.not106, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %.preheader100
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(14288400) @f, i8 -63, i64 14288400, i1 false)
  store i32 0, ptr getelementptr inbounds (i8, ptr @f, i64 1600), align 16, !tbaa !5
  br label %.preheader99

._crit_edge:                                      ; preds = %.lr.ph
  %.pre187.pre = load i32, ptr @m, align 4, !tbaa !5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(14288400) @f, i8 -63, i64 14288400, i1 false)
  store i32 0, ptr getelementptr inbounds (i8, ptr @f, i64 1600), align 16, !tbaa !5
  %.not91112 = icmp slt i32 %15, 1
  %10 = icmp slt i32 %.pre187.pre, 0
  %or.cond200 = select i1 %.not91112, i1 true, i1 %10
  br i1 %or.cond200, label %.preheader99, label %.preheader97

.lr.ph:                                           ; preds = %.preheader100, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.preheader100 ]
  %11 = getelementptr inbounds [210 x i32], ptr @p, i64 0, i64 %indvars.iv
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %13 = getelementptr inbounds [210 x i32], ptr @d, i64 0, i64 %indvars.iv
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %15 = load i32, ptr @n, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %.not.not = icmp slt i64 %indvars.iv, %16
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader99:                                     ; preds = %._crit_edge111, %._crit_edge.thread, %._crit_edge
  %17 = phi i32 [ %.pre187.pre, %._crit_edge ], [ %.pre187189, %._crit_edge.thread ], [ %53, %._crit_edge111 ]
  %.lcssa = phi i32 [ %15, %._crit_edge ], [ %9, %._crit_edge.thread ], [ %52, %._crit_edge111 ]
  %18 = sext i32 %.lcssa to i64
  %19 = sext i32 %17 to i64
  %20 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %18, i64 %19, i64 400
  %21 = load i32, ptr %20, align 8, !tbaa !5
  %22 = icmp slt i32 %21, 0
  br i1 %22, label %.lr.ph115.preheader, label %.critedge

.lr.ph115.preheader:                              ; preds = %.preheader99
  %23 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %18, i64 %19, i64 400
  %24 = load i32, ptr %23, align 8, !tbaa !5
  %25 = icmp slt i32 %24, 0
  br i1 %25, label %.lr.ph208, label %.critedge.loopexit

.preheader97:                                     ; preds = %._crit_edge, %._crit_edge111
  %26 = phi i32 [ %52, %._crit_edge111 ], [ %15, %._crit_edge ]
  %27 = phi i32 [ %53, %._crit_edge111 ], [ %.pre187.pre, %._crit_edge ]
  %28 = phi i32 [ %54, %._crit_edge111 ], [ %.pre187.pre, %._crit_edge ]
  %indvars.iv165 = phi i64 [ %indvars.iv.next166, %._crit_edge111 ], [ 1, %._crit_edge ]
  %.not93109 = icmp slt i32 %28, 0
  br i1 %.not93109, label %._crit_edge111, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.preheader97
  %29 = add nsw i64 %indvars.iv165, -1
  %30 = getelementptr inbounds [210 x i32], ptr @p, i64 0, i64 %indvars.iv165
  %31 = getelementptr inbounds [210 x i32], ptr @d, i64 0, i64 %indvars.iv165
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %.split.us
  %32 = phi i32 [ %27, %.preheader.lr.ph ], [ %56, %.split.us ]
  %.086110 = phi i32 [ 0, %.preheader.lr.ph ], [ %57, %.split.us ]
  %33 = zext nneg i32 %.086110 to i64
  %34 = icmp eq i32 %.086110, 0
  %35 = add nsw i32 %.086110, -1
  %36 = zext nneg i32 %35 to i64
  br i1 %34, label %vector.body, label %.preheader.split

vector.body:                                      ; preds = %.preheader, %vector.body.1
  %index = phi i64 [ %index.next.1, %vector.body.1 ], [ 0, %.preheader ]
  %37 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %29, i64 %33, i64 %index
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  %wide.load = load <4 x i32>, ptr %37, align 8, !tbaa !5
  %wide.load214 = load <4 x i32>, ptr %38, align 8, !tbaa !5
  %39 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %indvars.iv165, i64 %33, i64 %index
  %40 = getelementptr inbounds i8, ptr %39, i64 16
  store <4 x i32> %wide.load, ptr %39, align 8, !tbaa !5
  store <4 x i32> %wide.load214, ptr %40, align 8, !tbaa !5
  %41 = icmp eq i64 %index, 800
  br i1 %41, label %.preheader.split.us, label %vector.body.1, !llvm.loop !11

vector.body.1:                                    ; preds = %vector.body
  %index.next = or disjoint i64 %index, 8
  %42 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %29, i64 %33, i64 %index.next
  %43 = getelementptr inbounds i8, ptr %42, i64 16
  %wide.load.1 = load <4 x i32>, ptr %42, align 8, !tbaa !5
  %wide.load214.1 = load <4 x i32>, ptr %43, align 8, !tbaa !5
  %44 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %indvars.iv165, i64 %33, i64 %index.next
  %45 = getelementptr inbounds i8, ptr %44, i64 16
  store <4 x i32> %wide.load.1, ptr %44, align 8, !tbaa !5
  store <4 x i32> %wide.load214.1, ptr %45, align 8, !tbaa !5
  %index.next.1 = add nuw nsw i64 %index, 16
  br label %vector.body

.preheader.split.us:                              ; preds = %vector.body
  %46 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %29, i64 %33, i64 808
  %47 = load i32, ptr %46, align 8, !tbaa !5
  %48 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %indvars.iv165, i64 %33, i64 808
  store i32 %47, ptr %48, align 8, !tbaa !5
  %49 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %29, i64 %33, i64 809
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %indvars.iv165, i64 %33, i64 809
  store i32 %50, ptr %51, align 4, !tbaa !5
  br label %.split.us

._crit_edge111.loopexit:                          ; preds = %.split.us
  %.pre186 = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge111

._crit_edge111:                                   ; preds = %._crit_edge111.loopexit, %.preheader97
  %52 = phi i32 [ %.pre186, %._crit_edge111.loopexit ], [ %26, %.preheader97 ]
  %53 = phi i32 [ %56, %._crit_edge111.loopexit ], [ %27, %.preheader97 ]
  %54 = phi i32 [ %56, %._crit_edge111.loopexit ], [ %28, %.preheader97 ]
  %indvars.iv.next166 = add nuw nsw i64 %indvars.iv165, 1
  %55 = sext i32 %52 to i64
  %.not91.not = icmp slt i64 %indvars.iv165, %55
  br i1 %.not91.not, label %.preheader97, label %.preheader99, !llvm.loop !14

.split.us.loopexit149:                            ; preds = %73
  %.pre = load i32, ptr @m, align 4, !tbaa !5
  br label %.split.us

.split.us:                                        ; preds = %.preheader.split.us, %.split.us.loopexit149
  %56 = phi i32 [ %.pre, %.split.us.loopexit149 ], [ %32, %.preheader.split.us ]
  %57 = add i32 %.086110, 1
  %.not93 = icmp sgt i32 %57, %56
  br i1 %.not93, label %._crit_edge111.loopexit, label %.preheader, !llvm.loop !16

.preheader.split:                                 ; preds = %.preheader, %73
  %indvars.iv155 = phi i64 [ %indvars.iv.next156, %73 ], [ 0, %.preheader ]
  %58 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %29, i64 %33, i64 %indvars.iv155
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %indvars.iv165, i64 %33, i64 %indvars.iv155
  store i32 %59, ptr %60, align 4, !tbaa !5
  %61 = load i32, ptr %30, align 4, !tbaa !5
  %62 = load i32, ptr %31, align 4, !tbaa !5
  %.neg94 = sub i32 %62, %61
  %63 = trunc nuw nsw i64 %indvars.iv155 to i32
  %64 = add i32 %.neg94, %63
  %or.cond = icmp ugt i32 %64, 809
  br i1 %or.cond, label %73, label %65

65:                                               ; preds = %.preheader.split
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %66 = zext nneg i32 %64 to i64
  %67 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %29, i64 %36, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = add i32 %62, %61
  %70 = add i32 %69, %68
  store i32 %70, ptr %1, align 4, !tbaa !5
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %60, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %72 = load i32, ptr %71, align 4, !tbaa !5
  store i32 %72, ptr %60, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  br label %73

73:                                               ; preds = %.preheader.split, %65
  %indvars.iv.next156 = add nuw nsw i64 %indvars.iv155, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next156, 810
  br i1 %exitcond.not, label %.split.us.loopexit149, label %.preheader.split, !llvm.loop !17

.lr.ph115:                                        ; preds = %.lr.ph208
  %74 = add nuw nsw i64 %indvars.iv168207, 401
  %75 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %18, i64 %19, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = icmp slt i32 %76, 0
  br i1 %77, label %.lr.ph208, label %.critedge.loopexit.loopexit, !llvm.loop !18

.lr.ph208:                                        ; preds = %.lr.ph115.preheader, %.lr.ph115
  %indvars.iv168207 = phi i64 [ %indvars.iv.next169, %.lr.ph115 ], [ 0, %.lr.ph115.preheader ]
  %indvars.iv.next169 = add nuw nsw i64 %indvars.iv168207, 1
  %78 = sub nsw i64 399, %indvars.iv168207
  %79 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %18, i64 %19, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = icmp slt i32 %80, 0
  br i1 %81, label %.lr.ph115, label %.critedge.loopexit.loopexit, !llvm.loop !18

.critedge.loopexit.loopexit:                      ; preds = %.lr.ph208, %.lr.ph115
  %82 = trunc nsw i64 %78 to i32
  br label %.critedge.loopexit

.critedge.loopexit:                               ; preds = %.critedge.loopexit.loopexit, %.lr.ph115.preheader
  %.083.lcssa.ph.in = phi i64 [ 0, %.lr.ph115.preheader ], [ %indvars.iv.next169, %.critedge.loopexit.loopexit ]
  %.lcssa102.ph = phi i32 [ 400, %.lr.ph115.preheader ], [ %82, %.critedge.loopexit.loopexit ]
  %.lcssa101.ph = phi i32 [ %21, %.lr.ph115.preheader ], [ %80, %.critedge.loopexit.loopexit ]
  %.083.lcssa.ph = trunc i64 %.083.lcssa.ph.in to i32
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %.preheader99
  %.083.lcssa = phi i32 [ 0, %.preheader99 ], [ %.083.lcssa.ph, %.critedge.loopexit ]
  %.lcssa102 = phi i32 [ 400, %.preheader99 ], [ %.lcssa102.ph, %.critedge.loopexit ]
  %.lcssa101 = phi i32 [ %21, %.preheader99 ], [ %.lcssa101.ph, %.critedge.loopexit ]
  %.not92129 = icmp eq i32 %17, 0
  br i1 %.not92129, label %._crit_edge140, label %.lr.ph134.preheader

.lr.ph134.preheader:                              ; preds = %.critedge
  %83 = add nuw nsw i32 %.083.lcssa, 400
  %84 = zext nneg i32 %83 to i64
  %85 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %18, i64 %19, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = icmp sgt i32 %.lcssa101, %86
  %. = select i1 %87, i32 %.lcssa102, i32 %83
  br label %.lr.ph134

.preheader98:                                     ; preds = %108
  %88 = icmp sgt i32 %.182, 0
  br i1 %88, label %.lr.ph139.preheader, label %._crit_edge140

.lr.ph139.preheader:                              ; preds = %.preheader98
  %wide.trip.count = zext nneg i32 %.182 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %89 = icmp ult i32 %.182, 4
  br i1 %89, label %._crit_edge140.loopexit.unr-lcssa, label %.lr.ph139.preheader.new

.lr.ph139.preheader.new:                          ; preds = %.lr.ph139.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph139

.lr.ph134:                                        ; preds = %.lr.ph134.preheader, %108
  %indvars.iv171 = phi i64 [ %18, %.lr.ph134.preheader ], [ %indvars.iv.next172, %108 ]
  %.076133 = phi i32 [ %., %.lr.ph134.preheader ], [ %.1, %108 ]
  %.077132 = phi i32 [ %17, %.lr.ph134.preheader ], [ %.178, %108 ]
  %.081130 = phi i32 [ 0, %.lr.ph134.preheader ], [ %.182, %108 ]
  %90 = sext i32 %.077132 to i64
  %91 = sext i32 %.076133 to i64
  %92 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %indvars.iv171, i64 %90, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %indvars.iv.next172 = add nsw i64 %indvars.iv171, -1
  %94 = getelementptr inbounds [210 x [21 x [810 x i32]]], ptr @f, i64 0, i64 %indvars.iv.next172, i64 %90, i64 %91
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = icmp eq i32 %93, %95
  br i1 %96, label %108, label %97

97:                                               ; preds = %.lr.ph134
  %98 = add nsw i32 %.081130, 1
  %99 = sext i32 %.081130 to i64
  %100 = getelementptr inbounds [210 x i32], ptr @ans, i64 0, i64 %99
  %101 = trunc nsw i64 %indvars.iv171 to i32
  store i32 %101, ptr %100, align 4, !tbaa !5
  %102 = getelementptr inbounds [210 x i32], ptr @p, i64 0, i64 %indvars.iv171
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = getelementptr inbounds [210 x i32], ptr @d, i64 0, i64 %indvars.iv171
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %.neg = sub i32 %.076133, %103
  %106 = add i32 %.neg, %105
  %107 = add nsw i32 %.077132, -1
  br label %108

108:                                              ; preds = %.lr.ph134, %97
  %.182 = phi i32 [ %98, %97 ], [ %.081130, %.lr.ph134 ]
  %.178 = phi i32 [ %107, %97 ], [ %.077132, %.lr.ph134 ]
  %.1 = phi i32 [ %106, %97 ], [ %.076133, %.lr.ph134 ]
  %.not92 = icmp eq i32 %.178, 0
  br i1 %.not92, label %.preheader98, label %.lr.ph134, !llvm.loop !19

._crit_edge140.loopexit.unr-lcssa:                ; preds = %.lr.ph139, %.lr.ph139.preheader
  %.lcssa222.ph = phi i32 [ poison, %.lr.ph139.preheader ], [ %156, %.lr.ph139 ]
  %.lcssa221.ph = phi i32 [ poison, %.lr.ph139.preheader ], [ %159, %.lr.ph139 ]
  %indvars.iv175.unr = phi i64 [ 0, %.lr.ph139.preheader ], [ %indvars.iv.next176.3, %.lr.ph139 ]
  %.074137.unr = phi i32 [ 0, %.lr.ph139.preheader ], [ %159, %.lr.ph139 ]
  %.075136.unr = phi i32 [ 0, %.lr.ph139.preheader ], [ %156, %.lr.ph139 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge140, label %.lr.ph139.epil

.lr.ph139.epil:                                   ; preds = %._crit_edge140.loopexit.unr-lcssa, %.lr.ph139.epil
  %indvars.iv175.epil = phi i64 [ %indvars.iv.next176.epil, %.lr.ph139.epil ], [ %indvars.iv175.unr, %._crit_edge140.loopexit.unr-lcssa ]
  %.074137.epil = phi i32 [ %117, %.lr.ph139.epil ], [ %.074137.unr, %._crit_edge140.loopexit.unr-lcssa ]
  %.075136.epil = phi i32 [ %114, %.lr.ph139.epil ], [ %.075136.unr, %._crit_edge140.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph139.epil ], [ 0, %._crit_edge140.loopexit.unr-lcssa ]
  %109 = getelementptr inbounds [210 x i32], ptr @ans, i64 0, i64 %indvars.iv175.epil
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [210 x i32], ptr @p, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = add nsw i32 %113, %.075136.epil
  %115 = getelementptr inbounds [210 x i32], ptr @d, i64 0, i64 %111
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = add nsw i32 %116, %.074137.epil
  %indvars.iv.next176.epil = add nuw nsw i64 %indvars.iv175.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge140, label %.lr.ph139.epil, !llvm.loop !20

._crit_edge140:                                   ; preds = %._crit_edge140.loopexit.unr-lcssa, %.lr.ph139.epil, %.critedge, %.preheader98
  %118 = phi i1 [ false, %.preheader98 ], [ false, %.critedge ], [ %88, %.lr.ph139.epil ], [ %88, %._crit_edge140.loopexit.unr-lcssa ]
  %.081.lcssa193 = phi i32 [ %.182, %.preheader98 ], [ 0, %.critedge ], [ %.182, %.lr.ph139.epil ], [ %.182, %._crit_edge140.loopexit.unr-lcssa ]
  %.075.lcssa = phi i32 [ 0, %.preheader98 ], [ 0, %.critedge ], [ %.lcssa222.ph, %._crit_edge140.loopexit.unr-lcssa ], [ %114, %.lr.ph139.epil ]
  %.074.lcssa = phi i32 [ 0, %.preheader98 ], [ 0, %.critedge ], [ %.lcssa221.ph, %._crit_edge140.loopexit.unr-lcssa ], [ %117, %.lr.ph139.epil ]
  %119 = add nuw nsw i32 %.089147, 1
  %120 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.089147)
  %121 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.075.lcssa, i32 noundef %.074.lcssa)
  %122 = sext i32 %.081.lcssa193 to i64
  %123 = getelementptr inbounds i32, ptr @ans, i64 %122
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull @ans, ptr noundef nonnull %123)
  br i1 %118, label %.lr.ph145.preheader, label %._crit_edge146

.lr.ph145.preheader:                              ; preds = %._crit_edge140
  %wide.trip.count184 = zext nneg i32 %.081.lcssa193 to i64
  br label %.lr.ph145

.lr.ph139:                                        ; preds = %.lr.ph139, %.lr.ph139.preheader.new
  %indvars.iv175 = phi i64 [ 0, %.lr.ph139.preheader.new ], [ %indvars.iv.next176.3, %.lr.ph139 ]
  %.074137 = phi i32 [ 0, %.lr.ph139.preheader.new ], [ %159, %.lr.ph139 ]
  %.075136 = phi i32 [ 0, %.lr.ph139.preheader.new ], [ %156, %.lr.ph139 ]
  %niter = phi i64 [ 0, %.lr.ph139.preheader.new ], [ %niter.next.3, %.lr.ph139 ]
  %124 = getelementptr inbounds [210 x i32], ptr @ans, i64 0, i64 %indvars.iv175
  %125 = load i32, ptr %124, align 16, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [210 x i32], ptr @p, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = add nsw i32 %128, %.075136
  %130 = getelementptr inbounds [210 x i32], ptr @d, i64 0, i64 %126
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = add nsw i32 %131, %.074137
  %indvars.iv.next176 = or disjoint i64 %indvars.iv175, 1
  %133 = getelementptr inbounds [210 x i32], ptr @ans, i64 0, i64 %indvars.iv.next176
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [210 x i32], ptr @p, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = add nsw i32 %137, %129
  %139 = getelementptr inbounds [210 x i32], ptr @d, i64 0, i64 %135
  %140 = load i32, ptr %139, align 4, !tbaa !5
  %141 = add nsw i32 %140, %132
  %indvars.iv.next176.1 = or disjoint i64 %indvars.iv175, 2
  %142 = getelementptr inbounds [210 x i32], ptr @ans, i64 0, i64 %indvars.iv.next176.1
  %143 = load i32, ptr %142, align 8, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [210 x i32], ptr @p, i64 0, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = add nsw i32 %146, %138
  %148 = getelementptr inbounds [210 x i32], ptr @d, i64 0, i64 %144
  %149 = load i32, ptr %148, align 4, !tbaa !5
  %150 = add nsw i32 %149, %141
  %indvars.iv.next176.2 = or disjoint i64 %indvars.iv175, 3
  %151 = getelementptr inbounds [210 x i32], ptr @ans, i64 0, i64 %indvars.iv.next176.2
  %152 = load i32, ptr %151, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [210 x i32], ptr @p, i64 0, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !5
  %156 = add nsw i32 %155, %147
  %157 = getelementptr inbounds [210 x i32], ptr @d, i64 0, i64 %153
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = add nsw i32 %158, %150
  %indvars.iv.next176.3 = add nuw nsw i64 %indvars.iv175, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge140.loopexit.unr-lcssa, label %.lr.ph139, !llvm.loop !22

._crit_edge146:                                   ; preds = %.lr.ph145, %._crit_edge140
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %161 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %160, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %162 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %163 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %162, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %164 = load i32, ptr @n, align 4, !tbaa !5
  %165 = icmp ne i32 %164, 0
  %166 = load i32, ptr @m, align 4
  %167 = icmp ne i32 %166, 0
  %168 = select i1 %165, i1 true, i1 %167
  br i1 %168, label %.preheader100, label %._crit_edge148, !llvm.loop !23

.lr.ph145:                                        ; preds = %.lr.ph145.preheader, %.lr.ph145
  %indvars.iv180 = phi i64 [ 0, %.lr.ph145.preheader ], [ %indvars.iv.next181, %.lr.ph145 ]
  %169 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %170 = getelementptr inbounds [210 x i32], ptr @ans, i64 0, i64 %indvars.iv180
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %169, i32 noundef %171)
  %indvars.iv.next181 = add nuw nsw i64 %indvars.iv180, 1
  %exitcond185.not = icmp eq i64 %indvars.iv.next181, %wide.trip.count184
  br i1 %exitcond185.not, label %._crit_edge146, label %.lr.ph145, !llvm.loop !24

._crit_edge148:                                   ; preds = %._crit_edge146, %0
  ret i32 0
}

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #6

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

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

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

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

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

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


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