; LLVM IR from Lakhankumawat/LearnCPP :: S-Stack (StacksUsingQueue)

; 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.Stack1 = type { i32, %"class.std::queue", %"class.std::queue" }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%class.Stack2 = type { i32, %"class.std::queue", %"class.std::queue" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %class.Stack1, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %class.Stack2, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 168, ptr %2) #6
  call void @_ZN6Stack1C2Ev(ptr noundef nonnull align 8 dereferenceable(168) %2)
  invoke void @_ZN6Stack14pushEi(ptr noundef nonnull align 8 dereferenceable(168) %2, i32 noundef 1)
          to label %6 unwind label %21

6:                                                ; preds = %0
  invoke void @_ZN6Stack14pushEi(ptr noundef nonnull align 8 dereferenceable(168) %2, i32 noundef 2)
          to label %7 unwind label %21

7:                                                ; preds = %6
  invoke void @_ZN6Stack14pushEi(ptr noundef nonnull align 8 dereferenceable(168) %2, i32 noundef 3)
          to label %8 unwind label %21

8:                                                ; preds = %7
  br label %9

9:                                                ; preds = %20, %8
  %10 = invoke noundef i32 @_ZN6Stack14sizeEv(ptr noundef nonnull align 8 dereferenceable(168) %2)
          to label %11 unwind label %21

11:                                               ; preds = %9
  %12 = icmp sgt i32 %10, 0
  br i1 %12, label %13, label %25

13:                                               ; preds = %11
  %14 = invoke noundef i32 @_ZN6Stack13topEv(ptr noundef nonnull align 8 dereferenceable(168) %2)
          to label %15 unwind label %21

15:                                               ; preds = %13
  %16 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %14)
          to label %17 unwind label %21

17:                                               ; preds = %15
  %18 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef @.str)
          to label %19 unwind label %21

19:                                               ; preds = %17
  invoke void @_ZN6Stack13popEv(ptr noundef nonnull align 8 dereferenceable(168) %2)
          to label %20 unwind label %21

20:                                               ; preds = %19
  br label %9, !llvm.loop !5

21:                                               ; preds = %19, %17, %15, %13, %9, %7, %6, %0
  %22 = landingpad { ptr, i32 }
          cleanup
  %23 = extractvalue { ptr, i32 } %22, 0
  store ptr %23, ptr %3, align 8
  %24 = extractvalue { ptr, i32 } %22, 1
  store i32 %24, ptr %4, align 4
  br label %53

25:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 168, ptr %5) #6
  invoke void @_ZN6Stack2C2Ev(ptr noundef nonnull align 8 dereferenceable(168) %5)
          to label %26 unwind label %42

26:                                               ; preds = %25
  invoke void @_ZN6Stack24pushEi(ptr noundef nonnull align 8 dereferenceable(168) %5, i32 noundef 1)
          to label %27 unwind label %46

27:                                               ; preds = %26
  invoke void @_ZN6Stack24pushEi(ptr noundef nonnull align 8 dereferenceable(168) %5, i32 noundef 2)
          to label %28 unwind label %46

28:                                               ; preds = %27
  invoke void @_ZN6Stack24pushEi(ptr noundef nonnull align 8 dereferenceable(168) %5, i32 noundef 3)
          to label %29 unwind label %46

29:                                               ; preds = %28
  br label %30

30:                                               ; preds = %41, %29
  %31 = invoke noundef i32 @_ZN6Stack24sizeEv(ptr noundef nonnull align 8 dereferenceable(168) %5)
          to label %32 unwind label %46

32:                                               ; preds = %30
  %33 = icmp sgt i32 %31, 0
  br i1 %33, label %34, label %50

34:                                               ; preds = %32
  %35 = invoke noundef i32 @_ZN6Stack23topEv(ptr noundef nonnull align 8 dereferenceable(168) %5)
          to label %36 unwind label %46

36:                                               ; preds = %34
  %37 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %35)
          to label %38 unwind label %46

38:                                               ; preds = %36
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef @.str)
          to label %40 unwind label %46

40:                                               ; preds = %38
  invoke void @_ZN6Stack23popEv(ptr noundef nonnull align 8 dereferenceable(168) %5)
          to label %41 unwind label %46

41:                                               ; preds = %40
  br label %30, !llvm.loop !7

42:                                               ; preds = %25
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %3, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %4, align 4
  br label %52

46:                                               ; preds = %40, %38, %36, %34, %30, %28, %27, %26
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %3, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %4, align 4
  call void @_ZN6Stack2D2Ev(ptr noundef nonnull align 8 dereferenceable(168) %5) #6
  br label %52

50:                                               ; preds = %32
  call void @_ZN6Stack2D2Ev(ptr noundef nonnull align 8 dereferenceable(168) %5) #6
  call void @llvm.lifetime.end.p0(i64 168, ptr %5) #6
  call void @_ZN6Stack1D2Ev(ptr noundef nonnull align 8 dereferenceable(168) %2) #6
  call void @llvm.lifetime.end.p0(i64 168, ptr %2) #6
  %51 = load i32, ptr %1, align 4
  ret i32 %51

52:                                               ; preds = %46, %42
  call void @llvm.lifetime.end.p0(i64 168, ptr %5) #6
  br label %53

53:                                               ; preds = %52, %21
  call void @_ZN6Stack1D2Ev(ptr noundef nonnull align 8 dereferenceable(168) %2) #6
  call void @llvm.lifetime.end.p0(i64 168, ptr %2) #6
  br label %54

54:                                               ; preds = %53
  %55 = load ptr, ptr %3, align 8
  %56 = load i32, ptr %4, align 4
  %57 = insertvalue { ptr, i32 } poison, ptr %55, 0
  %58 = insertvalue { ptr, i32 } %57, i32 %56, 1
  resume { ptr, i32 } %58
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Stack1C2Ev(ptr noundef nonnull align 8 dereferenceable(168)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Stack14pushEi(ptr noundef nonnull align 8 dereferenceable(168), i32 noundef) #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6Stack14sizeEv(ptr noundef nonnull align 8 dereferenceable(168)) #2 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) #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6Stack13topEv(ptr noundef nonnull align 8 dereferenceable(168)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Stack13popEv(ptr noundef nonnull align 8 dereferenceable(168)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Stack2C2Ev(ptr noundef nonnull align 8 dereferenceable(168)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Stack24pushEi(ptr noundef nonnull align 8 dereferenceable(168), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6Stack24sizeEv(ptr noundef nonnull align 8 dereferenceable(168)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6Stack23topEv(ptr noundef nonnull align 8 dereferenceable(168)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Stack23popEv(ptr noundef nonnull align 8 dereferenceable(168)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6Stack2D2Ev(ptr noundef nonnull align 8 dereferenceable(168)) unnamed_addr #5 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6Stack1D2Ev(ptr noundef nonnull align 8 dereferenceable(168)) unnamed_addr #5 align 2

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 = { 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 = { 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 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}


; 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.Stack1 = type { i32, %"class.std::queue", %"class.std::queue" }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl" = type { %"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<int, std::allocator<int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%class.Stack2 = type { i32, %"class.std::queue", %"class.std::queue" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %class.Stack1, align 8
  %2 = alloca %class.Stack2, align 8
  call void @llvm.lifetime.start.p0(i64 168, ptr nonnull %1) #6
  call void @_ZN6Stack1C2Ev(ptr noundef nonnull align 8 dereferenceable(168) %1)
  invoke void @_ZN6Stack14pushEi(ptr noundef nonnull align 8 dereferenceable(168) %1, i32 noundef 1)
          to label %3 unwind label %.loopexit.split-lp9

3:                                                ; preds = %0
  invoke void @_ZN6Stack14pushEi(ptr noundef nonnull align 8 dereferenceable(168) %1, i32 noundef 2)
          to label %4 unwind label %.loopexit.split-lp9

4:                                                ; preds = %3
  invoke void @_ZN6Stack14pushEi(ptr noundef nonnull align 8 dereferenceable(168) %1, i32 noundef 3)
          to label %.preheader7 unwind label %.loopexit.split-lp9

.preheader7:                                      ; preds = %4, %14
  %5 = invoke noundef i32 @_ZN6Stack14sizeEv(ptr noundef nonnull align 8 dereferenceable(168) %1)
          to label %6 unwind label %.loopexit8

6:                                                ; preds = %.preheader7
  %7 = icmp sgt i32 %5, 0
  br i1 %7, label %8, label %15

8:                                                ; preds = %6
  %9 = invoke noundef i32 @_ZN6Stack13topEv(ptr noundef nonnull align 8 dereferenceable(168) %1)
          to label %10 unwind label %.loopexit8

10:                                               ; preds = %8
  %11 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %9)
          to label %12 unwind label %.loopexit8

12:                                               ; preds = %10
  %13 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull @.str)
          to label %14 unwind label %.loopexit8

14:                                               ; preds = %12
  invoke void @_ZN6Stack13popEv(ptr noundef nonnull align 8 dereferenceable(168) %1)
          to label %.preheader7 unwind label %.loopexit8, !llvm.loop !5

.loopexit8:                                       ; preds = %.preheader7, %8, %10, %12, %14
  %lpad.loopexit10 = landingpad { ptr, i32 }
          cleanup
  br label %34

.loopexit.split-lp9:                              ; preds = %0, %3, %4
  %lpad.loopexit.split-lp11 = landingpad { ptr, i32 }
          cleanup
  br label %34

15:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 168, ptr nonnull %2) #6
  invoke void @_ZN6Stack2C2Ev(ptr noundef nonnull align 8 dereferenceable(168) %2)
          to label %16 unwind label %29

16:                                               ; preds = %15
  invoke void @_ZN6Stack24pushEi(ptr noundef nonnull align 8 dereferenceable(168) %2, i32 noundef 1)
          to label %17 unwind label %.loopexit.split-lp

17:                                               ; preds = %16
  invoke void @_ZN6Stack24pushEi(ptr noundef nonnull align 8 dereferenceable(168) %2, i32 noundef 2)
          to label %18 unwind label %.loopexit.split-lp

18:                                               ; preds = %17
  invoke void @_ZN6Stack24pushEi(ptr noundef nonnull align 8 dereferenceable(168) %2, i32 noundef 3)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %18, %28
  %19 = invoke noundef i32 @_ZN6Stack24sizeEv(ptr noundef nonnull align 8 dereferenceable(168) %2)
          to label %20 unwind label %.loopexit

20:                                               ; preds = %.preheader
  %21 = icmp sgt i32 %19, 0
  br i1 %21, label %22, label %32

22:                                               ; preds = %20
  %23 = invoke noundef i32 @_ZN6Stack23topEv(ptr noundef nonnull align 8 dereferenceable(168) %2)
          to label %24 unwind label %.loopexit

24:                                               ; preds = %22
  %25 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %23)
          to label %26 unwind label %.loopexit

26:                                               ; preds = %24
  %27 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @.str)
          to label %28 unwind label %.loopexit

28:                                               ; preds = %26
  invoke void @_ZN6Stack23popEv(ptr noundef nonnull align 8 dereferenceable(168) %2)
          to label %.preheader unwind label %.loopexit, !llvm.loop !7

29:                                               ; preds = %15
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %33

.loopexit:                                        ; preds = %.preheader, %22, %24, %26, %28
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %31

.loopexit.split-lp:                               ; preds = %16, %17, %18
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %31

31:                                               ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN6Stack2D2Ev(ptr noundef nonnull align 8 dereferenceable(168) %2) #6
  br label %33

32:                                               ; preds = %20
  call void @_ZN6Stack2D2Ev(ptr noundef nonnull align 8 dereferenceable(168) %2) #6
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %2) #6
  call void @_ZN6Stack1D2Ev(ptr noundef nonnull align 8 dereferenceable(168) %1) #6
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %1) #6
  ret i32 0

33:                                               ; preds = %31, %29
  %.pn = phi { ptr, i32 } [ %lpad.phi, %31 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %2) #6
  br label %34

34:                                               ; preds = %.loopexit8, %.loopexit.split-lp9, %33
  %.pn5 = phi { ptr, i32 } [ %.pn, %33 ], [ %lpad.loopexit10, %.loopexit8 ], [ %lpad.loopexit.split-lp11, %.loopexit.split-lp9 ]
  call void @_ZN6Stack1D2Ev(ptr noundef nonnull align 8 dereferenceable(168) %1) #6
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn5
}

; 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 uwtable
declare dso_local void @_ZN6Stack1C2Ev(ptr noundef nonnull align 8 dereferenceable(168)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Stack14pushEi(ptr noundef nonnull align 8 dereferenceable(168), i32 noundef) local_unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6Stack14sizeEv(ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #2 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 #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6Stack13topEv(ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Stack13popEv(ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Stack2C2Ev(ptr noundef nonnull align 8 dereferenceable(168)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Stack24pushEi(ptr noundef nonnull align 8 dereferenceable(168), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6Stack24sizeEv(ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6Stack23topEv(ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Stack23popEv(ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6Stack2D2Ev(ptr noundef nonnull align 8 dereferenceable(168)) unnamed_addr #5 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6Stack1D2Ev(ptr noundef nonnull align 8 dereferenceable(168)) unnamed_addr #5 align 2

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 = { 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 = { 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 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}


; Effective O3 passes: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass