; LLVM IR from tangjz/acm-icpc :: codechef/SNCKPE19 (BUDDYNIM)

; 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::greater" = type { i8 }

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@a = external dso_local global [101 x i32], align 16
@b = external dso_local global [101 x i32], align 16
@.str = external hidden unnamed_addr constant [3 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
@.str.3 = external hidden unnamed_addr constant [6 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 %"struct.std::greater", align 1
  %5 = alloca %"struct.std::greater", align 1
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %9

9:                                                ; preds = %122, %0
  %10 = load i32, ptr @t, align 4, !tbaa !5
  %11 = add nsw i32 %10, -1
  store i32 %11, ptr @t, align 4, !tbaa !5
  %12 = icmp ne i32 %10, 0
  br i1 %12, label %13, label %123

13:                                               ; preds = %9
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @n, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %25, %13
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = load i32, ptr @n, align 4, !tbaa !5
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %20, label %19

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

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

25:                                               ; preds = %20
  %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 %15, !llvm.loop !9

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

29:                                               ; preds = %39, %28
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = load i32, ptr @m, align 4, !tbaa !5
  %32 = icmp slt 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 %42

34:                                               ; preds = %29
  %35 = load i32, ptr %3, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds i32, ptr @b, i64 %36
  %38 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %37)
  br label %39

39:                                               ; preds = %34
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %3, align 4, !tbaa !5
  br label %29, !llvm.loop !11

42:                                               ; preds = %33
  %43 = load i32, ptr @n, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds i32, ptr @a, i64 %44
  call void @_ZSt4sortIPiSt7greaterIiEEvT_S3_T0_(ptr noundef @a, ptr noundef %45)
  br label %46

46:                                               ; preds = %60, %42
  %47 = load i32, ptr @n, align 4, !tbaa !5
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %57

49:                                               ; preds = %46
  %50 = load i32, ptr @n, align 4, !tbaa !5
  %51 = sub nsw i32 %50, 1
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = icmp ne i32 %54, 0
  %56 = xor i1 %55, true
  br label %57

57:                                               ; preds = %49, %46
  %58 = phi i1 [ false, %46 ], [ %56, %49 ]
  br i1 %58, label %59, label %63

59:                                               ; preds = %57
  br label %60

60:                                               ; preds = %59
  %61 = load i32, ptr @n, align 4, !tbaa !5
  %62 = add nsw i32 %61, -1
  store i32 %62, ptr @n, align 4, !tbaa !5
  br label %46, !llvm.loop !12

63:                                               ; preds = %57
  %64 = load i32, ptr @m, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds i32, ptr @b, i64 %65
  call void @_ZSt4sortIPiSt7greaterIiEEvT_S3_T0_(ptr noundef @b, ptr noundef %66)
  br label %67

67:                                               ; preds = %81, %63
  %68 = load i32, ptr @m, align 4, !tbaa !5
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %78

70:                                               ; preds = %67
  %71 = load i32, ptr @m, align 4, !tbaa !5
  %72 = sub nsw i32 %71, 1
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [101 x i32], ptr @b, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = icmp ne i32 %75, 0
  %77 = xor i1 %76, true
  br label %78

78:                                               ; preds = %70, %67
  %79 = phi i1 [ false, %67 ], [ %77, %70 ]
  br i1 %79, label %80, label %84

80:                                               ; preds = %78
  br label %81

81:                                               ; preds = %80
  %82 = load i32, ptr @m, align 4, !tbaa !5
  %83 = add nsw i32 %82, -1
  store i32 %83, ptr @m, align 4, !tbaa !5
  br label %67, !llvm.loop !13

84:                                               ; preds = %78
  %85 = load i32, ptr @n, align 4, !tbaa !5
  %86 = load i32, ptr @m, align 4, !tbaa !5
  %87 = icmp eq i32 %85, %86
  br i1 %87, label %88, label %120

88:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #4
  store i8 1, ptr %6, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %111, %88
  %90 = load i32, ptr %7, align 4, !tbaa !5
  %91 = load i32, ptr @n, align 4, !tbaa !5
  %92 = icmp slt i32 %90, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %114

94:                                               ; preds = %89
  %95 = load i32, ptr %7, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = load i32, ptr %7, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [101 x i32], ptr @b, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = icmp eq i32 %98, %102
  %104 = zext i1 %103 to i32
  %105 = load i8, ptr %6, align 1, !tbaa !14, !range !16, !noundef !17
  %106 = trunc i8 %105 to i1
  %107 = zext i1 %106 to i32
  %108 = and i32 %107, %104
  %109 = icmp ne i32 %108, 0
  %110 = zext i1 %109 to i8
  store i8 %110, ptr %6, align 1, !tbaa !14
  br label %111

111:                                              ; preds = %94
  %112 = load i32, ptr %7, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %7, align 4, !tbaa !5
  br label %89, !llvm.loop !18

114:                                              ; preds = %93
  %115 = load i8, ptr %6, align 1, !tbaa !14, !range !16, !noundef !17
  %116 = trunc i8 %115 to i1
  %117 = zext i1 %116 to i64
  %118 = select i1 %116, ptr @.str.2, ptr @.str.3
  %119 = call i32 @puts(ptr noundef %118)
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #4
  br label %122

120:                                              ; preds = %84
  %121 = call i32 @puts(ptr noundef @.str.3)
  br label %122

122:                                              ; preds = %120, %114
  br label %9, !llvm.loop !19

123:                                              ; preds = %9
  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 @_ZSt4sortIPiSt7greaterIiEEvT_S3_T0_(ptr noundef, ptr noundef) #3

declare i32 @puts(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}
!13 = distinct !{!13, !10}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !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
@m = external dso_local global i32, align 4
@a = external dso_local global [101 x i32], align 16
@b = external dso_local global [101 x i32], align 16
@.str = external hidden unnamed_addr constant [3 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
@.str.3 = external hidden unnamed_addr constant [6 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
  %3 = add nsw i32 %2, -1
  store i32 %3, ptr @t, align 4, !tbaa !5
  %.not41 = icmp eq i32 %2, 0
  br i1 %.not41, label %._crit_edge44, label %.lr.ph43

.lr.ph43:                                         ; preds = %0, %59
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %.preheader24

.preheader24:                                     ; preds = %.lr.ph, %.lr.ph43
  %7 = phi i32 [ %5, %.lr.ph43 ], [ %12, %.lr.ph ]
  %8 = load i32, ptr @m, align 4, !tbaa !5
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph27, label %._crit_edge

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

._crit_edge.loopexit:                             ; preds = %.lr.ph27
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader24
  %15 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %7, %.preheader24 ]
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds i32, ptr @a, i64 %16
  tail call void @_ZSt4sortIPiSt7greaterIiEEvT_S3_T0_(ptr noundef nonnull @a, ptr noundef nonnull %17)
  %.pr = load i32, ptr @n, align 4, !tbaa !5
  %.not1928 = icmp eq i32 %.pr, 0
  br i1 %.not1928, label %.critedge, label %.lr.ph30.preheader

.lr.ph30.preheader:                               ; preds = %._crit_edge
  %18 = sext i32 %.pr to i64
  br label %.lr.ph30

.lr.ph27:                                         ; preds = %.preheader24, %.lr.ph27
  %indvars.iv47 = phi i64 [ %indvars.iv.next48, %.lr.ph27 ], [ 0, %.preheader24 ]
  %19 = getelementptr inbounds i32, ptr @b, i64 %indvars.iv47
  %20 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %19)
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %21 = load i32, ptr @m, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = icmp slt i64 %indvars.iv.next48, %22
  br i1 %23, label %.lr.ph27, label %._crit_edge.loopexit, !llvm.loop !11

.lr.ph30:                                         ; preds = %.lr.ph30.preheader, %26
  %indvars.iv50 = phi i64 [ %18, %.lr.ph30.preheader ], [ %indvars.iv.next51, %26 ]
  %indvars.iv.next51 = add nsw i64 %indvars.iv50, -1
  %24 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv.next51
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %.not20 = icmp eq i32 %25, 0
  br i1 %.not20, label %26, label %.critedge

26:                                               ; preds = %.lr.ph30
  %27 = trunc nsw i64 %indvars.iv.next51 to i32
  store i32 %27, ptr @n, align 4, !tbaa !5
  %.not19 = icmp eq i64 %indvars.iv.next51, 0
  br i1 %.not19, label %.critedge, label %.lr.ph30, !llvm.loop !12

.critedge:                                        ; preds = %.lr.ph30, %26, %._crit_edge
  %28 = load i32, ptr @m, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds i32, ptr @b, i64 %29
  tail call void @_ZSt4sortIPiSt7greaterIiEEvT_S3_T0_(ptr noundef nonnull @b, ptr noundef nonnull %30)
  %.pr23 = load i32, ptr @m, align 4, !tbaa !5
  %.not2132 = icmp eq i32 %.pr23, 0
  br i1 %.not2132, label %.critedge2, label %.lr.ph33.preheader

.lr.ph33.preheader:                               ; preds = %.critedge
  %31 = sext i32 %.pr23 to i64
  br label %.lr.ph33

.lr.ph33:                                         ; preds = %.lr.ph33.preheader, %34
  %indvars.iv53 = phi i64 [ %31, %.lr.ph33.preheader ], [ %indvars.iv.next54, %34 ]
  %indvars.iv.next54 = add nsw i64 %indvars.iv53, -1
  %32 = getelementptr inbounds [101 x i32], ptr @b, i64 0, i64 %indvars.iv.next54
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %.not22 = icmp eq i32 %33, 0
  br i1 %.not22, label %34, label %.critedge2.loopexit.split.loop.exit62

34:                                               ; preds = %.lr.ph33
  %35 = trunc nsw i64 %indvars.iv.next54 to i32
  store i32 %35, ptr @m, align 4, !tbaa !5
  %.not21 = icmp eq i64 %indvars.iv.next54, 0
  br i1 %.not21, label %.critedge2, label %.lr.ph33, !llvm.loop !13

.critedge2.loopexit.split.loop.exit62:            ; preds = %.lr.ph33
  %36 = trunc nsw i64 %indvars.iv53 to i32
  br label %.critedge2

.critedge2:                                       ; preds = %34, %.critedge2.loopexit.split.loop.exit62, %.critedge
  %.lcssa = phi i32 [ 0, %.critedge ], [ %36, %.critedge2.loopexit.split.loop.exit62 ], [ 0, %34 ]
  %37 = load i32, ptr @n, align 4, !tbaa !5
  %38 = icmp eq i32 %37, %.lcssa
  br i1 %38, label %.preheader, label %59

.preheader:                                       ; preds = %.critedge2
  %39 = icmp sgt i32 %.lcssa, 0
  br i1 %39, label %.lr.ph38.preheader, label %._crit_edge39.thread

.lr.ph38.preheader:                               ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %.lcssa to i64
  %min.iters.check = icmp ult i32 %.lcssa, 8
  br i1 %min.iters.check, label %.lr.ph38.preheader71, label %vector.ph

.lr.ph38.preheader71:                             ; preds = %middle.block, %.lr.ph38.preheader
  %indvars.iv56.ph = phi i64 [ 0, %.lr.ph38.preheader ], [ %n.vec, %middle.block ]
  %.01436.ph = phi i1 [ true, %.lr.ph38.preheader ], [ %52, %middle.block ]
  br label %.lr.ph38

vector.ph:                                        ; preds = %.lr.ph38.preheader
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i1> [ <i1 true, i1 true, i1 true, i1 true>, %vector.ph ], [ %48, %vector.body ]
  %vec.phi67 = phi <4 x i1> [ <i1 true, i1 true, i1 true, i1 true>, %vector.ph ], [ %49, %vector.body ]
  %40 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %index
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  %wide.load = load <4 x i32>, ptr %40, align 16, !tbaa !5
  %wide.load68 = load <4 x i32>, ptr %41, align 16, !tbaa !5
  %42 = getelementptr inbounds [101 x i32], ptr @b, i64 0, i64 %index
  %43 = getelementptr inbounds i8, ptr %42, i64 16
  %wide.load69 = load <4 x i32>, ptr %42, align 16, !tbaa !5
  %wide.load70 = load <4 x i32>, ptr %43, align 16, !tbaa !5
  %44 = icmp eq <4 x i32> %wide.load, %wide.load69
  %45 = icmp eq <4 x i32> %wide.load68, %wide.load70
  %46 = freeze <4 x i1> %44
  %47 = freeze <4 x i1> %45
  %48 = and <4 x i1> %vec.phi, %46
  %49 = and <4 x i1> %vec.phi67, %47
  %index.next = add nuw i64 %index, 8
  %50 = icmp eq i64 %index.next, %n.vec
  br i1 %50, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %bin.rdx = and <4 x i1> %49, %48
  %51 = bitcast <4 x i1> %bin.rdx to i4
  %52 = icmp eq i4 %51, -1
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge39, label %.lr.ph38.preheader71

._crit_edge39:                                    ; preds = %.lr.ph38, %middle.block
  %.lcssa66 = phi i1 [ %52, %middle.block ], [ %58, %.lr.ph38 ]
  br i1 %.lcssa66, label %._crit_edge39.thread, label %59

._crit_edge39.thread:                             ; preds = %.preheader, %._crit_edge39
  br label %59

.lr.ph38:                                         ; preds = %.lr.ph38.preheader71, %.lr.ph38
  %indvars.iv56 = phi i64 [ %indvars.iv.next57, %.lr.ph38 ], [ %indvars.iv56.ph, %.lr.ph38.preheader71 ]
  %.01436 = phi i1 [ %58, %.lr.ph38 ], [ %.01436.ph, %.lr.ph38.preheader71 ]
  %53 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv56
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = getelementptr inbounds [101 x i32], ptr @b, i64 0, i64 %indvars.iv56
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = icmp eq i32 %54, %56
  %.fr = freeze i1 %57
  %58 = and i1 %.01436, %.fr
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next57, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge39, label %.lr.ph38, !llvm.loop !17

59:                                               ; preds = %.critedge2, %._crit_edge39.thread, %._crit_edge39
  %.str.3.sink = phi ptr [ @.str.2, %._crit_edge39.thread ], [ @.str.3, %._crit_edge39 ], [ @.str.3, %.critedge2 ]
  %60 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.3.sink)
  %61 = load i32, ptr @t, align 4, !tbaa !5
  %62 = add nsw i32 %61, -1
  store i32 %62, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %61, 0
  br i1 %.not, label %._crit_edge44, label %.lr.ph43, !llvm.loop !18

._crit_edge44:                                    ; preds = %59, %0
  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 @_ZSt4sortIPiSt7greaterIiEEvT_S3_T0_(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @puts(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 = distinct !{!13, !10}
!14 = distinct !{!14, !10, !15, !16}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !10, !16, !15}
!18 = distinct !{!18, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,TailCallElimPass