; LLVM IR from Aryansh-S/USACO :: algo_ds/DP/atcoder (d-knapsack1)

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

@n = external dso_local global i32, align 4
@c = external dso_local global i32, align 4
@w = external dso_local global [105 x i64], align 16
@v = external dso_local global [105 x i64], align 16
@dp = external dso_local global [105 x [200005 x i64]], align 16
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@_ZSt3cin = external global %"class.std::basic_istream", 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 i64, align 8
  store i32 0, ptr %1, align 4
  %7 = call noalias ptr @fopen(ptr noundef @.str, ptr noundef @.str.2)
  %8 = icmp ne ptr %7, null
  br i1 %8, label %9, label %14

9:                                                ; preds = %0
  %10 = load ptr, ptr @stdin, align 8, !tbaa !5
  %11 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.2, ptr noundef %10)
  %12 = load ptr, ptr @stdout, align 8, !tbaa !5
  %13 = call ptr @freopen(ptr noundef @.str.3, ptr noundef @.str.4, ptr noundef %12)
  br label %14

14:                                               ; preds = %9, %0
  %15 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !9
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %17
  %19 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %18, ptr noundef null)
  %20 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @_Z2reIRiJS0_EEvOT_DpOT0_(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull align 4 dereferenceable(4) @c)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 1, ptr %2, align 4, !tbaa !11
  br label %21

21:                                               ; preds = %34, %14
  %22 = load i32, ptr %2, align 4, !tbaa !11
  %23 = load i32, ptr @n, align 4, !tbaa !11
  %24 = add nsw i32 %23, 1
  %25 = icmp slt i32 %22, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %37

27:                                               ; preds = %21
  %28 = load i32, ptr %2, align 4, !tbaa !11
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [105 x i64], ptr @w, i64 0, i64 %29
  %31 = load i32, ptr %2, align 4, !tbaa !11
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [105 x i64], ptr @v, i64 0, i64 %32
  call void @_Z2reIRxJS0_EEvOT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %33)
  br label %34

34:                                               ; preds = %27
  %35 = load i32, ptr %2, align 4, !tbaa !11
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %2, align 4, !tbaa !11
  br label %21, !llvm.loop !13

37:                                               ; preds = %26
  call void @llvm.memset.p0.i64(ptr align 16 @dp, i8 -63, i64 168004200, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @dp, i8 0, i64 1600040, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !11
  br label %38

38:                                               ; preds = %115, %37
  %39 = load i32, ptr %3, align 4, !tbaa !11
  %40 = load i32, ptr @n, align 4, !tbaa !11
  %41 = add nsw i32 %40, 2
  %42 = icmp slt i32 %39, %41
  br i1 %42, label %44, label %43

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

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

45:                                               ; preds = %111, %44
  %46 = load i32, ptr %5, align 4, !tbaa !11
  %47 = load i32, ptr @c, align 4, !tbaa !11
  %48 = add nsw i32 %47, 2
  %49 = icmp slt i32 %46, %48
  br i1 %49, label %51, label %50

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

51:                                               ; preds = %45
  %52 = load i32, ptr %3, align 4, !tbaa !11
  %53 = add nsw i32 %52, 1
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [105 x i64], ptr @w, i64 0, i64 %54
  %56 = load i64, ptr %55, align 8, !tbaa !15
  %57 = load i32, ptr %5, align 4, !tbaa !11
  %58 = sext i32 %57 to i64
  %59 = icmp sgt i64 %56, %58
  br i1 %59, label %60, label %75

60:                                               ; preds = %51
  %61 = load i32, ptr %3, align 4, !tbaa !11
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [105 x [200005 x i64]], ptr @dp, i64 0, i64 %62
  %64 = load i32, ptr %5, align 4, !tbaa !11
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [200005 x i64], ptr %63, i64 0, i64 %65
  %67 = load i64, ptr %66, align 8, !tbaa !15
  %68 = load i32, ptr %3, align 4, !tbaa !11
  %69 = add nsw i32 %68, 1
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [105 x [200005 x i64]], ptr @dp, i64 0, i64 %70
  %72 = load i32, ptr %5, align 4, !tbaa !11
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [200005 x i64], ptr %71, i64 0, i64 %73
  store i64 %67, ptr %74, align 8, !tbaa !15
  br label %110

75:                                               ; preds = %51
  %76 = load i32, ptr %3, align 4, !tbaa !11
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [105 x [200005 x i64]], ptr @dp, i64 0, i64 %77
  %79 = load i32, ptr %5, align 4, !tbaa !11
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [200005 x i64], ptr %78, i64 0, i64 %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %82 = load i32, ptr %3, align 4, !tbaa !11
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [105 x [200005 x i64]], ptr @dp, i64 0, i64 %83
  %85 = load i32, ptr %5, align 4, !tbaa !11
  %86 = sext i32 %85 to i64
  %87 = load i32, ptr %3, align 4, !tbaa !11
  %88 = add nsw i32 %87, 1
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [105 x i64], ptr @w, i64 0, i64 %89
  %91 = load i64, ptr %90, align 8, !tbaa !15
  %92 = sub nsw i64 %86, %91
  %93 = getelementptr inbounds [200005 x i64], ptr %84, i64 0, i64 %92
  %94 = load i64, ptr %93, align 8, !tbaa !15
  %95 = load i32, ptr %3, align 4, !tbaa !11
  %96 = add nsw i32 %95, 1
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [105 x i64], ptr @v, i64 0, i64 %97
  %99 = load i64, ptr %98, align 8, !tbaa !15
  %100 = add nsw i64 %94, %99
  store i64 %100, ptr %6, align 8, !tbaa !15
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %102 = load i64, ptr %101, align 8, !tbaa !15
  %103 = load i32, ptr %3, align 4, !tbaa !11
  %104 = add nsw i32 %103, 1
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [105 x [200005 x i64]], ptr @dp, i64 0, i64 %105
  %107 = load i32, ptr %5, align 4, !tbaa !11
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [200005 x i64], ptr %106, i64 0, i64 %108
  store i64 %102, ptr %109, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %110

110:                                              ; preds = %75, %60
  br label %111

111:                                              ; preds = %110
  %112 = load i32, ptr %5, align 4, !tbaa !11
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %5, align 4, !tbaa !11
  br label %45, !llvm.loop !17

114:                                              ; preds = %50
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %3, align 4, !tbaa !11
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %3, align 4, !tbaa !11
  br label %38, !llvm.loop !18

118:                                              ; preds = %43
  %119 = load i32, ptr @n, align 4, !tbaa !11
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [105 x [200005 x i64]], ptr @dp, i64 0, i64 %120
  %122 = load i32, ptr @c, align 4, !tbaa !11
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [200005 x i64], ptr %121, i64 0, i64 %123
  call void @_Z2prIRxJEEvOT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8) %124)
  %125 = load i32, ptr %1, align 4
  ret i32 %125
}

declare noalias ptr @fopen(ptr noundef, ptr noundef) #1

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #1

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

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

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2prIRxJEEvOT_DpOT0_(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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !16, i64 0}
!16 = !{!"long long", !7, i64 0}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !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 }

@n = external dso_local global i32, align 4
@c = external dso_local global i32, align 4
@w = external dso_local global [105 x i64], align 16
@v = external dso_local global [105 x i64], align 16
@dp = external dso_local global [105 x [200005 x i64]], align 16
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = tail call noalias ptr @fopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.2)
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %8, label %3

3:                                                ; preds = %0
  %4 = load ptr, ptr @stdin, align 8, !tbaa !5
  %5 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.2, ptr noundef %4)
  %6 = load ptr, ptr @stdout, align 8, !tbaa !5
  %7 = tail call ptr @freopen(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef %6)
  br label %8

8:                                                ; preds = %3, %0
  %9 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !9
  %10 = getelementptr i8, ptr %9, i64 -24
  %11 = load i64, ptr %10, align 8
  %12 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %11
  %13 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %12, ptr noundef null)
  %14 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  tail call void @_Z2reIRiJS0_EEvOT_DpOT0_(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull align 4 dereferenceable(4) @c)
  %15 = load i32, ptr @n, align 4, !tbaa !11
  %.not2627 = icmp slt i32 %15, 1
  br i1 %.not2627, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %8
  %16 = phi i32 [ %15, %8 ], [ %21, %.lr.ph ]
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(168004200) getelementptr inbounds (i8, ptr @dp, i64 1600032), i8 -63, i64 166404168, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1600040) @dp, i8 0, i64 1600040, i1 false)
  %17 = icmp sgt i32 %16, -2
  %.pre47 = load i32, ptr @c, align 4, !tbaa !11
  %18 = icmp sgt i32 %.pre47, -2
  %or.cond = select i1 %17, i1 %18, i1 false
  br i1 %or.cond, label %.preheader, label %._crit_edge33

.lr.ph:                                           ; preds = %8, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %8 ]
  %19 = getelementptr inbounds [105 x i64], ptr @w, i64 0, i64 %indvars.iv
  %20 = getelementptr inbounds [105 x i64], ptr @v, i64 0, i64 %indvars.iv
  tail call void @_Z2reIRxJS0_EEvOT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %21 = load i32, ptr @n, align 4, !tbaa !11
  %22 = sext i32 %21 to i64
  %.not26.not = icmp slt i64 %indvars.iv, %22
  br i1 %.not26.not, label %.lr.ph, label %._crit_edge, !llvm.loop !13

.preheader:                                       ; preds = %._crit_edge, %._crit_edge31
  %23 = phi i32 [ %34, %._crit_edge31 ], [ %16, %._crit_edge ]
  %24 = phi i32 [ %35, %._crit_edge31 ], [ %.pre47, %._crit_edge ]
  %25 = phi i32 [ %36, %._crit_edge31 ], [ %.pre47, %._crit_edge ]
  %indvars.iv43 = phi i64 [ %27, %._crit_edge31 ], [ 0, %._crit_edge ]
  %26 = icmp sgt i32 %25, -2
  %27 = add nuw nsw i64 %indvars.iv43, 1
  br i1 %26, label %.lr.ph30, label %._crit_edge31

.lr.ph30:                                         ; preds = %.preheader
  %28 = getelementptr inbounds [105 x i64], ptr @w, i64 0, i64 %27
  %29 = getelementptr inbounds [105 x i64], ptr @v, i64 0, i64 %27
  br label %38

._crit_edge33:                                    ; preds = %._crit_edge31, %._crit_edge
  %30 = phi i32 [ %.pre47, %._crit_edge ], [ %35, %._crit_edge31 ]
  %.lcssa = phi i32 [ %16, %._crit_edge ], [ %34, %._crit_edge31 ]
  %31 = sext i32 %.lcssa to i64
  %32 = sext i32 %30 to i64
  %33 = getelementptr inbounds [105 x [200005 x i64]], ptr @dp, i64 0, i64 %31, i64 %32
  call void @_Z2prIRxJEEvOT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8) %33)
  ret i32 0

._crit_edge31.loopexit:                           ; preds = %53
  %.pre46 = load i32, ptr @n, align 4, !tbaa !11
  br label %._crit_edge31

._crit_edge31:                                    ; preds = %.preheader, %._crit_edge31.loopexit
  %34 = phi i32 [ %.pre46, %._crit_edge31.loopexit ], [ %23, %.preheader ]
  %35 = phi i32 [ %54, %._crit_edge31.loopexit ], [ %24, %.preheader ]
  %36 = phi i32 [ %54, %._crit_edge31.loopexit ], [ %25, %.preheader ]
  %37 = sext i32 %34 to i64
  %.not36 = icmp sgt i64 %indvars.iv43, %37
  br i1 %.not36, label %._crit_edge33, label %.preheader, !llvm.loop !15

38:                                               ; preds = %.lr.ph30, %53
  %39 = phi i32 [ %24, %.lr.ph30 ], [ %54, %53 ]
  %indvars.iv40 = phi i64 [ 0, %.lr.ph30 ], [ %indvars.iv.next41, %53 ]
  %40 = load i64, ptr %28, align 8, !tbaa !17
  %41 = icmp sgt i64 %40, %indvars.iv40
  %42 = getelementptr inbounds [105 x [200005 x i64]], ptr @dp, i64 0, i64 %indvars.iv43, i64 %indvars.iv40
  br i1 %41, label %43, label %45

43:                                               ; preds = %38
  %44 = load i64, ptr %42, align 8, !tbaa !17
  br label %53

45:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  %46 = sub nsw i64 %indvars.iv40, %40
  %47 = getelementptr inbounds [105 x [200005 x i64]], ptr @dp, i64 0, i64 %indvars.iv43, i64 %46
  %48 = load i64, ptr %47, align 8, !tbaa !17
  %49 = load i64, ptr %29, align 8, !tbaa !17
  %50 = add nsw i64 %49, %48
  store i64 %50, ptr %1, align 8, !tbaa !17
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %52 = load i64, ptr %51, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  %.pre = load i32, ptr @c, align 4, !tbaa !11
  br label %53

53:                                               ; preds = %43, %45
  %54 = phi i32 [ %39, %43 ], [ %.pre, %45 ]
  %.sink = phi i64 [ %44, %43 ], [ %52, %45 ]
  %55 = getelementptr inbounds [105 x [200005 x i64]], ptr @dp, i64 0, i64 %27, i64 %indvars.iv40
  store i64 %.sink, ptr %55, align 8
  %indvars.iv.next41 = add nuw nsw i64 %indvars.iv40, 1
  %56 = sext i32 %54 to i64
  %.not35 = icmp sgt i64 %indvars.iv40, %56
  br i1 %.not35, label %._crit_edge31.loopexit, label %38, !llvm.loop !19
}

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #1

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2prIRxJEEvOT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #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 = { nofree nounwind "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 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 #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 #8 = { nounwind }

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

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


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