; LLVM IR from spirosmaggioros/AlgoPlus :: examples/list (circular_list_iteration)

; 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.circular_linked_list = type { %"class.std::shared_ptr", %"class.std::shared_ptr", i64 }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%"class.std::allocator" = type { i8 }
%"class.circular_linked_list<char>::Iterator" = type { %"class.std::shared_ptr" }

@_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.circular_linked_list, align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::initializer_list", align 8
  %5 = alloca [4 x i8], align 1
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.circular_linked_list<char>::Iterator", align 8
  %10 = alloca %"class.circular_linked_list<char>::Iterator", align 8
  %11 = alloca %"class.circular_linked_list<char>::Iterator", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 40, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i8 97, ptr %5, align 1, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %5, i64 1
  store i8 98, ptr %12, align 1, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %5, i64 2
  store i8 99, ptr %13, align 1, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %5, i64 3
  store i8 100, ptr %14, align 1, !tbaa !5
  %15 = getelementptr inbounds %"class.std::initializer_list", ptr %4, i32 0, i32 0
  store ptr %5, ptr %15, align 8, !tbaa !8
  %16 = getelementptr inbounds %"class.std::initializer_list", ptr %4, i32 0, i32 1
  store i64 4, ptr %16, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  %17 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %18 = load ptr, ptr %17, align 8
  %19 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %20 = load i64, ptr %19, align 8
  invoke void @_ZNSt6vectorIcSaIcEEC2ESt16initializer_listIcERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr %18, i64 %20, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %21 unwind label %34

21:                                               ; preds = %0
  call void @_ZN20circular_linked_listIcEC2ESt6vectorIcSaIcEE(ptr noundef nonnull align 8 dereferenceable(40) %2, ptr noundef %3) #7
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  invoke void @_ZN20circular_linked_listIcE9push_backEc(ptr noundef nonnull align 8 dereferenceable(40) %2, i8 noundef signext 97)
          to label %22 unwind label %38

22:                                               ; preds = %21
  invoke void @_ZN20circular_linked_listIcE9push_backEc(ptr noundef nonnull align 8 dereferenceable(40) %2, i8 noundef signext 98)
          to label %23 unwind label %38

23:                                               ; preds = %22
  invoke void @_ZN20circular_linked_listIcE9push_backEc(ptr noundef nonnull align 8 dereferenceable(40) %2, i8 noundef signext 99)
          to label %24 unwind label %38

24:                                               ; preds = %23
  invoke void @_ZN20circular_linked_listIcE9push_backEc(ptr noundef nonnull align 8 dereferenceable(40) %2, i8 noundef signext 100)
          to label %25 unwind label %38

25:                                               ; preds = %24
  invoke void @_ZN20circular_linked_listIcE9push_backEc(ptr noundef nonnull align 8 dereferenceable(40) %2, i8 noundef signext 101)
          to label %26 unwind label %38

26:                                               ; preds = %25
  invoke void @_ZN20circular_linked_listIcE9push_backEc(ptr noundef nonnull align 8 dereferenceable(40) %2, i8 noundef signext 102)
          to label %27 unwind label %38

27:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #7
  invoke void @_ZN20circular_linked_listIcE5beginEv(ptr dead_on_unwind writable sret(%"class.circular_linked_list<char>::Iterator") align 8 %9, ptr noundef nonnull align 8 dereferenceable(40) %2)
          to label %28 unwind label %42

28:                                               ; preds = %27
  br label %29

29:                                               ; preds = %63, %28
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  invoke void @_ZN20circular_linked_listIcE3endEv(ptr dead_on_unwind writable sret(%"class.circular_linked_list<char>::Iterator") align 8 %10, ptr noundef nonnull align 8 dereferenceable(40) %2)
          to label %30 unwind label %46

30:                                               ; preds = %29
  %31 = invoke noundef zeroext i1 @_ZN20circular_linked_listIcE8IteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %32 unwind label %50

32:                                               ; preds = %30
  call void @_ZN20circular_linked_listIcE8IteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  br i1 %31, label %55, label %33

33:                                               ; preds = %32
  call void @_ZN20circular_linked_listIcE8IteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  br label %70

34:                                               ; preds = %0
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %7, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %76

38:                                               ; preds = %72, %70, %26, %25, %24, %23, %22, %21
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %7, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %8, align 4
  br label %75

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

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

50:                                               ; preds = %30
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %7, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %8, align 4
  call void @_ZN20circular_linked_listIcE8IteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  br label %54

54:                                               ; preds = %50, %46
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  br label %68

55:                                               ; preds = %32
  %56 = invoke noundef signext i8 @_ZN20circular_linked_listIcE8IteratordeEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %57 unwind label %64

57:                                               ; preds = %55
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %56)
          to label %59 unwind label %64

59:                                               ; preds = %57
  %60 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef @.str)
          to label %61 unwind label %64

61:                                               ; preds = %59
  br label %62

62:                                               ; preds = %61
  invoke void @_ZN20circular_linked_listIcE8IteratorppEi(ptr dead_on_unwind writable sret(%"class.circular_linked_list<char>::Iterator") align 8 %11, ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef 0)
          to label %63 unwind label %64

63:                                               ; preds = %62
  call void @_ZN20circular_linked_listIcE8IteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #7
  br label %29, !llvm.loop !13

64:                                               ; preds = %62, %59, %57, %55
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %7, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %8, align 4
  br label %68

68:                                               ; preds = %64, %54
  call void @_ZN20circular_linked_listIcE8IteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #7
  br label %69

69:                                               ; preds = %68, %42
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  br label %75

70:                                               ; preds = %33
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
          to label %72 unwind label %38

72:                                               ; preds = %70
  invoke void @_ZN20circular_linked_listIcE9visualizeEv(ptr noundef nonnull align 8 dereferenceable(40) %2)
          to label %73 unwind label %38

73:                                               ; preds = %72
  call void @_ZN20circular_linked_listIcED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %2) #7
  %74 = load i32, ptr %1, align 4
  ret i32 %74

75:                                               ; preds = %69, %38
  call void @_ZN20circular_linked_listIcED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #7
  br label %76

76:                                               ; preds = %75, %34
  call void @llvm.lifetime.end.p0(i64 40, ptr %2) #7
  br label %77

77:                                               ; preds = %76
  %78 = load ptr, ptr %7, align 8
  %79 = load i32, ptr %8, align 4
  %80 = insertvalue { ptr, i32 } poison, ptr %78, 0
  %81 = insertvalue { ptr, i32 } %80, i32 %79, 1
  resume { ptr, i32 } %81
}

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIcSaIcEEC2ESt16initializer_listIcERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN20circular_linked_listIcE9push_backEc(ptr noundef nonnull align 8 dereferenceable(40), i8 noundef signext) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN20circular_linked_listIcE5beginEv(ptr dead_on_unwind noalias writable sret(%"class.circular_linked_list<char>::Iterator") align 8, ptr noundef nonnull align 8 dereferenceable(40)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN20circular_linked_listIcE8IteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN20circular_linked_listIcE3endEv(ptr dead_on_unwind noalias writable sret(%"class.circular_linked_list<char>::Iterator") align 8, ptr noundef nonnull align 8 dereferenceable(40)) #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef signext i8 @_ZN20circular_linked_listIcE8IteratordeEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN20circular_linked_listIcE8IteratorppEi(ptr dead_on_unwind noalias writable sret(%"class.circular_linked_list<char>::Iterator") align 8, ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #3 align 2

declare void @_ZN20circular_linked_listIcE9visualizeEv(ptr noundef nonnull align 8 dereferenceable(40)) #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

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


; 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.circular_linked_list = type { %"class.std::shared_ptr", %"class.std::shared_ptr", i64 }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.circular_linked_list<char>::Iterator" = type { %"class.std::shared_ptr" }

@_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.circular_linked_list, align 8
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca [4 x i8], align 4
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.circular_linked_list<char>::Iterator", align 8
  %6 = alloca %"class.circular_linked_list<char>::Iterator", align 8
  %7 = alloca %"class.circular_linked_list<char>::Iterator", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store <4 x i8> <i8 97, i8 98, i8 99, i8 100>, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  invoke void @_ZNSt6vectorIcSaIcEEC2ESt16initializer_listIcERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr nonnull %3, i64 4, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %8 unwind label %17

8:                                                ; preds = %0
  call void @_ZN20circular_linked_listIcEC2ESt6vectorIcSaIcEE(ptr noundef nonnull align 8 dereferenceable(40) %1, ptr noundef nonnull %2) #7
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  invoke void @_ZN20circular_linked_listIcE9push_backEc(ptr noundef nonnull align 8 dereferenceable(40) %1, i8 noundef signext 97)
          to label %9 unwind label %19

9:                                                ; preds = %8
  invoke void @_ZN20circular_linked_listIcE9push_backEc(ptr noundef nonnull align 8 dereferenceable(40) %1, i8 noundef signext 98)
          to label %10 unwind label %19

10:                                               ; preds = %9
  invoke void @_ZN20circular_linked_listIcE9push_backEc(ptr noundef nonnull align 8 dereferenceable(40) %1, i8 noundef signext 99)
          to label %11 unwind label %19

11:                                               ; preds = %10
  invoke void @_ZN20circular_linked_listIcE9push_backEc(ptr noundef nonnull align 8 dereferenceable(40) %1, i8 noundef signext 100)
          to label %12 unwind label %19

12:                                               ; preds = %11
  invoke void @_ZN20circular_linked_listIcE9push_backEc(ptr noundef nonnull align 8 dereferenceable(40) %1, i8 noundef signext 101)
          to label %13 unwind label %19

13:                                               ; preds = %12
  invoke void @_ZN20circular_linked_listIcE9push_backEc(ptr noundef nonnull align 8 dereferenceable(40) %1, i8 noundef signext 102)
          to label %14 unwind label %19

14:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @_ZN20circular_linked_listIcE5beginEv(ptr dead_on_unwind nonnull writable sret(%"class.circular_linked_list<char>::Iterator") align 8 %5, ptr noundef nonnull align 8 dereferenceable(40) %1)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  call void @_ZN20circular_linked_listIcE3endEv(ptr dead_on_unwind nonnull writable sret(%"class.circular_linked_list<char>::Iterator") align 8 %6, ptr noundef nonnull align 8 dereferenceable(40) %1)
  %15 = call noundef zeroext i1 @_ZN20circular_linked_listIcE8IteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %6)
  call void @_ZN20circular_linked_listIcE8IteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %26, %14
  call void @_ZN20circular_linked_listIcE8IteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  %16 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
          to label %30 unwind label %19

17:                                               ; preds = %0
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  br label %33

19:                                               ; preds = %30, %._crit_edge, %13, %12, %11, %10, %9, %8
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %32

.lr.ph:                                           ; preds = %14, %26
  %21 = call noundef signext i8 @_ZN20circular_linked_listIcE8IteratordeEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  %22 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext %21)
          to label %23 unwind label %28

23:                                               ; preds = %.lr.ph
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull @.str)
          to label %25 unwind label %28

25:                                               ; preds = %23
  invoke void @_ZN20circular_linked_listIcE8IteratorppEi(ptr dead_on_unwind nonnull writable sret(%"class.circular_linked_list<char>::Iterator") align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef 0)
          to label %26 unwind label %28

26:                                               ; preds = %25
  call void @_ZN20circular_linked_listIcE8IteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  call void @_ZN20circular_linked_listIcE3endEv(ptr dead_on_unwind nonnull writable sret(%"class.circular_linked_list<char>::Iterator") align 8 %6, ptr noundef nonnull align 8 dereferenceable(40) %1)
  %27 = call noundef zeroext i1 @_ZN20circular_linked_listIcE8IteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %6)
  call void @_ZN20circular_linked_listIcE8IteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  br i1 %27, label %.lr.ph, label %._crit_edge, !llvm.loop !8

28:                                               ; preds = %25, %23, %.lr.ph
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN20circular_linked_listIcE8IteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  br label %32

30:                                               ; preds = %._crit_edge
  invoke void @_ZN20circular_linked_listIcE9visualizeEv(ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %31 unwind label %19

31:                                               ; preds = %30
  call void @_ZN20circular_linked_listIcED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #7
  ret i32 0

32:                                               ; preds = %28, %19
  %.pn = phi { ptr, i32 } [ %29, %28 ], [ %20, %19 ]
  call void @_ZN20circular_linked_listIcED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #7
  br label %33

33:                                               ; preds = %32, %17
  %.pn.pn = phi { ptr, i32 } [ %.pn, %32 ], [ %18, %17 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn.pn
}

; 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 nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIcSaIcEEC2ESt16initializer_listIcERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 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 uwtable
declare dso_local void @_ZN20circular_linked_listIcE9push_backEc(ptr noundef nonnull align 8 dereferenceable(40), i8 noundef signext) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN20circular_linked_listIcE5beginEv(ptr dead_on_unwind noalias writable sret(%"class.circular_linked_list<char>::Iterator") align 8, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN20circular_linked_listIcE8IteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN20circular_linked_listIcE3endEv(ptr dead_on_unwind noalias writable sret(%"class.circular_linked_list<char>::Iterator") align 8, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #4 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef signext i8 @_ZN20circular_linked_listIcE8IteratordeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN20circular_linked_listIcE8IteratorppEi(ptr dead_on_unwind noalias writable sret(%"class.circular_linked_list<char>::Iterator") align 8, ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #3 align 2

declare void @_ZN20circular_linked_listIcE9visualizeEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

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


; Effective O3 passes: GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass