; LLVM IR from Izaron/ACM-ICPC :: Timus Online Judge/Volume 5/1495. One-two, One-two 2 (main)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }

@calced = external dso_local global [1000005 x [31 x i16]], align 16
@gen = external dso_local global %"class.std::vector", align 8
@n = external dso_local global i32, align 4
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef signext i16 @_Z4calcii(i32 noundef, i32 noundef) #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5vosstii(i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %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 noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %6 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %7 = getelementptr i8, ptr %6, i64 -24
  %8 = load i64, ptr %7, align 8
  %9 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %8
  %10 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %9, ptr noundef null)
  call void @llvm.memset.p0.i64(ptr align 16 @calced, i8 -1, i64 62000310, i1 false)
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @gen, i64 noundef 31)
  %12 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @gen, i64 noundef 0) #7
  store i32 1, ptr %12, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 1, ptr %2, align 4, !tbaa !8
  br label %13

13:                                               ; preds = %33, %0
  %14 = load i32, ptr %2, align 4, !tbaa !8
  %15 = icmp slt i32 %14, 31
  br i1 %15, label %17, label %16

16:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %36

17:                                               ; preds = %13
  %18 = load i32, ptr %2, align 4, !tbaa !8
  %19 = sub nsw i32 %18, 1
  %20 = sext i32 %19 to i64
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @gen, i64 noundef %20) #7
  %22 = load i32, ptr %21, align 4, !tbaa !8
  %23 = mul nsw i32 %22, 10
  %24 = load i32, ptr %2, align 4, !tbaa !8
  %25 = sext i32 %24 to i64
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @gen, i64 noundef %25) #7
  store i32 %23, ptr %26, align 4, !tbaa !8
  %27 = load i32, ptr @n, align 4, !tbaa !8
  %28 = load i32, ptr %2, align 4, !tbaa !8
  %29 = sext i32 %28 to i64
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @gen, i64 noundef %29) #7
  %31 = load i32, ptr %30, align 4, !tbaa !8
  %32 = srem i32 %31, %27
  store i32 %32, ptr %30, align 4, !tbaa !8
  br label %33

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

36:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !8
  br label %37

37:                                               ; preds = %52, %36
  br label %38

38:                                               ; preds = %37
  %39 = load i32, ptr %3, align 4, !tbaa !8
  %40 = call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef %39)
  %41 = sext i16 %40 to i32
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %43, label %44

43:                                               ; preds = %38
  br label %53

44:                                               ; preds = %38
  %45 = load i32, ptr %3, align 4, !tbaa !8
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %3, align 4, !tbaa !8
  %47 = load i32, ptr %3, align 4, !tbaa !8
  %48 = icmp sge i32 %47, 30
  br i1 %48, label %49, label %52

49:                                               ; preds = %44
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %56

52:                                               ; preds = %44
  br label %37, !llvm.loop !13

53:                                               ; preds = %43
  %54 = load i32, ptr %3, align 4, !tbaa !8
  call void @_Z5vosstii(i32 noundef 0, i32 noundef %54)
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %4, align 4
  br label %56

56:                                               ; preds = %53, %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  %57 = load i32, ptr %4, align 4
  switch i32 %57, label %60 [
    i32 0, label %58
    i32 1, label %58
  ]

58:                                               ; preds = %56, %56
  %59 = load i32, ptr %1, align 4
  ret i32 %59

60:                                               ; preds = %56
  unreachable
}

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

; 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 #4 = { "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 #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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 }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }

@calced = external dso_local local_unnamed_addr global [1000005 x [31 x i16]], align 16
@gen = external dso_local global %"class.std::vector", align 8
@n = external dso_local global i32, align 4
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef signext i16 @_Z4calcii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5vosstii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %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)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(62000310) @calced, i8 -1, i64 62000310, i1 false)
  %7 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  tail call void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) @gen, i64 noundef 31)
  %8 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @gen, i64 noundef 0) #6
  store i32 1, ptr %8, align 4, !tbaa !8
  br label %9

9:                                                ; preds = %0, %9
  %indvars.iv = phi i64 [ 1, %0 ], [ %indvars.iv.next, %9 ]
  %10 = add nsw i64 %indvars.iv, -1
  %11 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @gen, i64 noundef %10) #6
  %12 = load i32, ptr %11, align 4, !tbaa !8
  %13 = mul nsw i32 %12, 10
  %14 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @gen, i64 noundef %indvars.iv) #6
  store i32 %13, ptr %14, align 4, !tbaa !8
  %15 = load i32, ptr @n, align 4, !tbaa !8
  %16 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @gen, i64 noundef %indvars.iv) #6
  %17 = load i32, ptr %16, align 4, !tbaa !8
  %18 = srem i32 %17, %15
  store i32 %18, ptr %16, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 31
  br i1 %exitcond.not, label %.preheader.preheader, label %9, !llvm.loop !11

.preheader.preheader:                             ; preds = %9
  %19 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 0)
  %.not = icmp eq i16 %19, 0
  br i1 %.not, label %.preheader.1, label %51

.preheader.1:                                     ; preds = %.preheader.preheader
  %20 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 1)
  %.not.1 = icmp eq i16 %20, 0
  br i1 %.not.1, label %.preheader.2, label %51

.preheader.2:                                     ; preds = %.preheader.1
  %21 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 2)
  %.not.2 = icmp eq i16 %21, 0
  br i1 %.not.2, label %.preheader.3, label %51

.preheader.3:                                     ; preds = %.preheader.2
  %22 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 3)
  %.not.3 = icmp eq i16 %22, 0
  br i1 %.not.3, label %.preheader.4, label %51

.preheader.4:                                     ; preds = %.preheader.3
  %23 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 4)
  %.not.4 = icmp eq i16 %23, 0
  br i1 %.not.4, label %.preheader.5, label %51

.preheader.5:                                     ; preds = %.preheader.4
  %24 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 5)
  %.not.5 = icmp eq i16 %24, 0
  br i1 %.not.5, label %.preheader.6, label %51

.preheader.6:                                     ; preds = %.preheader.5
  %25 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 6)
  %.not.6 = icmp eq i16 %25, 0
  br i1 %.not.6, label %.preheader.7, label %51

.preheader.7:                                     ; preds = %.preheader.6
  %26 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 7)
  %.not.7 = icmp eq i16 %26, 0
  br i1 %.not.7, label %.preheader.8, label %51

.preheader.8:                                     ; preds = %.preheader.7
  %27 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 8)
  %.not.8 = icmp eq i16 %27, 0
  br i1 %.not.8, label %.preheader.9, label %51

.preheader.9:                                     ; preds = %.preheader.8
  %28 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 9)
  %.not.9 = icmp eq i16 %28, 0
  br i1 %.not.9, label %.preheader.10, label %51

.preheader.10:                                    ; preds = %.preheader.9
  %29 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 10)
  %.not.10 = icmp eq i16 %29, 0
  br i1 %.not.10, label %.preheader.11, label %51

.preheader.11:                                    ; preds = %.preheader.10
  %30 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 11)
  %.not.11 = icmp eq i16 %30, 0
  br i1 %.not.11, label %.preheader.12, label %51

.preheader.12:                                    ; preds = %.preheader.11
  %31 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 12)
  %.not.12 = icmp eq i16 %31, 0
  br i1 %.not.12, label %.preheader.13, label %51

.preheader.13:                                    ; preds = %.preheader.12
  %32 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 13)
  %.not.13 = icmp eq i16 %32, 0
  br i1 %.not.13, label %.preheader.14, label %51

.preheader.14:                                    ; preds = %.preheader.13
  %33 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 14)
  %.not.14 = icmp eq i16 %33, 0
  br i1 %.not.14, label %.preheader.15, label %51

.preheader.15:                                    ; preds = %.preheader.14
  %34 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 15)
  %.not.15 = icmp eq i16 %34, 0
  br i1 %.not.15, label %.preheader.16, label %51

.preheader.16:                                    ; preds = %.preheader.15
  %35 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 16)
  %.not.16 = icmp eq i16 %35, 0
  br i1 %.not.16, label %.preheader.17, label %51

.preheader.17:                                    ; preds = %.preheader.16
  %36 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 17)
  %.not.17 = icmp eq i16 %36, 0
  br i1 %.not.17, label %.preheader.18, label %51

.preheader.18:                                    ; preds = %.preheader.17
  %37 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 18)
  %.not.18 = icmp eq i16 %37, 0
  br i1 %.not.18, label %.preheader.19, label %51

.preheader.19:                                    ; preds = %.preheader.18
  %38 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 19)
  %.not.19 = icmp eq i16 %38, 0
  br i1 %.not.19, label %.preheader.20, label %51

.preheader.20:                                    ; preds = %.preheader.19
  %39 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 20)
  %.not.20 = icmp eq i16 %39, 0
  br i1 %.not.20, label %.preheader.21, label %51

.preheader.21:                                    ; preds = %.preheader.20
  %40 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 21)
  %.not.21 = icmp eq i16 %40, 0
  br i1 %.not.21, label %.preheader.22, label %51

.preheader.22:                                    ; preds = %.preheader.21
  %41 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 22)
  %.not.22 = icmp eq i16 %41, 0
  br i1 %.not.22, label %.preheader.23, label %51

.preheader.23:                                    ; preds = %.preheader.22
  %42 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 23)
  %.not.23 = icmp eq i16 %42, 0
  br i1 %.not.23, label %.preheader.24, label %51

.preheader.24:                                    ; preds = %.preheader.23
  %43 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 24)
  %.not.24 = icmp eq i16 %43, 0
  br i1 %.not.24, label %.preheader.25, label %51

.preheader.25:                                    ; preds = %.preheader.24
  %44 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 25)
  %.not.25 = icmp eq i16 %44, 0
  br i1 %.not.25, label %.preheader.26, label %51

.preheader.26:                                    ; preds = %.preheader.25
  %45 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 26)
  %.not.26 = icmp eq i16 %45, 0
  br i1 %.not.26, label %.preheader.27, label %51

.preheader.27:                                    ; preds = %.preheader.26
  %46 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 27)
  %.not.27 = icmp eq i16 %46, 0
  br i1 %.not.27, label %.preheader.28, label %51

.preheader.28:                                    ; preds = %.preheader.27
  %47 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 28)
  %.not.28 = icmp eq i16 %47, 0
  br i1 %.not.28, label %.preheader.29, label %51

.preheader.29:                                    ; preds = %.preheader.28
  %48 = tail call noundef signext i16 @_Z4calcii(i32 noundef 0, i32 noundef 29)
  %.not.29 = icmp eq i16 %48, 0
  br i1 %.not.29, label %49, label %51

49:                                               ; preds = %.preheader.29
  %50 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  br label %52

51:                                               ; preds = %.preheader.29, %.preheader.28, %.preheader.27, %.preheader.26, %.preheader.25, %.preheader.24, %.preheader.23, %.preheader.22, %.preheader.21, %.preheader.20, %.preheader.19, %.preheader.18, %.preheader.17, %.preheader.16, %.preheader.15, %.preheader.14, %.preheader.13, %.preheader.12, %.preheader.11, %.preheader.10, %.preheader.9, %.preheader.8, %.preheader.7, %.preheader.6, %.preheader.5, %.preheader.4, %.preheader.3, %.preheader.2, %.preheader.1, %.preheader.preheader
  %.0.lcssa = phi i32 [ 0, %.preheader.preheader ], [ 1, %.preheader.1 ], [ 2, %.preheader.2 ], [ 3, %.preheader.3 ], [ 4, %.preheader.4 ], [ 5, %.preheader.5 ], [ 6, %.preheader.6 ], [ 7, %.preheader.7 ], [ 8, %.preheader.8 ], [ 9, %.preheader.9 ], [ 10, %.preheader.10 ], [ 11, %.preheader.11 ], [ 12, %.preheader.12 ], [ 13, %.preheader.13 ], [ 14, %.preheader.14 ], [ 15, %.preheader.15 ], [ 16, %.preheader.16 ], [ 17, %.preheader.17 ], [ 18, %.preheader.18 ], [ 19, %.preheader.19 ], [ 20, %.preheader.20 ], [ 21, %.preheader.21 ], [ 22, %.preheader.22 ], [ 23, %.preheader.23 ], [ 24, %.preheader.24 ], [ 25, %.preheader.25 ], [ 26, %.preheader.26 ], [ 27, %.preheader.27 ], [ 28, %.preheader.28 ], [ 29, %.preheader.29 ]
  tail call void @_Z5vosstii(i32 noundef 0, i32 noundef %.0.lcssa)
  br label %52

52:                                               ; preds = %51, %49
  %_ZSt4cout.sink = phi ptr [ @_ZSt4cout, %51 ], [ %50, %49 ]
  %53 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %_ZSt4cout.sink, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

attributes #0 = { 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 #1 = { 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 #2 = { 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 #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" }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass,TailCallElimPass