; LLVM IR from the-hyp0cr1t3/CC :: CSES/Dynamic Programming (Array Description)

; 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 [100005 x [105 x i64]], align 16
@a = external dso_local global [100005 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 i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %7 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %9
  %11 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i32 0, ptr %2, align 4, !tbaa !8
  br label %15

15:                                               ; preds = %24, %0
  %16 = load i32, ptr %2, align 4, !tbaa !8
  %17 = load i32, ptr %4, align 4, !tbaa !8
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %19, label %27

19:                                               ; preds = %15
  %20 = load i32, ptr %2, align 4, !tbaa !8
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [100005 x i64], ptr @a, i64 0, i64 %21
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %22)
  br label %24

24:                                               ; preds = %19
  %25 = load i32, ptr %2, align 4, !tbaa !8
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %2, align 4, !tbaa !8
  br label %15, !llvm.loop !11

27:                                               ; preds = %15
  %28 = load i64, ptr @a, align 16, !tbaa !13
  %29 = icmp ne i64 %28, 0
  br i1 %29, label %35, label %30

30:                                               ; preds = %27
  %31 = load i32, ptr %5, align 4, !tbaa !8
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds i64, ptr @dp, i64 %32
  %34 = getelementptr inbounds i64, ptr %33, i64 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !8
  call void @_ZSt4fillIPliEvT_S1_RKT0_(ptr noundef getelementptr inbounds (i64, ptr @dp, i64 1), ptr noundef %34, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %38

35:                                               ; preds = %27
  %36 = load i64, ptr @a, align 16, !tbaa !13
  %37 = getelementptr inbounds [105 x i64], ptr @dp, i64 0, i64 %36
  store i64 1, ptr %37, align 8, !tbaa !13
  br label %38

38:                                               ; preds = %35, %30
  store i32 1, ptr %2, align 4, !tbaa !8
  br label %39

39:                                               ; preds = %155, %38
  %40 = load i32, ptr %2, align 4, !tbaa !8
  %41 = load i32, ptr %4, align 4, !tbaa !8
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %43, label %158

43:                                               ; preds = %39
  %44 = load i32, ptr %2, align 4, !tbaa !8
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [100005 x i64], ptr @a, i64 0, i64 %45
  %47 = load i64, ptr %46, align 8, !tbaa !13
  %48 = icmp ne i64 %47, 0
  br i1 %48, label %49, label %102

49:                                               ; preds = %43
  %50 = load i32, ptr %2, align 4, !tbaa !8
  %51 = sub nsw i32 %50, 1
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %52
  %54 = load i32, ptr %2, align 4, !tbaa !8
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [100005 x i64], ptr @a, i64 0, i64 %55
  %57 = load i64, ptr %56, align 8, !tbaa !13
  %58 = sub nsw i64 %57, 1
  %59 = getelementptr inbounds [105 x i64], ptr %53, i64 0, i64 %58
  %60 = load i64, ptr %59, align 8, !tbaa !13
  %61 = load i32, ptr %2, align 4, !tbaa !8
  %62 = sub nsw i32 %61, 1
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %63
  %65 = load i32, ptr %2, align 4, !tbaa !8
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [100005 x i64], ptr @a, i64 0, i64 %66
  %68 = load i64, ptr %67, align 8, !tbaa !13
  %69 = getelementptr inbounds [105 x i64], ptr %64, i64 0, i64 %68
  %70 = load i64, ptr %69, align 8, !tbaa !13
  %71 = add nsw i64 %60, %70
  %72 = load i32, ptr %2, align 4, !tbaa !8
  %73 = sub nsw i32 %72, 1
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %74
  %76 = load i32, ptr %2, align 4, !tbaa !8
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [100005 x i64], ptr @a, i64 0, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !13
  %80 = add nsw i64 %79, 1
  %81 = getelementptr inbounds [105 x i64], ptr %75, i64 0, i64 %80
  %82 = load i64, ptr %81, align 8, !tbaa !13
  %83 = add nsw i64 %71, %82
  %84 = load i32, ptr %2, align 4, !tbaa !8
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %85
  %87 = load i32, ptr %2, align 4, !tbaa !8
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100005 x i64], ptr @a, i64 0, i64 %88
  %90 = load i64, ptr %89, align 8, !tbaa !13
  %91 = getelementptr inbounds [105 x i64], ptr %86, i64 0, i64 %90
  store i64 %83, ptr %91, align 8, !tbaa !13
  %92 = load i32, ptr %2, align 4, !tbaa !8
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %93
  %95 = load i32, ptr %2, align 4, !tbaa !8
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [100005 x i64], ptr @a, i64 0, i64 %96
  %98 = load i64, ptr %97, align 8, !tbaa !13
  %99 = getelementptr inbounds [105 x i64], ptr %94, i64 0, i64 %98
  %100 = load i64, ptr %99, align 8, !tbaa !13
  %101 = srem i64 %100, 1000000007
  store i64 %101, ptr %99, align 8, !tbaa !13
  br label %154

102:                                              ; preds = %43
  store i32 1, ptr %3, align 4, !tbaa !8
  br label %103

103:                                              ; preds = %150, %102
  %104 = load i32, ptr %3, align 4, !tbaa !8
  %105 = load i32, ptr %5, align 4, !tbaa !8
  %106 = icmp sle i32 %104, %105
  br i1 %106, label %107, label %153

107:                                              ; preds = %103
  %108 = load i32, ptr %2, align 4, !tbaa !8
  %109 = sub nsw i32 %108, 1
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %110
  %112 = load i32, ptr %3, align 4, !tbaa !8
  %113 = sub nsw i32 %112, 1
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [105 x i64], ptr %111, i64 0, i64 %114
  %116 = load i64, ptr %115, align 8, !tbaa !13
  %117 = load i32, ptr %2, align 4, !tbaa !8
  %118 = sub nsw i32 %117, 1
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %119
  %121 = load i32, ptr %3, align 4, !tbaa !8
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [105 x i64], ptr %120, i64 0, i64 %122
  %124 = load i64, ptr %123, align 8, !tbaa !13
  %125 = add nsw i64 %116, %124
  %126 = load i32, ptr %2, align 4, !tbaa !8
  %127 = sub nsw i32 %126, 1
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %128
  %130 = load i32, ptr %3, align 4, !tbaa !8
  %131 = add nsw i32 %130, 1
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [105 x i64], ptr %129, i64 0, i64 %132
  %134 = load i64, ptr %133, align 8, !tbaa !13
  %135 = add nsw i64 %125, %134
  %136 = load i32, ptr %2, align 4, !tbaa !8
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %137
  %139 = load i32, ptr %3, align 4, !tbaa !8
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [105 x i64], ptr %138, i64 0, i64 %140
  store i64 %135, ptr %141, align 8, !tbaa !13
  %142 = load i32, ptr %2, align 4, !tbaa !8
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %143
  %145 = load i32, ptr %3, align 4, !tbaa !8
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [105 x i64], ptr %144, i64 0, i64 %146
  %148 = load i64, ptr %147, align 8, !tbaa !13
  %149 = srem i64 %148, 1000000007
  store i64 %149, ptr %147, align 8, !tbaa !13
  br label %150

150:                                              ; preds = %107
  %151 = load i32, ptr %3, align 4, !tbaa !8
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %3, align 4, !tbaa !8
  br label %103, !llvm.loop !15

153:                                              ; preds = %103
  br label %154

154:                                              ; preds = %153, %49
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %2, align 4, !tbaa !8
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %2, align 4, !tbaa !8
  br label %39, !llvm.loop !16

158:                                              ; preds = %39
  %159 = load i32, ptr %4, align 4, !tbaa !8
  %160 = sub nsw i32 %159, 1
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %161
  %163 = getelementptr inbounds [105 x i64], ptr %162, i64 0, i64 0
  %164 = load i32, ptr %4, align 4, !tbaa !8
  %165 = sub nsw i32 %164, 1
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %166
  %168 = getelementptr inbounds [105 x i64], ptr %167, i64 0, i64 0
  %169 = load i32, ptr %5, align 4, !tbaa !8
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds i64, ptr %168, i64 %170
  %172 = getelementptr inbounds i64, ptr %171, i64 1
  %173 = call noundef i64 @_ZSt10accumulateIPlxET0_T_S2_S1_(ptr noundef %163, ptr noundef %172, i64 noundef 0)
  %174 = srem i64 %173, 1000000007
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %174)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %176 = load i32, ptr %1, align 4
  ret i32 %176
}

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt10accumulateIPlxET0_T_S2_S1_(ptr noundef, ptr noundef, i64 noundef) #6

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

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

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

@dp = external dso_local global [100005 x [105 x i64]], align 16
@a = external dso_local global [100005 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 i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %5 = getelementptr i8, ptr %4, i64 -24
  %6 = load i64, ptr %5, align 8
  %7 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %6
  %8 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %7, ptr noundef null)
  %9 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %10 = 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)
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %12 = load i32, ptr %1, align 4, !tbaa !8
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %14 = getelementptr inbounds [100005 x i64], ptr @a, i64 0, i64 %indvars.iv
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %16 = load i32, ptr %1, align 4, !tbaa !8
  %17 = sext i32 %16 to i64
  %18 = icmp slt i64 %indvars.iv.next, %17
  br i1 %18, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph, %0
  %19 = phi i32 [ %12, %0 ], [ %16, %.lr.ph ]
  %20 = load i64, ptr @a, align 16, !tbaa !13
  %.not = icmp eq i64 %20, 0
  br i1 %.not, label %21, label %26

21:                                               ; preds = %._crit_edge
  %22 = load i32, ptr %2, align 4, !tbaa !8
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds i64, ptr @dp, i64 %23
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 1, ptr %3, align 4, !tbaa !8
  call void @_ZSt4fillIPliEvT_S1_RKT0_(ptr noundef nonnull getelementptr inbounds (i8, ptr @dp, i64 8), ptr noundef nonnull %25, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  %.pre = load i32, ptr %1, align 4, !tbaa !8
  br label %28

26:                                               ; preds = %._crit_edge
  %27 = getelementptr inbounds [105 x i64], ptr @dp, i64 0, i64 %20
  store i64 1, ptr %27, align 8, !tbaa !13
  br label %28

28:                                               ; preds = %26, %21
  %29 = phi i32 [ %19, %26 ], [ %.pre, %21 ]
  %30 = icmp sgt i32 %29, 1
  %.pre62 = load i32, ptr %2, align 4
  %.fr = freeze i32 %.pre62
  br i1 %30, label %.lr.ph42, label %._crit_edge43

.lr.ph42:                                         ; preds = %28
  %.not3436 = icmp slt i32 %.fr, 1
  br i1 %.not3436, label %.lr.ph42.split.us.preheader, label %.lr.ph42.split.preheader

.lr.ph42.split.preheader:                         ; preds = %.lr.ph42
  %wide.trip.count52 = zext nneg i32 %29 to i64
  %31 = zext nneg i32 %.fr to i64
  %xtraiter = and i64 %31, 1
  %32 = icmp eq i32 %.fr, 1
  %unroll_iter = and i64 %31, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.lr.ph42.split

.lr.ph42.split.us.preheader:                      ; preds = %.lr.ph42
  %wide.trip.count57 = zext nneg i32 %29 to i64
  br label %.lr.ph42.split.us

.lr.ph42.split.us:                                ; preds = %.lr.ph42.split.us.preheader, %.preheader.us
  %indvars.iv54 = phi i64 [ 1, %.lr.ph42.split.us.preheader ], [ %indvars.iv.next55, %.preheader.us ]
  %33 = getelementptr inbounds [100005 x i64], ptr @a, i64 0, i64 %indvars.iv54
  %34 = load i64, ptr %33, align 8, !tbaa !13
  %.not33.us = icmp eq i64 %34, 0
  br i1 %.not33.us, label %.preheader.us, label %35

35:                                               ; preds = %.lr.ph42.split.us
  %36 = add nsw i64 %indvars.iv54, -1
  %37 = add nsw i64 %34, -1
  %38 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %36, i64 %37
  %39 = load i64, ptr %38, align 8, !tbaa !13
  %40 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %36, i64 %34
  %41 = load i64, ptr %40, align 8, !tbaa !13
  %42 = add nsw i64 %41, %39
  %43 = add nsw i64 %34, 1
  %44 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %36, i64 %43
  %45 = load i64, ptr %44, align 8, !tbaa !13
  %46 = add nsw i64 %42, %45
  %47 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %indvars.iv54, i64 %34
  %48 = srem i64 %46, 1000000007
  store i64 %48, ptr %47, align 8, !tbaa !13
  br label %.preheader.us

.preheader.us:                                    ; preds = %.lr.ph42.split.us, %35
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %exitcond58.not = icmp eq i64 %indvars.iv.next55, %wide.trip.count57
  br i1 %exitcond58.not, label %._crit_edge43, label %.lr.ph42.split.us, !llvm.loop !15

.lr.ph42.split:                                   ; preds = %.lr.ph42.split.preheader, %..loopexit_crit_edge
  %indvars.iv49 = phi i64 [ 1, %.lr.ph42.split.preheader ], [ %indvars.iv.next50, %..loopexit_crit_edge ]
  %49 = getelementptr inbounds [100005 x i64], ptr @a, i64 0, i64 %indvars.iv49
  %50 = load i64, ptr %49, align 8, !tbaa !13
  %.not33 = icmp eq i64 %50, 0
  %51 = add nsw i64 %indvars.iv49, -1
  br i1 %.not33, label %.preheader, label %52

.preheader:                                       ; preds = %.lr.ph42.split
  %.phi.trans.insert = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %51, i64 0
  %.pre59 = load i64, ptr %.phi.trans.insert, align 8, !tbaa !13
  %.phi.trans.insert60 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %51, i64 1
  %.pre61 = load i64, ptr %.phi.trans.insert60, align 8, !tbaa !13
  br i1 %32, label %..loopexit_crit_edge.loopexit.unr-lcssa, label %.preheader.new

52:                                               ; preds = %.lr.ph42.split
  %53 = add nsw i64 %50, -1
  %54 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %51, i64 %53
  %55 = load i64, ptr %54, align 8, !tbaa !13
  %56 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %51, i64 %50
  %57 = load i64, ptr %56, align 8, !tbaa !13
  %58 = add nsw i64 %57, %55
  %59 = add nsw i64 %50, 1
  %60 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %51, i64 %59
  %61 = load i64, ptr %60, align 8, !tbaa !13
  %62 = add nsw i64 %58, %61
  %63 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %indvars.iv49, i64 %50
  %64 = srem i64 %62, 1000000007
  store i64 %64, ptr %63, align 8, !tbaa !13
  br label %..loopexit_crit_edge

.preheader.new:                                   ; preds = %.preheader, %.preheader.new
  %65 = phi i64 [ %75, %.preheader.new ], [ %.pre61, %.preheader ]
  %66 = phi i64 [ %69, %.preheader.new ], [ %.pre59, %.preheader ]
  %indvars.iv46 = phi i64 [ %indvars.iv.next47.1, %.preheader.new ], [ 1, %.preheader ]
  %niter = phi i64 [ %niter.next.1, %.preheader.new ], [ 0, %.preheader ]
  %67 = add nsw i64 %65, %66
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  %68 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %51, i64 %indvars.iv.next47
  %69 = load i64, ptr %68, align 8, !tbaa !13
  %70 = add nsw i64 %67, %69
  %71 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %indvars.iv49, i64 %indvars.iv46
  %72 = srem i64 %70, 1000000007
  store i64 %72, ptr %71, align 8, !tbaa !13
  %73 = add nsw i64 %69, %65
  %indvars.iv.next47.1 = add nuw nsw i64 %indvars.iv46, 2
  %74 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %51, i64 %indvars.iv.next47.1
  %75 = load i64, ptr %74, align 8, !tbaa !13
  %76 = add nsw i64 %73, %75
  %77 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %indvars.iv49, i64 %indvars.iv.next47
  %78 = srem i64 %76, 1000000007
  store i64 %78, ptr %77, align 8, !tbaa !13
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %..loopexit_crit_edge.loopexit.unr-lcssa, label %.preheader.new, !llvm.loop !16

..loopexit_crit_edge.loopexit.unr-lcssa:          ; preds = %.preheader.new, %.preheader
  %.unr = phi i64 [ %.pre61, %.preheader ], [ %75, %.preheader.new ]
  %.unr66 = phi i64 [ %.pre59, %.preheader ], [ %69, %.preheader.new ]
  %indvars.iv46.unr = phi i64 [ 1, %.preheader ], [ %indvars.iv.next47.1, %.preheader.new ]
  br i1 %lcmp.mod.not, label %..loopexit_crit_edge, label %..loopexit_crit_edge.loopexit.epilog-lcssa

..loopexit_crit_edge.loopexit.epilog-lcssa:       ; preds = %..loopexit_crit_edge.loopexit.unr-lcssa
  %79 = add nsw i64 %.unr, %.unr66
  %indvars.iv.next47.epil = add nuw nsw i64 %indvars.iv46.unr, 1
  %80 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %51, i64 %indvars.iv.next47.epil
  %81 = load i64, ptr %80, align 8, !tbaa !13
  %82 = add nsw i64 %79, %81
  %83 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %indvars.iv49, i64 %indvars.iv46.unr
  %84 = srem i64 %82, 1000000007
  store i64 %84, ptr %83, align 8, !tbaa !13
  br label %..loopexit_crit_edge

..loopexit_crit_edge:                             ; preds = %..loopexit_crit_edge.loopexit.epilog-lcssa, %..loopexit_crit_edge.loopexit.unr-lcssa, %52
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1
  %exitcond53.not = icmp eq i64 %indvars.iv.next50, %wide.trip.count52
  br i1 %exitcond53.not, label %._crit_edge43, label %.lr.ph42.split, !llvm.loop !15

._crit_edge43:                                    ; preds = %..loopexit_crit_edge, %.preheader.us, %28
  %85 = add nsw i32 %29, -1
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [100005 x [105 x i64]], ptr @dp, i64 0, i64 %86
  %88 = sext i32 %.fr to i64
  %89 = getelementptr inbounds i64, ptr %87, i64 %88
  %90 = getelementptr inbounds i8, ptr %89, i64 8
  %91 = call noundef i64 @_ZSt10accumulateIPlxET0_T_S2_S1_(ptr noundef nonnull %87, ptr noundef nonnull %90, i64 noundef 0)
  %92 = srem i64 %91, 1000000007
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %92)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0
}

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

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

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

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

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

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

; 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 #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZSt10accumulateIPlxET0_T_S2_S1_(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #6

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

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

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


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