; LLVM IR from eyangch/competitive-programming :: Codeforces/355 (c)

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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %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
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %24 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %25 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %26 = getelementptr i8, ptr %25, i64 -24
  %27 = load i64, ptr %26, align 8
  %28 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %27
  %29 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %28, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %35 = load i32, ptr %2, align 4, !tbaa !8
  %36 = zext i32 %35 to i64
  %37 = call ptr @llvm.stacksave.p0()
  store ptr %37, ptr %7, align 8
  %38 = alloca i32, i64 %36, align 16
  store i64 %36, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !8
  br label %39

39:                                               ; preds = %49, %0
  %40 = load i32, ptr %9, align 4, !tbaa !8
  %41 = load i32, ptr %2, align 4, !tbaa !8
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %52

44:                                               ; preds = %39
  %45 = load i32, ptr %9, align 4, !tbaa !8
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds i32, ptr %38, i64 %46
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %47)
  br label %49

49:                                               ; preds = %44
  %50 = load i32, ptr %9, align 4, !tbaa !8
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %9, align 4, !tbaa !8
  br label %39, !llvm.loop !11

52:                                               ; preds = %43
  %53 = load i32, ptr %2, align 4, !tbaa !8
  %54 = zext i32 %53 to i64
  %55 = alloca i32, i64 %54, align 16
  store i64 %54, ptr %10, align 8
  %56 = load i32, ptr %2, align 4, !tbaa !8
  %57 = zext i32 %56 to i64
  %58 = alloca i32, i64 %57, align 16
  store i64 %57, ptr %11, align 8
  %59 = load i32, ptr %2, align 4, !tbaa !8
  %60 = zext i32 %59 to i64
  %61 = alloca i32, i64 %60, align 16
  store i64 %60, ptr %12, align 8
  %62 = load i32, ptr %2, align 4, !tbaa !8
  %63 = zext i32 %62 to i64
  %64 = alloca i32, i64 %63, align 16
  store i64 %63, ptr %13, align 8
  %65 = getelementptr inbounds i32, ptr %38, i64 0
  %66 = load i32, ptr %65, align 16, !tbaa !8
  %67 = load i32, ptr %3, align 4, !tbaa !8
  %68 = mul nsw i32 %66, %67
  %69 = getelementptr inbounds i32, ptr %55, i64 0
  store i32 %68, ptr %69, align 16, !tbaa !8
  %70 = load i32, ptr %2, align 4, !tbaa !8
  %71 = sub nsw i32 %70, 1
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds i32, ptr %38, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !8
  %75 = load i32, ptr %4, align 4, !tbaa !8
  %76 = mul nsw i32 %74, %75
  %77 = load i32, ptr %2, align 4, !tbaa !8
  %78 = sub nsw i32 %77, 1
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i32, ptr %58, i64 %79
  store i32 %76, ptr %80, align 4, !tbaa !8
  %81 = getelementptr inbounds i32, ptr %61, i64 0
  store i32 0, ptr %81, align 16, !tbaa !8
  %82 = load i32, ptr %2, align 4, !tbaa !8
  %83 = sub nsw i32 %82, 1
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds i32, ptr %64, i64 %84
  store i32 0, ptr %85, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 1, ptr %14, align 4, !tbaa !8
  br label %86

86:                                               ; preds = %158, %52
  %87 = load i32, ptr %14, align 4, !tbaa !8
  %88 = load i32, ptr %2, align 4, !tbaa !8
  %89 = icmp slt i32 %87, %88
  br i1 %89, label %91, label %90

90:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %161

91:                                               ; preds = %86
  %92 = load i32, ptr %14, align 4, !tbaa !8
  %93 = sub nsw i32 %92, 1
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i32, ptr %55, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !8
  %97 = load i32, ptr %14, align 4, !tbaa !8
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i32, ptr %38, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !8
  %101 = load i32, ptr %3, align 4, !tbaa !8
  %102 = mul nsw i32 %100, %101
  %103 = add nsw i32 %96, %102
  %104 = load i32, ptr %14, align 4, !tbaa !8
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds i32, ptr %55, i64 %105
  store i32 %103, ptr %106, align 4, !tbaa !8
  %107 = load i32, ptr %5, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 0, ptr %15, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %108 = load i32, ptr %14, align 4, !tbaa !8
  %109 = add nsw i32 %108, 1
  %110 = load i32, ptr %2, align 4, !tbaa !8
  %111 = load i32, ptr %14, align 4, !tbaa !8
  %112 = sub nsw i32 %110, %111
  %113 = sub nsw i32 %109, %112
  store i32 %113, ptr %16, align 4, !tbaa !8
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %115 = load i32, ptr %114, align 4, !tbaa !8
  %116 = mul nsw i32 %107, %115
  %117 = load i32, ptr %14, align 4, !tbaa !8
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds i32, ptr %61, i64 %118
  store i32 %116, ptr %119, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  %120 = load i32, ptr %2, align 4, !tbaa !8
  %121 = load i32, ptr %14, align 4, !tbaa !8
  %122 = sub nsw i32 %120, %121
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds i32, ptr %58, i64 %123
  %125 = load i32, ptr %124, align 4, !tbaa !8
  %126 = load i32, ptr %2, align 4, !tbaa !8
  %127 = load i32, ptr %14, align 4, !tbaa !8
  %128 = sub nsw i32 %126, %127
  %129 = sub nsw i32 %128, 1
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds i32, ptr %38, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !8
  %133 = load i32, ptr %4, align 4, !tbaa !8
  %134 = mul nsw i32 %132, %133
  %135 = add nsw i32 %125, %134
  %136 = load i32, ptr %2, align 4, !tbaa !8
  %137 = load i32, ptr %14, align 4, !tbaa !8
  %138 = sub nsw i32 %136, %137
  %139 = sub nsw i32 %138, 1
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds i32, ptr %58, i64 %140
  store i32 %135, ptr %141, align 4, !tbaa !8
  %142 = load i32, ptr %6, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 0, ptr %17, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %143 = load i32, ptr %14, align 4, !tbaa !8
  %144 = add nsw i32 %143, 1
  %145 = load i32, ptr %2, align 4, !tbaa !8
  %146 = load i32, ptr %14, align 4, !tbaa !8
  %147 = sub nsw i32 %145, %146
  %148 = sub nsw i32 %144, %147
  store i32 %148, ptr %18, align 4, !tbaa !8
  %149 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %150 = load i32, ptr %149, align 4, !tbaa !8
  %151 = mul nsw i32 %142, %150
  %152 = load i32, ptr %2, align 4, !tbaa !8
  %153 = load i32, ptr %14, align 4, !tbaa !8
  %154 = sub nsw i32 %152, %153
  %155 = sub nsw i32 %154, 1
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds i32, ptr %64, i64 %156
  store i32 %151, ptr %157, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %158

158:                                              ; preds = %91
  %159 = load i32, ptr %14, align 4, !tbaa !8
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %14, align 4, !tbaa !8
  br label %86, !llvm.loop !13

161:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %162 = getelementptr inbounds i32, ptr %58, i64 0
  %163 = load i32, ptr %162, align 16, !tbaa !8
  %164 = getelementptr inbounds i32, ptr %64, i64 0
  %165 = load i32, ptr %164, align 16, !tbaa !8
  %166 = add nsw i32 %163, %165
  store i32 %166, ptr %20, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %167 = load i32, ptr %2, align 4, !tbaa !8
  %168 = sub nsw i32 %167, 1
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds i32, ptr %55, i64 %169
  %171 = load i32, ptr %170, align 4, !tbaa !8
  %172 = load i32, ptr %2, align 4, !tbaa !8
  %173 = sub nsw i32 %172, 1
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds i32, ptr %61, i64 %174
  %176 = load i32, ptr %175, align 4, !tbaa !8
  %177 = add nsw i32 %171, %176
  store i32 %177, ptr %21, align 4, !tbaa !8
  %178 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %179 = load i32, ptr %178, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  store i32 %179, ptr %19, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  store i32 1, ptr %22, align 4, !tbaa !8
  br label %180

180:                                              ; preds = %209, %161
  %181 = load i32, ptr %22, align 4, !tbaa !8
  %182 = load i32, ptr %2, align 4, !tbaa !8
  %183 = icmp slt i32 %181, %182
  br i1 %183, label %185, label %184

184:                                              ; preds = %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %212

185:                                              ; preds = %180
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %186 = load i32, ptr %22, align 4, !tbaa !8
  %187 = sub nsw i32 %186, 1
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds i32, ptr %55, i64 %188
  %190 = load i32, ptr %189, align 4, !tbaa !8
  %191 = load i32, ptr %22, align 4, !tbaa !8
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds i32, ptr %58, i64 %192
  %194 = load i32, ptr %193, align 4, !tbaa !8
  %195 = add nsw i32 %190, %194
  %196 = load i32, ptr %22, align 4, !tbaa !8
  %197 = sub nsw i32 %196, 1
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds i32, ptr %61, i64 %198
  %200 = load i32, ptr %199, align 4, !tbaa !8
  %201 = add nsw i32 %195, %200
  %202 = load i32, ptr %22, align 4, !tbaa !8
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds i32, ptr %64, i64 %203
  %205 = load i32, ptr %204, align 4, !tbaa !8
  %206 = add nsw i32 %201, %205
  store i32 %206, ptr %23, align 4, !tbaa !8
  %207 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %208 = load i32, ptr %207, align 4, !tbaa !8
  store i32 %208, ptr %19, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %209

209:                                              ; preds = %185
  %210 = load i32, ptr %22, align 4, !tbaa !8
  %211 = add nsw i32 %210, 1
  store i32 %211, ptr %22, align 4, !tbaa !8
  br label %180, !llvm.loop !14

212:                                              ; preds = %184
  %213 = load i32, ptr %19, align 4, !tbaa !8
  %214 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %213)
  %215 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %214, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  %216 = load ptr, ptr %7, align 8
  call void @llvm.stackrestore.p0(ptr %216)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %217 = load i32, ptr %1, align 4
  ret i32 %217
}

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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)) #5

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

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


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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = 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 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %15 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %17
  %19 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %18, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  %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) %1)
  %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) %2)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %25 = load i32, ptr %1, align 4, !tbaa !8
  %26 = zext i32 %25 to i64
  %27 = call ptr @llvm.stacksave.p0()
  %28 = alloca i32, i64 %26, align 16
  %29 = load i32, ptr %1, align 4, !tbaa !8
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre54 = sext i32 %29 to i64
  br label %._crit_edge

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i32, ptr %28, align 16, !tbaa !8
  br label %._crit_edge

._crit_edge:                                      ; preds = %.._crit_edge_crit_edge, %._crit_edge.loopexit
  %.pre-phi55 = phi i64 [ %.pre54, %.._crit_edge_crit_edge ], [ %53, %._crit_edge.loopexit ]
  %31 = phi i32 [ undef, %.._crit_edge_crit_edge ], [ %.pre, %._crit_edge.loopexit ]
  %32 = phi i32 [ %29, %.._crit_edge_crit_edge ], [ %52, %._crit_edge.loopexit ]
  %33 = zext i32 %32 to i64
  %34 = alloca i32, i64 %33, align 16
  %35 = alloca i32, i64 %33, align 16
  %36 = alloca i32, i64 %33, align 16
  %37 = alloca i32, i64 %33, align 16
  %38 = load i32, ptr %2, align 4, !tbaa !8
  %39 = mul nsw i32 %38, %31
  store i32 %39, ptr %34, align 16, !tbaa !8
  %40 = add nsw i32 %32, -1
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds i32, ptr %28, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !8
  %44 = load i32, ptr %3, align 4, !tbaa !8
  %45 = mul nsw i32 %44, %43
  %46 = getelementptr inbounds i32, ptr %35, i64 %41
  store i32 %45, ptr %46, align 4, !tbaa !8
  store i32 0, ptr %36, align 16, !tbaa !8
  %47 = getelementptr i32, ptr %37, i64 %.pre-phi55
  %48 = getelementptr i8, ptr %47, i64 -4
  store i32 0, ptr %48, align 4, !tbaa !8
  %49 = icmp sgt i32 %32, 1
  br i1 %49, label %.lr.ph34, label %._crit_edge35

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %50 = getelementptr inbounds i32, ptr %28, i64 %indvars.iv
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %50)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %52 = load i32, ptr %1, align 4, !tbaa !8
  %53 = sext i32 %52 to i64
  %54 = icmp slt i64 %indvars.iv.next, %53
  br i1 %54, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !11

._crit_edge35.loopexit:                           ; preds = %.lr.ph34
  %.pre51 = add nsw i32 %104, -1
  %.pre52 = sext i32 %.pre51 to i64
  br label %._crit_edge35

._crit_edge35:                                    ; preds = %._crit_edge35.loopexit, %._crit_edge
  %.pre-phi53 = phi i64 [ %.pre52, %._crit_edge35.loopexit ], [ %41, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %55 = load i32, ptr %35, align 16, !tbaa !8
  %56 = load i32, ptr %37, align 16, !tbaa !8
  %57 = add nsw i32 %56, %55
  store i32 %57, ptr %11, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  %58 = getelementptr inbounds i32, ptr %34, i64 %.pre-phi53
  %59 = load i32, ptr %58, align 4, !tbaa !8
  %60 = getelementptr inbounds i32, ptr %36, i64 %.pre-phi53
  %61 = load i32, ptr %60, align 4, !tbaa !8
  %62 = add nsw i32 %61, %59
  store i32 %62, ptr %12, align 4, !tbaa !8
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %64 = load i32, ptr %63, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  store i32 %64, ptr %10, align 4, !tbaa !8
  %65 = load i32, ptr %1, align 4, !tbaa !8
  %66 = icmp sgt i32 %65, 1
  br i1 %66, label %.lr.ph39, label %._crit_edge40

.lr.ph34:                                         ; preds = %._crit_edge, %.lr.ph34
  %indvars.iv44 = phi i64 [ %indvars.iv.next45, %.lr.ph34 ], [ 1, %._crit_edge ]
  %67 = phi i32 [ %104, %.lr.ph34 ], [ %32, %._crit_edge ]
  %68 = getelementptr i32, ptr %34, i64 %indvars.iv44
  %69 = getelementptr i8, ptr %68, i64 -4
  %70 = load i32, ptr %69, align 4, !tbaa !8
  %71 = getelementptr inbounds i32, ptr %28, i64 %indvars.iv44
  %72 = load i32, ptr %71, align 4, !tbaa !8
  %73 = load i32, ptr %2, align 4, !tbaa !8
  %74 = mul nsw i32 %73, %72
  %75 = add nsw i32 %74, %70
  store i32 %75, ptr %68, align 4, !tbaa !8
  %76 = load i32, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  store i32 0, ptr %6, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  %indvars.iv.next45 = add nuw nsw i64 %indvars.iv44, 1
  %77 = trunc nuw nsw i64 %indvars.iv44 to i32
  %.neg = sub i32 %77, %67
  %78 = trunc nuw nsw i64 %indvars.iv.next45 to i32
  %79 = add i32 %.neg, %78
  store i32 %79, ptr %7, align 4, !tbaa !8
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %81 = load i32, ptr %80, align 4, !tbaa !8
  %82 = mul nsw i32 %81, %76
  %83 = getelementptr inbounds i32, ptr %36, i64 %indvars.iv44
  store i32 %82, ptr %83, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  %84 = load i32, ptr %1, align 4, !tbaa !8
  %85 = sub nsw i32 %84, %77
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i32, ptr %35, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !8
  %89 = add nsw i32 %85, -1
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i32, ptr %28, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !8
  %93 = load i32, ptr %3, align 4, !tbaa !8
  %94 = mul nsw i32 %93, %92
  %95 = add nsw i32 %94, %88
  %96 = getelementptr inbounds i32, ptr %35, i64 %90
  store i32 %95, ptr %96, align 4, !tbaa !8
  %97 = load i32, ptr %5, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  store i32 0, ptr %8, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  %98 = add nuw nsw i64 %indvars.iv.next45, %indvars.iv44
  %99 = trunc nuw i64 %98 to i32
  %100 = sub i32 %99, %84
  store i32 %100, ptr %9, align 4, !tbaa !8
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %102 = load i32, ptr %101, align 4, !tbaa !8
  %103 = mul nsw i32 %102, %97
  %104 = load i32, ptr %1, align 4, !tbaa !8
  %105 = xor i32 %77, -1
  %106 = add i32 %104, %105
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds i32, ptr %37, i64 %107
  store i32 %103, ptr %108, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  %109 = sext i32 %104 to i64
  %110 = icmp slt i64 %indvars.iv.next45, %109
  br i1 %110, label %.lr.ph34, label %._crit_edge35.loopexit, !llvm.loop !13

._crit_edge40:                                    ; preds = %.lr.ph39, %._crit_edge35
  %111 = phi i32 [ %64, %._crit_edge35 ], [ %127, %.lr.ph39 ]
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %111)
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  call void @llvm.stackrestore.p0(ptr %27)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0

.lr.ph39:                                         ; preds = %._crit_edge35, %.lr.ph39
  %indvars.iv48 = phi i64 [ %indvars.iv.next49, %.lr.ph39 ], [ 1, %._crit_edge35 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  %114 = add nsw i64 %indvars.iv48, -1
  %115 = getelementptr inbounds i32, ptr %34, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !8
  %117 = getelementptr inbounds i32, ptr %35, i64 %indvars.iv48
  %118 = load i32, ptr %117, align 4, !tbaa !8
  %119 = add nsw i32 %118, %116
  %120 = getelementptr inbounds i32, ptr %36, i64 %114
  %121 = load i32, ptr %120, align 4, !tbaa !8
  %122 = add nsw i32 %119, %121
  %123 = getelementptr inbounds i32, ptr %37, i64 %indvars.iv48
  %124 = load i32, ptr %123, align 4, !tbaa !8
  %125 = add nsw i32 %122, %124
  store i32 %125, ptr %13, align 4, !tbaa !8
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %127 = load i32, ptr %126, align 4, !tbaa !8
  store i32 %127, ptr %10, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1
  %128 = load i32, ptr %1, align 4, !tbaa !8
  %129 = sext i32 %128 to i64
  %130 = icmp slt i64 %indvars.iv.next49, %129
  br i1 %130, label %.lr.ph39, label %._crit_edge40, !llvm.loop !14
}

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 #5

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

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


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