; LLVM IR from eyangch/competitive-programming :: 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" }

@MOD = external dso_local global i32, align 4
@N = external dso_local global i32, align 4
@M = external dso_local global i32, align 4
@x = external dso_local global [100000 x i32], align 16
@dp = external dso_local global [100000 x [102 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
  %7 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(4) @M)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %20, %0
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = load i32, ptr @N, align 4, !tbaa !5
  %13 = icmp slt i32 %11, %12
  br i1 %13, label %15, label %14

14:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %23

15:                                               ; preds = %10
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [100000 x i32], ptr @x, i64 0, i64 %17
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %18)
  br label %20

20:                                               ; preds = %15
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %2, align 4, !tbaa !5
  br label %10, !llvm.loop !9

23:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 1, ptr %3, align 4, !tbaa !5
  %24 = load i32, ptr @x, align 16, !tbaa !5
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %32

26:                                               ; preds = %23
  %27 = load i32, ptr @M, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds i64, ptr @dp, i64 %28
  %30 = getelementptr inbounds i64, ptr %29, i64 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !5
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef getelementptr inbounds (i64, ptr @dp, i64 1), ptr noundef %30, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  %31 = load i32, ptr @M, align 4, !tbaa !5
  store i32 %31, ptr %3, align 4, !tbaa !5
  br label %36

32:                                               ; preds = %23
  %33 = load i32, ptr @x, align 16, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [102 x i64], ptr @dp, i64 0, i64 %34
  store i64 1, ptr %35, align 8, !tbaa !11
  br label %36

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

37:                                               ; preds = %126, %36
  %38 = load i32, ptr %5, align 4, !tbaa !5
  %39 = load i32, ptr @N, align 4, !tbaa !5
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %42, label %41

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

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

43:                                               ; preds = %122, %42
  %44 = load i32, ptr %7, align 4, !tbaa !5
  %45 = load i32, ptr @M, align 4, !tbaa !5
  %46 = icmp sle i32 %44, %45
  br i1 %46, label %48, label %47

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

48:                                               ; preds = %43
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [100000 x i32], ptr @x, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %61, label %54

54:                                               ; preds = %48
  %55 = load i32, ptr %5, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [100000 x i32], ptr @x, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = icmp eq i32 %58, %59
  br i1 %60, label %61, label %121

61:                                               ; preds = %54, %48
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [100000 x [102 x i64]], ptr @dp, i64 0, i64 %63
  %65 = load i32, ptr %7, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [102 x i64], ptr %64, i64 0, i64 %66
  %68 = load i64, ptr %67, align 8, !tbaa !11
  %69 = load i32, ptr %5, align 4, !tbaa !5
  %70 = sub nsw i32 %69, 1
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [100000 x [102 x i64]], ptr @dp, i64 0, i64 %71
  %73 = load i32, ptr %7, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [102 x i64], ptr %72, i64 0, i64 %74
  %76 = load i64, ptr %75, align 8, !tbaa !11
  %77 = add nsw i64 %68, %76
  %78 = load i32, ptr %5, align 4, !tbaa !5
  %79 = sub nsw i32 %78, 1
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [100000 x [102 x i64]], ptr @dp, i64 0, i64 %80
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = sub nsw i32 %82, 1
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [102 x i64], ptr %81, i64 0, i64 %84
  %86 = load i64, ptr %85, align 8, !tbaa !11
  %87 = add nsw i64 %77, %86
  %88 = load i32, ptr %5, align 4, !tbaa !5
  %89 = sub nsw i32 %88, 1
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [100000 x [102 x i64]], ptr @dp, i64 0, i64 %90
  %92 = load i32, ptr %7, align 4, !tbaa !5
  %93 = add nsw i32 %92, 1
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [102 x i64], ptr %91, i64 0, i64 %94
  %96 = load i64, ptr %95, align 8, !tbaa !11
  %97 = add nsw i64 %87, %96
  %98 = load i32, ptr @MOD, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = srem i64 %97, %99
  %101 = load i32, ptr %5, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [100000 x [102 x i64]], ptr @dp, i64 0, i64 %102
  %104 = load i32, ptr %7, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [102 x i64], ptr %103, i64 0, i64 %105
  store i64 %100, ptr %106, align 8, !tbaa !11
  %107 = load i32, ptr %3, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = load i32, ptr %5, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [100000 x [102 x i64]], ptr @dp, i64 0, i64 %110
  %112 = load i32, ptr %7, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [102 x i64], ptr %111, i64 0, i64 %113
  %115 = load i64, ptr %114, align 8, !tbaa !11
  %116 = add nsw i64 %108, %115
  %117 = load i32, ptr @MOD, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = srem i64 %116, %118
  %120 = trunc i64 %119 to i32
  store i32 %120, ptr %3, align 4, !tbaa !5
  br label %121

121:                                              ; preds = %61, %54
  br label %122

122:                                              ; preds = %121
  %123 = load i32, ptr %7, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %7, align 4, !tbaa !5
  br label %43, !llvm.loop !13

125:                                              ; preds = %47
  br label %126

126:                                              ; preds = %125
  %127 = load i32, ptr %5, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %5, align 4, !tbaa !5
  br label %37, !llvm.loop !14

129:                                              ; preds = %41
  %130 = load i32, ptr %3, align 4, !tbaa !5
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %130)
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %131, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  %133 = load i32, ptr %1, align 4
  ret i32 %133
}

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 memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

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

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

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) #4 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)) #3

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

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

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


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

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

@MOD = external dso_local local_unnamed_addr global i32, align 4
@N = external dso_local global i32, align 4
@M = external dso_local global i32, align 4
@x = external dso_local global [100000 x i32], align 16
@dp = external dso_local global [100000 x [102 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 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %3 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) @M)
  %4 = load i32, ptr @N, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %6 = phi i32 [ %4, %0 ], [ %11, %.lr.ph ]
  %7 = load i32, ptr @x, align 16, !tbaa !5
  %8 = icmp eq i32 %7, 0
  br i1 %8, label %14, label %20

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

14:                                               ; preds = %._crit_edge
  %15 = load i32, ptr @M, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds i64, ptr @dp, i64 %16
  %18 = getelementptr inbounds i8, ptr %17, i64 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  store i32 1, ptr %1, align 4, !tbaa !5
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull getelementptr inbounds (i8, ptr @dp, i64 8), ptr noundef nonnull %18, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  %19 = load i32, ptr @M, align 4, !tbaa !5
  %.pre = load i32, ptr @N, align 4, !tbaa !5
  br label %23

20:                                               ; preds = %._crit_edge
  %21 = sext i32 %7 to i64
  %22 = getelementptr inbounds [102 x i64], ptr @dp, i64 0, i64 %21
  store i64 1, ptr %22, align 8, !tbaa !11
  br label %23

23:                                               ; preds = %20, %14
  %24 = phi i32 [ %.pre, %14 ], [ %6, %20 ]
  %.026 = phi i32 [ %19, %14 ], [ 1, %20 ]
  %25 = icmp sgt i32 %24, 1
  br i1 %25, label %.preheader.lr.ph, label %._crit_edge37

.preheader.lr.ph:                                 ; preds = %23
  %26 = load i32, ptr @M, align 4, !tbaa !5
  %.not31 = icmp slt i32 %26, 1
  %27 = load i32, ptr @MOD, align 4
  %28 = sext i32 %27 to i64
  br i1 %.not31, label %._crit_edge37, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader.lr.ph
  %29 = add nuw i32 %26, 1
  %wide.trip.count55 = zext nneg i32 %24 to i64
  %wide.trip.count = zext i32 %29 to i64
  %wide.trip.count50 = zext i32 %29 to i64
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge35
  %indvars.iv52 = phi i64 [ 1, %.preheader.preheader ], [ %indvars.iv.next53, %._crit_edge35 ]
  %30 = getelementptr inbounds [100000 x i32], ptr @x, i64 0, i64 %indvars.iv52
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %.fr40 = freeze i32 %31
  %32 = icmp eq i32 %.fr40, 0
  %33 = add nsw i64 %indvars.iv52, -1
  br i1 %32, label %.lr.ph34.split.us.preheader, label %.lr.ph34.split.preheader

.lr.ph34.split.preheader:                         ; preds = %.preheader
  %34 = zext i32 %.fr40 to i64
  %35 = getelementptr inbounds [100000 x [102 x i64]], ptr @dp, i64 0, i64 %indvars.iv52, i64 %34
  %36 = getelementptr inbounds [100000 x [102 x i64]], ptr @dp, i64 0, i64 %33, i64 %34
  %37 = add nsw i64 %34, -1
  %38 = getelementptr inbounds [100000 x [102 x i64]], ptr @dp, i64 0, i64 %33, i64 %37
  %39 = add nuw nsw i64 %34, 1
  %40 = getelementptr inbounds [100000 x [102 x i64]], ptr @dp, i64 0, i64 %33, i64 %39
  br label %.lr.ph34.split

.lr.ph34.split.us.preheader:                      ; preds = %.preheader
  %.phi.trans.insert = getelementptr inbounds [100000 x [102 x i64]], ptr @dp, i64 0, i64 %33, i64 1
  %.pre57 = load i64, ptr %.phi.trans.insert, align 8, !tbaa !11
  br label %.lr.ph34.split.us

.lr.ph34.split.us:                                ; preds = %.lr.ph34.split.us.preheader, %.lr.ph34.split.us
  %41 = phi i64 [ %.pre57, %.lr.ph34.split.us.preheader ], [ %50, %.lr.ph34.split.us ]
  %indvars.iv47 = phi i64 [ 1, %.lr.ph34.split.us.preheader ], [ %indvars.iv.next48, %.lr.ph34.split.us ]
  %.232.us = phi i64 [ 0, %.lr.ph34.split.us.preheader ], [ %54, %.lr.ph34.split.us ]
  %42 = getelementptr inbounds [100000 x [102 x i64]], ptr @dp, i64 0, i64 %indvars.iv52, i64 %indvars.iv47
  %43 = load i64, ptr %42, align 8, !tbaa !11
  %44 = add nsw i64 %41, %43
  %45 = add nsw i64 %indvars.iv47, -1
  %46 = getelementptr inbounds [100000 x [102 x i64]], ptr @dp, i64 0, i64 %33, i64 %45
  %47 = load i64, ptr %46, align 8, !tbaa !11
  %48 = add nsw i64 %44, %47
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %49 = getelementptr inbounds [100000 x [102 x i64]], ptr @dp, i64 0, i64 %33, i64 %indvars.iv.next48
  %50 = load i64, ptr %49, align 8, !tbaa !11
  %51 = add nsw i64 %48, %50
  %52 = srem i64 %51, %28
  store i64 %52, ptr %42, align 8, !tbaa !11
  %53 = add nsw i64 %52, %.232.us
  %54 = srem i64 %53, %28
  %exitcond51.not = icmp eq i64 %indvars.iv.next48, %wide.trip.count50
  br i1 %exitcond51.not, label %._crit_edge35.loopexit, label %.lr.ph34.split.us, !llvm.loop !13

._crit_edge37:                                    ; preds = %._crit_edge35, %.preheader.lr.ph, %23
  %.1.lcssa = phi i32 [ %.026, %23 ], [ 0, %.preheader.lr.ph ], [ %.us-phi, %._crit_edge35 ]
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.1.lcssa)
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

._crit_edge35.loopexit:                           ; preds = %.lr.ph34.split.us
  %57 = trunc nsw i64 %54 to i32
  br label %._crit_edge35

._crit_edge35:                                    ; preds = %72, %._crit_edge35.loopexit
  %.us-phi = phi i32 [ %57, %._crit_edge35.loopexit ], [ %.3, %72 ]
  %indvars.iv.next53 = add nuw nsw i64 %indvars.iv52, 1
  %exitcond56.not = icmp eq i64 %indvars.iv.next53, %wide.trip.count55
  br i1 %exitcond56.not, label %._crit_edge37, label %.preheader, !llvm.loop !14

.lr.ph34.split:                                   ; preds = %.lr.ph34.split.preheader, %72
  %indvars.iv44 = phi i64 [ 1, %.lr.ph34.split.preheader ], [ %indvars.iv.next45, %72 ]
  %.232 = phi i32 [ 0, %.lr.ph34.split.preheader ], [ %.3, %72 ]
  %58 = icmp eq i64 %indvars.iv44, %34
  br i1 %58, label %59, label %72

59:                                               ; preds = %.lr.ph34.split
  %60 = load i64, ptr %35, align 8, !tbaa !11
  %61 = load i64, ptr %36, align 8, !tbaa !11
  %62 = add nsw i64 %61, %60
  %63 = load i64, ptr %38, align 8, !tbaa !11
  %64 = add nsw i64 %62, %63
  %65 = load i64, ptr %40, align 8, !tbaa !11
  %66 = add nsw i64 %64, %65
  %67 = srem i64 %66, %28
  store i64 %67, ptr %35, align 8, !tbaa !11
  %68 = sext i32 %.232 to i64
  %69 = add nsw i64 %67, %68
  %70 = srem i64 %69, %28
  %71 = trunc nsw i64 %70 to i32
  br label %72

72:                                               ; preds = %.lr.ph34.split, %59
  %.3 = phi i32 [ %71, %59 ], [ %.232, %.lr.ph34.split ]
  %indvars.iv.next45 = add nuw nsw i64 %indvars.iv44, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next45, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge35, label %.lr.ph34.split, !llvm.loop !13
}

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 memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

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

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

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 #4 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)) #3

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

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

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


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