; LLVM IR from abhisheknaiidu/dsa :: Other/Codechef/Problems (Gcd-Queries)

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

@pre = external dso_local global [100005 x i64], align 16
@suf = external dso_local global [100005 x i64], align 16
@a = external dso_local global [100001 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z14abhisheknaiiduv() #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z3gcdxx(i64 noundef, i64 noundef) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @_Z14abhisheknaiiduv()
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  br label %11

11:                                               ; preds = %92, %0
  %12 = load i64, ptr %2, align 8, !tbaa !5
  %13 = add nsw i64 %12, -1
  store i64 %13, ptr %2, align 8, !tbaa !5
  %14 = icmp ne i64 %12, 0
  br i1 %14, label %15, label %93

15:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %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) %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store i64 1, ptr %5, align 8, !tbaa !5
  br label %18

18:                                               ; preds = %27, %15
  %19 = load i64, ptr %5, align 8, !tbaa !5
  %20 = load i64, ptr %3, align 8, !tbaa !5
  %21 = icmp sle i64 %19, %20
  br i1 %21, label %23, label %22

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

23:                                               ; preds = %18
  %24 = load i64, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds [100001 x i64], ptr @a, i64 0, i64 %24
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %25)
  br label %27

27:                                               ; preds = %23
  %28 = load i64, ptr %5, align 8, !tbaa !5
  %29 = add nsw i64 %28, 1
  store i64 %29, ptr %5, align 8, !tbaa !5
  br label %18, !llvm.loop !9

30:                                               ; preds = %22
  %31 = load i64, ptr %3, align 8, !tbaa !5
  %32 = add nsw i64 %31, 1
  %33 = getelementptr inbounds [100005 x i64], ptr @suf, i64 0, i64 %32
  store i64 0, ptr %33, align 8, !tbaa !5
  store i64 0, ptr @pre, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store i64 1, ptr %6, align 8, !tbaa !5
  br label %34

34:                                               ; preds = %50, %30
  %35 = load i64, ptr %6, align 8, !tbaa !5
  %36 = load i64, ptr %3, align 8, !tbaa !5
  %37 = icmp sle i64 %35, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %53

39:                                               ; preds = %34
  %40 = load i64, ptr %6, align 8, !tbaa !5
  %41 = sub nsw i64 %40, 1
  %42 = getelementptr inbounds [100005 x i64], ptr @pre, i64 0, i64 %41
  %43 = load i64, ptr %42, align 8, !tbaa !5
  %44 = load i64, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds [100001 x i64], ptr @a, i64 0, i64 %44
  %46 = load i64, ptr %45, align 8, !tbaa !5
  %47 = call noundef i64 @_Z3gcdxx(i64 noundef %43, i64 noundef %46)
  %48 = load i64, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds [100005 x i64], ptr @pre, i64 0, i64 %48
  store i64 %47, ptr %49, align 8, !tbaa !5
  br label %50

50:                                               ; preds = %39
  %51 = load i64, ptr %6, align 8, !tbaa !5
  %52 = add nsw i64 %51, 1
  store i64 %52, ptr %6, align 8, !tbaa !5
  br label %34, !llvm.loop !11

53:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %54 = load i64, ptr %3, align 8, !tbaa !5
  store i64 %54, ptr %7, align 8, !tbaa !5
  br label %55

55:                                               ; preds = %70, %53
  %56 = load i64, ptr %7, align 8, !tbaa !5
  %57 = icmp sge i64 %56, 1
  br i1 %57, label %59, label %58

58:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %73

59:                                               ; preds = %55
  %60 = load i64, ptr %7, align 8, !tbaa !5
  %61 = getelementptr inbounds [100001 x i64], ptr @a, i64 0, i64 %60
  %62 = load i64, ptr %61, align 8, !tbaa !5
  %63 = load i64, ptr %7, align 8, !tbaa !5
  %64 = add nsw i64 %63, 1
  %65 = getelementptr inbounds [100005 x i64], ptr @suf, i64 0, i64 %64
  %66 = load i64, ptr %65, align 8, !tbaa !5
  %67 = call noundef i64 @_Z3gcdxx(i64 noundef %62, i64 noundef %66)
  %68 = load i64, ptr %7, align 8, !tbaa !5
  %69 = getelementptr inbounds [100005 x i64], ptr @suf, i64 0, i64 %68
  store i64 %67, ptr %69, align 8, !tbaa !5
  br label %70

70:                                               ; preds = %59
  %71 = load i64, ptr %7, align 8, !tbaa !5
  %72 = add nsw i64 %71, -1
  store i64 %72, ptr %7, align 8, !tbaa !5
  br label %55, !llvm.loop !12

73:                                               ; preds = %58
  br label %74

74:                                               ; preds = %78, %73
  %75 = load i64, ptr %4, align 8, !tbaa !5
  %76 = add nsw i64 %75, -1
  store i64 %76, ptr %4, align 8, !tbaa !5
  %77 = icmp ne i64 %75, 0
  br i1 %77, label %78, label %92

78:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %79 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %80 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %79, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %81 = load i64, ptr %8, align 8, !tbaa !5
  %82 = sub nsw i64 %81, 1
  %83 = getelementptr inbounds [100005 x i64], ptr @pre, i64 0, i64 %82
  %84 = load i64, ptr %83, align 8, !tbaa !5
  %85 = load i64, ptr %9, align 8, !tbaa !5
  %86 = add nsw i64 %85, 1
  %87 = getelementptr inbounds [100005 x i64], ptr @suf, i64 0, i64 %86
  %88 = load i64, ptr %87, align 8, !tbaa !5
  %89 = call noundef i64 @_Z3gcdxx(i64 noundef %84, i64 noundef %88)
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %89)
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %74, !llvm.loop !13

92:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %11, !llvm.loop !14

93:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  ret i32 0
}

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1 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)) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


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

@pre = external dso_local local_unnamed_addr global [100005 x i64], align 16
@suf = external dso_local local_unnamed_addr global [100005 x i64], align 16
@a = external dso_local global [100001 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z14abhisheknaiiduv() local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z3gcdxx(i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  tail call void @_Z14abhisheknaiiduv()
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %7 = load i64, ptr %1, align 8, !tbaa !5
  %8 = add nsw i64 %7, -1
  store i64 %8, ptr %1, align 8, !tbaa !5
  %.not34 = icmp eq i64 %7, 0
  br i1 %.not34, label %._crit_edge37, label %.lr.ph36

.lr.ph36:                                         ; preds = %0, %._crit_edge33
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %11 = load i64, ptr %2, align 8, !tbaa !5
  %.not1722 = icmp slt i64 %11, 1
  br i1 %.not1722, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %.lr.ph36
  %12 = add nsw i64 %11, 1
  %13 = getelementptr inbounds [100005 x i64], ptr @suf, i64 0, i64 %12
  store i64 0, ptr %13, align 8, !tbaa !5
  store i64 0, ptr @pre, align 16, !tbaa !5
  br label %.preheader

._crit_edge:                                      ; preds = %.lr.ph
  %14 = add nsw i64 %19, 1
  %15 = getelementptr inbounds [100005 x i64], ptr @suf, i64 0, i64 %14
  store i64 0, ptr %15, align 8, !tbaa !5
  store i64 0, ptr @pre, align 16, !tbaa !5
  %.not1824 = icmp slt i64 %19, 1
  br i1 %.not1824, label %.preheader, label %.lr.ph27

.lr.ph:                                           ; preds = %.lr.ph36, %.lr.ph
  %.01423 = phi i64 [ %18, %.lr.ph ], [ 1, %.lr.ph36 ]
  %16 = getelementptr inbounds [100001 x i64], ptr @a, i64 0, i64 %.01423
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %18 = add nuw nsw i64 %.01423, 1
  %19 = load i64, ptr %2, align 8, !tbaa !5
  %.not17.not = icmp slt i64 %.01423, %19
  br i1 %.not17.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader20:                                     ; preds = %.lr.ph27
  %20 = icmp sgt i64 %27, 0
  br i1 %20, label %.lr.ph30, label %.preheader

.lr.ph27:                                         ; preds = %._crit_edge, %.lr.ph27
  %21 = phi i64 [ %24, %.lr.ph27 ], [ 0, %._crit_edge ]
  %.01325 = phi i64 [ %26, %.lr.ph27 ], [ 1, %._crit_edge ]
  %22 = getelementptr inbounds [100001 x i64], ptr @a, i64 0, i64 %.01325
  %23 = load i64, ptr %22, align 8, !tbaa !5
  %24 = call noundef i64 @_Z3gcdxx(i64 noundef %21, i64 noundef %23)
  %25 = getelementptr inbounds [100005 x i64], ptr @pre, i64 0, i64 %.01325
  store i64 %24, ptr %25, align 8, !tbaa !5
  %26 = add nuw nsw i64 %.01325, 1
  %27 = load i64, ptr %2, align 8, !tbaa !5
  %.not18.not = icmp slt i64 %.01325, %27
  br i1 %.not18.not, label %.lr.ph27, label %.preheader20, !llvm.loop !11

.preheader:                                       ; preds = %.lr.ph30, %._crit_edge.thread, %._crit_edge, %.preheader20
  %28 = load i64, ptr %3, align 8, !tbaa !5
  %29 = add nsw i64 %28, -1
  store i64 %29, ptr %3, align 8, !tbaa !5
  %.not1931 = icmp eq i64 %28, 0
  br i1 %.not1931, label %._crit_edge33, label %.lr.ph32

.lr.ph30:                                         ; preds = %.preheader20, %.lr.ph30
  %.029 = phi i64 [ %37, %.lr.ph30 ], [ %27, %.preheader20 ]
  %30 = getelementptr inbounds [100001 x i64], ptr @a, i64 0, i64 %.029
  %31 = load i64, ptr %30, align 8, !tbaa !5
  %32 = add nuw nsw i64 %.029, 1
  %33 = getelementptr inbounds [100005 x i64], ptr @suf, i64 0, i64 %32
  %34 = load i64, ptr %33, align 8, !tbaa !5
  %35 = call noundef i64 @_Z3gcdxx(i64 noundef %31, i64 noundef %34)
  %36 = getelementptr inbounds [100005 x i64], ptr @suf, i64 0, i64 %.029
  store i64 %35, ptr %36, align 8, !tbaa !5
  %37 = add nsw i64 %.029, -1
  %38 = icmp ugt i64 %.029, 1
  br i1 %38, label %.lr.ph30, label %.preheader, !llvm.loop !12

.lr.ph32:                                         ; preds = %.preheader, %.lr.ph32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %41 = load i64, ptr %4, align 8, !tbaa !5
  %42 = add nsw i64 %41, -1
  %43 = getelementptr inbounds [100005 x i64], ptr @pre, i64 0, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !5
  %45 = load i64, ptr %5, align 8, !tbaa !5
  %46 = add nsw i64 %45, 1
  %47 = getelementptr inbounds [100005 x i64], ptr @suf, i64 0, i64 %46
  %48 = load i64, ptr %47, align 8, !tbaa !5
  %49 = call noundef i64 @_Z3gcdxx(i64 noundef %44, i64 noundef %48)
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %49)
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %52 = load i64, ptr %3, align 8, !tbaa !5
  %53 = add nsw i64 %52, -1
  store i64 %53, ptr %3, align 8, !tbaa !5
  %.not19 = icmp eq i64 %52, 0
  br i1 %.not19, label %._crit_edge33, label %.lr.ph32, !llvm.loop !13

._crit_edge33:                                    ; preds = %.lr.ph32, %.preheader
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  %54 = load i64, ptr %1, align 8, !tbaa !5
  %55 = add nsw i64 %54, -1
  store i64 %55, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i64 %54, 0
  br i1 %.not, label %._crit_edge37, label %.lr.ph36, !llvm.loop !14

._crit_edge37:                                    ; preds = %._crit_edge33, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  ret i32 0
}

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

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

; 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 #1 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)) #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


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