; LLVM IR from eyangch/competitive-programming :: USACOcontests/gold/2018.03/talent.ll (Z5worksiiPSt4pairIxxEi)

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

%"struct.std::pair" = type { i64, i64 }

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z5worksiiPSt4pairIxxEi(i32 noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) #1 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca %"struct.std::pair", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  store i32 %0, ptr %5, align 4, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !5
  %21 = load i32, ptr %6, align 4, !tbaa !5
  %22 = add nsw i32 %21, 1
  %23 = zext i32 %22 to i64
  %24 = call ptr @llvm.stacksave.p0()
  store ptr %24, ptr %9, align 8
  %25 = alloca i64, i64 %23, align 16
  store i64 %23, ptr %10, align 8
  %26 = load i32, ptr %6, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds i64, ptr %25, i64 %27
  %29 = getelementptr inbounds i64, ptr %28, i64 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 -9223372036854775808, ptr %11, align 8, !tbaa !11
  call void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef %25, ptr noundef %29, ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  %30 = getelementptr inbounds i64, ptr %25, i64 0
  store i64 0, ptr %30, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %138, %4
  %32 = load i32, ptr %12, align 4, !tbaa !5
  %33 = load i32, ptr %5, align 4, !tbaa !5
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  store i32 2, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %141

36:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %37 = load ptr, ptr %7, align 8, !tbaa !9
  %38 = load i32, ptr %12, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds %"struct.std::pair", ptr %37, i64 %39
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %40, i64 16, i1 false)
  %41 = load i32, ptr %8, align 4, !tbaa !5
  %42 = getelementptr inbounds { i64, i64 }, ptr %15, i32 0, i32 0
  %43 = load i64, ptr %42, align 8
  %44 = getelementptr inbounds { i64, i64 }, ptr %15, i32 0, i32 1
  %45 = load i64, ptr %44, align 8
  %46 = call noundef i64 @_Z10calc_scoreSt4pairIxxEi(i64 %43, i64 %45, i32 noundef %41)
  store i64 %46, ptr %14, align 8, !tbaa !11
  %47 = load i32, ptr %6, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  %49 = zext i32 %48 to i64
  %50 = call ptr @llvm.stacksave.p0()
  store ptr %50, ptr %16, align 8
  %51 = alloca i64, i64 %49, align 16
  store i64 %49, ptr %17, align 8
  %52 = load i32, ptr %6, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i64, ptr %25, i64 %53
  %55 = getelementptr inbounds i64, ptr %54, i64 1
  %56 = call noundef ptr @_ZSt4copyIPxS0_ET0_T_S2_S1_(ptr noundef %25, ptr noundef %55, ptr noundef %51)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %128, %36
  %58 = load i32, ptr %18, align 4, !tbaa !5
  %59 = load i32, ptr %6, align 4, !tbaa !5
  %60 = add nsw i32 %59, 1
  %61 = icmp slt i32 %58, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %57
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %131

63:                                               ; preds = %57
  %64 = load i32, ptr %18, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds i64, ptr %25, i64 %65
  %67 = load i64, ptr %66, align 8, !tbaa !11
  %68 = icmp eq i64 %67, -9223372036854775808
  br i1 %68, label %69, label %70

69:                                               ; preds = %63
  br label %128

70:                                               ; preds = %63
  %71 = load i32, ptr %18, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = load ptr, ptr %7, align 8, !tbaa !9
  %74 = load i32, ptr %12, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds %"struct.std::pair", ptr %73, i64 %75
  %77 = getelementptr inbounds %"struct.std::pair", ptr %76, i32 0, i32 0
  %78 = load i64, ptr %77, align 8, !tbaa !13
  %79 = add nsw i64 %72, %78
  %80 = load i32, ptr %6, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = icmp sge i64 %79, %81
  br i1 %82, label %83, label %98

83:                                               ; preds = %70
  %84 = load i32, ptr %6, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i64, ptr %51, i64 %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %87 = load i32, ptr %18, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i64, ptr %25, i64 %88
  %90 = load i64, ptr %89, align 8, !tbaa !11
  %91 = load i64, ptr %14, align 8, !tbaa !11
  %92 = add nsw i64 %90, %91
  store i64 %92, ptr %19, align 8, !tbaa !11
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef nonnull align 8 dereferenceable(8) %19)
  %94 = load i64, ptr %93, align 8, !tbaa !11
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds i64, ptr %51, i64 %96
  store i64 %94, ptr %97, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %127

98:                                               ; preds = %70
  %99 = load i32, ptr %18, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = load ptr, ptr %7, align 8, !tbaa !9
  %102 = load i32, ptr %12, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds %"struct.std::pair", ptr %101, i64 %103
  %105 = getelementptr inbounds %"struct.std::pair", ptr %104, i32 0, i32 0
  %106 = load i64, ptr %105, align 8, !tbaa !13
  %107 = add nsw i64 %100, %106
  %108 = getelementptr inbounds i64, ptr %51, i64 %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %109 = load i32, ptr %18, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds i64, ptr %25, i64 %110
  %112 = load i64, ptr %111, align 8, !tbaa !11
  %113 = load i64, ptr %14, align 8, !tbaa !11
  %114 = add nsw i64 %112, %113
  store i64 %114, ptr %20, align 8, !tbaa !11
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %108, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %116 = load i64, ptr %115, align 8, !tbaa !11
  %117 = load i32, ptr %18, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = load ptr, ptr %7, align 8, !tbaa !9
  %120 = load i32, ptr %12, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds %"struct.std::pair", ptr %119, i64 %121
  %123 = getelementptr inbounds %"struct.std::pair", ptr %122, i32 0, i32 0
  %124 = load i64, ptr %123, align 8, !tbaa !13
  %125 = add nsw i64 %118, %124
  %126 = getelementptr inbounds i64, ptr %51, i64 %125
  store i64 %116, ptr %126, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %127

127:                                              ; preds = %98, %83
  br label %128

128:                                              ; preds = %127, %69
  %129 = load i32, ptr %18, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %18, align 4, !tbaa !5
  br label %57, !llvm.loop !15

131:                                              ; preds = %62
  %132 = load i32, ptr %6, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds i64, ptr %51, i64 %133
  %135 = getelementptr inbounds i64, ptr %134, i64 1
  %136 = call noundef ptr @_ZSt4copyIPxS0_ET0_T_S2_S1_(ptr noundef %51, ptr noundef %135, ptr noundef %25)
  %137 = load ptr, ptr %16, align 8
  call void @llvm.stackrestore.p0(ptr %137)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %138

138:                                              ; preds = %131
  %139 = load i32, ptr %12, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %12, align 4, !tbaa !5
  br label %31, !llvm.loop !17

141:                                              ; preds = %35
  %142 = load i32, ptr %6, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds i64, ptr %25, i64 %143
  %145 = load i64, ptr %144, align 8, !tbaa !11
  store i32 1, ptr %13, align 4
  %146 = load ptr, ptr %9, align 8
  call void @llvm.stackrestore.p0(ptr %146)
  ret i64 %145
}

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

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

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

; 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: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4copyIPxS0_ET0_T_S2_S1_(ptr noundef, ptr noundef, ptr noundef) #3

; 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: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #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 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 = { nocallback nofree nosync nounwind willreturn }
attributes #3 = { 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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_ZTSSt4pairIxxE", !12, i64 0, !12, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


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

%"struct.std::pair" = type { i64, i64 }

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z5worksiiPSt4pairIxxEi(i32 noundef %0, i32 noundef %1, ptr nocapture noundef readonly %2, i32 noundef %3) local_unnamed_addr #1 {
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = add i32 %1, 1
  %9 = zext i32 %8 to i64
  %10 = alloca i64, i64 %9, align 16
  %11 = sext i32 %1 to i64
  %12 = getelementptr inbounds i64, ptr %10, i64 %11
  %13 = getelementptr inbounds i8, ptr %12, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store i64 -9223372036854775808, ptr %5, align 8, !tbaa !5
  call void @_ZSt4fillIPxxEvT_S1_RKT0_(ptr noundef nonnull %10, ptr noundef nonnull %13, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  store i64 0, ptr %10, align 16, !tbaa !5
  %14 = icmp sgt i32 %0, 0
  br i1 %14, label %.lr.ph41, label %._crit_edge42

.lr.ph41:                                         ; preds = %4
  %.not37 = icmp slt i32 %1, 0
  %wide.trip.count53 = zext nneg i32 %0 to i64
  br i1 %.not37, label %.lr.ph41.split.us, label %.lr.ph

.lr.ph41.split.us:                                ; preds = %.lr.ph41, %.lr.ph41.split.us
  %indvars.iv50 = phi i64 [ %indvars.iv.next51, %.lr.ph41.split.us ], [ 0, %.lr.ph41 ]
  %15 = getelementptr inbounds %"struct.std::pair", ptr %2, i64 %indvars.iv50
  %.sroa.0.0.copyload.us = load i64, ptr %15, align 8
  %.sroa.2.0..sroa_idx.us = getelementptr inbounds i8, ptr %15, i64 8
  %.sroa.2.0.copyload.us = load i64, ptr %.sroa.2.0..sroa_idx.us, align 8
  %16 = call noundef i64 @_Z10calc_scoreSt4pairIxxEi(i64 %.sroa.0.0.copyload.us, i64 %.sroa.2.0.copyload.us, i32 noundef %3)
  %17 = call ptr @llvm.stacksave.p0()
  %18 = alloca i64, i64 %9, align 16
  %19 = call noundef ptr @_ZSt4copyIPxS0_ET0_T_S2_S1_(ptr noundef nonnull %10, ptr noundef nonnull %13, ptr noundef nonnull %18)
  %20 = getelementptr inbounds i64, ptr %18, i64 %11
  %21 = getelementptr inbounds i8, ptr %20, i64 8
  %22 = call noundef ptr @_ZSt4copyIPxS0_ET0_T_S2_S1_(ptr noundef nonnull %18, ptr noundef nonnull %21, ptr noundef nonnull %10)
  call void @llvm.stackrestore.p0(ptr %17)
  %indvars.iv.next51 = add nuw nsw i64 %indvars.iv50, 1
  %exitcond54.not = icmp eq i64 %indvars.iv.next51, %wide.trip.count53
  br i1 %exitcond54.not, label %._crit_edge42, label %.lr.ph41.split.us, !llvm.loop !9

._crit_edge42:                                    ; preds = %._crit_edge, %.lr.ph41.split.us, %4
  %23 = load i64, ptr %12, align 8, !tbaa !5
  ret i64 %23

.lr.ph:                                           ; preds = %.lr.ph41, %._crit_edge
  %indvars.iv45 = phi i64 [ %indvars.iv.next46, %._crit_edge ], [ 0, %.lr.ph41 ]
  %24 = getelementptr inbounds %"struct.std::pair", ptr %2, i64 %indvars.iv45
  %.sroa.0.0.copyload = load i64, ptr %24, align 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %24, i64 8
  %.sroa.2.0.copyload = load i64, ptr %.sroa.2.0..sroa_idx, align 8
  %25 = call noundef i64 @_Z10calc_scoreSt4pairIxxEi(i64 %.sroa.0.0.copyload, i64 %.sroa.2.0.copyload, i32 noundef %3)
  %26 = call ptr @llvm.stacksave.p0()
  %27 = alloca i64, i64 %9, align 16
  %28 = call noundef ptr @_ZSt4copyIPxS0_ET0_T_S2_S1_(ptr noundef nonnull %10, ptr noundef nonnull %13, ptr noundef nonnull %27)
  %29 = getelementptr inbounds i64, ptr %27, i64 %11
  br label %32

._crit_edge:                                      ; preds = %51
  %30 = getelementptr inbounds i8, ptr %29, i64 8
  %31 = call noundef ptr @_ZSt4copyIPxS0_ET0_T_S2_S1_(ptr noundef nonnull %27, ptr noundef nonnull %30, ptr noundef nonnull %10)
  call void @llvm.stackrestore.p0(ptr %26)
  %indvars.iv.next46 = add nuw nsw i64 %indvars.iv45, 1
  %exitcond49.not = icmp eq i64 %indvars.iv.next46, %wide.trip.count53
  br i1 %exitcond49.not, label %._crit_edge42, label %.lr.ph, !llvm.loop !9

32:                                               ; preds = %.lr.ph, %51
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %51 ]
  %33 = getelementptr inbounds i64, ptr %10, i64 %indvars.iv
  %34 = load i64, ptr %33, align 8, !tbaa !5
  %35 = icmp eq i64 %34, -9223372036854775808
  br i1 %35, label %51, label %36

36:                                               ; preds = %32
  %37 = load i64, ptr %24, align 8, !tbaa !11
  %38 = add nsw i64 %37, %indvars.iv
  %.not36 = icmp slt i64 %38, %11
  br i1 %.not36, label %43, label %39

39:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %40 = add nsw i64 %34, %25
  store i64 %40, ptr %6, align 8, !tbaa !5
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %42 = load i64, ptr %41, align 8, !tbaa !5
  store i64 %42, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %51

43:                                               ; preds = %36
  %44 = getelementptr inbounds i64, ptr %27, i64 %38
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %45 = add nsw i64 %34, %25
  store i64 %45, ptr %7, align 8, !tbaa !5
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %47 = load i64, ptr %46, align 8, !tbaa !5
  %48 = load i64, ptr %24, align 8, !tbaa !11
  %49 = getelementptr i64, ptr %27, i64 %48
  %50 = getelementptr i64, ptr %49, i64 %indvars.iv
  store i64 %47, ptr %50, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %51

51:                                               ; preds = %39, %43, %32
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %9
  br i1 %exitcond.not, label %._crit_edge, label %32, !llvm.loop !13
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4copyIPxS0_ET0_T_S2_S1_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; 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 #5

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #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 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 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #3 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSSt4pairIxxE", !6, i64 0, !6, i64 8}
!13 = distinct !{!13, !10}


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