; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/IPC/IPC15P1A/Problem G (G)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@MOD = external dso_local global i64, align 8
@f = external dso_local global [1048576 x i64], align 16
@invf = external dso_local global [1048576 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z4fastxxx(i64 noundef, i64 noundef, i64 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: 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 noundef i64 @_Z1xi(i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z1yi(i32 noundef) #2

; 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)
  %11 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %13
  %15 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(8) @MOD)
  store i64 1, ptr @f, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 1, ptr %3, align 4, !tbaa !11
  br label %18

18:                                               ; preds = %37, %0
  %19 = load i32, ptr %3, align 4, !tbaa !11
  %20 = load i32, ptr %2, align 4, !tbaa !11
  %21 = icmp sle i32 %19, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %40

23:                                               ; preds = %18
  %24 = load i32, ptr %3, align 4, !tbaa !11
  %25 = sub nsw i32 %24, 1
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [1048576 x i64], ptr @f, i64 0, i64 %26
  %28 = load i64, ptr %27, align 8, !tbaa !8
  %29 = load i32, ptr %3, align 4, !tbaa !11
  %30 = sext i32 %29 to i64
  %31 = mul nsw i64 %28, %30
  %32 = load i64, ptr @MOD, align 8, !tbaa !8
  %33 = srem i64 %31, %32
  %34 = load i32, ptr %3, align 4, !tbaa !11
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [1048576 x i64], ptr @f, i64 0, i64 %35
  store i64 %33, ptr %36, align 8, !tbaa !8
  br label %37

37:                                               ; preds = %23
  %38 = load i32, ptr %3, align 4, !tbaa !11
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %3, align 4, !tbaa !11
  br label %18, !llvm.loop !13

40:                                               ; preds = %22
  %41 = load i32, ptr %2, align 4, !tbaa !11
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [1048576 x i64], ptr @f, i64 0, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !8
  %45 = load i64, ptr @MOD, align 8, !tbaa !8
  %46 = sub nsw i64 %45, 2
  %47 = load i64, ptr @MOD, align 8, !tbaa !8
  %48 = call noundef i64 @_Z4fastxxx(i64 noundef %44, i64 noundef %46, i64 noundef %47)
  %49 = load i32, ptr %2, align 4, !tbaa !11
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [1048576 x i64], ptr @invf, i64 0, i64 %50
  store i64 %48, ptr %51, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %52 = load i32, ptr %2, align 4, !tbaa !11
  %53 = sub nsw i32 %52, 1
  store i32 %53, ptr %4, align 4, !tbaa !11
  br label %54

54:                                               ; preds = %73, %40
  %55 = load i32, ptr %4, align 4, !tbaa !11
  %56 = icmp sge i32 %55, 0
  br i1 %56, label %58, label %57

57:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %76

58:                                               ; preds = %54
  %59 = load i32, ptr %4, align 4, !tbaa !11
  %60 = add nsw i32 %59, 1
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [1048576 x i64], ptr @invf, i64 0, i64 %61
  %63 = load i64, ptr %62, align 8, !tbaa !8
  %64 = load i32, ptr %4, align 4, !tbaa !11
  %65 = add nsw i32 %64, 1
  %66 = sext i32 %65 to i64
  %67 = mul nsw i64 %63, %66
  %68 = load i64, ptr @MOD, align 8, !tbaa !8
  %69 = srem i64 %67, %68
  %70 = load i32, ptr %4, align 4, !tbaa !11
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [1048576 x i64], ptr @invf, i64 0, i64 %71
  store i64 %69, ptr %72, align 8, !tbaa !8
  br label %73

73:                                               ; preds = %58
  %74 = load i32, ptr %4, align 4, !tbaa !11
  %75 = add nsw i32 %74, -1
  store i32 %75, ptr %4, align 4, !tbaa !11
  br label %54, !llvm.loop !15

76:                                               ; preds = %57
  %77 = load i32, ptr %2, align 4, !tbaa !11
  %78 = load i32, ptr %2, align 4, !tbaa !11
  %79 = add nsw i32 %78, 1
  %80 = and i32 %77, %79
  %81 = icmp eq i32 %80, 0
  br i1 %81, label %82, label %85

82:                                               ; preds = %76
  %83 = load i32, ptr %2, align 4, !tbaa !11
  %84 = call noundef i64 @_Z1xi(i32 noundef %83)
  br label %88

85:                                               ; preds = %76
  %86 = load i32, ptr %2, align 4, !tbaa !11
  %87 = call noundef i64 @_Z1yi(i32 noundef %86)
  br label %88

88:                                               ; preds = %85, %82
  %89 = phi i64 [ %84, %82 ], [ %87, %85 ]
  %90 = call i32 (ptr, ...) @printf(ptr noundef @.str, i64 noundef %89)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  ret i32 0
}

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) #0 align 2

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 noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

declare i32 @printf(ptr noundef, ...) #4

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !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_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" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@MOD = external dso_local global i64, align 8
@f = external dso_local local_unnamed_addr global [1048576 x i64], align 16
@invf = external dso_local local_unnamed_addr global [1048576 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z4fastxxx(i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress 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 noundef i64 @_Z1xi(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z1yi(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i32, align 4
  %2 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %3 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %4 = getelementptr i8, ptr %3, i64 -24
  %5 = load i64, ptr %4, align 8
  %6 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %5
  %7 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %6, ptr noundef null)
  %8 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %10
  %12 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %11, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) @MOD)
  store i64 1, ptr @f, align 16, !tbaa !8
  %15 = load i32, ptr %1, align 4, !tbaa !11
  %.not12 = icmp slt i32 %15, 1
  %.pre = load i64, ptr @MOD, align 8, !tbaa !8
  br i1 %.not12, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %0
  %16 = zext nneg i32 %15 to i64
  %xtraiter = and i64 %16, 1
  %17 = icmp eq i32 %15, 1
  br i1 %17, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %16, 2147483646
  br label %36

._crit_edge.loopexit.unr-lcssa:                   ; preds = %36, %.lr.ph
  %.unr = phi i64 [ 1, %.lr.ph ], [ %42, %36 ]
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next.1, %36 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %._crit_edge.loopexit.epilog-lcssa

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %18 = mul nsw i64 %.unr, %indvars.iv.unr
  %19 = srem i64 %18, %.pre
  %20 = getelementptr inbounds [1048576 x i64], ptr @f, i64 0, i64 %indvars.iv.unr
  store i64 %19, ptr %20, align 8, !tbaa !8
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %0
  %21 = sext i32 %15 to i64
  %22 = getelementptr inbounds [1048576 x i64], ptr @f, i64 0, i64 %21
  %23 = load i64, ptr %22, align 8, !tbaa !8
  %24 = add nsw i64 %.pre, -2
  %25 = call noundef i64 @_Z4fastxxx(i64 noundef %23, i64 noundef %24, i64 noundef %.pre)
  %26 = load i32, ptr %1, align 4, !tbaa !11
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [1048576 x i64], ptr @invf, i64 0, i64 %27
  store i64 %25, ptr %28, align 8, !tbaa !8
  %29 = icmp sgt i32 %26, 0
  br i1 %29, label %.lr.ph16, label %._crit_edge17

.lr.ph16:                                         ; preds = %._crit_edge
  %30 = load i64, ptr @MOD, align 8, !tbaa !8
  %31 = zext nneg i32 %26 to i64
  %.phi.trans.insert = getelementptr inbounds [1048576 x i64], ptr @invf, i64 0, i64 %31
  %.pre22 = load i64, ptr %.phi.trans.insert, align 8, !tbaa !8
  %xtraiter23 = and i64 %31, 1
  %lcmp.mod24.not = icmp eq i64 %xtraiter23, 0
  br i1 %lcmp.mod24.not, label %.prol.loopexit, label %.prol.loopexit.unr-lcssa

.prol.loopexit.unr-lcssa:                         ; preds = %.lr.ph16
  %indvars.iv.next20.prol = add nsw i64 %31, -1
  %32 = mul nsw i64 %.pre22, %31
  %33 = srem i64 %32, %30
  %34 = getelementptr inbounds [1048576 x i64], ptr @invf, i64 0, i64 %indvars.iv.next20.prol
  store i64 %33, ptr %34, align 8, !tbaa !8
  br label %.prol.loopexit

.prol.loopexit:                                   ; preds = %.prol.loopexit.unr-lcssa, %.lr.ph16
  %.unr25 = phi i64 [ %.pre22, %.lr.ph16 ], [ %33, %.prol.loopexit.unr-lcssa ]
  %indvars.iv19.unr = phi i64 [ %31, %.lr.ph16 ], [ %indvars.iv.next20.prol, %.prol.loopexit.unr-lcssa ]
  %35 = icmp eq i32 %26, 1
  br i1 %35, label %._crit_edge17, label %.lr.ph16.new

36:                                               ; preds = %36, %.lr.ph.new
  %37 = phi i64 [ 1, %.lr.ph.new ], [ %42, %36 ]
  %indvars.iv = phi i64 [ 1, %.lr.ph.new ], [ %indvars.iv.next.1, %36 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %36 ]
  %38 = mul nsw i64 %37, %indvars.iv
  %39 = srem i64 %38, %.pre
  %40 = getelementptr inbounds [1048576 x i64], ptr @f, i64 0, i64 %indvars.iv
  store i64 %39, ptr %40, align 8, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %41 = mul nsw i64 %39, %indvars.iv.next
  %42 = srem i64 %41, %.pre
  %43 = getelementptr inbounds [1048576 x i64], ptr @f, i64 0, i64 %indvars.iv.next
  store i64 %42, ptr %43, align 8, !tbaa !8
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %36, !llvm.loop !13

._crit_edge17:                                    ; preds = %.prol.loopexit, %.lr.ph16.new, %._crit_edge
  %44 = add nsw i32 %26, 1
  %45 = and i32 %44, %26
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %55, label %57

.lr.ph16.new:                                     ; preds = %.prol.loopexit, %.lr.ph16.new
  %47 = phi i64 [ %52, %.lr.ph16.new ], [ %.unr25, %.prol.loopexit ]
  %indvars.iv19 = phi i64 [ %indvars.iv.next20.1, %.lr.ph16.new ], [ %indvars.iv19.unr, %.prol.loopexit ]
  %indvars.iv.next20 = add nsw i64 %indvars.iv19, -1
  %48 = mul nsw i64 %47, %indvars.iv19
  %49 = srem i64 %48, %30
  %50 = getelementptr inbounds [1048576 x i64], ptr @invf, i64 0, i64 %indvars.iv.next20
  store i64 %49, ptr %50, align 8, !tbaa !8
  %indvars.iv.next20.1 = add nsw i64 %indvars.iv19, -2
  %51 = mul nsw i64 %49, %indvars.iv.next20
  %52 = srem i64 %51, %30
  %53 = getelementptr inbounds [1048576 x i64], ptr @invf, i64 0, i64 %indvars.iv.next20.1
  store i64 %52, ptr %53, align 8, !tbaa !8
  %54 = icmp ugt i64 %indvars.iv.next20, 1
  br i1 %54, label %.lr.ph16.new, label %._crit_edge17, !llvm.loop !15

55:                                               ; preds = %._crit_edge17
  %56 = call noundef i64 @_Z1xi(i32 noundef %26)
  br label %59

57:                                               ; preds = %._crit_edge17
  %58 = call noundef i64 @_Z1yi(i32 noundef %26)
  br label %59

59:                                               ; preds = %57, %55
  %60 = phi i64 [ %56, %55 ], [ %58, %57 ]
  %61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %60)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0
}

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

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

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 #4

; 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 #2 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 #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 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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