; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/97 Beta Division 1/Problem A (A)

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@n = external dso_local global i32, align 4
@a = external dso_local global [100000 x i32], align 16
@res = external dso_local global [100000 x i32], align 16
@cnt = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.1 = 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
  store i32 0, ptr %1, align 4
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %6

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

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

11:                                               ; preds = %6
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %13
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %14)
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %17
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = icmp eq i32 %19, 1
  br i1 %20, label %21, label %24

21:                                               ; preds = %11
  %22 = load i32, ptr @cnt, align 4, !tbaa !5
  %23 = add nsw i32 %22, 1
  store i32 %23, ptr @cnt, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %21, %11
  br label %25

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

28:                                               ; preds = %10
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds i32, ptr @a, i64 %30
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef @a, ptr noundef %31)
  %32 = load i32, ptr @n, align 4, !tbaa !5
  %33 = icmp eq i32 %32, 1
  br i1 %33, label %34, label %42

34:                                               ; preds = %28
  %35 = load i32, ptr @a, align 16, !tbaa !5
  %36 = icmp eq i32 %35, 1
  br i1 %36, label %37, label %39

37:                                               ; preds = %34
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 2)
  br label %41

39:                                               ; preds = %34
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 1)
  br label %41

41:                                               ; preds = %39, %37
  store i32 0, ptr %1, align 4
  br label %111

42:                                               ; preds = %28
  store i32 1, ptr @res, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %92, %42
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = load i32, ptr @n, align 4, !tbaa !5
  %46 = icmp slt i32 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %95

48:                                               ; preds = %43
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = icmp sgt i32 %52, 1
  br i1 %53, label %54, label %63

54:                                               ; preds = %48
  %55 = load i32, ptr %3, align 4, !tbaa !5
  %56 = sub nsw i32 %55, 1
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = load i32, ptr %3, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100000 x i32], ptr @res, i64 0, i64 %61
  store i32 %59, ptr %62, align 4, !tbaa !5
  br label %91

63:                                               ; preds = %48
  %64 = load i32, ptr %3, align 4, !tbaa !5
  %65 = load i32, ptr @n, align 4, !tbaa !5
  %66 = sub nsw i32 %65, 1
  %67 = icmp slt i32 %64, %66
  br i1 %67, label %68, label %72

68:                                               ; preds = %63
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [100000 x i32], ptr @res, i64 0, i64 %70
  store i32 1, ptr %71, align 4, !tbaa !5
  br label %90

72:                                               ; preds = %63
  %73 = load i32, ptr @cnt, align 4, !tbaa !5
  %74 = load i32, ptr @n, align 4, !tbaa !5
  %75 = icmp eq i32 %73, %74
  br i1 %75, label %76, label %80

76:                                               ; preds = %72
  %77 = load i32, ptr %3, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [100000 x i32], ptr @res, i64 0, i64 %78
  store i32 2, ptr %79, align 4, !tbaa !5
  br label %89

80:                                               ; preds = %72
  %81 = load i32, ptr %3, align 4, !tbaa !5
  %82 = sub nsw i32 %81, 1
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = load i32, ptr %3, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [100000 x i32], ptr @res, i64 0, i64 %87
  store i32 %85, ptr %88, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %80, %76
  br label %90

90:                                               ; preds = %89, %68
  br label %91

91:                                               ; preds = %90, %54
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %3, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %3, align 4, !tbaa !5
  br label %43, !llvm.loop !11

95:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %107, %95
  %97 = load i32, ptr %4, align 4, !tbaa !5
  %98 = load i32, ptr @n, align 4, !tbaa !5
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %110

101:                                              ; preds = %96
  %102 = load i32, ptr %4, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [100000 x i32], ptr @res, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %105)
  br label %107

107:                                              ; preds = %101
  %108 = load i32, ptr %4, align 4, !tbaa !5
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %4, align 4, !tbaa !5
  br label %96, !llvm.loop !12

110:                                              ; preds = %100
  store i32 0, ptr %1, align 4
  br label %111

111:                                              ; preds = %110, %41
  %112 = load i32, ptr %1, align 4
  ret i32 %112
}

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 noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 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 = 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"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@n = external dso_local global i32, align 4
@a = external dso_local global [100000 x i32], align 16
@res = external dso_local local_unnamed_addr global [100000 x i32], align 16
@cnt = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [4 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 @n)
  %2 = load i32, ptr @n, align 4, !tbaa !5
  %3 = icmp sgt i32 %2, 0
  br i1 %3, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre = sext i32 %2 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %14, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.._crit_edge_crit_edge ], [ %16, %14 ]
  %4 = getelementptr inbounds i32, ptr @a, i64 %.pre-phi
  tail call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull @a, ptr noundef nonnull %4)
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %6 = icmp eq i32 %5, 1
  br i1 %6, label %.loopexit.sink.split, label %21

.lr.ph:                                           ; preds = %0, %14
  %indvars.iv = phi i64 [ %indvars.iv.next, %14 ], [ 0, %0 ]
  %7 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %indvars.iv
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %7)
  %9 = load i32, ptr %7, align 4, !tbaa !5
  %10 = icmp eq i32 %9, 1
  br i1 %10, label %11, label %14

11:                                               ; preds = %.lr.ph
  %12 = load i32, ptr @cnt, align 4, !tbaa !5
  %13 = add nsw i32 %12, 1
  store i32 %13, ptr @cnt, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %.lr.ph, %11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %15 = load i32, ptr @n, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = icmp slt i64 %indvars.iv.next, %16
  br i1 %17, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.loopexit.sink.split:                             ; preds = %._crit_edge
  %18 = load i32, ptr @a, align 16, !tbaa !5
  %19 = icmp eq i32 %18, 1
  %. = select i1 %19, i32 2, i32 1
  %20 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.)
  br label %.loopexit

21:                                               ; preds = %._crit_edge
  store i32 1, ptr @res, align 16, !tbaa !5
  %22 = icmp sgt i32 %5, 1
  br i1 %22, label %.lr.ph26, label %.loopexit

.lr.ph26:                                         ; preds = %21
  %23 = add nsw i32 %5, -1
  %24 = load i32, ptr @cnt, align 4
  %25 = icmp eq i32 %24, %5
  %.fr = freeze i1 %25
  %26 = zext nneg i32 %23 to i64
  %wide.trip.count38 = zext nneg i32 %5 to i64
  br i1 %.fr, label %.lr.ph26.split.us, label %.lr.ph26.split.preheader

.lr.ph26.split.preheader:                         ; preds = %.lr.ph26
  %27 = add nsw i64 %wide.trip.count38, -1
  %xtraiter = and i64 %27, 1
  %28 = icmp eq i32 %5, 2
  br i1 %28, label %.lr.ph28.preheader.loopexit49.unr-lcssa, label %.lr.ph26.split.preheader.new

.lr.ph26.split.preheader.new:                     ; preds = %.lr.ph26.split.preheader
  %unroll_iter = and i64 %27, -2
  br label %.lr.ph26.split

.lr.ph26.split.us:                                ; preds = %.lr.ph26, %42
  %indvars.iv35 = phi i64 [ %indvars.iv.next36, %42 ], [ 1, %.lr.ph26 ]
  %29 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %indvars.iv35
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = icmp sgt i32 %30, 1
  br i1 %31, label %37, label %32

32:                                               ; preds = %.lr.ph26.split.us
  %33 = icmp ult i64 %indvars.iv35, %26
  %34 = getelementptr inbounds [100000 x i32], ptr @res, i64 0, i64 %indvars.iv35
  br i1 %33, label %36, label %35

35:                                               ; preds = %32
  store i32 2, ptr %34, align 4, !tbaa !5
  br label %42

36:                                               ; preds = %32
  store i32 1, ptr %34, align 4, !tbaa !5
  br label %42

37:                                               ; preds = %.lr.ph26.split.us
  %38 = add nsw i64 %indvars.iv35, -1
  %39 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = getelementptr inbounds [100000 x i32], ptr @res, i64 0, i64 %indvars.iv35
  store i32 %40, ptr %41, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %37, %36, %35
  %indvars.iv.next36 = add nuw nsw i64 %indvars.iv35, 1
  %exitcond39.not = icmp eq i64 %indvars.iv.next36, %wide.trip.count38
  br i1 %exitcond39.not, label %.lr.ph28.preheader, label %.lr.ph26.split.us, !llvm.loop !11

.lr.ph26.split:                                   ; preds = %.lr.ph26.split.1, %.lr.ph26.split.preheader.new
  %indvars.iv32 = phi i64 [ 1, %.lr.ph26.split.preheader.new ], [ %indvars.iv.next33.1, %.lr.ph26.split.1 ]
  %niter = phi i64 [ 0, %.lr.ph26.split.preheader.new ], [ %niter.next.1, %.lr.ph26.split.1 ]
  %43 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %indvars.iv32
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = icmp slt i32 %44, 2
  %46 = icmp ult i64 %indvars.iv32, %26
  %or.cond = select i1 %45, i1 %46, i1 false
  br i1 %or.cond, label %.lr.ph26.split.1, label %.sink.split

.sink.split:                                      ; preds = %.lr.ph26.split
  %47 = add nsw i64 %indvars.iv32, -1
  %48 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  br label %.lr.ph26.split.1

.lr.ph26.split.1:                                 ; preds = %.lr.ph26.split, %.sink.split
  %.sink = phi i32 [ %49, %.sink.split ], [ 1, %.lr.ph26.split ]
  %50 = getelementptr inbounds [100000 x i32], ptr @res, i64 0, i64 %indvars.iv32
  store i32 %.sink, ptr %50, align 4, !tbaa !5
  %indvars.iv.next33 = add nuw nsw i64 %indvars.iv32, 1
  %51 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %indvars.iv.next33
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = icmp slt i32 %52, 2
  %54 = icmp ult i64 %indvars.iv.next33, %26
  %or.cond.1 = select i1 %53, i1 %54, i1 false
  %spec.select = select i1 %or.cond.1, i32 1, i32 %44
  %55 = getelementptr inbounds [100000 x i32], ptr @res, i64 0, i64 %indvars.iv.next33
  store i32 %spec.select, ptr %55, align 4, !tbaa !5
  %indvars.iv.next33.1 = add nuw nsw i64 %indvars.iv32, 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 %.lr.ph28.preheader.loopexit49.unr-lcssa, label %.lr.ph26.split, !llvm.loop !11

.lr.ph28.preheader.loopexit49.unr-lcssa:          ; preds = %.lr.ph26.split.1, %.lr.ph26.split.preheader
  %indvars.iv32.unr = phi i64 [ 1, %.lr.ph26.split.preheader ], [ %indvars.iv.next33.1, %.lr.ph26.split.1 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph28.preheader, label %.lr.ph26.split.epil

.lr.ph26.split.epil:                              ; preds = %.lr.ph28.preheader.loopexit49.unr-lcssa
  %56 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %indvars.iv32.unr
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = icmp slt i32 %57, 2
  %59 = icmp ult i64 %indvars.iv32.unr, %26
  %or.cond.epil = select i1 %58, i1 %59, i1 false
  br i1 %or.cond.epil, label %.lr.ph28.preheader.loopexit49.epilog-lcssa, label %.sink.split.epil

.sink.split.epil:                                 ; preds = %.lr.ph26.split.epil
  %60 = add nsw i64 %indvars.iv32.unr, -1
  %61 = getelementptr inbounds [100000 x i32], ptr @a, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  br label %.lr.ph28.preheader.loopexit49.epilog-lcssa

.lr.ph28.preheader.loopexit49.epilog-lcssa:       ; preds = %.sink.split.epil, %.lr.ph26.split.epil
  %.sink.epil = phi i32 [ %62, %.sink.split.epil ], [ 1, %.lr.ph26.split.epil ]
  %63 = getelementptr inbounds [100000 x i32], ptr @res, i64 0, i64 %indvars.iv32.unr
  store i32 %.sink.epil, ptr %63, align 4, !tbaa !5
  br label %.lr.ph28.preheader

.lr.ph28.preheader:                               ; preds = %.lr.ph28.preheader.loopexit49.epilog-lcssa, %.lr.ph28.preheader.loopexit49.unr-lcssa, %42
  br label %.lr.ph28

.lr.ph28:                                         ; preds = %.lr.ph28.preheader, %.lr.ph28
  %indvars.iv40 = phi i64 [ %indvars.iv.next41, %.lr.ph28 ], [ 0, %.lr.ph28.preheader ]
  %64 = getelementptr inbounds [100000 x i32], ptr @res, i64 0, i64 %indvars.iv40
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %65)
  %indvars.iv.next41 = add nuw nsw i64 %indvars.iv40, 1
  %67 = load i32, ptr @n, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = icmp slt i64 %indvars.iv.next41, %68
  br i1 %69, label %.lr.ph28, label %.loopexit, !llvm.loop !12

.loopexit:                                        ; preds = %.lr.ph28, %.loopexit.sink.split, %21
  ret i32 0
}

; 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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

; 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" }
attributes #3 = { "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}


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