; LLVM IR from lzyrapx/Competitive-Programming :: ACdream (1014（dp）(PE240))

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

@dp = external dso_local global [21 x [13 x [21 x [100 x i64]]]], align 16
@_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 i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %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 i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  br label %17

17:                                               ; preds = %195, %0
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %22 = load ptr, ptr %21, align 8, !tbaa !5
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr %21, i64 %24
  %26 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %25)
  br i1 %26, label %27, label %199

27:                                               ; preds = %17
  call void @llvm.memset.p0.i64(ptr align 16 @dp, i8 0, i64 4586400, i1 false)
  %28 = load i64, ptr %3, align 8, !tbaa !8
  %29 = getelementptr inbounds [13 x [21 x [100 x i64]]], ptr @dp, i64 0, i64 %28
  %30 = getelementptr inbounds [21 x [100 x i64]], ptr %29, i64 0, i64 0
  %31 = getelementptr inbounds [100 x i64], ptr %30, i64 0, i64 0
  store i64 1, ptr %31, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 1, ptr %6, align 4, !tbaa !11
  br label %32

32:                                               ; preds = %157, %27
  %33 = load i32, ptr %6, align 4, !tbaa !11
  %34 = sext i32 %33 to i64
  %35 = load i64, ptr %2, align 8, !tbaa !8
  %36 = icmp sle i64 %34, %35
  br i1 %36, label %38, label %37

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

38:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 1, ptr %8, align 4, !tbaa !11
  br label %39

39:                                               ; preds = %153, %38
  %40 = load i32, ptr %8, align 4, !tbaa !11
  %41 = sext i32 %40 to i64
  %42 = load i64, ptr %3, align 8, !tbaa !8
  %43 = icmp sle i64 %41, %42
  br i1 %43, label %45, label %44

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

45:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !11
  br label %46

46:                                               ; preds = %149, %45
  %47 = load i32, ptr %9, align 4, !tbaa !11
  %48 = load i32, ptr %6, align 4, !tbaa !11
  %49 = icmp sle i32 %47, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %46
  store i32 10, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %152

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

52:                                               ; preds = %145, %51
  %53 = load i32, ptr %10, align 4, !tbaa !11
  %54 = sext i32 %53 to i64
  %55 = load i64, ptr %5, align 8, !tbaa !8
  %56 = icmp sle i64 %54, %55
  br i1 %56, label %58, label %57

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

58:                                               ; preds = %52
  %59 = load i32, ptr %6, align 4, !tbaa !11
  %60 = sub nsw i32 %59, 1
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [21 x [13 x [21 x [100 x i64]]]], ptr @dp, i64 0, i64 %61
  %63 = load i32, ptr %8, align 4, !tbaa !11
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [13 x [21 x [100 x i64]]], ptr %62, i64 0, i64 %64
  %66 = load i32, ptr %9, align 4, !tbaa !11
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [21 x [100 x i64]], ptr %65, i64 0, i64 %67
  %69 = load i32, ptr %10, align 4, !tbaa !11
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [100 x i64], ptr %68, i64 0, i64 %70
  %72 = load i64, ptr %71, align 8, !tbaa !8
  %73 = icmp eq i64 %72, 0
  br i1 %73, label %74, label %75

74:                                               ; preds = %58
  br label %145

75:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 1, ptr %11, align 4, !tbaa !11
  br label %76

76:                                               ; preds = %141, %75
  %77 = load i32, ptr %11, align 4, !tbaa !11
  %78 = load i32, ptr %8, align 4, !tbaa !11
  %79 = icmp sle i32 %77, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %76
  store i32 16, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %144

81:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %82 = load i32, ptr %6, align 4, !tbaa !11
  %83 = sext i32 %82 to i64
  %84 = load i64, ptr %4, align 8, !tbaa !8
  %85 = icmp sle i64 %83, %84
  br i1 %85, label %86, label %90

86:                                               ; preds = %81
  %87 = load i32, ptr %10, align 4, !tbaa !11
  %88 = load i32, ptr %11, align 4, !tbaa !11
  %89 = add nsw i32 %87, %88
  store i32 %89, ptr %12, align 4, !tbaa !11
  br label %92

90:                                               ; preds = %81
  %91 = load i32, ptr %10, align 4, !tbaa !11
  store i32 %91, ptr %12, align 4, !tbaa !11
  br label %92

92:                                               ; preds = %90, %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !11
  %93 = load i32, ptr %11, align 4, !tbaa !11
  %94 = load i32, ptr %8, align 4, !tbaa !11
  %95 = icmp eq i32 %93, %94
  br i1 %95, label %96, label %99

96:                                               ; preds = %92
  %97 = load i32, ptr %9, align 4, !tbaa !11
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %13, align 4, !tbaa !11
  br label %100

99:                                               ; preds = %92
  store i32 1, ptr %13, align 4, !tbaa !11
  br label %100

100:                                              ; preds = %99, %96
  %101 = load i32, ptr %12, align 4, !tbaa !11
  %102 = sext i32 %101 to i64
  %103 = load i64, ptr %5, align 8, !tbaa !8
  %104 = icmp sle i64 %102, %103
  br i1 %104, label %105, label %140

105:                                              ; preds = %100
  %106 = load i32, ptr %6, align 4, !tbaa !11
  %107 = sub nsw i32 %106, 1
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [21 x [13 x [21 x [100 x i64]]]], ptr @dp, i64 0, i64 %108
  %110 = load i32, ptr %8, align 4, !tbaa !11
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [13 x [21 x [100 x i64]]], ptr %109, i64 0, i64 %111
  %113 = load i32, ptr %9, align 4, !tbaa !11
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [21 x [100 x i64]], ptr %112, i64 0, i64 %114
  %116 = load i32, ptr %10, align 4, !tbaa !11
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [100 x i64], ptr %115, i64 0, i64 %117
  %119 = load i64, ptr %118, align 8, !tbaa !8
  %120 = load i32, ptr %6, align 4, !tbaa !11
  %121 = sext i32 %120 to i64
  %122 = mul nsw i64 %119, %121
  %123 = load i32, ptr %13, align 4, !tbaa !11
  %124 = sext i32 %123 to i64
  %125 = sdiv i64 %122, %124
  %126 = load i32, ptr %6, align 4, !tbaa !11
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [21 x [13 x [21 x [100 x i64]]]], ptr @dp, i64 0, i64 %127
  %129 = load i32, ptr %11, align 4, !tbaa !11
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [13 x [21 x [100 x i64]]], ptr %128, i64 0, i64 %130
  %132 = load i32, ptr %13, align 4, !tbaa !11
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [21 x [100 x i64]], ptr %131, i64 0, i64 %133
  %135 = load i32, ptr %12, align 4, !tbaa !11
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [100 x i64], ptr %134, i64 0, i64 %136
  %138 = load i64, ptr %137, align 8, !tbaa !8
  %139 = add nsw i64 %138, %125
  store i64 %139, ptr %137, align 8, !tbaa !8
  br label %140

140:                                              ; preds = %105, %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %11, align 4, !tbaa !11
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %11, align 4, !tbaa !11
  br label %76, !llvm.loop !13

144:                                              ; preds = %80
  br label %145

145:                                              ; preds = %144, %74
  %146 = load i32, ptr %10, align 4, !tbaa !11
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %10, align 4, !tbaa !11
  br label %52, !llvm.loop !15

148:                                              ; preds = %57
  br label %149

149:                                              ; preds = %148
  %150 = load i32, ptr %9, align 4, !tbaa !11
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %9, align 4, !tbaa !11
  br label %46, !llvm.loop !16

152:                                              ; preds = %50
  br label %153

153:                                              ; preds = %152
  %154 = load i32, ptr %8, align 4, !tbaa !11
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %8, align 4, !tbaa !11
  br label %39, !llvm.loop !17

156:                                              ; preds = %44
  br label %157

157:                                              ; preds = %156
  %158 = load i32, ptr %6, align 4, !tbaa !11
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %6, align 4, !tbaa !11
  br label %32, !llvm.loop !18

160:                                              ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store i64 0, ptr %14, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 1, ptr %15, align 4, !tbaa !11
  br label %161

161:                                              ; preds = %192, %160
  %162 = load i32, ptr %15, align 4, !tbaa !11
  %163 = sext i32 %162 to i64
  %164 = load i64, ptr %3, align 8, !tbaa !8
  %165 = icmp sle i64 %163, %164
  br i1 %165, label %167, label %166

166:                                              ; preds = %161
  store i32 19, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %195

167:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 1, ptr %16, align 4, !tbaa !11
  br label %168

168:                                              ; preds = %188, %167
  %169 = load i32, ptr %16, align 4, !tbaa !11
  %170 = sext i32 %169 to i64
  %171 = load i64, ptr %2, align 8, !tbaa !8
  %172 = icmp sle i64 %170, %171
  br i1 %172, label %174, label %173

173:                                              ; preds = %168
  store i32 22, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %191

174:                                              ; preds = %168
  %175 = load i64, ptr %2, align 8, !tbaa !8
  %176 = getelementptr inbounds [21 x [13 x [21 x [100 x i64]]]], ptr @dp, i64 0, i64 %175
  %177 = load i32, ptr %15, align 4, !tbaa !11
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [13 x [21 x [100 x i64]]], ptr %176, i64 0, i64 %178
  %180 = load i32, ptr %16, align 4, !tbaa !11
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [21 x [100 x i64]], ptr %179, i64 0, i64 %181
  %183 = load i64, ptr %5, align 8, !tbaa !8
  %184 = getelementptr inbounds [100 x i64], ptr %182, i64 0, i64 %183
  %185 = load i64, ptr %184, align 8, !tbaa !8
  %186 = load i64, ptr %14, align 8, !tbaa !8
  %187 = add nsw i64 %186, %185
  store i64 %187, ptr %14, align 8, !tbaa !8
  br label %188

188:                                              ; preds = %174
  %189 = load i32, ptr %16, align 4, !tbaa !11
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr %16, align 4, !tbaa !11
  br label %168, !llvm.loop !19

191:                                              ; preds = %173
  br label %192

192:                                              ; preds = %191
  %193 = load i32, ptr %15, align 4, !tbaa !11
  %194 = add nsw i32 %193, 1
  store i32 %194, ptr %15, align 4, !tbaa !11
  br label %161, !llvm.loop !20

195:                                              ; preds = %166
  %196 = load i64, ptr %14, align 8, !tbaa !8
  %197 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %196)
  %198 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %197, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %17, !llvm.loop !21

199:                                              ; preds = %17
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %200 = load i32, ptr %1, align 4
  ret i32 %200
}

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

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

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 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)) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #5 = { 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 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

@dp = external dso_local local_unnamed_addr global [21 x [13 x [21 x [100 x i64]]]], align 16
@_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 i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  br label %5

5:                                                ; preds = %._crit_edge108, %0
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr %9, i64 %12
  %14 = call noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264) %13)
  br i1 %14, label %15, label %70

15:                                               ; preds = %5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4586400) @dp, i8 0, i64 4586400, i1 false)
  %16 = load i64, ptr %2, align 8, !tbaa !8
  %17 = getelementptr inbounds [13 x [21 x [100 x i64]]], ptr @dp, i64 0, i64 %16
  store i64 1, ptr %17, align 16, !tbaa !8
  %18 = load i64, ptr %1, align 8, !tbaa !8
  %.not92 = icmp slt i64 %18, 1
  br i1 %.not92, label %._crit_edge108, label %.preheader70.lr.ph

.preheader70.lr.ph:                               ; preds = %15
  %.not6184 = icmp slt i64 %16, 1
  %19 = load i64, ptr %4, align 8
  %20 = load i64, ptr %3, align 8
  br i1 %.not6184, label %._crit_edge108, label %.preheader70.lr.ph.split

.preheader70.lr.ph.split:                         ; preds = %.preheader70.lr.ph
  %.not6373 = icmp slt i64 %19, 0
  br i1 %.not6373, label %.preheader69.preheader, label %.preheader70

.preheader69.lr.ph:                               ; preds = %._crit_edge.split88
  br i1 %.not92, label %._crit_edge108, label %.preheader69.preheader

.preheader69.preheader:                           ; preds = %.preheader70.lr.ph.split, %.preheader69.lr.ph
  %21 = load i64, ptr %4, align 8
  %xtraiter = and i64 %18, 3
  %22 = icmp ult i64 %18, 4
  %unroll_iter = and i64 %18, 9223372036854775804
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader69

.preheader70:                                     ; preds = %.preheader70.lr.ph.split, %._crit_edge.split88
  %indvars.iv164 = phi i64 [ %indvars.iv.next165, %._crit_edge.split88 ], [ 1, %.preheader70.lr.ph.split ]
  %indvars.iv162 = phi i64 [ %indvars.iv.next163, %._crit_edge.split88 ], [ 2, %.preheader70.lr.ph.split ]
  %23 = add nsw i64 %indvars.iv164, -1
  %.not65 = icmp slt i64 %20, %indvars.iv164
  %.not65.fr = freeze i1 %.not65
  br i1 %.not65.fr, label %.preheader68.us89, label %.preheader68

.preheader68.us89:                                ; preds = %.preheader70, %.split.split.us.us
  %indvars.iv156 = phi i64 [ %indvars.iv.next157, %.split.split.us.us ], [ 1, %.preheader70 ]
  %indvars.iv154 = phi i64 [ %indvars.iv.next155, %.split.split.us.us ], [ 2, %.preheader70 ]
  br label %.preheader67.us81.us

.preheader67.us81.us:                             ; preds = %._crit_edge.split.us.us.us, %.preheader68.us89
  %indvars.iv149 = phi i64 [ %indvars.iv.next150, %._crit_edge.split.us.us.us ], [ 0, %.preheader68.us89 ]
  %indvars.iv.next150 = add nuw nsw i64 %indvars.iv149, 1
  %24 = and i64 %indvars.iv.next150, 4294967295
  br label %25

25:                                               ; preds = %.loopexit.split.us.us.us.us, %.preheader67.us81.us
  %indvars.iv145 = phi i64 [ %indvars.iv.next146, %.loopexit.split.us.us.us.us ], [ 0, %.preheader67.us81.us ]
  %26 = getelementptr inbounds [21 x [13 x [21 x [100 x i64]]]], ptr @dp, i64 0, i64 %23, i64 %indvars.iv156, i64 %indvars.iv149, i64 %indvars.iv145
  %27 = load i64, ptr %26, align 8, !tbaa !8
  %28 = icmp eq i64 %27, 0
  br i1 %28, label %.loopexit.split.us.us.us.us, label %.preheader.split.us.split.us79.us.us

.loopexit.split.us.us.us.us:                      ; preds = %.preheader.split.us.split.us79.us.us, %25
  %indvars.iv.next146 = add nuw nsw i64 %indvars.iv145, 1
  %exitcond148 = icmp eq i64 %indvars.iv145, %19
  br i1 %exitcond148, label %._crit_edge.split.us.us.us, label %25, !llvm.loop !11

.preheader.split.us.split.us79.us.us:             ; preds = %25, %.preheader.split.us.split.us79.us.us
  %indvars.iv139 = phi i64 [ %indvars.iv.next140, %.preheader.split.us.split.us79.us.us ], [ 1, %25 ]
  %29 = icmp eq i64 %indvars.iv139, %indvars.iv156
  %30 = load i64, ptr %26, align 8, !tbaa !8
  %31 = mul nsw i64 %30, %indvars.iv164
  %32 = select i1 %29, i64 %24, i64 1
  %33 = sdiv i64 %31, %32
  %34 = getelementptr inbounds [21 x [13 x [21 x [100 x i64]]]], ptr @dp, i64 0, i64 %indvars.iv164, i64 %indvars.iv139, i64 %32, i64 %indvars.iv145
  %35 = load i64, ptr %34, align 8, !tbaa !8
  %36 = add nsw i64 %35, %33
  store i64 %36, ptr %34, align 8, !tbaa !8
  %indvars.iv.next140 = add nuw nsw i64 %indvars.iv139, 1
  %exitcond144.not = icmp eq i64 %indvars.iv.next140, %indvars.iv154
  br i1 %exitcond144.not, label %.loopexit.split.us.us.us.us, label %.preheader.split.us.split.us79.us.us, !llvm.loop !13

._crit_edge.split.us.us.us:                       ; preds = %.loopexit.split.us.us.us.us
  %exitcond153.not = icmp eq i64 %indvars.iv.next150, %indvars.iv162
  br i1 %exitcond153.not, label %.split.split.us.us, label %.preheader67.us81.us, !llvm.loop !14

.split.split.us.us:                               ; preds = %._crit_edge.split.us.us.us
  %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1
  %indvars.iv.next155 = add nuw i64 %indvars.iv154, 1
  %exitcond161 = icmp eq i64 %indvars.iv156, %16
  br i1 %exitcond161, label %._crit_edge.split88, label %.preheader68.us89, !llvm.loop !15

.preheader68:                                     ; preds = %.preheader70, %.split.split
  %indvars.iv133 = phi i64 [ %indvars.iv.next134, %.split.split ], [ 1, %.preheader70 ]
  %indvars.iv131 = phi i64 [ %indvars.iv.next132, %.split.split ], [ 2, %.preheader70 ]
  br label %.preheader67

._crit_edge.split88:                              ; preds = %.split.split, %.split.split.us.us
  %indvars.iv.next165 = add nuw nsw i64 %indvars.iv164, 1
  %indvars.iv.next163 = add nuw i64 %indvars.iv162, 1
  %exitcond169 = icmp eq i64 %indvars.iv164, %18
  br i1 %exitcond169, label %.preheader69.lr.ph, label %.preheader70, !llvm.loop !16

.preheader67:                                     ; preds = %.preheader68, %._crit_edge.split
  %indvars.iv124 = phi i64 [ 0, %.preheader68 ], [ %indvars.iv.next125, %._crit_edge.split ]
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 1
  %37 = and i64 %indvars.iv.next125, 4294967295
  br label %38

.split.split:                                     ; preds = %._crit_edge.split
  %indvars.iv.next134 = add nuw nsw i64 %indvars.iv133, 1
  %indvars.iv.next132 = add nuw i64 %indvars.iv131, 1
  %exitcond138 = icmp eq i64 %indvars.iv133, %16
  br i1 %exitcond138, label %._crit_edge.split88, label %.preheader68, !llvm.loop !15

._crit_edge.split:                                ; preds = %.loopexit.split
  %exitcond130.not = icmp eq i64 %indvars.iv.next125, %indvars.iv162
  br i1 %exitcond130.not, label %.split.split, label %.preheader67, !llvm.loop !14

38:                                               ; preds = %.preheader67, %.loopexit.split
  %indvars.iv120 = phi i64 [ 0, %.preheader67 ], [ %indvars.iv.next121, %.loopexit.split ]
  %39 = getelementptr inbounds [21 x [13 x [21 x [100 x i64]]]], ptr @dp, i64 0, i64 %23, i64 %indvars.iv133, i64 %indvars.iv124, i64 %indvars.iv120
  %40 = load i64, ptr %39, align 8, !tbaa !8
  %41 = icmp eq i64 %40, 0
  br i1 %41, label %.loopexit.split, label %.preheader

.preheader:                                       ; preds = %38, %52
  %indvars.iv = phi i64 [ %indvars.iv.next, %52 ], [ 1, %38 ]
  %42 = add nuw nsw i64 %indvars.iv, %indvars.iv120
  %.not66 = icmp slt i64 %19, %42
  br i1 %.not66, label %52, label %43

43:                                               ; preds = %.preheader
  %44 = icmp eq i64 %indvars.iv, %indvars.iv133
  %45 = load i64, ptr %39, align 8, !tbaa !8
  %46 = mul nsw i64 %45, %indvars.iv164
  %47 = select i1 %44, i64 %37, i64 1
  %48 = sdiv i64 %46, %47
  %49 = getelementptr inbounds [21 x [13 x [21 x [100 x i64]]]], ptr @dp, i64 0, i64 %indvars.iv164, i64 %indvars.iv, i64 %47, i64 %42
  %50 = load i64, ptr %49, align 8, !tbaa !8
  %51 = add nsw i64 %50, %48
  store i64 %51, ptr %49, align 8, !tbaa !8
  br label %52

52:                                               ; preds = %43, %.preheader
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %indvars.iv131
  br i1 %exitcond.not, label %.loopexit.split, label %.preheader, !llvm.loop !13

.loopexit.split:                                  ; preds = %52, %38
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1
  %exitcond123 = icmp eq i64 %indvars.iv120, %19
  br i1 %exitcond123, label %._crit_edge.split, label %38, !llvm.loop !11

.preheader69:                                     ; preds = %.preheader69.preheader, %._crit_edge
  %indvars.iv183 = phi i64 [ 1, %.preheader69.preheader ], [ %indvars.iv.next184, %._crit_edge ]
  %.044106 = phi i64 [ 0, %.preheader69.preheader ], [ %.lcssa, %._crit_edge ]
  br i1 %22, label %._crit_edge.unr-lcssa, label %.preheader69.new

._crit_edge108:                                   ; preds = %._crit_edge, %15, %.preheader70.lr.ph, %.preheader69.lr.ph
  %.044.lcssa = phi i64 [ 0, %.preheader69.lr.ph ], [ 0, %.preheader70.lr.ph ], [ 0, %15 ], [ %.lcssa, %._crit_edge ]
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.044.lcssa)
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %5, !llvm.loop !17

._crit_edge.unr-lcssa:                            ; preds = %.preheader69.new, %.preheader69
  %.lcssa.ph = phi i64 [ poison, %.preheader69 ], [ %69, %.preheader69.new ]
  %indvars.iv179.unr = phi i64 [ 1, %.preheader69 ], [ %indvars.iv.next180.3, %.preheader69.new ]
  %.1102.unr = phi i64 [ %.044106, %.preheader69 ], [ %69, %.preheader69.new ]
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.unr-lcssa, %.epil.preheader
  %indvars.iv179.epil = phi i64 [ %indvars.iv.next180.epil, %.epil.preheader ], [ %indvars.iv179.unr, %._crit_edge.unr-lcssa ]
  %.1102.epil = phi i64 [ %57, %.epil.preheader ], [ %.1102.unr, %._crit_edge.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.unr-lcssa ]
  %55 = getelementptr inbounds [21 x [13 x [21 x [100 x i64]]]], ptr @dp, i64 0, i64 %18, i64 %indvars.iv183, i64 %indvars.iv179.epil, i64 %21
  %56 = load i64, ptr %55, align 8, !tbaa !8
  %57 = add nsw i64 %56, %.1102.epil
  %indvars.iv.next180.epil = add nuw nsw i64 %indvars.iv179.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_edge, label %.epil.preheader, !llvm.loop !18

._crit_edge:                                      ; preds = %.epil.preheader, %._crit_edge.unr-lcssa
  %.lcssa = phi i64 [ %.lcssa.ph, %._crit_edge.unr-lcssa ], [ %57, %.epil.preheader ]
  %indvars.iv.next184 = add nuw nsw i64 %indvars.iv183, 1
  %exitcond186 = icmp eq i64 %indvars.iv183, %16
  br i1 %exitcond186, label %._crit_edge108, label %.preheader69, !llvm.loop !20

.preheader69.new:                                 ; preds = %.preheader69, %.preheader69.new
  %indvars.iv179 = phi i64 [ %indvars.iv.next180.3, %.preheader69.new ], [ 1, %.preheader69 ]
  %.1102 = phi i64 [ %69, %.preheader69.new ], [ %.044106, %.preheader69 ]
  %niter = phi i64 [ %niter.next.3, %.preheader69.new ], [ 0, %.preheader69 ]
  %58 = getelementptr inbounds [21 x [13 x [21 x [100 x i64]]]], ptr @dp, i64 0, i64 %18, i64 %indvars.iv183, i64 %indvars.iv179, i64 %21
  %59 = load i64, ptr %58, align 8, !tbaa !8
  %60 = add nsw i64 %59, %.1102
  %indvars.iv.next180 = add nuw nsw i64 %indvars.iv179, 1
  %61 = getelementptr inbounds [21 x [13 x [21 x [100 x i64]]]], ptr @dp, i64 0, i64 %18, i64 %indvars.iv183, i64 %indvars.iv.next180, i64 %21
  %62 = load i64, ptr %61, align 8, !tbaa !8
  %63 = add nsw i64 %62, %60
  %indvars.iv.next180.1 = add nuw nsw i64 %indvars.iv179, 2
  %64 = getelementptr inbounds [21 x [13 x [21 x [100 x i64]]]], ptr @dp, i64 0, i64 %18, i64 %indvars.iv183, i64 %indvars.iv.next180.1, i64 %21
  %65 = load i64, ptr %64, align 8, !tbaa !8
  %66 = add nsw i64 %65, %63
  %indvars.iv.next180.2 = add nuw nsw i64 %indvars.iv179, 3
  %67 = getelementptr inbounds [21 x [13 x [21 x [100 x i64]]]], ptr @dp, i64 0, i64 %18, i64 %indvars.iv183, i64 %indvars.iv.next180.2, i64 %21
  %68 = load i64, ptr %67, align 8, !tbaa !8
  %69 = add nsw i64 %68, %66
  %indvars.iv.next180.3 = add nuw nsw i64 %indvars.iv179, 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_edge.unr-lcssa, label %.preheader69.new, !llvm.loop !21

70:                                               ; preds = %5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  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

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

; Function Attrs: mustprogress uwtable
declare noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEEcvbEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #2 align 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 #2 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)) #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #5 = { 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 = !{!"long long", !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}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.unroll.disable"}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}


; Effective O3 passes: ADCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass