; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2016-17/Jan 2017/Plat (subrev)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@N = external dso_local global i32, align 4
@a = external dso_local global [55 x i32], align 16
@dp = external dso_local global [55 x [55 x [55 x [55 x i32]]]], align 16
@.str.15 = external hidden unnamed_addr constant [7 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca ptr, align 8
  %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
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef @.str.15, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %22 unwind label %30

22:                                               ; preds = %0
  invoke void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %2)
          to label %23 unwind label %34

23:                                               ; preds = %22
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #4
  call void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) @N)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %43, %23
  %25 = load i32, ptr %6, align 4, !tbaa !5
  %26 = load i32, ptr @N, align 4, !tbaa !5
  %27 = add nsw i32 %26, 1
  %28 = icmp slt i32 %25, %27
  br i1 %28, label %39, label %29

29:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %46

30:                                               ; preds = %0
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %4, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %5, align 4
  br label %38

34:                                               ; preds = %22
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %4, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %5, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  br label %38

38:                                               ; preds = %34, %30
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #4
  br label %329

39:                                               ; preds = %24
  %40 = load i32, ptr %6, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [55 x i32], ptr @a, i64 0, i64 %41
  call void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) %42)
  br label %43

43:                                               ; preds = %39
  %44 = load i32, ptr %6, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %6, align 4, !tbaa !5
  br label %24, !llvm.loop !9

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

47:                                               ; preds = %280, %46
  %48 = load i32, ptr %7, align 4, !tbaa !5
  %49 = load i32, ptr @N, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  %51 = icmp slt i32 %48, %50
  br i1 %51, label %53, label %52

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

53:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %54 = load i32, ptr @N, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  %56 = sub nsw i32 %55, 1
  store i32 %56, ptr %9, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %276, %53
  %58 = load i32, ptr %9, align 4, !tbaa !5
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = icmp sge i32 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %57
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %279

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

63:                                               ; preds = %272, %62
  %64 = load i32, ptr %10, align 4, !tbaa !5
  %65 = icmp slt i32 %64, 52
  br i1 %65, label %67, label %66

66:                                               ; preds = %63
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %275

67:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 51, ptr %11, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %268, %67
  %69 = load i32, ptr %11, align 4, !tbaa !5
  %70 = load i32, ptr %10, align 4, !tbaa !5
  %71 = icmp sge i32 %69, %70
  br i1 %71, label %73, label %72

72:                                               ; preds = %68
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %271

73:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %74 = load i32, ptr %7, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %75
  %77 = load i32, ptr %9, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [55 x [55 x [55 x i32]]], ptr %76, i64 0, i64 %78
  %80 = load i32, ptr %10, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [55 x [55 x i32]], ptr %79, i64 0, i64 %81
  %83 = load i32, ptr %11, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [55 x i32], ptr %82, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  store i32 %86, ptr %12, align 4, !tbaa !5
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %89
  %91 = load i32, ptr %9, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [55 x [55 x [55 x i32]]], ptr %90, i64 0, i64 %92
  %94 = load i32, ptr %10, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [55 x [55 x i32]], ptr %93, i64 0, i64 %95
  %97 = load i32, ptr %11, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [55 x i32], ptr %96, i64 0, i64 %98
  %100 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %99, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %101 = load i32, ptr %10, align 4, !tbaa !5
  %102 = load i32, ptr %7, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [55 x i32], ptr @a, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = icmp sle i32 %101, %105
  br i1 %106, label %107, label %127

107:                                              ; preds = %73
  %108 = load i32, ptr %7, align 4, !tbaa !5
  %109 = add nsw i32 %108, 1
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %110
  %112 = load i32, ptr %9, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [55 x [55 x [55 x i32]]], ptr %111, i64 0, i64 %113
  %115 = load i32, ptr %7, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [55 x i32], ptr @a, i64 0, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [55 x [55 x i32]], ptr %114, i64 0, i64 %119
  %121 = load i32, ptr %11, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [55 x i32], ptr %120, i64 0, i64 %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %124 = load i32, ptr %12, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %13, align 4, !tbaa !5
  %126 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %123, ptr noundef nonnull align 4 dereferenceable(4) %13)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %127

127:                                              ; preds = %107, %73
  %128 = load i32, ptr %7, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %129
  %131 = load i32, ptr %9, align 4, !tbaa !5
  %132 = sub nsw i32 %131, 1
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [55 x [55 x [55 x i32]]], ptr %130, i64 0, i64 %133
  %135 = load i32, ptr %10, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [55 x [55 x i32]], ptr %134, i64 0, i64 %136
  %138 = load i32, ptr %11, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [55 x i32], ptr %137, i64 0, i64 %139
  %141 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %140, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %142 = load i32, ptr %9, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [55 x i32], ptr @a, i64 0, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = load i32, ptr %11, align 4, !tbaa !5
  %147 = icmp sle i32 %145, %146
  br i1 %147, label %148, label %168

148:                                              ; preds = %127
  %149 = load i32, ptr %7, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %150
  %152 = load i32, ptr %9, align 4, !tbaa !5
  %153 = sub nsw i32 %152, 1
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [55 x [55 x [55 x i32]]], ptr %151, i64 0, i64 %154
  %156 = load i32, ptr %10, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [55 x [55 x i32]], ptr %155, i64 0, i64 %157
  %159 = load i32, ptr %9, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [55 x i32], ptr @a, i64 0, i64 %160
  %162 = load i32, ptr %161, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [55 x i32], ptr %158, i64 0, i64 %163
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %165 = load i32, ptr %12, align 4, !tbaa !5
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %14, align 4, !tbaa !5
  %167 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %164, ptr noundef nonnull align 4 dereferenceable(4) %14)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %168

168:                                              ; preds = %148, %127
  %169 = load i32, ptr %7, align 4, !tbaa !5
  %170 = load i32, ptr %9, align 4, !tbaa !5
  %171 = icmp slt i32 %169, %170
  br i1 %171, label %172, label %267

172:                                              ; preds = %168
  %173 = load i32, ptr %10, align 4, !tbaa !5
  %174 = load i32, ptr %9, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [55 x i32], ptr @a, i64 0, i64 %175
  %177 = load i32, ptr %176, align 4, !tbaa !5
  %178 = icmp sle i32 %173, %177
  br i1 %178, label %179, label %200

179:                                              ; preds = %172
  %180 = load i32, ptr %7, align 4, !tbaa !5
  %181 = add nsw i32 %180, 1
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %182
  %184 = load i32, ptr %9, align 4, !tbaa !5
  %185 = sub nsw i32 %184, 1
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [55 x [55 x [55 x i32]]], ptr %183, i64 0, i64 %186
  %188 = load i32, ptr %9, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [55 x i32], ptr @a, i64 0, i64 %189
  %191 = load i32, ptr %190, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [55 x [55 x i32]], ptr %187, i64 0, i64 %192
  %194 = load i32, ptr %11, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [55 x i32], ptr %193, i64 0, i64 %195
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %197 = load i32, ptr %12, align 4, !tbaa !5
  %198 = add nsw i32 %197, 1
  store i32 %198, ptr %15, align 4, !tbaa !5
  %199 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %196, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %200

200:                                              ; preds = %179, %172
  %201 = load i32, ptr %7, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [55 x i32], ptr @a, i64 0, i64 %202
  %204 = load i32, ptr %203, align 4, !tbaa !5
  %205 = load i32, ptr %11, align 4, !tbaa !5
  %206 = icmp sle i32 %204, %205
  br i1 %206, label %207, label %228

207:                                              ; preds = %200
  %208 = load i32, ptr %7, align 4, !tbaa !5
  %209 = add nsw i32 %208, 1
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %210
  %212 = load i32, ptr %9, align 4, !tbaa !5
  %213 = sub nsw i32 %212, 1
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [55 x [55 x [55 x i32]]], ptr %211, i64 0, i64 %214
  %216 = load i32, ptr %10, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [55 x [55 x i32]], ptr %215, i64 0, i64 %217
  %219 = load i32, ptr %7, align 4, !tbaa !5
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [55 x i32], ptr @a, i64 0, i64 %220
  %222 = load i32, ptr %221, align 4, !tbaa !5
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [55 x i32], ptr %218, i64 0, i64 %223
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %225 = load i32, ptr %12, align 4, !tbaa !5
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %16, align 4, !tbaa !5
  %227 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %224, ptr noundef nonnull align 4 dereferenceable(4) %16)
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %228

228:                                              ; preds = %207, %200
  %229 = load i32, ptr %10, align 4, !tbaa !5
  %230 = load i32, ptr %9, align 4, !tbaa !5
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds [55 x i32], ptr @a, i64 0, i64 %231
  %233 = load i32, ptr %232, align 4, !tbaa !5
  %234 = icmp sle i32 %229, %233
  br i1 %234, label %235, label %266

235:                                              ; preds = %228
  %236 = load i32, ptr %7, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [55 x i32], ptr @a, i64 0, i64 %237
  %239 = load i32, ptr %238, align 4, !tbaa !5
  %240 = load i32, ptr %11, align 4, !tbaa !5
  %241 = icmp sle i32 %239, %240
  br i1 %241, label %242, label %266

242:                                              ; preds = %235
  %243 = load i32, ptr %7, align 4, !tbaa !5
  %244 = add nsw i32 %243, 1
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %245
  %247 = load i32, ptr %9, align 4, !tbaa !5
  %248 = sub nsw i32 %247, 1
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [55 x [55 x [55 x i32]]], ptr %246, i64 0, i64 %249
  %251 = load i32, ptr %9, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [55 x i32], ptr @a, i64 0, i64 %252
  %254 = load i32, ptr %253, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [55 x [55 x i32]], ptr %250, i64 0, i64 %255
  %257 = load i32, ptr %7, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds [55 x i32], ptr @a, i64 0, i64 %258
  %260 = load i32, ptr %259, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [55 x i32], ptr %256, i64 0, i64 %261
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %263 = load i32, ptr %12, align 4, !tbaa !5
  %264 = add nsw i32 %263, 2
  store i32 %264, ptr %17, align 4, !tbaa !5
  %265 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %262, ptr noundef nonnull align 4 dereferenceable(4) %17)
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %266

266:                                              ; preds = %242, %235, %228
  br label %267

267:                                              ; preds = %266, %168
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %268

268:                                              ; preds = %267
  %269 = load i32, ptr %11, align 4, !tbaa !5
  %270 = add nsw i32 %269, -1
  store i32 %270, ptr %11, align 4, !tbaa !5
  br label %68, !llvm.loop !11

271:                                              ; preds = %72
  br label %272

272:                                              ; preds = %271
  %273 = load i32, ptr %10, align 4, !tbaa !5
  %274 = add nsw i32 %273, 1
  store i32 %274, ptr %10, align 4, !tbaa !5
  br label %63, !llvm.loop !12

275:                                              ; preds = %66
  br label %276

276:                                              ; preds = %275
  %277 = load i32, ptr %9, align 4, !tbaa !5
  %278 = add nsw i32 %277, -1
  store i32 %278, ptr %9, align 4, !tbaa !5
  br label %57, !llvm.loop !13

279:                                              ; preds = %61
  br label %280

280:                                              ; preds = %279
  %281 = load i32, ptr %7, align 4, !tbaa !5
  %282 = add nsw i32 %281, 1
  store i32 %282, ptr %7, align 4, !tbaa !5
  br label %47, !llvm.loop !14

283:                                              ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 0, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store i32 1, ptr %19, align 4, !tbaa !5
  br label %284

284:                                              ; preds = %324, %283
  %285 = load i32, ptr %19, align 4, !tbaa !5
  %286 = load i32, ptr @N, align 4, !tbaa !5
  %287 = add nsw i32 %286, 1
  %288 = icmp slt i32 %285, %287
  br i1 %288, label %290, label %289

289:                                              ; preds = %284
  store i32 17, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %327

290:                                              ; preds = %284
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %291

291:                                              ; preds = %320, %290
  %292 = load i32, ptr %20, align 4, !tbaa !5
  %293 = icmp slt i32 %292, 52
  br i1 %293, label %295, label %294

294:                                              ; preds = %291
  store i32 20, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %323

295:                                              ; preds = %291
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %296 = load i32, ptr %20, align 4, !tbaa !5
  store i32 %296, ptr %21, align 4, !tbaa !5
  br label %297

297:                                              ; preds = %316, %295
  %298 = load i32, ptr %21, align 4, !tbaa !5
  %299 = icmp slt i32 %298, 52
  br i1 %299, label %301, label %300

300:                                              ; preds = %297
  store i32 23, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  br label %319

301:                                              ; preds = %297
  %302 = load i32, ptr %19, align 4, !tbaa !5
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %303
  %305 = load i32, ptr %19, align 4, !tbaa !5
  %306 = sub nsw i32 %305, 1
  %307 = sext i32 %306 to i64
  %308 = getelementptr inbounds [55 x [55 x [55 x i32]]], ptr %304, i64 0, i64 %307
  %309 = load i32, ptr %20, align 4, !tbaa !5
  %310 = sext i32 %309 to i64
  %311 = getelementptr inbounds [55 x [55 x i32]], ptr %308, i64 0, i64 %310
  %312 = load i32, ptr %21, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [55 x i32], ptr %311, i64 0, i64 %313
  %315 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %314)
  br label %316

316:                                              ; preds = %301
  %317 = load i32, ptr %21, align 4, !tbaa !5
  %318 = add nsw i32 %317, 1
  store i32 %318, ptr %21, align 4, !tbaa !5
  br label %297, !llvm.loop !15

319:                                              ; preds = %300
  br label %320

320:                                              ; preds = %319
  %321 = load i32, ptr %20, align 4, !tbaa !5
  %322 = add nsw i32 %321, 1
  store i32 %322, ptr %20, align 4, !tbaa !5
  br label %291, !llvm.loop !16

323:                                              ; preds = %294
  br label %324

324:                                              ; preds = %323
  %325 = load i32, ptr %19, align 4, !tbaa !5
  %326 = add nsw i32 %325, 1
  store i32 %326, ptr %19, align 4, !tbaa !5
  br label %284, !llvm.loop !17

327:                                              ; preds = %289
  call void @_ZN6output2psIiJEEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4) %18)
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  %328 = load i32, ptr %1, align 4
  ret i32 %328

329:                                              ; preds = %38
  %330 = load ptr, ptr %4, align 8
  %331 = load i32, ptr %5, align 4
  %332 = insertvalue { ptr, i32 } poison, ptr %330, 0
  %333 = insertvalue { ptr, i32 } %332, i32 %331, 1
  resume { ptr, i32 } %333
}

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6output2psIiJEEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { 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 #4 = { 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}


; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@N = external dso_local global i32, align 4
@a = external dso_local global [55 x i32], align 16
@dp = external dso_local global [55 x [55 x [55 x [55 x i32]]]], align 16
@.str.15 = external hidden unnamed_addr constant [7 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.std::allocator", align 1
  %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
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull @.str.15, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %10 unwind label %13

10:                                               ; preds = %0
  invoke void @_ZN2io5setIOENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull %1)
          to label %11 unwind label %15

11:                                               ; preds = %10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #4
  call void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) @N)
  %12 = load i32, ptr @N, align 4, !tbaa !5
  %.not103 = icmp slt i32 %12, 1
  br i1 %.not103, label %._crit_edge.thread, label %.lr.ph

.preheader102:                                    ; preds = %.lr.ph
  %.not88110 = icmp slt i32 %19, 1
  br i1 %.not88110, label %._crit_edge.thread, label %.preheader101

13:                                               ; preds = %0
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %17

15:                                               ; preds = %10
  %16 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #4
  br label %17

17:                                               ; preds = %15, %13
  %.pn = phi { ptr, i32 } [ %16, %15 ], [ %14, %13 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn

.lr.ph:                                           ; preds = %11, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %11 ]
  %18 = getelementptr inbounds [55 x i32], ptr @a, i64 0, i64 %indvars.iv
  call void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4) %18)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %19 = load i32, ptr @N, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %.not.not = icmp slt i64 %indvars.iv, %20
  br i1 %.not.not, label %.lr.ph, label %.preheader102, !llvm.loop !9

.preheader101:                                    ; preds = %.preheader102, %75
  %indvars.iv135 = phi i64 [ %indvars.iv.next136, %75 ], [ 1, %.preheader102 ]
  %21 = phi i32 [ %76, %75 ], [ %19, %.preheader102 ]
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %22 = getelementptr inbounds [55 x i32], ptr @a, i64 0, i64 %indvars.iv135
  %23 = sext i32 %21 to i64
  br label %.preheader100

._crit_edge.thread:                               ; preds = %.preheader102, %11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %._crit_edge116

._crit_edge:                                      ; preds = %75
  %24 = icmp slt i32 %76, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  br i1 %24, label %._crit_edge116, label %.preheader98

.preheader100:                                    ; preds = %.preheader101, %.split108.us
  %indvars.iv132 = phi i64 [ %23, %.preheader101 ], [ %indvars.iv.next133, %.split108.us ]
  %indvars.iv.next133 = add nsw i64 %indvars.iv132, -1
  %25 = getelementptr inbounds [55 x i32], ptr @a, i64 0, i64 %indvars.iv132
  %26 = icmp slt i64 %indvars.iv135, %indvars.iv132
  %.fr = freeze i1 %26
  br i1 %.fr, label %.preheader99.us, label %.preheader99

.preheader99.us:                                  ; preds = %.preheader100, %.split.us.us
  %indvars.iv128 = phi i64 [ %indvars.iv.next129, %.split.us.us ], [ 0, %.preheader100 ]
  br label %27

27:                                               ; preds = %74, %.preheader99.us
  %indvars.iv125 = phi i64 [ %indvars.iv.next126, %74 ], [ 51, %.preheader99.us ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %28 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %indvars.iv135, i64 %indvars.iv132, i64 %indvars.iv128, i64 %indvars.iv125
  %29 = load i32, ptr %28, align 4, !tbaa !5
  store i32 %29, ptr %3, align 4, !tbaa !5
  %30 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %indvars.iv.next136, i64 %indvars.iv132, i64 %indvars.iv128, i64 %indvars.iv125
  %31 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %32 = load i32, ptr %22, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %.not92.us.us = icmp sgt i64 %indvars.iv128, %33
  br i1 %.not92.us.us, label %39, label %34

34:                                               ; preds = %27
  %35 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %indvars.iv.next136, i64 %indvars.iv132, i64 %33, i64 %indvars.iv125
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %4, align 4, !tbaa !5
  %38 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %35, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  br label %39

39:                                               ; preds = %34, %27
  %40 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %indvars.iv135, i64 %indvars.iv.next133, i64 %indvars.iv128, i64 %indvars.iv125
  %41 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %40, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %42 = load i32, ptr %25, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %.not93.us.us = icmp slt i64 %indvars.iv125, %43
  br i1 %.not93.us.us, label %49, label %44

44:                                               ; preds = %39
  %45 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %indvars.iv135, i64 %indvars.iv.next133, i64 %indvars.iv128, i64 %43
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %5, align 4, !tbaa !5
  %48 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %45, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  %.pre = load i32, ptr %25, align 4, !tbaa !5
  %.pre149 = sext i32 %.pre to i64
  br label %49

49:                                               ; preds = %44, %39
  %.pre-phi = phi i64 [ %.pre149, %44 ], [ %43, %39 ]
  %.not94.us.us = icmp sgt i64 %indvars.iv128, %.pre-phi
  br i1 %.not94.us.us, label %55, label %50

50:                                               ; preds = %49
  %51 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %indvars.iv.next136, i64 %indvars.iv.next133, i64 %.pre-phi, i64 %indvars.iv125
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %6, align 4, !tbaa !5
  %54 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %51, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  br label %55

55:                                               ; preds = %50, %49
  %56 = load i32, ptr %22, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %.not95.us.us = icmp slt i64 %indvars.iv125, %57
  br i1 %.not95.us.us, label %63, label %58

58:                                               ; preds = %55
  %59 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %indvars.iv.next136, i64 %indvars.iv.next133, i64 %indvars.iv128, i64 %57
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  %60 = load i32, ptr %3, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %7, align 4, !tbaa !5
  %62 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %59, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  br label %63

63:                                               ; preds = %58, %55
  %64 = load i32, ptr %25, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %.not96.us.us = icmp sgt i64 %indvars.iv128, %65
  br i1 %.not96.us.us, label %74, label %66

66:                                               ; preds = %63
  %67 = load i32, ptr %22, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %.not97.us.us = icmp slt i64 %indvars.iv125, %68
  br i1 %.not97.us.us, label %74, label %69

69:                                               ; preds = %66
  %70 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %indvars.iv.next136, i64 %indvars.iv.next133, i64 %65, i64 %68
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  %71 = load i32, ptr %3, align 4, !tbaa !5
  %72 = add nsw i32 %71, 2
  store i32 %72, ptr %8, align 4, !tbaa !5
  %73 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %70, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  br label %74

74:                                               ; preds = %69, %66, %63
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  %indvars.iv.next126 = add nsw i64 %indvars.iv125, -1
  %.not91.us.us.not = icmp ugt i64 %indvars.iv125, %indvars.iv128
  br i1 %.not91.us.us.not, label %27, label %.split.us.us, !llvm.loop !11

.split.us.us:                                     ; preds = %74
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %exitcond131.not = icmp eq i64 %indvars.iv.next129, 52
  br i1 %exitcond131.not, label %.split108.us, label %.preheader99.us, !llvm.loop !12

75:                                               ; preds = %.split108.us
  %76 = load i32, ptr @N, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %.not88.not = icmp slt i64 %indvars.iv135, %77
  br i1 %.not88.not, label %.preheader101, label %._crit_edge, !llvm.loop !13

.preheader99:                                     ; preds = %.preheader100, %.split
  %indvars.iv122 = phi i64 [ %indvars.iv.next123, %.split ], [ 0, %.preheader100 ]
  br label %78

.split108.us:                                     ; preds = %.split, %.split.us.us
  br i1 %.fr, label %.preheader100, label %75, !llvm.loop !14

.split:                                           ; preds = %100
  %indvars.iv.next123 = add nuw nsw i64 %indvars.iv122, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next123, 52
  br i1 %exitcond.not, label %.split108.us, label %.preheader99, !llvm.loop !12

78:                                               ; preds = %.preheader99, %100
  %indvars.iv119 = phi i64 [ 51, %.preheader99 ], [ %indvars.iv.next120, %100 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %79 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %indvars.iv135, i64 %indvars.iv132, i64 %indvars.iv122, i64 %indvars.iv119
  %80 = load i32, ptr %79, align 4, !tbaa !5
  store i32 %80, ptr %3, align 4, !tbaa !5
  %81 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %indvars.iv.next136, i64 %indvars.iv132, i64 %indvars.iv122, i64 %indvars.iv119
  %82 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %81, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %83 = load i32, ptr %22, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %.not92 = icmp sgt i64 %indvars.iv122, %84
  br i1 %.not92, label %90, label %85

85:                                               ; preds = %78
  %86 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %indvars.iv.next136, i64 %indvars.iv132, i64 %84, i64 %indvars.iv119
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %87 = load i32, ptr %3, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %4, align 4, !tbaa !5
  %89 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %86, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  br label %90

90:                                               ; preds = %85, %78
  %91 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %indvars.iv135, i64 %indvars.iv.next133, i64 %indvars.iv122, i64 %indvars.iv119
  %92 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %91, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %93 = load i32, ptr %25, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %.not93 = icmp slt i64 %indvars.iv119, %94
  br i1 %.not93, label %100, label %95

95:                                               ; preds = %90
  %96 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %indvars.iv135, i64 %indvars.iv.next133, i64 %indvars.iv122, i64 %94
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %97 = load i32, ptr %3, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %5, align 4, !tbaa !5
  %99 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %96, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  br label %100

100:                                              ; preds = %95, %90
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  %indvars.iv.next120 = add nsw i64 %indvars.iv119, -1
  %.not91.not = icmp ugt i64 %indvars.iv119, %indvars.iv122
  br i1 %.not91.not, label %78, label %.split, !llvm.loop !11

.preheader98:                                     ; preds = %._crit_edge, %102
  %indvars.iv146 = phi i64 [ %indvars.iv.next147, %102 ], [ 1, %._crit_edge ]
  %101 = add nsw i64 %indvars.iv146, -1
  br label %.preheader

._crit_edge116:                                   ; preds = %102, %._crit_edge.thread, %._crit_edge
  call void @_ZN6output2psIiJEEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  ret i32 0

.preheader:                                       ; preds = %.preheader98, %105
  %indvars.iv138 = phi i64 [ 0, %.preheader98 ], [ %indvars.iv.next139, %105 ]
  br label %106

102:                                              ; preds = %105
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %103 = load i32, ptr @N, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %.not89.not = icmp slt i64 %indvars.iv146, %104
  br i1 %.not89.not, label %.preheader98, label %._crit_edge116, !llvm.loop !15

105:                                              ; preds = %106
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %exitcond145.not = icmp eq i64 %indvars.iv.next139, 52
  br i1 %exitcond145.not, label %102, label %.preheader, !llvm.loop !16

106:                                              ; preds = %.preheader, %106
  %indvars.iv140 = phi i64 [ %indvars.iv138, %.preheader ], [ %indvars.iv.next141, %106 ]
  %107 = getelementptr inbounds [55 x [55 x [55 x [55 x i32]]]], ptr @dp, i64 0, i64 %indvars.iv146, i64 %101, i64 %indvars.iv138, i64 %indvars.iv140
  %108 = call noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %107)
  %indvars.iv.next141 = add nuw nsw i64 %indvars.iv140, 1
  %exitcond143.not = icmp eq i64 %indvars.iv.next141, 52
  br i1 %exitcond143.not, label %105, label %106, !llvm.loop !17
}

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5input2reIiEEvRT_(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5ckmaxIiEbRT_RKS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6output2psIiJEEEvRKT_DpRKT0_(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { 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 #4 = { nounwind }

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

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


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