; LLVM IR from mackorone/mms :: old/v1/src/algo/FloodFill/History.ll (ZN7History10initializeEiP4Cell)

; 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::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<Cell *, std::allocator<Cell *>>::_Deque_impl" }
%"struct.std::_Deque_base<Cell *, std::allocator<Cell *>>::_Deque_impl" = type { %"struct.std::_Deque_base<Cell *, std::allocator<Cell *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<Cell *, std::allocator<Cell *>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%class.History = type { i32, i32, ptr, %"class.std::stack", %"class.std::queue", %"class.std::__cxx11::list", %"class.std::__cxx11::list.9" }
%"class.std::queue" = type { %"class.std::deque.0" }
%"class.std::deque.0" = type { %"class.std::_Deque_base.1" }
%"class.std::_Deque_base.1" = type { %"struct.std::_Deque_base<std::stack<Cell *>, std::allocator<std::stack<Cell *>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::stack<Cell *>, std::allocator<std::stack<Cell *>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::stack<Cell *>, std::allocator<std::stack<Cell *>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::stack<Cell *>, std::allocator<std::stack<Cell *>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator.5", %"struct.std::_Deque_iterator.5" }
%"struct.std::_Deque_iterator.5" = type { ptr, ptr, ptr, ptr }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<int, std::allocator<int>>::_List_impl" }
%"struct.std::__cxx11::_List_base<int, std::allocator<int>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::__cxx11::list.9" = type { %"class.std::__cxx11::_List_base.10" }
%"class.std::__cxx11::_List_base.10" = type { %"struct.std::__cxx11::_List_base<std::__cxx11::list<Cellmod>, std::allocator<std::__cxx11::list<Cellmod>>>::_List_impl" }
%"struct.std::__cxx11::_List_base<std::__cxx11::list<Cellmod>, std::allocator<std::__cxx11::list<Cellmod>>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7History10initializeEiP4Cell(ptr noundef nonnull align 8 dereferenceable(224) %0, i32 noundef %1, ptr noundef %2) #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::stack", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8
  %12 = load i32, ptr %5, align 4, !tbaa !9
  %13 = getelementptr inbounds %class.History, ptr %11, i32 0, i32 0
  store i32 %12, ptr %13, align 8, !tbaa !11
  %14 = getelementptr inbounds %class.History, ptr %11, i32 0, i32 1
  store i32 0, ptr %14, align 4, !tbaa !34
  br label %15

15:                                               ; preds = %19, %3
  %16 = getelementptr inbounds %class.History, ptr %11, i32 0, i32 4
  %17 = call noundef zeroext i1 @_ZNKSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %16)
  %18 = xor i1 %17, true
  br i1 %18, label %19, label %21

19:                                               ; preds = %15
  %20 = getelementptr inbounds %class.History, ptr %11, i32 0, i32 4
  call void @_ZNSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %20)
  br label %15, !llvm.loop !35

21:                                               ; preds = %15
  br label %22

22:                                               ; preds = %26, %21
  %23 = getelementptr inbounds %class.History, ptr %11, i32 0, i32 5
  %24 = call noundef zeroext i1 @_ZNKSt7__cxx114listIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #5
  %25 = xor i1 %24, true
  br i1 %25, label %26, label %28

26:                                               ; preds = %22
  %27 = getelementptr inbounds %class.History, ptr %11, i32 0, i32 5
  call void @_ZNSt7__cxx114listIiSaIiEE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #5
  br label %22, !llvm.loop !37

28:                                               ; preds = %22
  br label %29

29:                                               ; preds = %33, %28
  %30 = getelementptr inbounds %class.History, ptr %11, i32 0, i32 6
  %31 = call noundef zeroext i1 @_ZNKSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  %32 = xor i1 %31, true
  br i1 %32, label %33, label %35

33:                                               ; preds = %29
  %34 = getelementptr inbounds %class.History, ptr %11, i32 0, i32 6
  call void @_ZNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #5
  br label %29, !llvm.loop !38

35:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 80, ptr %7) #5
  call void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
  invoke void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %36 unwind label %46

36:                                               ; preds = %35
  %37 = getelementptr inbounds %class.History, ptr %11, i32 0, i32 4
  invoke void @_ZNSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE4pushERKS6_(ptr noundef nonnull align 8 dereferenceable(80) %37, ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %38 unwind label %46

38:                                               ; preds = %36
  %39 = getelementptr inbounds %class.History, ptr %11, i32 0, i32 5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 1, ptr %10, align 4, !tbaa !9
  invoke void @_ZNSt7__cxx114listIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %40 unwind label %50

40:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %class.History, ptr %11, i32 0, i32 2
  store ptr %41, ptr %42, align 8, !tbaa !39
  %43 = getelementptr inbounds %class.History, ptr %11, i32 0, i32 3
  %44 = invoke noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEEaSERKS5_(ptr noundef nonnull align 8 dereferenceable(80) %43, ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %45 unwind label %46

45:                                               ; preds = %40
  call void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %7) #5
  ret void

46:                                               ; preds = %40, %36, %35
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %8, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %9, align 4
  br label %54

50:                                               ; preds = %38
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %8, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %54

54:                                               ; preds = %50, %46
  call void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %7) #5
  br label %55

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt7__cxx114listIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx114listIiSaIiEE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEEaSERKS5_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(80)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #4 align 2

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS7History", !10, i64 0, !10, i64 4, !6, i64 8, !13, i64 16, !20, i64 96, !26, i64 176, !31, i64 200}
!13 = !{!"_ZTSSt5stackIP4CellSt5dequeIS1_SaIS1_EEE", !14, i64 0}
!14 = !{!"_ZTSSt5dequeIP4CellSaIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt11_Deque_baseIP4CellSaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSNSt11_Deque_baseIP4CellSaIS1_EE11_Deque_implE", !17, i64 0}
!17 = !{!"_ZTSNSt11_Deque_baseIP4CellSaIS1_EE16_Deque_impl_dataE", !6, i64 0, !18, i64 8, !19, i64 16, !19, i64 48}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSSt15_Deque_iteratorIP4CellRS1_PS1_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!20 = !{!"_ZTSSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE", !21, i64 0}
!21 = !{!"_ZTSSt5dequeISt5stackIP4CellS_IS2_SaIS2_EEESaIS5_EE", !22, i64 0}
!22 = !{!"_ZTSSt11_Deque_baseISt5stackIP4CellSt5dequeIS2_SaIS2_EEESaIS6_EE", !23, i64 0}
!23 = !{!"_ZTSNSt11_Deque_baseISt5stackIP4CellSt5dequeIS2_SaIS2_EEESaIS6_EE11_Deque_implE", !24, i64 0}
!24 = !{!"_ZTSNSt11_Deque_baseISt5stackIP4CellSt5dequeIS2_SaIS2_EEESaIS6_EE16_Deque_impl_dataE", !6, i64 0, !18, i64 8, !25, i64 16, !25, i64 48}
!25 = !{!"_ZTSSt15_Deque_iteratorISt5stackIP4CellSt5dequeIS2_SaIS2_EEERS6_PS6_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!26 = !{!"_ZTSNSt7__cxx114listIiSaIiEEE", !27, i64 0}
!27 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEEE", !28, i64 0}
!28 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEE10_List_implE", !29, i64 0}
!29 = !{!"_ZTSNSt8__detail17_List_node_headerE", !30, i64 0, !18, i64 16}
!30 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!31 = !{!"_ZTSNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EEE", !32, i64 0}
!32 = !{!"_ZTSNSt7__cxx1110_List_baseINS_4listI7CellmodSaIS2_EEESaIS4_EEE", !33, i64 0}
!33 = !{!"_ZTSNSt7__cxx1110_List_baseINS_4listI7CellmodSaIS2_EEESaIS4_EE10_List_implE", !29, i64 0}
!34 = !{!12, !10, i64 4}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = distinct !{!37, !36}
!38 = distinct !{!38, !36}
!39 = !{!12, !6, i64 8}


; 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::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<Cell *, std::allocator<Cell *>>::_Deque_impl" }
%"struct.std::_Deque_base<Cell *, std::allocator<Cell *>>::_Deque_impl" = type { %"struct.std::_Deque_base<Cell *, std::allocator<Cell *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<Cell *, std::allocator<Cell *>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7History10initializeEiP4Cell(ptr noundef nonnull align 8 dereferenceable(224) %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::stack", align 8
  %6 = alloca i32, align 4
  store ptr %2, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %0, align 8, !tbaa !9
  %7 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 0, ptr %7, align 4, !tbaa !33
  %8 = getelementptr inbounds i8, ptr %0, i64 96
  %9 = tail call noundef zeroext i1 @_ZNKSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %8)
  br i1 %9, label %.preheader5, label %.lr.ph

.preheader5:                                      ; preds = %.lr.ph, %3
  %10 = getelementptr inbounds i8, ptr %0, i64 176
  %11 = tail call noundef zeroext i1 @_ZNKSt7__cxx114listIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  br i1 %11, label %.preheader, label %.lr.ph7

.lr.ph:                                           ; preds = %3, %.lr.ph
  tail call void @_ZNSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %8)
  %12 = tail call noundef zeroext i1 @_ZNKSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %8)
  br i1 %12, label %.preheader5, label %.lr.ph, !llvm.loop !34

.preheader:                                       ; preds = %.lr.ph7, %.preheader5
  %13 = getelementptr inbounds i8, ptr %0, i64 200
  %14 = tail call noundef zeroext i1 @_ZNKSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  br i1 %14, label %._crit_edge, label %.lr.ph9

.lr.ph7:                                          ; preds = %.preheader5, %.lr.ph7
  tail call void @_ZNSt7__cxx114listIiSaIiEE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %15 = tail call noundef zeroext i1 @_ZNKSt7__cxx114listIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  br i1 %15, label %.preheader, label %.lr.ph7, !llvm.loop !36

.lr.ph9:                                          ; preds = %.preheader, %.lr.ph9
  tail call void @_ZNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  %16 = tail call noundef zeroext i1 @_ZNKSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  br i1 %16, label %._crit_edge, label %.lr.ph9, !llvm.loop !37

._crit_edge:                                      ; preds = %.lr.ph9, %.preheader
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %5) #5
  call void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %5)
  invoke void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %5, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %17 unwind label %25

17:                                               ; preds = %._crit_edge
  invoke void @_ZNSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE4pushERKS6_(ptr noundef nonnull align 8 dereferenceable(80) %8, ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %18 unwind label %25

18:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store i32 1, ptr %6, align 4, !tbaa !38
  invoke void @_ZNSt7__cxx114listIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %19 unwind label %27

19:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %20, ptr %21, align 8, !tbaa !39
  %22 = getelementptr inbounds i8, ptr %0, i64 16
  %23 = invoke noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEEaSERKS5_(ptr noundef nonnull align 8 dereferenceable(80) %22, ptr noundef nonnull align 8 dereferenceable(80) %5)
          to label %24 unwind label %25

24:                                               ; preds = %19
  call void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #5
  ret void

25:                                               ; preds = %19, %17, %._crit_edge
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %29

27:                                               ; preds = %18
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  br label %29

29:                                               ; preds = %27, %25
  %.pn = phi { ptr, i32 } [ %26, %25 ], [ %28, %27 ]
  call void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %5) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %5) #5
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt7__cxx114listIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx114listIiSaIiEE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEEaSERKS5_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5stackIP4CellSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #4 align 2

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS7History", !11, i64 0, !11, i64 4, !6, i64 8, !12, i64 16, !19, i64 96, !25, i64 176, !30, i64 200}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt5stackIP4CellSt5dequeIS1_SaIS1_EEE", !13, i64 0}
!13 = !{!"_ZTSSt5dequeIP4CellSaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSSt11_Deque_baseIP4CellSaIS1_EE", !15, i64 0}
!15 = !{!"_ZTSNSt11_Deque_baseIP4CellSaIS1_EE11_Deque_implE", !16, i64 0}
!16 = !{!"_ZTSNSt11_Deque_baseIP4CellSaIS1_EE16_Deque_impl_dataE", !6, i64 0, !17, i64 8, !18, i64 16, !18, i64 48}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTSSt15_Deque_iteratorIP4CellRS1_PS1_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!19 = !{!"_ZTSSt5queueISt5stackIP4CellSt5dequeIS2_SaIS2_EEES3_IS6_SaIS6_EEE", !20, i64 0}
!20 = !{!"_ZTSSt5dequeISt5stackIP4CellS_IS2_SaIS2_EEESaIS5_EE", !21, i64 0}
!21 = !{!"_ZTSSt11_Deque_baseISt5stackIP4CellSt5dequeIS2_SaIS2_EEESaIS6_EE", !22, i64 0}
!22 = !{!"_ZTSNSt11_Deque_baseISt5stackIP4CellSt5dequeIS2_SaIS2_EEESaIS6_EE11_Deque_implE", !23, i64 0}
!23 = !{!"_ZTSNSt11_Deque_baseISt5stackIP4CellSt5dequeIS2_SaIS2_EEESaIS6_EE16_Deque_impl_dataE", !6, i64 0, !17, i64 8, !24, i64 16, !24, i64 48}
!24 = !{!"_ZTSSt15_Deque_iteratorISt5stackIP4CellSt5dequeIS2_SaIS2_EEERS6_PS6_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!25 = !{!"_ZTSNSt7__cxx114listIiSaIiEEE", !26, i64 0}
!26 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEEE", !27, i64 0}
!27 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEE10_List_implE", !28, i64 0}
!28 = !{!"_ZTSNSt8__detail17_List_node_headerE", !29, i64 0, !17, i64 16}
!29 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!30 = !{!"_ZTSNSt7__cxx114listINS0_I7CellmodSaIS1_EEESaIS3_EEE", !31, i64 0}
!31 = !{!"_ZTSNSt7__cxx1110_List_baseINS_4listI7CellmodSaIS2_EEESaIS4_EEE", !32, i64 0}
!32 = !{!"_ZTSNSt7__cxx1110_List_baseINS_4listI7CellmodSaIS2_EEESaIS4_EE10_List_implE", !28, i64 0}
!33 = !{!10, !11, i64 4}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = distinct !{!36, !35}
!37 = distinct !{!37, !35}
!38 = !{!11, !11, i64 0}
!39 = !{!10, !6, i64 8}


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