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

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

@pat = external dso_local global ptr, align 8
@n = external dso_local global i32, align 4
@f = external dso_local global [3 x i32], align 4
@g = external dso_local global [3 x i32], align 4
@buf = external dso_local global [100001 x i8], align 16
@.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 [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
  store i32 0, ptr %1, align 4
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @n, ptr noundef @buf)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %34, %0
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = icmp slt i32 %10, 3
  br i1 %11, label %13, label %12

12:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %37

13:                                               ; preds = %9
  %14 = load i8, ptr @buf, align 16, !tbaa !9
  %15 = sext i8 %14 to i32
  %16 = icmp eq i32 %15, 63
  br i1 %16, label %27, label %17

17:                                               ; preds = %13
  %18 = load i8, ptr @buf, align 16, !tbaa !9
  %19 = sext i8 %18 to i32
  %20 = load ptr, ptr @pat, align 8, !tbaa !10
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds i8, ptr %20, i64 %22
  %24 = load i8, ptr %23, align 1, !tbaa !9
  %25 = sext i8 %24 to i32
  %26 = icmp eq i32 %19, %25
  br i1 %26, label %27, label %33

27:                                               ; preds = %17, %13
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [3 x i32], ptr @f, i64 0, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %30, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %27, %17
  br label %34

34:                                               ; preds = %33
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %2, align 4, !tbaa !5
  br label %9, !llvm.loop !12

37:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %105, %37
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = load i32, ptr @n, align 4, !tbaa !5
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %43, label %42

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

43:                                               ; preds = %38
  store i32 0, ptr getelementptr inbounds ([3 x i32], ptr @g, i64 0, i64 2), align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds ([3 x i32], ptr @g, i64 0, i64 1), align 4, !tbaa !5
  store i32 0, ptr @g, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %44

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

47:                                               ; preds = %44
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %104

48:                                               ; preds = %44
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [100001 x i8], ptr @buf, i64 0, i64 %50
  %52 = load i8, ptr %51, align 1, !tbaa !9
  %53 = sext i8 %52 to i32
  %54 = icmp ne i32 %53, 63
  br i1 %54, label %55, label %69

55:                                               ; preds = %48
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [100001 x i8], ptr @buf, i64 0, i64 %57
  %59 = load i8, ptr %58, align 1, !tbaa !9
  %60 = sext i8 %59 to i32
  %61 = load ptr, ptr @pat, align 8, !tbaa !10
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds i8, ptr %61, i64 %63
  %65 = load i8, ptr %64, align 1, !tbaa !9
  %66 = sext i8 %65 to i32
  %67 = icmp ne i32 %60, %66
  br i1 %67, label %68, label %69

68:                                               ; preds = %55
  br label %101

69:                                               ; preds = %55, %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %89, %69
  %71 = load i32, ptr %6, align 4, !tbaa !5
  %72 = icmp slt i32 %71, 3
  br i1 %72, label %74, label %73

73:                                               ; preds = %70
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %92

74:                                               ; preds = %70
  %75 = load i32, ptr %5, align 4, !tbaa !5
  %76 = load i32, ptr %6, align 4, !tbaa !5
  %77 = icmp ne i32 %75, %76
  br i1 %77, label %78, label %88

78:                                               ; preds = %74
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [3 x i32], ptr @f, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [3 x i32], ptr @g, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = add nsw i32 %86, %82
  store i32 %87, ptr %85, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %78, %74
  br label %89

89:                                               ; preds = %88
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %6, align 4, !tbaa !5
  br label %70, !llvm.loop !14

92:                                               ; preds = %73
  %93 = load i32, ptr %5, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [3 x i32], ptr @g, i64 0, i64 %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 2, ptr %7, align 4, !tbaa !5
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %95, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = load i32, ptr %5, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [3 x i32], ptr @g, i64 0, i64 %99
  store i32 %97, ptr %100, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %101

101:                                              ; preds = %92, %68
  %102 = load i32, ptr %5, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %5, align 4, !tbaa !5
  br label %44, !llvm.loop !15

104:                                              ; preds = %47
  call void @_ZSt4swapIiLm3EENSt9enable_ifIXsr14__is_swappableIT_EE5valueEvE4typeERAT0__S1_S5_(ptr noundef nonnull align 4 dereferenceable(12) @f, ptr noundef nonnull align 4 dereferenceable(12) @g) #4
  br label %105

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

108:                                              ; preds = %42
  %109 = load i32, ptr @f, align 4, !tbaa !5
  %110 = load i32, ptr getelementptr inbounds ([3 x i32], ptr @f, i64 0, i64 1), align 4, !tbaa !5
  %111 = add nsw i32 %109, %110
  %112 = load i32, ptr getelementptr inbounds ([3 x i32], ptr @f, i64 0, i64 2), align 4, !tbaa !5
  %113 = add nsw i32 %111, %112
  %114 = icmp sge i32 %113, 2
  %115 = zext i1 %114 to i64
  %116 = select i1 %114, ptr @.str.2, ptr @.str.3
  %117 = call i32 @puts(ptr noundef %116)
  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 @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiLm3EENSt9enable_ifIXsr14__is_swappableIT_EE5valueEvE4typeERAT0__S1_S5_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #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 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}


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

@pat = external dso_local local_unnamed_addr global ptr, align 8
@n = external dso_local global i32, align 4
@f = external dso_local global [3 x i32], align 4
@g = external dso_local global [3 x i32], align 4
@buf = external dso_local global [100001 x i8], align 16
@.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 [3 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.1, ptr noundef nonnull @n, ptr noundef nonnull @buf)
  %3 = load i8, ptr @buf, align 16, !tbaa !5
  %4 = icmp eq i8 %3, 63
  %5 = load ptr, ptr @pat, align 8
  br i1 %4, label %.split.us.preheader, label %.split.preheader

.split.preheader:                                 ; preds = %0
  %6 = load i8, ptr %5, align 1, !tbaa !5
  %7 = icmp eq i8 %3, %6
  br i1 %7, label %14, label %.split.1

.split.us.preheader:                              ; preds = %0
  %8 = load <2 x i32>, ptr @f, align 4, !tbaa !8
  %9 = add nsw <2 x i32> %8, <i32 1, i32 1>
  store <2 x i32> %9, ptr @f, align 4, !tbaa !8
  br label %.preheader.sink.split

.preheader.sink.split:                            ; preds = %.split.2, %.split.us.preheader
  %10 = load i32, ptr getelementptr inbounds (i8, ptr @f, i64 8), align 4, !tbaa !8
  %11 = add nsw i32 %10, 1
  store i32 %11, ptr getelementptr inbounds (i8, ptr @f, i64 8), align 4, !tbaa !8
  br label %.preheader

.preheader:                                       ; preds = %.preheader.sink.split, %.split.2
  %12 = load i32, ptr @n, align 4, !tbaa !8
  %13 = icmp sgt i32 %12, 1
  br i1 %13, label %.lr.ph, label %._crit_edge

14:                                               ; preds = %.split.preheader
  %15 = load i32, ptr @f, align 4, !tbaa !8
  %16 = add nsw i32 %15, 1
  store i32 %16, ptr @f, align 4, !tbaa !8
  br label %.split.1

.split.1:                                         ; preds = %.split.preheader, %14
  %17 = getelementptr inbounds i8, ptr %5, i64 1
  %18 = load i8, ptr %17, align 1, !tbaa !5
  %19 = icmp eq i8 %3, %18
  br i1 %19, label %20, label %.split.2

20:                                               ; preds = %.split.1
  %21 = load i32, ptr getelementptr inbounds (i8, ptr @f, i64 4), align 4, !tbaa !8
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr getelementptr inbounds (i8, ptr @f, i64 4), align 4, !tbaa !8
  br label %.split.2

.split.2:                                         ; preds = %20, %.split.1
  %23 = getelementptr inbounds i8, ptr %5, i64 2
  %24 = load i8, ptr %23, align 1, !tbaa !5
  %25 = icmp eq i8 %3, %24
  br i1 %25, label %.preheader.sink.split, label %.preheader

._crit_edge:                                      ; preds = %69, %.preheader
  %26 = load i32, ptr @f, align 4, !tbaa !8
  %27 = load i32, ptr getelementptr inbounds (i8, ptr @f, i64 4), align 4, !tbaa !8
  %28 = add nsw i32 %27, %26
  %29 = load i32, ptr getelementptr inbounds (i8, ptr @f, i64 8), align 4, !tbaa !8
  %30 = add nsw i32 %28, %29
  %31 = icmp sgt i32 %30, 1
  %32 = select i1 %31, ptr @.str.2, ptr @.str.3
  %33 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %32)
  ret i32 0

.lr.ph:                                           ; preds = %.preheader, %69
  %indvars.iv = phi i64 [ %indvars.iv.next, %69 ], [ 1, %.preheader ]
  store i32 0, ptr getelementptr inbounds (i8, ptr @g, i64 8), align 4, !tbaa !8
  store i32 0, ptr getelementptr inbounds (i8, ptr @g, i64 4), align 4, !tbaa !8
  store i32 0, ptr @g, align 4, !tbaa !8
  %34 = getelementptr inbounds [100001 x i8], ptr @buf, i64 0, i64 %indvars.iv
  %35 = load i8, ptr %34, align 1, !tbaa !5
  %.not = icmp eq i8 %35, 63
  br i1 %.not, label %39, label %36

36:                                               ; preds = %.lr.ph
  %37 = load ptr, ptr @pat, align 8, !tbaa !10
  %38 = load i8, ptr %37, align 1, !tbaa !5
  %.not24 = icmp eq i8 %35, %38
  br i1 %.not24, label %39, label %.thread

39:                                               ; preds = %36, %.lr.ph
  %40 = load i32, ptr getelementptr inbounds (i8, ptr @f, i64 4), align 4, !tbaa !8
  %41 = load i32, ptr getelementptr inbounds (i8, ptr @f, i64 8), align 4, !tbaa !8
  %42 = add nsw i32 %40, %41
  store i32 %42, ptr @g, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  store i32 2, ptr %1, align 4, !tbaa !8
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @g, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %44 = load i32, ptr %43, align 4, !tbaa !8
  store i32 %44, ptr @g, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  %.pre = load i8, ptr %34, align 1, !tbaa !5
  %.not.1 = icmp eq i8 %.pre, 63
  br i1 %.not.1, label %49, label %.thread

.thread:                                          ; preds = %36, %39
  %45 = phi i8 [ %.pre, %39 ], [ %35, %36 ]
  %46 = load ptr, ptr @pat, align 8, !tbaa !10
  %47 = getelementptr inbounds i8, ptr %46, i64 1
  %48 = load i8, ptr %47, align 1, !tbaa !5
  %.not24.1 = icmp eq i8 %45, %48
  br i1 %.not24.1, label %49, label %.thread46

49:                                               ; preds = %.thread, %39
  %50 = load i32, ptr @f, align 4, !tbaa !8
  %51 = load i32, ptr getelementptr inbounds (i8, ptr @g, i64 4), align 4, !tbaa !8
  %52 = add nsw i32 %51, %50
  store i32 %52, ptr getelementptr inbounds (i8, ptr @g, i64 4), align 4, !tbaa !8
  %53 = load i32, ptr getelementptr inbounds (i8, ptr @f, i64 8), align 4, !tbaa !8
  %54 = add nsw i32 %52, %53
  store i32 %54, ptr getelementptr inbounds (i8, ptr @g, i64 4), align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  store i32 2, ptr %1, align 4, !tbaa !8
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @g, i64 4), ptr noundef nonnull align 4 dereferenceable(4) %1)
  %56 = load i32, ptr %55, align 4, !tbaa !8
  store i32 %56, ptr getelementptr inbounds (i8, ptr @g, i64 4), align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  %.pre42 = load i8, ptr %34, align 1, !tbaa !5
  %.not.2 = icmp eq i8 %.pre42, 63
  br i1 %.not.2, label %61, label %.thread46

.thread46:                                        ; preds = %.thread, %49
  %57 = phi i8 [ %.pre42, %49 ], [ %45, %.thread ]
  %58 = load ptr, ptr @pat, align 8, !tbaa !10
  %59 = getelementptr inbounds i8, ptr %58, i64 2
  %60 = load i8, ptr %59, align 1, !tbaa !5
  %.not24.2 = icmp eq i8 %57, %60
  br i1 %.not24.2, label %61, label %69

61:                                               ; preds = %49, %.thread46
  %62 = load i32, ptr @f, align 4, !tbaa !8
  %63 = load i32, ptr getelementptr inbounds (i8, ptr @g, i64 8), align 4, !tbaa !8
  %64 = add nsw i32 %63, %62
  store i32 %64, ptr getelementptr inbounds (i8, ptr @g, i64 8), align 4, !tbaa !8
  %65 = load i32, ptr getelementptr inbounds (i8, ptr @f, i64 4), align 4, !tbaa !8
  %66 = add nsw i32 %64, %65
  store i32 %66, ptr getelementptr inbounds (i8, ptr @g, i64 8), align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  store i32 2, ptr %1, align 4, !tbaa !8
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @g, i64 8), ptr noundef nonnull align 4 dereferenceable(4) %1)
  %68 = load i32, ptr %67, align 4, !tbaa !8
  store i32 %68, ptr getelementptr inbounds (i8, ptr @g, i64 8), align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  br label %69

69:                                               ; preds = %61, %.thread46
  call void @_ZSt4swapIiLm3EENSt9enable_ifIXsr14__is_swappableIT_EE5valueEvE4typeERAT0__S1_S5_(ptr noundef nonnull align 4 dereferenceable(12) @f, ptr noundef nonnull align 4 dereferenceable(12) @g) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %70 = load i32, ptr @n, align 4, !tbaa !8
  %71 = sext i32 %70 to i64
  %72 = icmp slt i64 %indvars.iv.next, %71
  br i1 %72, label %.lr.ph, label %._crit_edge, !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 @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiLm3EENSt9enable_ifIXsr14__is_swappableIT_EE5valueEvE4typeERAT0__S1_S5_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @puts(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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !6, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass