; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/280 Division 2/Problem D (D)

; 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_istream" = type { ptr, i64, %"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 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i64, align 8
@x = external dso_local global i64, align 8
@y = external dso_local global i64, align 8
@a = external dso_local global [100001 x i64], align 16
@s = external dso_local global [2000001 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 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 i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %7 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %8 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %10
  %12 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %11, ptr noundef null)
  %13 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %14 = getelementptr i8, ptr %13, i64 -24
  %15 = load i64, ptr %14, align 8
  %16 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %15
  %17 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %16, ptr noundef null)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @n)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(8) @x)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(8) @y)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 1, ptr %2, align 4, !tbaa !8
  br label %21

21:                                               ; preds = %32, %0
  %22 = load i32, ptr %2, align 4, !tbaa !8
  %23 = sext i32 %22 to i64
  %24 = load i64, ptr @n, align 8, !tbaa !11
  %25 = icmp sle i64 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %35

27:                                               ; preds = %21
  %28 = load i32, ptr %2, align 4, !tbaa !8
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [100001 x i64], ptr @a, i64 0, i64 %29
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %30)
  br label %32

32:                                               ; preds = %27
  %33 = load i32, ptr %2, align 4, !tbaa !8
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %2, align 4, !tbaa !8
  br label %21, !llvm.loop !13

35:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store i64 0, ptr %3, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store i64 0, ptr %4, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store i64 0, ptr %5, align 8, !tbaa !11
  br label %36

36:                                               ; preds = %90, %35
  %37 = load i64, ptr %3, align 8, !tbaa !11
  %38 = load i64, ptr @x, align 8, !tbaa !11
  %39 = icmp slt i64 %37, %38
  br i1 %39, label %40, label %44

40:                                               ; preds = %36
  %41 = load i64, ptr %4, align 8, !tbaa !11
  %42 = load i64, ptr @y, align 8, !tbaa !11
  %43 = icmp slt i64 %41, %42
  br label %44

44:                                               ; preds = %40, %36
  %45 = phi i1 [ false, %36 ], [ %43, %40 ]
  br i1 %45, label %46, label %91

46:                                               ; preds = %44
  %47 = load i64, ptr %3, align 8, !tbaa !11
  %48 = add nsw i64 %47, 1
  %49 = load i64, ptr @y, align 8, !tbaa !11
  %50 = mul nsw i64 %48, %49
  %51 = load i64, ptr %4, align 8, !tbaa !11
  %52 = add nsw i64 %51, 1
  %53 = load i64, ptr @x, align 8, !tbaa !11
  %54 = mul nsw i64 %52, %53
  %55 = icmp sgt i64 %50, %54
  br i1 %55, label %56, label %62

56:                                               ; preds = %46
  %57 = load i64, ptr %5, align 8, !tbaa !11
  %58 = add nsw i64 %57, 1
  store i64 %58, ptr %5, align 8, !tbaa !11
  %59 = getelementptr inbounds [2000001 x i64], ptr @s, i64 0, i64 %57
  store i64 2, ptr %59, align 8, !tbaa !11
  %60 = load i64, ptr %4, align 8, !tbaa !11
  %61 = add nsw i64 %60, 1
  store i64 %61, ptr %4, align 8, !tbaa !11
  br label %90

62:                                               ; preds = %46
  %63 = load i64, ptr %3, align 8, !tbaa !11
  %64 = add nsw i64 %63, 1
  %65 = load i64, ptr @y, align 8, !tbaa !11
  %66 = mul nsw i64 %64, %65
  %67 = load i64, ptr %4, align 8, !tbaa !11
  %68 = add nsw i64 %67, 1
  %69 = load i64, ptr @x, align 8, !tbaa !11
  %70 = mul nsw i64 %68, %69
  %71 = icmp slt i64 %66, %70
  br i1 %71, label %72, label %78

72:                                               ; preds = %62
  %73 = load i64, ptr %5, align 8, !tbaa !11
  %74 = add nsw i64 %73, 1
  store i64 %74, ptr %5, align 8, !tbaa !11
  %75 = getelementptr inbounds [2000001 x i64], ptr @s, i64 0, i64 %73
  store i64 1, ptr %75, align 8, !tbaa !11
  %76 = load i64, ptr %3, align 8, !tbaa !11
  %77 = add nsw i64 %76, 1
  store i64 %77, ptr %3, align 8, !tbaa !11
  br label %89

78:                                               ; preds = %62
  %79 = load i64, ptr %5, align 8, !tbaa !11
  %80 = add nsw i64 %79, 1
  store i64 %80, ptr %5, align 8, !tbaa !11
  %81 = getelementptr inbounds [2000001 x i64], ptr @s, i64 0, i64 %79
  store i64 3, ptr %81, align 8, !tbaa !11
  %82 = load i64, ptr %5, align 8, !tbaa !11
  %83 = add nsw i64 %82, 1
  store i64 %83, ptr %5, align 8, !tbaa !11
  %84 = getelementptr inbounds [2000001 x i64], ptr @s, i64 0, i64 %82
  store i64 3, ptr %84, align 8, !tbaa !11
  %85 = load i64, ptr %3, align 8, !tbaa !11
  %86 = add nsw i64 %85, 1
  store i64 %86, ptr %3, align 8, !tbaa !11
  %87 = load i64, ptr %4, align 8, !tbaa !11
  %88 = add nsw i64 %87, 1
  store i64 %88, ptr %4, align 8, !tbaa !11
  br label %89

89:                                               ; preds = %78, %72
  br label %90

90:                                               ; preds = %89, %56
  br label %36, !llvm.loop !15

91:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 1, ptr %6, align 4, !tbaa !8
  br label %92

92:                                               ; preds = %132, %91
  %93 = load i32, ptr %6, align 4, !tbaa !8
  %94 = sext i32 %93 to i64
  %95 = load i64, ptr @n, align 8, !tbaa !11
  %96 = icmp sle i64 %94, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %135

98:                                               ; preds = %92
  %99 = load i32, ptr %6, align 4, !tbaa !8
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [100001 x i64], ptr @a, i64 0, i64 %100
  %102 = load i64, ptr %101, align 8, !tbaa !11
  %103 = sub nsw i64 %102, 1
  %104 = load i64, ptr @x, align 8, !tbaa !11
  %105 = load i64, ptr @y, align 8, !tbaa !11
  %106 = add nsw i64 %104, %105
  %107 = srem i64 %103, %106
  %108 = getelementptr inbounds [2000001 x i64], ptr @s, i64 0, i64 %107
  %109 = load i64, ptr %108, align 8, !tbaa !11
  %110 = icmp eq i64 %109, 1
  br i1 %110, label %111, label %113

111:                                              ; preds = %98
  %112 = call i32 @puts(ptr noundef @.str)
  br label %131

113:                                              ; preds = %98
  %114 = load i32, ptr %6, align 4, !tbaa !8
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [100001 x i64], ptr @a, i64 0, i64 %115
  %117 = load i64, ptr %116, align 8, !tbaa !11
  %118 = sub nsw i64 %117, 1
  %119 = load i64, ptr @x, align 8, !tbaa !11
  %120 = load i64, ptr @y, align 8, !tbaa !11
  %121 = add nsw i64 %119, %120
  %122 = srem i64 %118, %121
  %123 = getelementptr inbounds [2000001 x i64], ptr @s, i64 0, i64 %122
  %124 = load i64, ptr %123, align 8, !tbaa !11
  %125 = icmp eq i64 %124, 2
  br i1 %125, label %126, label %128

126:                                              ; preds = %113
  %127 = call i32 @puts(ptr noundef @.str.1)
  br label %130

128:                                              ; preds = %113
  %129 = call i32 @puts(ptr noundef @.str.2)
  br label %130

130:                                              ; preds = %128, %126
  br label %131

131:                                              ; preds = %130, %111
  br label %132

132:                                              ; preds = %131
  %133 = load i32, ptr %6, align 4, !tbaa !8
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %6, align 4, !tbaa !8
  br label %92, !llvm.loop !16

135:                                              ; preds = %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

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

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 = { 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 #3 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; 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_istream" = type { ptr, i64, %"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 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i64, align 8
@x = external dso_local global i64, align 8
@y = external dso_local global i64, align 8
@a = external dso_local global [100001 x i64], align 16
@s = external dso_local local_unnamed_addr global [2000001 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %2 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %3 = getelementptr i8, ptr %2, i64 -24
  %4 = load i64, ptr %3, align 8
  %5 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %4
  %6 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %5, ptr noundef null)
  %7 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @n)
  %13 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(8) @x)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) @y)
  %15 = load i64, ptr @n, align 8, !tbaa !8
  %.not36 = icmp slt i64 %15, 1
  br i1 %.not36, label %.preheader35, label %.lr.ph

.preheader35.loopexit:                            ; preds = %.lr.ph
  %16 = icmp slt i64 %24, 1
  br label %.preheader35

.preheader35:                                     ; preds = %.preheader35.loopexit, %0
  %.not3442 = phi i1 [ %16, %.preheader35.loopexit ], [ true, %0 ]
  %17 = load i64, ptr @x, align 8, !tbaa !8
  %18 = load i64, ptr @y, align 8
  %19 = icmp sgt i64 %17, 0
  %20 = icmp sgt i64 %18, 0
  %21 = select i1 %19, i1 %20, i1 false
  br i1 %21, label %.lr.ph41, label %.preheader

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %22 = getelementptr inbounds [100001 x i64], ptr @a, i64 0, i64 %indvars.iv
  %23 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %22)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %24 = load i64, ptr @n, align 8, !tbaa !8
  %.not.not = icmp sgt i64 %24, %indvars.iv
  br i1 %.not.not, label %.lr.ph, label %.preheader35.loopexit, !llvm.loop !11

.preheader:                                       ; preds = %41, %.preheader35
  br i1 %.not3442, label %._crit_edge, label %.lr.ph44

.lr.ph41:                                         ; preds = %.preheader35, %41
  %.02140 = phi i64 [ %.1, %41 ], [ 0, %.preheader35 ]
  %.02239 = phi i64 [ %.123, %41 ], [ 0, %.preheader35 ]
  %.02438 = phi i64 [ %.125, %41 ], [ 0, %.preheader35 ]
  %25 = add nsw i64 %.02438, 1
  %26 = mul nsw i64 %18, %25
  %27 = add nsw i64 %.02239, 1
  %28 = mul nsw i64 %17, %27
  %29 = icmp sgt i64 %26, %28
  br i1 %29, label %30, label %33

30:                                               ; preds = %.lr.ph41
  %31 = add nsw i64 %.02140, 1
  %32 = getelementptr inbounds [2000001 x i64], ptr @s, i64 0, i64 %.02140
  store i64 2, ptr %32, align 8, !tbaa !8
  br label %41

33:                                               ; preds = %.lr.ph41
  %34 = icmp slt i64 %26, %28
  %35 = add nsw i64 %.02140, 1
  %36 = getelementptr inbounds [2000001 x i64], ptr @s, i64 0, i64 %.02140
  br i1 %34, label %37, label %38

37:                                               ; preds = %33
  store i64 1, ptr %36, align 8, !tbaa !8
  br label %41

38:                                               ; preds = %33
  store i64 3, ptr %36, align 8, !tbaa !8
  %39 = add nsw i64 %.02140, 2
  %40 = getelementptr inbounds [2000001 x i64], ptr @s, i64 0, i64 %35
  store i64 3, ptr %40, align 8, !tbaa !8
  br label %41

41:                                               ; preds = %37, %38, %30
  %.125 = phi i64 [ %.02438, %30 ], [ %25, %37 ], [ %25, %38 ]
  %.123 = phi i64 [ %27, %30 ], [ %.02239, %37 ], [ %27, %38 ]
  %.1 = phi i64 [ %31, %30 ], [ %35, %37 ], [ %39, %38 ]
  %42 = icmp slt i64 %.125, %17
  %43 = icmp slt i64 %.123, %18
  %44 = select i1 %42, i1 %43, i1 false
  br i1 %44, label %.lr.ph41, label %.preheader, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph44, %.preheader
  ret i32 0

.lr.ph44:                                         ; preds = %.preheader, %.lr.ph44
  %indvars.iv46 = phi i64 [ %indvars.iv.next47, %.lr.ph44 ], [ 1, %.preheader ]
  %45 = getelementptr inbounds [100001 x i64], ptr @a, i64 0, i64 %indvars.iv46
  %46 = load i64, ptr %45, align 8, !tbaa !8
  %47 = add nsw i64 %46, -1
  %48 = load i64, ptr @x, align 8, !tbaa !8
  %49 = load i64, ptr @y, align 8, !tbaa !8
  %50 = add nsw i64 %49, %48
  %51 = srem i64 %47, %50
  %52 = getelementptr inbounds [2000001 x i64], ptr @s, i64 0, i64 %51
  %53 = load i64, ptr %52, align 8, !tbaa !8
  %switch.selectcmp = icmp eq i64 %53, 2
  %switch.select = select i1 %switch.selectcmp, ptr @.str.1, ptr @.str.2
  %switch.selectcmp49 = icmp eq i64 %53, 1
  %switch.select50 = select i1 %switch.selectcmp49, ptr @.str, ptr %switch.select
  %54 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) %switch.select50)
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  %55 = load i64, ptr @n, align 8, !tbaa !8
  %.not34.not = icmp sgt i64 %55, %indvars.iv46
  br i1 %.not34.not, label %.lr.ph44, label %._crit_edge, !llvm.loop !14
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

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

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}


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