; LLVM IR from the-hyp0cr1t3/CC :: CSES/Dynamic Programming (Money Sums)

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

13:                                               ; preds = %40, %0
  %14 = load i32, ptr %2, align 4, !tbaa !8
  %15 = load i32, ptr %4, align 4, !tbaa !8
  %16 = icmp slt i32 %14, %15
  br i1 %16, label %17, label %43

17:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i32 100004, ptr %3, align 4, !tbaa !8
  br label %19

19:                                               ; preds = %36, %17
  %20 = load i32, ptr %3, align 4, !tbaa !8
  %21 = load i32, ptr %5, align 4, !tbaa !8
  %22 = icmp sge i32 %20, %21
  br i1 %22, label %23, label %39

23:                                               ; preds = %19
  %24 = load i32, ptr %3, align 4, !tbaa !8
  %25 = load i32, ptr %5, align 4, !tbaa !8
  %26 = sub nsw i32 %24, %25
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [100006 x i32], ptr @dp, i64 0, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !8
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %35

31:                                               ; preds = %23
  %32 = load i32, ptr %3, align 4, !tbaa !8
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [100006 x i32], ptr @dp, i64 0, i64 %33
  store i32 1, ptr %34, align 4, !tbaa !8
  br label %35

35:                                               ; preds = %31, %23
  br label %36

36:                                               ; preds = %35
  %37 = load i32, ptr %3, align 4, !tbaa !8
  %38 = add nsw i32 %37, -1
  store i32 %38, ptr %3, align 4, !tbaa !8
  br label %19, !llvm.loop !11

39:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %40

40:                                               ; preds = %39
  %41 = load i32, ptr %2, align 4, !tbaa !8
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %2, align 4, !tbaa !8
  br label %13, !llvm.loop !13

43:                                               ; preds = %13
  %44 = call noundef i32 @_ZSt10accumulateIPiiET0_T_S2_S1_(ptr noundef getelementptr inbounds (i32, ptr @dp, i64 1), ptr noundef getelementptr inbounds (i32, ptr @dp, i64 100005), i32 noundef 0)
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %44)
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %45, i8 noundef signext 10)
  store i32 1, ptr %2, align 4, !tbaa !8
  br label %47

47:                                               ; preds = %61, %43
  %48 = load i32, ptr %2, align 4, !tbaa !8
  %49 = icmp slt i32 %48, 100005
  br i1 %49, label %50, label %64

50:                                               ; preds = %47
  %51 = load i32, ptr %2, align 4, !tbaa !8
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [100006 x i32], ptr @dp, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !8
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %56, label %60

56:                                               ; preds = %50
  %57 = load i32, ptr %2, align 4, !tbaa !8
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %57)
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %58, i8 noundef signext 32)
  br label %60

60:                                               ; preds = %56, %50
  br label %61

61:                                               ; preds = %60
  %62 = load i32, ptr %2, align 4, !tbaa !8
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %2, align 4, !tbaa !8
  br label %47, !llvm.loop !14

64:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %65 = load i32, ptr %1, align 4
  ret i32 %65
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZSt10accumulateIPiiET0_T_S2_S1_(ptr noundef, ptr noundef, i32 noundef) #5

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 = { 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

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

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


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

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

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

.lr.ph19:                                         ; preds = %0, %._crit_edge
  %.01117 = phi i32 [ %61, %._crit_edge ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %13 = load i32, ptr %2, align 4, !tbaa !8
  %.not1315 = icmp sgt i32 %13, 100004
  br i1 %.not1315, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.lr.ph19
  %14 = sext i32 %13 to i64
  %15 = sub nsw i64 100005, %14
  %min.iters.check = icmp ult i64 %15, 32
  br i1 %min.iters.check, label %.lr.ph.preheader46, label %vector.scevcheck

vector.scevcheck:                                 ; preds = %.lr.ph.preheader
  %.neg = shl nsw i64 %14, 2
  %16 = getelementptr i8, ptr @dp, i64 %.neg
  %17 = icmp ugt ptr %16, getelementptr inbounds (i8, ptr @dp, i64 400016)
  %18 = mul nsw i64 %14, -4
  %scevgep = getelementptr i8, ptr getelementptr inbounds (i8, ptr @dp, i64 400016), i64 %18
  %.neg45 = shl nsw i64 %14, 2
  %notsub = add nsw i64 %14, -100005
  %mul.overflow28 = icmp ult i64 %notsub, -4611686018427387904
  %19 = getelementptr i8, ptr %scevgep, i64 %.neg45
  %20 = getelementptr i8, ptr %19, i64 -400016
  %21 = icmp ugt ptr %20, %scevgep
  %22 = or i1 %21, %mul.overflow28
  %23 = or i1 %17, %22
  %24 = mul nsw i64 %14, -4
  %diff.check = icmp ult i64 %24, 32
  %or.cond = select i1 %23, i1 true, i1 %diff.check
  br i1 %or.cond, label %.lr.ph.preheader46, label %vector.ph

vector.ph:                                        ; preds = %vector.scevcheck
  %n.vec = and i64 %15, -8
  %ind.end = sub nsw i64 100004, %n.vec
  br label %vector.body

vector.body:                                      ; preds = %pred.store.continue44, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %pred.store.continue44 ]
  %offset.idx = sub i64 100004, %index
  %25 = sub i64 100000, %index
  %26 = sub nsw i64 %offset.idx, %14
  %27 = getelementptr inbounds [100006 x i32], ptr @dp, i64 0, i64 %26
  %28 = getelementptr inbounds i8, ptr %27, i64 -12
  %29 = getelementptr inbounds i8, ptr %27, i64 -28
  %wide.load = load <4 x i32>, ptr %28, align 4, !tbaa !8
  %reverse = shufflevector <4 x i32> %wide.load, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %wide.load29 = load <4 x i32>, ptr %29, align 4, !tbaa !8
  %reverse30 = shufflevector <4 x i32> %wide.load29, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %30 = icmp ne <4 x i32> %reverse, zeroinitializer
  %31 = icmp ne <4 x i32> %reverse30, zeroinitializer
  %32 = extractelement <4 x i1> %30, i64 0
  br i1 %32, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body
  %33 = getelementptr inbounds [100006 x i32], ptr @dp, i64 0, i64 %offset.idx
  store i32 1, ptr %33, align 16, !tbaa !8
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body
  %34 = extractelement <4 x i1> %30, i64 1
  br i1 %34, label %pred.store.if31, label %pred.store.continue32

pred.store.if31:                                  ; preds = %pred.store.continue
  %35 = sub i64 100003, %index
  %36 = getelementptr inbounds [100006 x i32], ptr @dp, i64 0, i64 %35
  store i32 1, ptr %36, align 4, !tbaa !8
  br label %pred.store.continue32

pred.store.continue32:                            ; preds = %pred.store.if31, %pred.store.continue
  %37 = extractelement <4 x i1> %30, i64 2
  br i1 %37, label %pred.store.if33, label %pred.store.continue34

pred.store.if33:                                  ; preds = %pred.store.continue32
  %38 = sub i64 100002, %index
  %39 = getelementptr inbounds [100006 x i32], ptr @dp, i64 0, i64 %38
  store i32 1, ptr %39, align 8, !tbaa !8
  br label %pred.store.continue34

pred.store.continue34:                            ; preds = %pred.store.if33, %pred.store.continue32
  %40 = extractelement <4 x i1> %30, i64 3
  br i1 %40, label %pred.store.if35, label %pred.store.continue36

pred.store.if35:                                  ; preds = %pred.store.continue34
  %41 = sub i64 100001, %index
  %42 = getelementptr inbounds [100006 x i32], ptr @dp, i64 0, i64 %41
  store i32 1, ptr %42, align 4, !tbaa !8
  br label %pred.store.continue36

pred.store.continue36:                            ; preds = %pred.store.if35, %pred.store.continue34
  %43 = extractelement <4 x i1> %31, i64 0
  br i1 %43, label %pred.store.if37, label %pred.store.continue38

pred.store.if37:                                  ; preds = %pred.store.continue36
  %44 = getelementptr inbounds [100006 x i32], ptr @dp, i64 0, i64 %25
  store i32 1, ptr %44, align 16, !tbaa !8
  br label %pred.store.continue38

pred.store.continue38:                            ; preds = %pred.store.if37, %pred.store.continue36
  %45 = extractelement <4 x i1> %31, i64 1
  br i1 %45, label %pred.store.if39, label %pred.store.continue40

pred.store.if39:                                  ; preds = %pred.store.continue38
  %46 = sub i64 99999, %index
  %47 = getelementptr inbounds [100006 x i32], ptr @dp, i64 0, i64 %46
  store i32 1, ptr %47, align 4, !tbaa !8
  br label %pred.store.continue40

pred.store.continue40:                            ; preds = %pred.store.if39, %pred.store.continue38
  %48 = extractelement <4 x i1> %31, i64 2
  br i1 %48, label %pred.store.if41, label %pred.store.continue42

pred.store.if41:                                  ; preds = %pred.store.continue40
  %49 = sub i64 99998, %index
  %50 = getelementptr inbounds [100006 x i32], ptr @dp, i64 0, i64 %49
  store i32 1, ptr %50, align 8, !tbaa !8
  br label %pred.store.continue42

pred.store.continue42:                            ; preds = %pred.store.if41, %pred.store.continue40
  %51 = extractelement <4 x i1> %31, i64 3
  br i1 %51, label %pred.store.if43, label %pred.store.continue44

pred.store.if43:                                  ; preds = %pred.store.continue42
  %52 = sub i64 99997, %index
  %53 = getelementptr inbounds [100006 x i32], ptr @dp, i64 0, i64 %52
  store i32 1, ptr %53, align 4, !tbaa !8
  br label %pred.store.continue44

pred.store.continue44:                            ; preds = %pred.store.if43, %pred.store.continue42
  %index.next = add nuw i64 %index, 8
  %54 = icmp eq i64 %index.next, %n.vec
  br i1 %54, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %pred.store.continue44
  %cmp.n = icmp eq i64 %15, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader46

.lr.ph.preheader46:                               ; preds = %middle.block, %vector.scevcheck, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 100004, %vector.scevcheck ], [ 100004, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader46, %60
  %indvars.iv = phi i64 [ %indvars.iv.next, %60 ], [ %indvars.iv.ph, %.lr.ph.preheader46 ]
  %55 = sub nsw i64 %indvars.iv, %14
  %56 = getelementptr inbounds [100006 x i32], ptr @dp, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !8
  %.not14 = icmp eq i32 %57, 0
  br i1 %.not14, label %60, label %58

58:                                               ; preds = %.lr.ph
  %59 = getelementptr inbounds [100006 x i32], ptr @dp, i64 0, i64 %indvars.iv
  store i32 1, ptr %59, align 4, !tbaa !8
  br label %60

60:                                               ; preds = %.lr.ph, %58
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %.not13.not = icmp sgt i64 %indvars.iv, %14
  br i1 %.not13.not, label %.lr.ph, label %._crit_edge, !llvm.loop !15

._crit_edge:                                      ; preds = %60, %middle.block, %.lr.ph19
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %61 = add nuw nsw i32 %.01117, 1
  %62 = load i32, ptr %1, align 4, !tbaa !8
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %.lr.ph19, label %._crit_edge20, !llvm.loop !16

._crit_edge20:                                    ; preds = %._crit_edge, %0
  %64 = call noundef i32 @_ZSt10accumulateIPiiET0_T_S2_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @dp, i64 4), ptr noundef nonnull getelementptr inbounds (i8, ptr @dp, i64 400020), i32 noundef 0)
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %64)
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %65, i8 noundef signext 10)
  br label %67

67:                                               ; preds = %._crit_edge20, %74
  %indvars.iv23 = phi i64 [ 1, %._crit_edge20 ], [ %indvars.iv.next24, %74 ]
  %68 = getelementptr inbounds [100006 x i32], ptr @dp, i64 0, i64 %indvars.iv23
  %69 = load i32, ptr %68, align 4, !tbaa !8
  %.not = icmp eq i32 %69, 0
  br i1 %.not, label %74, label %70

70:                                               ; preds = %67
  %71 = trunc nuw nsw i64 %indvars.iv23 to i32
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %71)
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %72, i8 noundef signext 32)
  br label %74

74:                                               ; preds = %67, %70
  %indvars.iv.next24 = add nuw nsw i64 %indvars.iv23, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next24, 100005
  br i1 %exitcond.not, label %75, label %67, !llvm.loop !17

75:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZSt10accumulateIPiiET0_T_S2_S1_(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

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 = { 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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, !13, !14}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !12, !13}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,TailCallElimPass