; LLVM IR from ravireddy07/cpp-book :: src/Arrays/MaxSumRect2DArray.ll (Z12MaxSumRect2DPPxxx)

; 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_ostream" = type { ptr, %"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 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z6kadanePxS_S_x(ptr noundef, ptr noundef, ptr noundef, i64 noundef) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z12MaxSumRect2DPPxxx(ptr noundef %0, i64 noundef %1, i64 noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  store i64 %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store i64 -2147483648, ptr %7, align 8, !tbaa !9
  %17 = load i64, ptr %5, align 8, !tbaa !9
  %18 = call ptr @llvm.stacksave.p0()
  store ptr %18, ptr %8, align 8
  %19 = alloca i64, i64 %17, align 16
  store i64 %17, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !11
  br label %20

20:                                               ; preds = %74, %3
  %21 = load i32, ptr %13, align 4, !tbaa !11
  %22 = sext i32 %21 to i64
  %23 = load i64, ptr %6, align 8, !tbaa !9
  %24 = icmp slt i64 %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %20
  store i32 2, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %77

26:                                               ; preds = %20
  %27 = mul nuw i64 8, %17
  call void @llvm.memset.p0.i64(ptr align 16 %19, i8 0, i64 %27, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %28 = load i32, ptr %13, align 4, !tbaa !11
  store i32 %28, ptr %15, align 4, !tbaa !11
  br label %29

29:                                               ; preds = %70, %26
  %30 = load i32, ptr %15, align 4, !tbaa !11
  %31 = sext i32 %30 to i64
  %32 = load i64, ptr %6, align 8, !tbaa !9
  %33 = icmp slt i64 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %29
  store i32 5, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %73

35:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !11
  br label %36

36:                                               ; preds = %57, %35
  %37 = load i32, ptr %16, align 4, !tbaa !11
  %38 = sext i32 %37 to i64
  %39 = load i64, ptr %5, align 8, !tbaa !9
  %40 = icmp slt i64 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %36
  store i32 8, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %60

42:                                               ; preds = %36
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = load i32, ptr %16, align 4, !tbaa !11
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds ptr, ptr %43, i64 %45
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  %48 = load i32, ptr %15, align 4, !tbaa !11
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds i64, ptr %47, i64 %49
  %51 = load i64, ptr %50, align 8, !tbaa !9
  %52 = load i32, ptr %16, align 4, !tbaa !11
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i64, ptr %19, i64 %53
  %55 = load i64, ptr %54, align 8, !tbaa !9
  %56 = add nsw i64 %55, %51
  store i64 %56, ptr %54, align 8, !tbaa !9
  br label %57

57:                                               ; preds = %42
  %58 = load i32, ptr %16, align 4, !tbaa !11
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %16, align 4, !tbaa !11
  br label %36, !llvm.loop !13

60:                                               ; preds = %41
  %61 = load i64, ptr %5, align 8, !tbaa !9
  %62 = call noundef i32 @_Z6kadanePxS_S_x(ptr noundef %19, ptr noundef %11, ptr noundef %12, i64 noundef %61)
  %63 = sext i32 %62 to i64
  store i64 %63, ptr %10, align 8, !tbaa !9
  %64 = load i64, ptr %10, align 8, !tbaa !9
  %65 = load i64, ptr %7, align 8, !tbaa !9
  %66 = icmp sgt i64 %64, %65
  br i1 %66, label %67, label %69

67:                                               ; preds = %60
  %68 = load i64, ptr %10, align 8, !tbaa !9
  store i64 %68, ptr %7, align 8, !tbaa !9
  br label %69

69:                                               ; preds = %67, %60
  br label %70

70:                                               ; preds = %69
  %71 = load i32, ptr %15, align 4, !tbaa !11
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %15, align 4, !tbaa !11
  br label %29, !llvm.loop !15

73:                                               ; preds = %34
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %13, align 4, !tbaa !11
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %13, align 4, !tbaa !11
  br label %20, !llvm.loop !16

77:                                               ; preds = %25
  %78 = load i64, ptr %7, align 8, !tbaa !9
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %78)
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %79, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  %81 = load ptr, ptr %8, align 8
  call void @llvm.stackrestore.p0(ptr %81)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

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

@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z6kadanePxS_S_x(ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z12MaxSumRect2DPPxxx(ptr nocapture noundef readonly %0, i64 noundef %1, i64 noundef %2) local_unnamed_addr #2 {
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, i64 %1, align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %7 = icmp sgt i64 %2, 0
  br i1 %7, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3
  %8 = shl nuw i64 %1, 3
  %9 = icmp sgt i64 %1, 0
  br i1 %9, label %.preheader.us.us.preheader.preheader, label %.preheader.preheader

.preheader.us.us.preheader.preheader:             ; preds = %.lr.ph
  %xtraiter = and i64 %1, 1
  %10 = icmp eq i64 %1, 1
  %unroll_iter = and i64 %1, 9223372036854775806
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader.us.us.preheader

.preheader.us.us.preheader:                       ; preds = %.preheader.us.us.preheader.preheader, %._crit_edge31.split.us.us
  %indvars.iv46 = phi i64 [ %indvars.iv.next47, %._crit_edge31.split.us.us ], [ 0, %.preheader.us.us.preheader.preheader ]
  %.02232.us = phi i64 [ %spec.select.us.us, %._crit_edge31.split.us.us ], [ -2147483648, %.preheader.us.us.preheader.preheader ]
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %6, i8 0, i64 %8, i1 false)
  br label %.preheader.us.us

._crit_edge31.split.us.us:                        ; preds = %._crit_edge.us.us
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  %exitcond52.not = icmp eq i64 %indvars.iv.next47, %2
  br i1 %exitcond52.not, label %._crit_edge, label %.preheader.us.us.preheader, !llvm.loop !5

.preheader.us.us:                                 ; preds = %.preheader.us.us.preheader, %._crit_edge.us.us
  %indvars.iv48 = phi i64 [ %indvars.iv46, %.preheader.us.us.preheader ], [ %indvars.iv.next49, %._crit_edge.us.us ]
  %.129.us.us = phi i64 [ %.02232.us, %.preheader.us.us.preheader ], [ %spec.select.us.us, %._crit_edge.us.us ]
  br i1 %10, label %._crit_edge.us.us.unr-lcssa, label %.preheader.us.us.new

.preheader.us.us.new:                             ; preds = %.preheader.us.us, %.preheader.us.us.new
  %indvars.iv42 = phi i64 [ %indvars.iv.next43.1, %.preheader.us.us.new ], [ 0, %.preheader.us.us ]
  %niter = phi i64 [ %niter.next.1, %.preheader.us.us.new ], [ 0, %.preheader.us.us ]
  %11 = getelementptr inbounds ptr, ptr %0, i64 %indvars.iv42
  %12 = load ptr, ptr %11, align 8, !tbaa !7
  %13 = getelementptr inbounds i64, ptr %12, i64 %indvars.iv48
  %14 = load i64, ptr %13, align 8, !tbaa !11
  %15 = getelementptr inbounds i64, ptr %6, i64 %indvars.iv42
  %16 = load i64, ptr %15, align 16, !tbaa !11
  %17 = add nsw i64 %16, %14
  store i64 %17, ptr %15, align 16, !tbaa !11
  %indvars.iv.next43 = or disjoint i64 %indvars.iv42, 1
  %18 = getelementptr inbounds ptr, ptr %0, i64 %indvars.iv.next43
  %19 = load ptr, ptr %18, align 8, !tbaa !7
  %20 = getelementptr inbounds i64, ptr %19, i64 %indvars.iv48
  %21 = load i64, ptr %20, align 8, !tbaa !11
  %22 = getelementptr inbounds i64, ptr %6, i64 %indvars.iv.next43
  %23 = load i64, ptr %22, align 8, !tbaa !11
  %24 = add nsw i64 %23, %21
  store i64 %24, ptr %22, align 8, !tbaa !11
  %indvars.iv.next43.1 = add nuw nsw i64 %indvars.iv42, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.us.us.unr-lcssa, label %.preheader.us.us.new, !llvm.loop !13

._crit_edge.us.us.unr-lcssa:                      ; preds = %.preheader.us.us.new, %.preheader.us.us
  %indvars.iv42.unr = phi i64 [ 0, %.preheader.us.us ], [ %indvars.iv.next43.1, %.preheader.us.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us.us, label %._crit_edge.us.us.epilog-lcssa

._crit_edge.us.us.epilog-lcssa:                   ; preds = %._crit_edge.us.us.unr-lcssa
  %25 = getelementptr inbounds ptr, ptr %0, i64 %indvars.iv42.unr
  %26 = load ptr, ptr %25, align 8, !tbaa !7
  %27 = getelementptr inbounds i64, ptr %26, i64 %indvars.iv48
  %28 = load i64, ptr %27, align 8, !tbaa !11
  %29 = getelementptr inbounds i64, ptr %6, i64 %indvars.iv42.unr
  %30 = load i64, ptr %29, align 8, !tbaa !11
  %31 = add nsw i64 %30, %28
  store i64 %31, ptr %29, align 8, !tbaa !11
  br label %._crit_edge.us.us

._crit_edge.us.us:                                ; preds = %._crit_edge.us.us.unr-lcssa, %._crit_edge.us.us.epilog-lcssa
  %32 = call noundef i32 @_Z6kadanePxS_S_x(ptr noundef nonnull %6, ptr noundef nonnull %4, ptr noundef nonnull %5, i64 noundef %1)
  %33 = sext i32 %32 to i64
  %spec.select.us.us = call i64 @llvm.smax.i64(i64 %.129.us.us, i64 %33)
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1
  %34 = icmp slt i64 %indvars.iv.next49, %2
  br i1 %34, label %.preheader.us.us, label %._crit_edge31.split.us.us, !llvm.loop !14

._crit_edge:                                      ; preds = %._crit_edge31.split, %._crit_edge31.split.us.us, %3
  %.022.lcssa = phi i64 [ -2147483648, %3 ], [ %spec.select.us.us, %._crit_edge31.split.us.us ], [ %spec.select, %._crit_edge31.split ]
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.022.lcssa)
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  ret void

.preheader.preheader:                             ; preds = %.lr.ph, %._crit_edge31.split
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge31.split ], [ 0, %.lr.ph ]
  %.02232 = phi i64 [ %spec.select, %._crit_edge31.split ], [ -2147483648, %.lr.ph ]
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %6, i8 0, i64 %8, i1 false)
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %indvars.iv38 = phi i64 [ %indvars.iv, %.preheader.preheader ], [ %indvars.iv.next39, %.preheader ]
  %.129 = phi i64 [ %.02232, %.preheader.preheader ], [ %spec.select, %.preheader ]
  %37 = call noundef i32 @_Z6kadanePxS_S_x(ptr noundef nonnull %6, ptr noundef nonnull %4, ptr noundef nonnull %5, i64 noundef %1)
  %38 = sext i32 %37 to i64
  %spec.select = call i64 @llvm.smax.i64(i64 %.129, i64 %38)
  %indvars.iv.next39 = add nuw nsw i64 %indvars.iv38, 1
  %39 = icmp slt i64 %indvars.iv.next39, %2
  br i1 %39, label %.preheader, label %._crit_edge31.split, !llvm.loop !14

._crit_edge31.split:                              ; preds = %.preheader
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %2
  br i1 %exitcond.not, label %._crit_edge, label %.preheader.preheader, !llvm.loop !5
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #5

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !9, i64 0}
!13 = distinct !{!13, !6}
!14 = distinct !{!14, !6}


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