; LLVM IR from upupming/algorithm :: acwing/每日一题·夏季/Week 2/AcWing 3516. 最大面积.ll (Z4calcPii)

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

@lft = external dso_local global [2010 x i32], align 16
@rht = external dso_local global [2010 x i32], align 16
@stk = external dso_local global [2010 x i32], align 16
@tt = external dso_local global i32, align 4

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z4calcPii(ptr noundef %0, i32 noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds i32, ptr %11, i64 0
  store i32 -1, ptr %12, align 4, !tbaa !9
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = load i32, ptr %4, align 4, !tbaa !9
  %15 = add nsw i32 %14, 1
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds i32, ptr %13, i64 %16
  store i32 -1, ptr %17, align 4, !tbaa !9
  store i32 0, ptr @tt, align 4, !tbaa !9
  %18 = load i32, ptr @tt, align 4, !tbaa !9
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr @tt, align 4, !tbaa !9
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [2010 x i32], ptr @stk, i64 0, i64 %20
  store i32 0, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 1, ptr %5, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %59, %2
  %23 = load i32, ptr %5, align 4, !tbaa !9
  %24 = load i32, ptr %4, align 4, !tbaa !9
  %25 = icmp sle i32 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %62

27:                                               ; preds = %22
  br label %28

28:                                               ; preds = %43, %27
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = load i32, ptr @tt, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [2010 x i32], ptr @stk, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds i32, ptr %29, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !9
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = load i32, ptr %5, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds i32, ptr %37, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = icmp sge i32 %36, %41
  br i1 %42, label %43, label %46

43:                                               ; preds = %28
  %44 = load i32, ptr @tt, align 4, !tbaa !9
  %45 = add nsw i32 %44, -1
  store i32 %45, ptr @tt, align 4, !tbaa !9
  br label %28, !llvm.loop !11

46:                                               ; preds = %28
  %47 = load i32, ptr @tt, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [2010 x i32], ptr @stk, i64 0, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !9
  %51 = load i32, ptr %5, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [2010 x i32], ptr @lft, i64 0, i64 %52
  store i32 %50, ptr %53, align 4, !tbaa !9
  %54 = load i32, ptr %5, align 4, !tbaa !9
  %55 = load i32, ptr @tt, align 4, !tbaa !9
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr @tt, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [2010 x i32], ptr @stk, i64 0, i64 %57
  store i32 %54, ptr %58, align 4, !tbaa !9
  br label %59

59:                                               ; preds = %46
  %60 = load i32, ptr %5, align 4, !tbaa !9
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %5, align 4, !tbaa !9
  br label %22, !llvm.loop !13

62:                                               ; preds = %26
  store i32 0, ptr @tt, align 4, !tbaa !9
  %63 = load i32, ptr %4, align 4, !tbaa !9
  %64 = add nsw i32 %63, 1
  %65 = load i32, ptr @tt, align 4, !tbaa !9
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr @tt, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [2010 x i32], ptr @stk, i64 0, i64 %67
  store i32 %64, ptr %68, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  %69 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %69, ptr %6, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %106, %62
  %71 = load i32, ptr %6, align 4, !tbaa !9
  %72 = icmp sge i32 %71, 1
  br i1 %72, label %74, label %73

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

74:                                               ; preds = %70
  br label %75

75:                                               ; preds = %90, %74
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = load i32, ptr @tt, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [2010 x i32], ptr @stk, i64 0, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds i32, ptr %76, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !9
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = load i32, ptr %6, 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 = icmp sge i32 %83, %88
  br i1 %89, label %90, label %93

90:                                               ; preds = %75
  %91 = load i32, ptr @tt, align 4, !tbaa !9
  %92 = add nsw i32 %91, -1
  store i32 %92, ptr @tt, align 4, !tbaa !9
  br label %75, !llvm.loop !14

93:                                               ; preds = %75
  %94 = load i32, ptr @tt, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [2010 x i32], ptr @stk, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !9
  %98 = load i32, ptr %6, align 4, !tbaa !9
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [2010 x i32], ptr @rht, i64 0, i64 %99
  store i32 %97, ptr %100, align 4, !tbaa !9
  %101 = load i32, ptr %6, align 4, !tbaa !9
  %102 = load i32, ptr @tt, align 4, !tbaa !9
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr @tt, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [2010 x i32], ptr @stk, i64 0, i64 %104
  store i32 %101, ptr %105, align 4, !tbaa !9
  br label %106

106:                                              ; preds = %93
  %107 = load i32, ptr %6, align 4, !tbaa !9
  %108 = add nsw i32 %107, -1
  store i32 %108, ptr %6, align 4, !tbaa !9
  br label %70, !llvm.loop !15

109:                                              ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 1, ptr %8, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %139, %109
  %111 = load i32, ptr %8, align 4, !tbaa !9
  %112 = load i32, ptr %4, align 4, !tbaa !9
  %113 = icmp sle i32 %111, %112
  br i1 %113, label %115, label %114

114:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %142

115:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %116 = load i32, ptr %8, align 4, !tbaa !9
  %117 = load i32, ptr %8, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [2010 x i32], ptr @lft, i64 0, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !9
  %121 = sub nsw i32 %116, %120
  %122 = load i32, ptr %8, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [2010 x i32], ptr @rht, i64 0, i64 %123
  %125 = load i32, ptr %124, align 4, !tbaa !9
  %126 = add nsw i32 %121, %125
  %127 = load i32, ptr %8, align 4, !tbaa !9
  %128 = sub nsw i32 %126, %127
  %129 = sub nsw i32 %128, 1
  store i32 %129, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %130 = load i32, ptr %9, align 4, !tbaa !9
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = load i32, ptr %8, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds i32, ptr %131, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !9
  %136 = mul nsw i32 %130, %135
  store i32 %136, ptr %10, align 4, !tbaa !9
  %137 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %138 = load i32, ptr %137, align 4, !tbaa !9
  store i32 %138, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %139

139:                                              ; preds = %115
  %140 = load i32, ptr %8, align 4, !tbaa !9
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %8, align 4, !tbaa !9
  br label %110, !llvm.loop !16

142:                                              ; preds = %114
  %143 = load i32, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret i32 %143
}

; 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 @_ZSt3maxIiERKT_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}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !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"

@lft = external dso_local local_unnamed_addr global [2010 x i32], align 16
@rht = external dso_local local_unnamed_addr global [2010 x i32], align 16
@stk = external dso_local local_unnamed_addr global [2010 x i32], align 16
@tt = external dso_local local_unnamed_addr global i32, align 4

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z4calcPii(ptr nocapture noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  store i32 -1, ptr %0, align 4, !tbaa !5
  %5 = add i32 %1, 1
  %6 = sext i32 %5 to i64
  %7 = getelementptr inbounds i32, ptr %0, i64 %6
  store i32 -1, ptr %7, align 4, !tbaa !5
  store i32 1, ptr @tt, align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @stk, i64 4), align 4, !tbaa !5
  %.not44 = icmp slt i32 %1, 1
  br i1 %.not44, label %._crit_edge46.thread, label %.preheader35.preheader

._crit_edge46.thread:                             ; preds = %2
  store i32 %5, ptr getelementptr inbounds (i8, ptr @stk, i64 4), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  br label %._crit_edge60

.preheader35.preheader:                           ; preds = %2
  %wide.trip.count = zext i32 %5 to i64
  br label %.preheader35

.preheader35:                                     ; preds = %.preheader35.preheader, %._crit_edge
  %8 = phi i32 [ 0, %.preheader35.preheader ], [ %28, %._crit_edge ]
  %indvars.iv65 = phi i64 [ 1, %.preheader35.preheader ], [ %indvars.iv.next66, %._crit_edge ]
  %9 = phi i32 [ 1, %.preheader35.preheader ], [ %25, %._crit_edge ]
  %10 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv65
  %11 = sext i32 %8 to i64
  %12 = getelementptr inbounds i32, ptr %0, i64 %11
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %14 = load i32, ptr %10, align 4, !tbaa !5
  %.not3441 = icmp slt i32 %13, %14
  br i1 %.not3441, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader35
  %15 = sext i32 %9 to i64
  br label %.lr.ph

._crit_edge46:                                    ; preds = %._crit_edge
  store i32 1, ptr @tt, align 4, !tbaa !5
  store i32 %5, ptr getelementptr inbounds (i8, ptr @stk, i64 4), align 4, !tbaa !5
  %16 = zext nneg i32 %1 to i64
  br label %.preheader

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %15, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %17 = trunc nsw i64 %indvars.iv.next to i32
  store i32 %17, ptr @tt, align 4, !tbaa !5
  %18 = getelementptr inbounds [2010 x i32], ptr @stk, i64 0, i64 %indvars.iv.next
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds i32, ptr %0, i64 %20
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %23 = load i32, ptr %10, align 4, !tbaa !5
  %.not34 = icmp slt i32 %22, %23
  br i1 %.not34, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %.preheader35
  %.lcssa40 = phi i32 [ %9, %.preheader35 ], [ %17, %.lr.ph ]
  %.lcssa39 = phi i32 [ %8, %.preheader35 ], [ %19, %.lr.ph ]
  %24 = getelementptr inbounds [2010 x i32], ptr @lft, i64 0, i64 %indvars.iv65
  store i32 %.lcssa39, ptr %24, align 4, !tbaa !5
  %25 = add nsw i32 %.lcssa40, 1
  store i32 %25, ptr @tt, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [2010 x i32], ptr @stk, i64 0, i64 %26
  %28 = trunc nuw nsw i64 %indvars.iv65 to i32
  store i32 %28, ptr %27, align 4, !tbaa !5
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next66, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge46, label %.preheader35, !llvm.loop !11

.preheader:                                       ; preds = %._crit_edge46, %._crit_edge49
  %29 = phi i32 [ %5, %._crit_edge46 ], [ %48, %._crit_edge49 ]
  %indvars.iv71 = phi i64 [ %16, %._crit_edge46 ], [ %indvars.iv.next72, %._crit_edge49 ]
  %30 = phi i32 [ 1, %._crit_edge46 ], [ %45, %._crit_edge49 ]
  %31 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv71
  %32 = sext i32 %29 to i64
  %33 = getelementptr inbounds i32, ptr %0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = load i32, ptr %31, align 4, !tbaa !5
  %.not3347 = icmp slt i32 %34, %35
  br i1 %.not3347, label %._crit_edge49, label %.lr.ph48.preheader

.lr.ph48.preheader:                               ; preds = %.preheader
  %36 = sext i32 %30 to i64
  br label %.lr.ph48

._crit_edge55:                                    ; preds = %._crit_edge49
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  store i32 0, ptr %3, align 4, !tbaa !5
  br i1 %.not44, label %._crit_edge60, label %.lr.ph59.preheader

.lr.ph59.preheader:                               ; preds = %._crit_edge55
  %wide.trip.count77 = zext i32 %5 to i64
  br label %.lr.ph59

.lr.ph48:                                         ; preds = %.lr.ph48.preheader, %.lr.ph48
  %indvars.iv68 = phi i64 [ %36, %.lr.ph48.preheader ], [ %indvars.iv.next69, %.lr.ph48 ]
  %indvars.iv.next69 = add nsw i64 %indvars.iv68, -1
  %37 = trunc nsw i64 %indvars.iv.next69 to i32
  store i32 %37, ptr @tt, align 4, !tbaa !5
  %38 = getelementptr inbounds [2010 x i32], ptr @stk, i64 0, i64 %indvars.iv.next69
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i32, ptr %0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = load i32, ptr %31, align 4, !tbaa !5
  %.not33 = icmp slt i32 %42, %43
  br i1 %.not33, label %._crit_edge49, label %.lr.ph48, !llvm.loop !12

._crit_edge49:                                    ; preds = %.lr.ph48, %.preheader
  %.lcssa37 = phi i32 [ %30, %.preheader ], [ %37, %.lr.ph48 ]
  %.lcssa36 = phi i32 [ %29, %.preheader ], [ %39, %.lr.ph48 ]
  %44 = getelementptr inbounds [2010 x i32], ptr @rht, i64 0, i64 %indvars.iv71
  store i32 %.lcssa36, ptr %44, align 4, !tbaa !5
  %45 = add nsw i32 %.lcssa37, 1
  store i32 %45, ptr @tt, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [2010 x i32], ptr @stk, i64 0, i64 %46
  %48 = trunc nuw nsw i64 %indvars.iv71 to i32
  store i32 %48, ptr %47, align 4, !tbaa !5
  %indvars.iv.next72 = add nsw i64 %indvars.iv71, -1
  %49 = icmp sgt i64 %indvars.iv71, 1
  br i1 %49, label %.preheader, label %._crit_edge55, !llvm.loop !13

._crit_edge60:                                    ; preds = %.lr.ph59, %._crit_edge46.thread, %._crit_edge55
  %50 = phi i32 [ 0, %._crit_edge55 ], [ 0, %._crit_edge46.thread ], [ %64, %.lr.ph59 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  ret i32 %50

.lr.ph59:                                         ; preds = %.lr.ph59.preheader, %.lr.ph59
  %indvars.iv74 = phi i64 [ 1, %.lr.ph59.preheader ], [ %indvars.iv.next75, %.lr.ph59 ]
  %51 = getelementptr inbounds [2010 x i32], ptr @lft, i64 0, i64 %indvars.iv74
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = getelementptr inbounds [2010 x i32], ptr @rht, i64 0, i64 %indvars.iv74
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = trunc nuw nsw i64 %indvars.iv74 to i32
  %56 = add i32 %54, %55
  %57 = add i32 %52, %55
  %58 = xor i32 %57, -1
  %59 = add i32 %56, %58
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  %60 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv74
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = mul nsw i32 %59, %61
  store i32 %62, ptr %4, align 4, !tbaa !5
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %64 = load i32, ptr %63, align 4, !tbaa !5
  store i32 %64, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %exitcond78.not = icmp eq i64 %indvars.iv.next75, %wide.trip.count77
  br i1 %exitcond78.not, label %._crit_edge60, label %.lr.ph59, !llvm.loop !14
}

; 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 @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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 = { nounwind }

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

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


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