; LLVM IR from Leet-Us-Code/DSA-A-Z-Practice :: Sid's Levels/Level - 2/Arrays/TrappingRainWater.ll (Z13trappingWaterPii)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z13trappingWaterPii(ptr noundef %0, i32 noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca [100000 x i32], align 16
  %6 = alloca [100000 x i32], align 16
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 400000, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 400000, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 -2147483648, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 -2147483648, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %13

13:                                               ; preds = %37, %2
  %14 = load i32, ptr %9, align 4, !tbaa !9
  %15 = load i32, ptr %4, align 4, !tbaa !9
  %16 = icmp slt i32 %14, %15
  br i1 %16, label %18, label %17

17:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %40

18:                                               ; preds = %13
  %19 = load i32, ptr %7, align 4, !tbaa !9
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = load i32, ptr %9, align 4, !tbaa !9
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds i32, ptr %20, i64 %22
  %24 = load i32, ptr %23, align 4, !tbaa !9
  %25 = icmp slt i32 %19, %24
  br i1 %25, label %26, label %32

26:                                               ; preds = %18
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = load i32, ptr %9, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds i32, ptr %27, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !9
  store i32 %31, ptr %7, align 4, !tbaa !9
  br label %32

32:                                               ; preds = %26, %18
  %33 = load i32, ptr %7, align 4, !tbaa !9
  %34 = load i32, ptr %9, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [100000 x i32], ptr %5, i64 0, i64 %35
  store i32 %33, ptr %36, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %32
  %38 = load i32, ptr %9, align 4, !tbaa !9
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %9, align 4, !tbaa !9
  br label %13, !llvm.loop !11

40:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %41 = load i32, ptr %4, align 4, !tbaa !9
  %42 = sub nsw i32 %41, 1
  store i32 %42, ptr %10, align 4, !tbaa !9
  br label %43

43:                                               ; preds = %66, %40
  %44 = load i32, ptr %10, align 4, !tbaa !9
  %45 = icmp sge i32 %44, 0
  br i1 %45, label %47, label %46

46:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %69

47:                                               ; preds = %43
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = load i32, ptr %10, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds i32, ptr %49, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !9
  %54 = icmp slt i32 %48, %53
  br i1 %54, label %55, label %61

55:                                               ; preds = %47
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = load i32, ptr %10, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i32, ptr %56, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !9
  store i32 %60, ptr %8, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %55, %47
  %62 = load i32, ptr %8, align 4, !tbaa !9
  %63 = load i32, ptr %10, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 %64
  store i32 %62, ptr %65, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %61
  %67 = load i32, ptr %10, align 4, !tbaa !9
  %68 = add nsw i32 %67, -1
  store i32 %68, ptr %10, align 4, !tbaa !9
  br label %43, !llvm.loop !13

69:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %92, %69
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = load i32, ptr %4, align 4, !tbaa !9
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %95

75:                                               ; preds = %70
  %76 = load i32, ptr %12, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [100000 x i32], ptr %6, i64 0, i64 %77
  %79 = load i32, ptr %12, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [100000 x i32], ptr %5, i64 0, i64 %80
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %78, ptr noundef nonnull align 4 dereferenceable(4) %81)
  %83 = load i32, ptr %82, align 4, !tbaa !9
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = load i32, ptr %12, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds i32, ptr %84, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !9
  %89 = sub nsw i32 %83, %88
  %90 = load i32, ptr %11, align 4, !tbaa !9
  %91 = add nsw i32 %90, %89
  store i32 %91, ptr %11, align 4, !tbaa !9
  br label %92

92:                                               ; preds = %75
  %93 = load i32, ptr %12, align 4, !tbaa !9
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %12, align 4, !tbaa !9
  br label %70, !llvm.loop !14

95:                                               ; preds = %74
  %96 = load i32, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 400000, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 400000, ptr %5) #3
  ret i32 %96
}

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 = !{!"int", !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"

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z13trappingWaterPii(ptr nocapture noundef readonly %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = alloca [100000 x i32], align 16
  %4 = alloca [100000 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %4) #4
  %5 = icmp sgt i32 %1, 0
  br i1 %5, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %2
  %wide.trip.count = zext nneg i32 %1 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %6 = icmp ult i32 %1, 4
  br i1 %6, label %.preheader38.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph

.preheader38.unr-lcssa:                           ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %.03239.unr = phi i32 [ -2147483648, %.lr.ph.preheader ], [ %spec.select.3, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader38, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader38.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %.preheader38.unr-lcssa ]
  %.03239.epil = phi i32 [ %spec.select.epil, %.lr.ph.epil ], [ %.03239.unr, %.preheader38.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %.preheader38.unr-lcssa ]
  %7 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.epil
  %8 = load i32, ptr %7, align 4, !tbaa !5
  %spec.select.epil = tail call i32 @llvm.smax.i32(i32 %.03239.epil, i32 %8)
  %9 = getelementptr inbounds [100000 x i32], ptr %3, i64 0, i64 %indvars.iv.epil
  store i32 %spec.select.epil, ptr %9, align 4, !tbaa !5
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader38, label %.lr.ph.epil, !llvm.loop !9

.preheader38:                                     ; preds = %.lr.ph.epil, %.preheader38.unr-lcssa
  br i1 %5, label %.lr.ph43.preheader, label %._crit_edge

.lr.ph43.preheader:                               ; preds = %.preheader38
  %10 = zext nneg i32 %1 to i64
  %xtraiter56 = and i64 %wide.trip.count, 3
  %11 = icmp ult i32 %1, 4
  br i1 %11, label %.preheader.unr-lcssa, label %.lr.ph43.preheader.new

.lr.ph43.preheader.new:                           ; preds = %.lr.ph43.preheader
  %unroll_iter59 = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph43

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %.03239 = phi i32 [ -2147483648, %.lr.ph.preheader.new ], [ %spec.select.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %12 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %spec.select = tail call i32 @llvm.smax.i32(i32 %.03239, i32 %13)
  %14 = getelementptr inbounds [100000 x i32], ptr %3, i64 0, i64 %indvars.iv
  store i32 %spec.select, ptr %14, align 16, !tbaa !5
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %15 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.next
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %spec.select.1 = tail call i32 @llvm.smax.i32(i32 %spec.select, i32 %16)
  %17 = getelementptr inbounds [100000 x i32], ptr %3, i64 0, i64 %indvars.iv.next
  store i32 %spec.select.1, ptr %17, align 4, !tbaa !5
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %18 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.next.1
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %spec.select.2 = tail call i32 @llvm.smax.i32(i32 %spec.select.1, i32 %19)
  %20 = getelementptr inbounds [100000 x i32], ptr %3, i64 0, i64 %indvars.iv.next.1
  store i32 %spec.select.2, ptr %20, align 8, !tbaa !5
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %21 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.next.2
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %spec.select.3 = tail call i32 @llvm.smax.i32(i32 %spec.select.2, i32 %22)
  %23 = getelementptr inbounds [100000 x i32], ptr %3, i64 0, i64 %indvars.iv.next.2
  store i32 %spec.select.3, ptr %23, align 4, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader38.unr-lcssa, label %.lr.ph, !llvm.loop !11

.preheader.unr-lcssa:                             ; preds = %.lr.ph43, %.lr.ph43.preheader
  %indvars.iv48.unr = phi i64 [ %10, %.lr.ph43.preheader ], [ %indvars.iv.next49.3, %.lr.ph43 ]
  %.03141.unr = phi i32 [ -2147483648, %.lr.ph43.preheader ], [ %spec.select37.3, %.lr.ph43 ]
  %lcmp.mod58.not = icmp eq i64 %xtraiter56, 0
  br i1 %lcmp.mod58.not, label %.preheader, label %.lr.ph43.epil

.lr.ph43.epil:                                    ; preds = %.preheader.unr-lcssa, %.lr.ph43.epil
  %indvars.iv48.epil = phi i64 [ %indvars.iv.next49.epil, %.lr.ph43.epil ], [ %indvars.iv48.unr, %.preheader.unr-lcssa ]
  %.03141.epil = phi i32 [ %spec.select37.epil, %.lr.ph43.epil ], [ %.03141.unr, %.preheader.unr-lcssa ]
  %epil.iter57 = phi i64 [ %epil.iter57.next, %.lr.ph43.epil ], [ 0, %.preheader.unr-lcssa ]
  %indvars.iv.next49.epil = add nsw i64 %indvars.iv48.epil, -1
  %24 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.next49.epil
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %spec.select37.epil = tail call i32 @llvm.smax.i32(i32 %.03141.epil, i32 %25)
  %26 = getelementptr inbounds [100000 x i32], ptr %4, i64 0, i64 %indvars.iv.next49.epil
  store i32 %spec.select37.epil, ptr %26, align 4, !tbaa !5
  %epil.iter57.next = add i64 %epil.iter57, 1
  %epil.iter57.cmp.not = icmp eq i64 %epil.iter57.next, %xtraiter56
  br i1 %epil.iter57.cmp.not, label %.preheader, label %.lr.ph43.epil, !llvm.loop !13

.preheader:                                       ; preds = %.lr.ph43.epil, %.preheader.unr-lcssa
  br i1 %5, label %.lr.ph46.preheader, label %._crit_edge

.lr.ph46.preheader:                               ; preds = %.preheader
  %wide.trip.count54 = zext nneg i32 %1 to i64
  br label %.lr.ph46

.lr.ph43:                                         ; preds = %.lr.ph43, %.lr.ph43.preheader.new
  %indvars.iv48 = phi i64 [ %10, %.lr.ph43.preheader.new ], [ %indvars.iv.next49.3, %.lr.ph43 ]
  %.03141 = phi i32 [ -2147483648, %.lr.ph43.preheader.new ], [ %spec.select37.3, %.lr.ph43 ]
  %niter60 = phi i64 [ 0, %.lr.ph43.preheader.new ], [ %niter60.next.3, %.lr.ph43 ]
  %indvars.iv.next49 = add nsw i64 %indvars.iv48, -1
  %27 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.next49
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %spec.select37 = tail call i32 @llvm.smax.i32(i32 %.03141, i32 %28)
  %29 = getelementptr inbounds [100000 x i32], ptr %4, i64 0, i64 %indvars.iv.next49
  store i32 %spec.select37, ptr %29, align 4, !tbaa !5
  %indvars.iv.next49.1 = add nsw i64 %indvars.iv48, -2
  %30 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.next49.1
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %spec.select37.1 = tail call i32 @llvm.smax.i32(i32 %spec.select37, i32 %31)
  %32 = getelementptr inbounds [100000 x i32], ptr %4, i64 0, i64 %indvars.iv.next49.1
  store i32 %spec.select37.1, ptr %32, align 4, !tbaa !5
  %indvars.iv.next49.2 = add nsw i64 %indvars.iv48, -3
  %33 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.next49.2
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %spec.select37.2 = tail call i32 @llvm.smax.i32(i32 %spec.select37.1, i32 %34)
  %35 = getelementptr inbounds [100000 x i32], ptr %4, i64 0, i64 %indvars.iv.next49.2
  store i32 %spec.select37.2, ptr %35, align 4, !tbaa !5
  %indvars.iv.next49.3 = add nsw i64 %indvars.iv48, -4
  %36 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.next49.3
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %spec.select37.3 = tail call i32 @llvm.smax.i32(i32 %spec.select37.2, i32 %37)
  %38 = getelementptr inbounds [100000 x i32], ptr %4, i64 0, i64 %indvars.iv.next49.3
  store i32 %spec.select37.3, ptr %38, align 4, !tbaa !5
  %niter60.next.3 = add i64 %niter60, 4
  %niter60.ncmp.3.not = icmp eq i64 %niter60.next.3, %unroll_iter59
  br i1 %niter60.ncmp.3.not, label %.preheader.unr-lcssa, label %.lr.ph43, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph46, %2, %.preheader38, %.preheader
  %.028.lcssa = phi i32 [ 0, %.preheader ], [ 0, %.preheader38 ], [ 0, %2 ], [ %46, %.lr.ph46 ]
  call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %3) #4
  ret i32 %.028.lcssa

.lr.ph46:                                         ; preds = %.lr.ph46.preheader, %.lr.ph46
  %indvars.iv51 = phi i64 [ 0, %.lr.ph46.preheader ], [ %indvars.iv.next52, %.lr.ph46 ]
  %.02844 = phi i32 [ 0, %.lr.ph46.preheader ], [ %46, %.lr.ph46 ]
  %39 = getelementptr inbounds [100000 x i32], ptr %4, i64 0, i64 %indvars.iv51
  %40 = getelementptr inbounds [100000 x i32], ptr %3, i64 0, i64 %indvars.iv51
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %39, ptr noundef nonnull align 4 dereferenceable(4) %40)
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv51
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = add i32 %42, %.02844
  %46 = sub i32 %45, %44
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %exitcond55.not = icmp eq i64 %indvars.iv.next52, %wide.trip.count54
  br i1 %exitcond55.not, label %._crit_edge, label %.lr.ph46, !llvm.loop !15
}

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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.unroll.disable"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass