; LLVM IR from tangjz/acm-icpc :: codeforces/complete (721E)

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

@len = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@dt = external dso_local global i32, align 4
@pL = external dso_local global [100001 x i32], align 16
@pR = external dso_local global [100001 x i32], align 16
@f = external dso_local global [100001 x i32], align 16
@p = external dso_local global [100001 x i32], align 16
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %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
  store i32 0, ptr %1, align 4
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @len, ptr noundef @n, ptr noundef @m, ptr noundef @dt)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %11

11:                                               ; preds = %24, %0
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = load i32, ptr @n, align 4, !tbaa !5
  %14 = icmp sle i32 %12, %13
  br i1 %14, label %16, label %15

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

16:                                               ; preds = %11
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds i32, ptr @pL, i64 %18
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds i32, ptr @pR, i64 %21
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %19, ptr noundef %22)
  br label %24

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

27:                                               ; preds = %15
  %28 = load i32, ptr getelementptr inbounds ([100001 x i32], ptr @pL, i64 0, i64 1), align 4, !tbaa !5
  %29 = load i32, ptr @dt, align 4, !tbaa !5
  %30 = sub nsw i32 %28, %29
  store i32 %30, ptr @p, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 1, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %144, %27
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = load i32, ptr @n, align 4, !tbaa !5
  %34 = icmp sle i32 %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %147

36:                                               ; preds = %31
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = sub nsw i32 %37, 1
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = load i32, ptr %3, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %43
  store i32 %41, ptr %44, align 4, !tbaa !5
  %45 = load i32, ptr %3, align 4, !tbaa !5
  %46 = sub nsw i32 %45, 1
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [100001 x i32], ptr @p, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = load i32, ptr %3, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [100001 x i32], ptr @p, i64 0, i64 %51
  store i32 %49, ptr %52, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %138, %36
  %54 = load i32, ptr %4, align 4, !tbaa !5
  %55 = load i32, ptr %3, align 4, !tbaa !5
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %57, label %69

57:                                               ; preds = %53
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [100001 x i32], ptr @p, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = load i32, ptr @dt, align 4, !tbaa !5
  %63 = add nsw i32 %61, %62
  %64 = load i32, ptr %3, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [100001 x i32], ptr @pR, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = icmp sle i32 %63, %67
  br label %69

69:                                               ; preds = %57, %53
  %70 = phi i1 [ false, %53 ], [ %68, %57 ]
  br i1 %70, label %71, label %141

71:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %72 = load i32, ptr %4, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [100001 x i32], ptr @p, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = load i32, ptr @dt, align 4, !tbaa !5
  %77 = add nsw i32 %75, %76
  store i32 %77, ptr %6, align 4, !tbaa !5
  %78 = load i32, ptr %3, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [100001 x i32], ptr @pL, i64 0, i64 %79
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %80)
  %82 = load i32, ptr %81, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  store i32 %82, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %83 = load i32, ptr %3, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [100001 x i32], ptr @pR, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = load i32, ptr %5, align 4, !tbaa !5
  %88 = sub nsw i32 %86, %87
  %89 = load i32, ptr @m, align 4, !tbaa !5
  %90 = sdiv i32 %88, %89
  store i32 %90, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %91 = load i32, ptr %4, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = load i32, ptr %7, align 4, !tbaa !5
  %96 = add nsw i32 %94, %95
  store i32 %96, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %97 = load i32, ptr %5, align 4, !tbaa !5
  %98 = load i32, ptr %7, align 4, !tbaa !5
  %99 = load i32, ptr @m, align 4, !tbaa !5
  %100 = mul nsw i32 %98, %99
  %101 = add nsw i32 %97, %100
  store i32 %101, ptr %9, align 4, !tbaa !5
  %102 = load i32, ptr %3, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = load i32, ptr %8, align 4, !tbaa !5
  %107 = icmp slt i32 %105, %106
  br i1 %107, label %108, label %117

108:                                              ; preds = %71
  %109 = load i32, ptr %8, align 4, !tbaa !5
  %110 = load i32, ptr %3, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %111
  store i32 %109, ptr %112, align 4, !tbaa !5
  %113 = load i32, ptr %9, align 4, !tbaa !5
  %114 = load i32, ptr %3, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [100001 x i32], ptr @p, i64 0, i64 %115
  store i32 %113, ptr %116, align 4, !tbaa !5
  br label %137

117:                                              ; preds = %71
  %118 = load i32, ptr %3, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = load i32, ptr %8, align 4, !tbaa !5
  %123 = icmp eq i32 %121, %122
  br i1 %123, label %124, label %136

124:                                              ; preds = %117
  %125 = load i32, ptr %9, align 4, !tbaa !5
  %126 = load i32, ptr %3, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [100001 x i32], ptr @p, i64 0, i64 %127
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = icmp slt i32 %125, %129
  br i1 %130, label %131, label %136

131:                                              ; preds = %124
  %132 = load i32, ptr %9, align 4, !tbaa !5
  %133 = load i32, ptr %3, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [100001 x i32], ptr @p, i64 0, i64 %134
  store i32 %132, ptr %135, align 4, !tbaa !5
  br label %136

136:                                              ; preds = %131, %124, %117
  br label %137

137:                                              ; preds = %136, %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %4, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %4, align 4, !tbaa !5
  br label %53, !llvm.loop !11

141:                                              ; preds = %69
  %142 = load i32, ptr %4, align 4, !tbaa !5
  %143 = add nsw i32 %142, -1
  store i32 %143, ptr %4, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %141
  %145 = load i32, ptr %3, align 4, !tbaa !5
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %3, align 4, !tbaa !5
  br label %31, !llvm.loop !12

147:                                              ; preds = %35
  %148 = load i32, ptr @n, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %149
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %151)
  ret i32 0
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #1

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

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

; 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)) #3

declare i32 @printf(ptr noundef, ...) #1

attributes #0 = { mustprogress norecurse 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 = { "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 memory(argmem: readwrite) }
attributes #3 = { 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 #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.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}


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

@len = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@dt = external dso_local global i32, align 4
@pL = external dso_local global [100001 x i32], align 16
@pR = external dso_local global [100001 x i32], align 16
@f = external dso_local local_unnamed_addr global [100001 x i32], align 16
@p = external dso_local local_unnamed_addr global [100001 x i32], align 16
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @len, ptr noundef nonnull @n, ptr noundef nonnull @m, ptr noundef nonnull @dt)
  %3 = load i32, ptr @n, align 4, !tbaa !5
  %.not45 = icmp slt i32 %3, 1
  br i1 %.not45, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %0
  %4 = load i32, ptr getelementptr inbounds (i8, ptr @pL, i64 4), align 4, !tbaa !5
  %5 = load i32, ptr @dt, align 4, !tbaa !5
  %6 = sub nsw i32 %4, %5
  store i32 %6, ptr @p, align 16, !tbaa !5
  br label %._crit_edge.._crit_edge57_crit_edge

._crit_edge:                                      ; preds = %.lr.ph
  %7 = load i32, ptr getelementptr inbounds (i8, ptr @pL, i64 4), align 4, !tbaa !5
  %8 = load i32, ptr @dt, align 4, !tbaa !5
  %9 = sub nsw i32 %7, %8
  store i32 %9, ptr @p, align 16, !tbaa !5
  %.not4352 = icmp slt i32 %14, 1
  br i1 %.not4352, label %._crit_edge.._crit_edge57_crit_edge, label %.lr.ph56.preheader

._crit_edge.._crit_edge57_crit_edge:              ; preds = %._crit_edge.thread, %._crit_edge
  %10 = phi i32 [ %3, %._crit_edge.thread ], [ %14, %._crit_edge ]
  %.pre69 = sext i32 %10 to i64
  br label %._crit_edge57

.lr.ph56.preheader:                               ; preds = %._crit_edge
  %.pre = load i32, ptr @f, align 16, !tbaa !5
  br label %.lr.ph56

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %11 = getelementptr inbounds i32, ptr @pL, i64 %indvars.iv
  %12 = getelementptr inbounds i32, ptr @pR, i64 %indvars.iv
  %13 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %11, ptr noundef nonnull %12)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %14 = load i32, ptr @n, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %.not.not = icmp slt i64 %indvars.iv, %15
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge57:                                    ; preds = %.critedge, %._crit_edge.._crit_edge57_crit_edge
  %.pre-phi = phi i64 [ %.pre69, %._crit_edge.._crit_edge57_crit_edge ], [ %65, %.critedge ]
  %16 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %.pre-phi
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %17)
  ret i32 0

.lr.ph56:                                         ; preds = %.lr.ph56.preheader, %.critedge
  %19 = phi i32 [ %14, %.lr.ph56.preheader ], [ %62, %.critedge ]
  %20 = phi i32 [ %.pre, %.lr.ph56.preheader ], [ %63, %.critedge ]
  %indvars.iv64 = phi i64 [ 1, %.lr.ph56.preheader ], [ %indvars.iv.next65, %.critedge ]
  %.03753 = phi i32 [ 0, %.lr.ph56.preheader ], [ %64, %.critedge ]
  %21 = add nsw i64 %indvars.iv64, -1
  %22 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %indvars.iv64
  store i32 %20, ptr %22, align 4, !tbaa !5
  %23 = getelementptr inbounds [100001 x i32], ptr @p, i64 0, i64 %21
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = getelementptr inbounds [100001 x i32], ptr @p, i64 0, i64 %indvars.iv64
  store i32 %24, ptr %25, align 4, !tbaa !5
  %26 = sext i32 %.03753 to i64
  %27 = icmp sgt i64 %indvars.iv64, %26
  br i1 %27, label %.lr.ph49, label %.critedge

.lr.ph49:                                         ; preds = %.lr.ph56
  %28 = getelementptr inbounds [100001 x i32], ptr @pR, i64 0, i64 %indvars.iv64
  %29 = getelementptr inbounds [100001 x i32], ptr @pL, i64 0, i64 %indvars.iv64
  %.pre67 = load i32, ptr %28, align 4, !tbaa !5
  %30 = getelementptr inbounds [100001 x i32], ptr @p, i64 0, i64 %26
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = load i32, ptr @dt, align 4, !tbaa !5
  %33 = add nsw i32 %32, %31
  %.not4473 = icmp sgt i32 %33, %.pre67
  br i1 %.not4473, label %.critedge.loopexit, label %.lr.ph75

34:                                               ; preds = %59
  %35 = getelementptr inbounds [100001 x i32], ptr @p, i64 0, i64 %indvars.iv.next62
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = load i32, ptr @dt, align 4, !tbaa !5
  %38 = add nsw i32 %37, %36
  %.not44 = icmp sgt i32 %38, %42
  br i1 %.not44, label %.critedge.loopexit, label %.lr.ph75, !llvm.loop !11

.lr.ph75:                                         ; preds = %.lr.ph49, %34
  %39 = phi i32 [ %38, %34 ], [ %33, %.lr.ph49 ]
  %indvars.iv6174 = phi i64 [ %indvars.iv.next62, %34 ], [ %26, %.lr.ph49 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  store i32 %39, ptr %1, align 4, !tbaa !5
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %29)
  %41 = load i32, ptr %40, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  %42 = load i32, ptr %28, align 4, !tbaa !5
  %43 = sub nsw i32 %42, %41
  %44 = load i32, ptr @m, align 4, !tbaa !5
  %45 = sdiv i32 %43, %44
  %46 = getelementptr inbounds [100001 x i32], ptr @f, i64 0, i64 %indvars.iv6174
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = add nsw i32 %47, %45
  %49 = mul nsw i32 %45, %44
  %50 = add nsw i32 %49, %41
  %51 = load i32, ptr %22, align 4, !tbaa !5
  %52 = icmp slt i32 %51, %48
  br i1 %52, label %53, label %54

53:                                               ; preds = %.lr.ph75
  store i32 %48, ptr %22, align 4, !tbaa !5
  br label %.sink.split

54:                                               ; preds = %.lr.ph75
  %55 = icmp eq i32 %51, %48
  br i1 %55, label %56, label %59

56:                                               ; preds = %54
  %57 = load i32, ptr %25, align 4, !tbaa !5
  %58 = icmp slt i32 %50, %57
  br i1 %58, label %.sink.split, label %59

.sink.split:                                      ; preds = %56, %53
  store i32 %50, ptr %25, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %.sink.split, %54, %56
  %60 = phi i32 [ %51, %54 ], [ %48, %56 ], [ %48, %.sink.split ]
  %indvars.iv.next62 = add nsw i64 %indvars.iv6174, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next62, %indvars.iv64
  br i1 %exitcond.not, label %.critedge.loopexit, label %34, !llvm.loop !11

.critedge.loopexit:                               ; preds = %34, %59, %.lr.ph49
  %61 = phi i32 [ %20, %.lr.ph49 ], [ %60, %59 ], [ %60, %34 ]
  %.1.lcssa.ph.in = phi i64 [ %26, %.lr.ph49 ], [ %indvars.iv.next62, %34 ], [ %indvars.iv64, %59 ]
  %.1.lcssa.ph = trunc i64 %.1.lcssa.ph.in to i32
  %.pre68 = load i32, ptr @n, align 4, !tbaa !5
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %.lr.ph56
  %62 = phi i32 [ %19, %.lr.ph56 ], [ %.pre68, %.critedge.loopexit ]
  %63 = phi i32 [ %20, %.lr.ph56 ], [ %61, %.critedge.loopexit ]
  %.1.lcssa = phi i32 [ %.03753, %.lr.ph56 ], [ %.1.lcssa.ph, %.critedge.loopexit ]
  %64 = add nsw i32 %.1.lcssa, -1
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %65 = sext i32 %62 to i64
  %.not43.not = icmp slt i64 %indvars.iv64, %65
  br i1 %.not43.not, label %.lr.ph56, label %._crit_edge57, !llvm.loop !12
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

attributes #0 = { mustprogress norecurse 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 = { nofree nounwind "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 memory(argmem: readwrite) }
attributes #3 = { 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 #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.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}


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