; LLVM IR from tangjz/acm-icpc :: codeforces/complete (856A)

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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@a = external dso_local global [101 x i32], align 16
@p = external dso_local global [2000001 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 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
  store i32 0, ptr %1, align 4
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %10

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

14:                                               ; preds = %10
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %117

15:                                               ; preds = %10
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %27, %15
  %18 = load i32, ptr %4, align 4, !tbaa !5
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = icmp sle i32 %18, %19
  br i1 %20, label %22, label %21

21:                                               ; preds = %17
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %30

22:                                               ; preds = %17
  %23 = load i32, ptr %4, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds i32, ptr @a, i64 %24
  %26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %25)
  br label %27

27:                                               ; preds = %22
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %4, align 4, !tbaa !5
  br label %17, !llvm.loop !9

30:                                               ; preds = %21
  %31 = load i32, ptr @n, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds i32, ptr @a, i64 %32
  %34 = getelementptr inbounds i32, ptr %33, i64 1
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef getelementptr inbounds (i32, ptr @a, i64 1), ptr noundef %34)
  %35 = call i32 @puts(ptr noundef @.str.1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 1, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %110, %30
  %37 = load i32, ptr %5, align 4, !tbaa !5
  %38 = load i32, ptr @n, align 4, !tbaa !5
  %39 = icmp sle i32 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %113

41:                                               ; preds = %36
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %6, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %52, %41
  %45 = load i32, ptr %6, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [2000001 x i32], ptr @p, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = load i32, ptr %2, align 4, !tbaa !5
  %50 = icmp eq i32 %48, %49
  br i1 %50, label %51, label %55

51:                                               ; preds = %44
  br label %52

52:                                               ; preds = %51
  %53 = load i32, ptr %6, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %6, align 4, !tbaa !5
  br label %44, !llvm.loop !11

55:                                               ; preds = %44
  %56 = load i32, ptr %6, align 4, !tbaa !5
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = load i32, ptr @n, align 4, !tbaa !5
  %59 = icmp eq i32 %57, %58
  %60 = zext i1 %59 to i64
  %61 = getelementptr inbounds [3 x i8], ptr @.str.3, i64 0, i64 %60
  %62 = load i8, ptr %61, align 1, !tbaa !12
  %63 = sext i8 %62 to i32
  %64 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %56, i32 noundef %63)
  %65 = load i32, ptr %2, align 4, !tbaa !5
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [2000001 x i32], ptr @p, i64 0, i64 %67
  store i32 %65, ptr %68, align 4, !tbaa !5
  %69 = load i32, ptr %5, align 4, !tbaa !5
  %70 = load i32, ptr @n, align 4, !tbaa !5
  %71 = icmp slt i32 %69, %70
  br i1 %71, label %72, label %109

72:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %105, %72
  %74 = load i32, ptr %7, align 4, !tbaa !5
  %75 = load i32, ptr @n, align 4, !tbaa !5
  %76 = icmp sle i32 %74, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %73
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %108

78:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %79 = load i32, ptr %7, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %8, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %101, %78
  %82 = load i32, ptr %8, align 4, !tbaa !5
  %83 = load i32, ptr @n, align 4, !tbaa !5
  %84 = icmp sle i32 %82, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %81
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %104

86:                                               ; preds = %81
  %87 = load i32, ptr %2, align 4, !tbaa !5
  %88 = load i32, ptr %6, align 4, !tbaa !5
  %89 = load i32, ptr %7, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = sub nsw i32 %88, %92
  %94 = load i32, ptr %8, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = add nsw i32 %93, %97
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [2000001 x i32], ptr @p, i64 0, i64 %99
  store i32 %87, ptr %100, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %86
  %102 = load i32, ptr %8, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %8, align 4, !tbaa !5
  br label %81, !llvm.loop !13

104:                                              ; preds = %85
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %7, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %7, align 4, !tbaa !5
  br label %73, !llvm.loop !14

108:                                              ; preds = %77
  br label %109

109:                                              ; preds = %108, %55
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %5, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %5, align 4, !tbaa !5
  br label %36, !llvm.loop !15

113:                                              ; preds = %40
  br label %114

114:                                              ; preds = %113
  %115 = load i32, ptr %2, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %2, align 4, !tbaa !5
  br label %10, !llvm.loop !16

117:                                              ; preds = %14
  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 uwtable
declare dso_local void @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) #3

declare i32 @puts(ptr noundef) #1

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 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 = !{!7, !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !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"

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@a = external dso_local global [101 x i32], align 16
@p = external dso_local local_unnamed_addr global [2000001 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %2 = load i32, ptr @t, align 4, !tbaa !5
  %.not52 = icmp slt i32 %2, 1
  br i1 %.not52, label %._crit_edge56, label %.lr.ph55

._crit_edge56:                                    ; preds = %._crit_edge51, %0
  ret i32 0

.lr.ph55:                                         ; preds = %0, %._crit_edge51
  %.02953 = phi i32 [ %13, %._crit_edge51 ], [ 1, %0 ]
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %4 = load i32, ptr @n, align 4, !tbaa !5
  %.not3138 = icmp slt i32 %4, 1
  br i1 %.not3138, label %.lr.ph55.._crit_edge_crit_edge, label %.lr.ph

.lr.ph55.._crit_edge_crit_edge:                   ; preds = %.lr.ph55
  %.pre = sext i32 %4 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph55.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.lr.ph55.._crit_edge_crit_edge ], [ %10, %.lr.ph ]
  %gep = getelementptr i32, ptr getelementptr inbounds (i8, ptr @a, i64 4), i64 %.pre-phi
  tail call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @a, i64 4), ptr noundef nonnull %gep)
  %5 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1)
  %6 = load i32, ptr @n, align 4, !tbaa !5
  %.not3248 = icmp slt i32 %6, 1
  br i1 %.not3248, label %._crit_edge51, label %.preheader36

.lr.ph:                                           ; preds = %.lr.ph55, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.lr.ph55 ]
  %7 = getelementptr inbounds i32, ptr @a, i64 %indvars.iv
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %7)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %9 = load i32, ptr @n, align 4, !tbaa !5
  %10 = sext i32 %9 to i64
  %.not31.not = icmp slt i64 %indvars.iv, %10
  br i1 %.not31.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader36:                                     ; preds = %._crit_edge, %.loopexit35
  %11 = phi i32 [ %28, %.loopexit35 ], [ %6, %._crit_edge ]
  %.02650 = phi i64 [ %indvars.iv.next61, %.loopexit35 ], [ 0, %._crit_edge ]
  %.02749 = phi i32 [ %65, %.loopexit35 ], [ 1, %._crit_edge ]
  %sext = shl i64 %.02650, 32
  %12 = ashr exact i64 %sext, 32
  br label %15

._crit_edge51:                                    ; preds = %.loopexit35, %._crit_edge
  %13 = add nuw nsw i32 %.02953, 1
  %14 = load i32, ptr @t, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.02953, %14
  br i1 %.not.not, label %.lr.ph55, label %._crit_edge56, !llvm.loop !11

15:                                               ; preds = %.preheader36, %15
  %indvars.iv60 = phi i64 [ %12, %.preheader36 ], [ %indvars.iv.next61, %15 ]
  %indvars.iv.next61 = add nsw i64 %indvars.iv60, 1
  %16 = getelementptr inbounds [2000001 x i32], ptr @p, i64 0, i64 %indvars.iv.next61
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = icmp eq i32 %17, %.02953
  br i1 %18, label %15, label %19, !llvm.loop !12

19:                                               ; preds = %15
  %20 = getelementptr inbounds [2000001 x i32], ptr @p, i64 0, i64 %indvars.iv.next61
  %21 = trunc nsw i64 %indvars.iv.next61 to i32
  %22 = icmp eq i32 %.02749, %11
  %23 = zext i1 %22 to i64
  %24 = getelementptr inbounds [3 x i8], ptr @.str.3, i64 0, i64 %23
  %25 = load i8, ptr %24, align 1, !tbaa !13
  %26 = sext i8 %25 to i32
  %27 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %21, i32 noundef %26)
  store i32 %.02953, ptr %20, align 4, !tbaa !5
  %28 = load i32, ptr @n, align 4, !tbaa !5
  %29 = icmp sge i32 %.02749, %28
  %.not3345 = icmp slt i32 %28, 1
  %or.cond = or i1 %29, %.not3345
  br i1 %or.cond, label %.loopexit35, label %.lr.ph47.preheader

.lr.ph47.preheader:                               ; preds = %19
  %30 = add nuw i32 %28, 1
  %31 = zext nneg i32 %28 to i64
  %wide.trip.count = zext i32 %30 to i64
  %32 = add nsw i32 %28, -2
  br label %.lr.ph47

.loopexit:                                        ; preds = %.prol.loopexit, %.lr.ph44.new, %.lr.ph47
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %exitcond71.not = icmp eq i64 %indvars.iv.next69, %wide.trip.count
  %indvar.next = add i32 %indvar, 1
  br i1 %exitcond71.not, label %.loopexit35, label %.lr.ph47, !llvm.loop !14

.lr.ph47:                                         ; preds = %.lr.ph47.preheader, %.loopexit
  %indvar = phi i32 [ 0, %.lr.ph47.preheader ], [ %indvar.next, %.loopexit ]
  %indvars.iv68 = phi i64 [ 1, %.lr.ph47.preheader ], [ %indvars.iv.next69, %.loopexit ]
  %indvars.iv63 = phi i64 [ 2, %.lr.ph47.preheader ], [ %indvars.iv.next64, %.loopexit ]
  %33 = sub i32 %32, %indvar
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %.not3441.not = icmp ult i64 %indvars.iv68, %31
  br i1 %.not3441.not, label %.lr.ph44, label %.loopexit

.lr.ph44:                                         ; preds = %.lr.ph47
  %34 = xor i32 %indvar, -1
  %35 = add i32 %28, %34
  %36 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv68
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = sub i32 %21, %37
  %xtraiter = and i32 %35, 3
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.prol.loopexit, label %.prol.preheader

.prol.preheader:                                  ; preds = %.lr.ph44, %.prol.preheader
  %indvars.iv65.prol = phi i64 [ %indvars.iv.next66.prol, %.prol.preheader ], [ %indvars.iv63, %.lr.ph44 ]
  %prol.iter = phi i32 [ %prol.iter.next, %.prol.preheader ], [ 0, %.lr.ph44 ]
  %39 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv65.prol
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = add nsw i32 %38, %40
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [2000001 x i32], ptr @p, i64 0, i64 %42
  store i32 %.02953, ptr %43, align 4, !tbaa !5
  %indvars.iv.next66.prol = add nuw nsw i64 %indvars.iv65.prol, 1
  %prol.iter.next = add i32 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.prol.loopexit, label %.prol.preheader, !llvm.loop !15

.prol.loopexit:                                   ; preds = %.prol.preheader, %.lr.ph44
  %indvars.iv65.unr = phi i64 [ %indvars.iv63, %.lr.ph44 ], [ %indvars.iv.next66.prol, %.prol.preheader ]
  %44 = icmp ult i32 %33, 3
  br i1 %44, label %.loopexit, label %.lr.ph44.new

.lr.ph44.new:                                     ; preds = %.prol.loopexit, %.lr.ph44.new
  %indvars.iv65 = phi i64 [ %indvars.iv.next66.3, %.lr.ph44.new ], [ %indvars.iv65.unr, %.prol.loopexit ]
  %45 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv65
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = add nsw i32 %38, %46
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [2000001 x i32], ptr @p, i64 0, i64 %48
  store i32 %.02953, ptr %49, align 4, !tbaa !5
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %50 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv.next66
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = add nsw i32 %38, %51
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [2000001 x i32], ptr @p, i64 0, i64 %53
  store i32 %.02953, ptr %54, align 4, !tbaa !5
  %indvars.iv.next66.1 = add nuw nsw i64 %indvars.iv65, 2
  %55 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv.next66.1
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = add nsw i32 %38, %56
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [2000001 x i32], ptr @p, i64 0, i64 %58
  store i32 %.02953, ptr %59, align 4, !tbaa !5
  %indvars.iv.next66.2 = add nuw nsw i64 %indvars.iv65, 3
  %60 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv.next66.2
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = add nsw i32 %38, %61
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [2000001 x i32], ptr @p, i64 0, i64 %63
  store i32 %.02953, ptr %64, align 4, !tbaa !5
  %indvars.iv.next66.3 = add nuw nsw i64 %indvars.iv65, 4
  %lftr.wideiv.3 = trunc i64 %indvars.iv.next66.3 to i32
  %exitcond.not.3 = icmp eq i32 %30, %lftr.wideiv.3
  br i1 %exitcond.not.3, label %.loopexit, label %.lr.ph44.new, !llvm.loop !17

.loopexit35:                                      ; preds = %.loopexit, %19
  %65 = add nuw nsw i32 %.02749, 1
  %.not32.not = icmp slt i32 %.02749, %28
  br i1 %.not32.not, label %.preheader36, label %._crit_edge51, !llvm.loop !18
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 = { 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 = { 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" }

!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 = !{!7, !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.unroll.disable"}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


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