; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/Other/DIBZ2016/DZ16SHOP/A.ll (Z13dualIterationv)

; 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 { i32, i32 }

@n = external dso_local global i32, align 4
@lx = external dso_local global [310 x i64], align 16
@ly = external dso_local global [310 x i64], align 16
@pre1 = external dso_local global [310 x i32], align 16
@pre2 = external dso_local global [310 x i32], align 16
@p = external dso_local global [310 x i64], align 16
@pi = external dso_local global [310 x i32], align 16
@q = external dso_local global [620 x %"struct.std::pair"], align 16
@back = external dso_local global i32, align 4

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13dualIterationv() #2 {
  %1 = alloca i64, align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::pair", align 4
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  store i64 1099511627776, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !9
  br label %7

7:                                                ; preds = %25, %0
  %8 = load i32, ptr %2, align 4, !tbaa !9
  %9 = load i32, ptr @n, align 4, !tbaa !9
  %10 = icmp sle i32 %8, %9
  br i1 %10, label %12, label %11

11:                                               ; preds = %7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %28

12:                                               ; preds = %7
  %13 = load i32, ptr %2, align 4, !tbaa !9
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [310 x i32], ptr @pre2, i64 0, i64 %14
  %16 = load i32, ptr %15, align 4, !tbaa !9
  %17 = icmp eq i32 %16, -1
  br i1 %17, label %18, label %24

18:                                               ; preds = %12
  %19 = load i32, ptr %2, align 4, !tbaa !9
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [310 x i64], ptr @p, i64 0, i64 %20
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %21)
  %23 = load i64, ptr %22, align 8, !tbaa !5
  store i64 %23, ptr %1, align 8, !tbaa !5
  br label %24

24:                                               ; preds = %18, %12
  br label %25

25:                                               ; preds = %24
  %26 = load i32, ptr %2, align 4, !tbaa !9
  %27 = add nsw i32 %26, 1
  store i32 %27, ptr %2, align 4, !tbaa !9
  br label %7, !llvm.loop !11

28:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 1, ptr %3, align 4, !tbaa !9
  br label %29

29:                                               ; preds = %48, %28
  %30 = load i32, ptr %3, align 4, !tbaa !9
  %31 = load i32, ptr @n, align 4, !tbaa !9
  %32 = icmp sle i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %51

34:                                               ; preds = %29
  %35 = load i32, ptr %3, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [310 x i32], ptr @pre1, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !9
  %39 = icmp ne i32 %38, -1
  br i1 %39, label %40, label %47

40:                                               ; preds = %34
  %41 = load i64, ptr %1, align 8, !tbaa !5
  %42 = load i32, ptr %3, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [310 x i64], ptr @lx, i64 0, i64 %43
  %45 = load i64, ptr %44, align 8, !tbaa !5
  %46 = add nsw i64 %45, %41
  store i64 %46, ptr %44, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %40, %34
  br label %48

48:                                               ; preds = %47
  %49 = load i32, ptr %3, align 4, !tbaa !9
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %3, align 4, !tbaa !9
  br label %29, !llvm.loop !13

51:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 1, ptr %4, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %98, %51
  %53 = load i32, ptr %4, align 4, !tbaa !9
  %54 = load i32, ptr @n, align 4, !tbaa !9
  %55 = icmp sle i32 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %101

57:                                               ; preds = %52
  %58 = load i32, ptr %4, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [310 x i32], ptr @pre2, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !9
  %62 = icmp ne i32 %61, -1
  br i1 %62, label %63, label %70

63:                                               ; preds = %57
  %64 = load i64, ptr %1, align 8, !tbaa !5
  %65 = load i32, ptr %4, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [310 x i64], ptr @ly, i64 0, i64 %66
  %68 = load i64, ptr %67, align 8, !tbaa !5
  %69 = sub nsw i64 %68, %64
  store i64 %69, ptr %67, align 8, !tbaa !5
  br label %97

70:                                               ; preds = %57
  %71 = load i64, ptr %1, align 8, !tbaa !5
  %72 = load i32, ptr %4, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [310 x i64], ptr @p, i64 0, i64 %73
  %75 = load i64, ptr %74, align 8, !tbaa !5
  %76 = sub nsw i64 %75, %71
  store i64 %76, ptr %74, align 8, !tbaa !5
  %77 = load i32, ptr %4, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [310 x i64], ptr @p, i64 0, i64 %78
  %80 = load i64, ptr %79, align 8, !tbaa !5
  %81 = icmp eq i64 %80, 0
  br i1 %81, label %82, label %96

82:                                               ; preds = %70
  %83 = load i32, ptr %4, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [310 x i32], ptr @pi, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !9
  %87 = load i32, ptr %4, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [310 x i32], ptr @pre2, i64 0, i64 %88
  store i32 %86, ptr %89, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 1, ptr %6, align 4, !tbaa !9
  %90 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %6)
  store i64 %90, ptr %5, align 4
  %91 = load i32, ptr @back, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr @back, align 4, !tbaa !9
  %93 = sext i32 %91 to i64
  %94 = getelementptr inbounds [620 x %"struct.std::pair"], ptr @q, i64 0, i64 %93
  %95 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %94, ptr noundef nonnull align 4 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %96

96:                                               ; preds = %82, %70
  br label %97

97:                                               ; preds = %96, %63
  br label %98

98:                                               ; preds = %97
  %99 = load i32, ptr %4, align 4, !tbaa !9
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %4, align 4, !tbaa !9
  br label %52, !llvm.loop !14

101:                                              ; preds = %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  ret void
}

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

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

@n = external dso_local local_unnamed_addr global i32, align 4
@lx = external dso_local local_unnamed_addr global [310 x i64], align 16
@ly = external dso_local local_unnamed_addr global [310 x i64], align 16
@pre1 = external dso_local local_unnamed_addr global [310 x i32], align 16
@pre2 = external dso_local local_unnamed_addr global [310 x i32], align 16
@p = external dso_local global [310 x i64], align 16
@pi = external dso_local local_unnamed_addr global [310 x i32], align 16
@q = external dso_local global [620 x %"struct.std::pair"], align 16
@back = external dso_local local_unnamed_addr global i32, align 4

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13dualIterationv() local_unnamed_addr #2 {
  %1 = alloca i64, align 8
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  store i64 1099511627776, ptr %1, align 8, !tbaa !5
  %5 = load i32, ptr @n, align 4, !tbaa !9
  %.not14 = icmp slt i32 %5, 1
  br i1 %.not14, label %._crit_edge.thread, label %.lr.ph

.preheader:                                       ; preds = %17
  %.not1016 = icmp slt i32 %19, 1
  br i1 %.not1016, label %._crit_edge.thread, label %.lr.ph18

.lr.ph18:                                         ; preds = %.preheader
  %6 = zext nneg i32 %19 to i64
  %xtraiter = and i64 %6, 1
  %7 = icmp eq i32 %19, 1
  br i1 %7, label %._crit_edge.unr-lcssa, label %.lr.ph18.new

.lr.ph18.new:                                     ; preds = %.lr.ph18
  %unroll_iter = and i64 %6, 2147483646
  br label %27

.lr.ph:                                           ; preds = %0, %17
  %8 = phi i64 [ %18, %17 ], [ 1099511627776, %0 ]
  %9 = phi i32 [ %19, %17 ], [ %5, %0 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %17 ], [ 1, %0 ]
  %10 = getelementptr inbounds [310 x i32], ptr @pre2, i64 0, i64 %indvars.iv
  %11 = load i32, ptr %10, align 4, !tbaa !9
  %12 = icmp eq i32 %11, -1
  br i1 %12, label %13, label %17

13:                                               ; preds = %.lr.ph
  %14 = getelementptr inbounds [310 x i64], ptr @p, i64 0, i64 %indvars.iv
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %16 = load i64, ptr %15, align 8, !tbaa !5
  store i64 %16, ptr %1, align 8, !tbaa !5
  %.pre = load i32, ptr @n, align 4, !tbaa !9
  br label %17

17:                                               ; preds = %.lr.ph, %13
  %18 = phi i64 [ %8, %.lr.ph ], [ %16, %13 ]
  %19 = phi i32 [ %9, %.lr.ph ], [ %.pre, %13 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %20 = sext i32 %19 to i64
  %.not.not = icmp slt i64 %indvars.iv, %20
  br i1 %.not.not, label %.lr.ph, label %.preheader, !llvm.loop !11

._crit_edge.thread:                               ; preds = %.preheader, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  br label %._crit_edge23

._crit_edge.unr-lcssa:                            ; preds = %41, %.lr.ph18
  %indvars.iv26.unr = phi i64 [ 1, %.lr.ph18 ], [ %indvars.iv.next27.1, %41 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.unr-lcssa
  %21 = getelementptr inbounds [310 x i32], ptr @pre1, i64 0, i64 %indvars.iv26.unr
  %22 = load i32, ptr %21, align 4, !tbaa !9
  %.not13.epil = icmp eq i32 %22, -1
  br i1 %.not13.epil, label %._crit_edge, label %23

23:                                               ; preds = %.epil.preheader
  %24 = getelementptr inbounds [310 x i64], ptr @lx, i64 0, i64 %indvars.iv26.unr
  %25 = load i64, ptr %24, align 8, !tbaa !5
  %26 = add nsw i64 %25, %18
  store i64 %26, ptr %24, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %.epil.preheader, %23, %._crit_edge.unr-lcssa
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  store i32 1, ptr %2, align 4, !tbaa !9
  br i1 %.not1016, label %._crit_edge23, label %.lr.ph22

27:                                               ; preds = %41, %.lr.ph18.new
  %indvars.iv26 = phi i64 [ 1, %.lr.ph18.new ], [ %indvars.iv.next27.1, %41 ]
  %niter = phi i64 [ 0, %.lr.ph18.new ], [ %niter.next.1, %41 ]
  %28 = getelementptr inbounds [310 x i32], ptr @pre1, i64 0, i64 %indvars.iv26
  %29 = load i32, ptr %28, align 4, !tbaa !9
  %.not13 = icmp eq i32 %29, -1
  br i1 %.not13, label %34, label %30

30:                                               ; preds = %27
  %31 = getelementptr inbounds [310 x i64], ptr @lx, i64 0, i64 %indvars.iv26
  %32 = load i64, ptr %31, align 8, !tbaa !5
  %33 = add nsw i64 %32, %18
  store i64 %33, ptr %31, align 8, !tbaa !5
  br label %34

34:                                               ; preds = %27, %30
  %indvars.iv.next27 = add nuw nsw i64 %indvars.iv26, 1
  %35 = getelementptr inbounds [310 x i32], ptr @pre1, i64 0, i64 %indvars.iv.next27
  %36 = load i32, ptr %35, align 4, !tbaa !9
  %.not13.1 = icmp eq i32 %36, -1
  br i1 %.not13.1, label %41, label %37

37:                                               ; preds = %34
  %38 = getelementptr inbounds [310 x i64], ptr @lx, i64 0, i64 %indvars.iv.next27
  %39 = load i64, ptr %38, align 8, !tbaa !5
  %40 = add nsw i64 %39, %18
  store i64 %40, ptr %38, align 8, !tbaa !5
  br label %41

41:                                               ; preds = %37, %34
  %indvars.iv.next27.1 = add nuw nsw i64 %indvars.iv26, 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.unr-lcssa, label %27, !llvm.loop !13

._crit_edge23:                                    ; preds = %65, %._crit_edge.thread, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  ret void

.lr.ph22:                                         ; preds = %._crit_edge, %65
  %42 = phi i32 [ %66, %65 ], [ %19, %._crit_edge ]
  %storemerge20 = phi i32 [ %68, %65 ], [ 1, %._crit_edge ]
  %43 = sext i32 %storemerge20 to i64
  %44 = getelementptr inbounds [310 x i32], ptr @pre2, i64 0, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !9
  %.not12 = icmp eq i32 %45, -1
  %46 = load i64, ptr %1, align 8, !tbaa !5
  br i1 %.not12, label %51, label %47

47:                                               ; preds = %.lr.ph22
  %48 = getelementptr inbounds [310 x i64], ptr @ly, i64 0, i64 %43
  %49 = load i64, ptr %48, align 8, !tbaa !5
  %50 = sub nsw i64 %49, %46
  store i64 %50, ptr %48, align 8, !tbaa !5
  br label %65

51:                                               ; preds = %.lr.ph22
  %52 = getelementptr inbounds [310 x i64], ptr @p, i64 0, i64 %43
  %53 = load i64, ptr %52, align 8, !tbaa !5
  %54 = sub nsw i64 %53, %46
  store i64 %54, ptr %52, align 8, !tbaa !5
  %55 = icmp eq i64 %53, %46
  br i1 %55, label %56, label %65

56:                                               ; preds = %51
  %57 = getelementptr inbounds [310 x i32], ptr @pi, i64 0, i64 %43
  %58 = load i32, ptr %57, align 4, !tbaa !9
  store i32 %58, ptr %44, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  store i32 1, ptr %4, align 4, !tbaa !9
  %59 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  store i64 %59, ptr %3, align 8
  %60 = load i32, ptr @back, align 4, !tbaa !9
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr @back, align 4, !tbaa !9
  %62 = sext i32 %60 to i64
  %63 = getelementptr inbounds [620 x %"struct.std::pair"], ptr @q, i64 0, i64 %62
  %64 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %63, ptr noundef nonnull align 4 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %.pre29 = load i32, ptr %2, align 4, !tbaa !9
  %.pre30 = load i32, ptr @n, align 4, !tbaa !9
  br label %65

65:                                               ; preds = %47, %56, %51
  %66 = phi i32 [ %42, %47 ], [ %.pre30, %56 ], [ %42, %51 ]
  %67 = phi i32 [ %storemerge20, %47 ], [ %.pre29, %56 ], [ %storemerge20, %51 ]
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %2, align 4, !tbaa !9
  %.not11.not = icmp slt i32 %67, %66
  br i1 %.not11.not, label %.lr.ph22, label %._crit_edge23, !llvm.loop !14
}

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


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass