; LLVM IR from nragland37/cpp-projects :: data_structures-I/06-LList (main)

; 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.LList = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 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.LList, align 8
  %3 = alloca i8, align 1
  %4 = alloca i16, align 2
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  call void @_ZN5LListIsEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 2, ptr %4) #6
  invoke void @_Z10checkStateR5LListIsE(ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %10 unwind label %15

10:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %11

11:                                               ; preds = %45, %10
  %12 = load i32, ptr %7, align 4, !tbaa !5
  %13 = icmp slt i32 %12, 5
  br i1 %13, label %19, label %14

14:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %48

15:                                               ; preds = %84, %48, %0
  %16 = landingpad { ptr, i32 }
          cleanup
  %17 = extractvalue { ptr, i32 } %16, 0
  store ptr %17, ptr %5, align 8
  %18 = extractvalue { ptr, i32 } %16, 1
  store i32 %18, ptr %6, align 4
  br label %122

19:                                               ; preds = %11
  %20 = load i32, ptr %7, align 4, !tbaa !5
  %21 = add nsw i32 %20, 1
  %22 = mul nsw i32 10, %21
  %23 = trunc i32 %22 to i16
  store i16 %23, ptr %4, align 2, !tbaa !9
  %24 = invoke noundef zeroext i1 @_ZN5LListIsE6insertERKs(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 2 dereferenceable(2) %4)
          to label %25 unwind label %37

25:                                               ; preds = %19
  %26 = zext i1 %24 to i8
  store i8 %26, ptr %3, align 1, !tbaa !11
  %27 = load i8, ptr %3, align 1, !tbaa !11, !range !13, !noundef !14
  %28 = trunc i8 %27 to i1
  br i1 %28, label %29, label %41

29:                                               ; preds = %25
  %30 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %31 unwind label %37

31:                                               ; preds = %29
  %32 = load i16, ptr %4, align 2, !tbaa !9
  %33 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8) %30, i16 noundef signext %32)
          to label %34 unwind label %37

34:                                               ; preds = %31
  %35 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %36 unwind label %37

36:                                               ; preds = %34
  br label %41

37:                                               ; preds = %41, %34, %31, %29, %19
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %5, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %122

41:                                               ; preds = %36, %25
  %42 = load i8, ptr %3, align 1, !tbaa !11, !range !13, !noundef !14
  %43 = trunc i8 %42 to i1
  invoke void @_Z12displayLListbR5LListIsE(i1 noundef zeroext %43, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %44 unwind label %37

44:                                               ; preds = %41
  br label %45

45:                                               ; preds = %44
  %46 = load i32, ptr %7, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %7, align 4, !tbaa !5
  br label %11, !llvm.loop !15

48:                                               ; preds = %14
  %49 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %50 unwind label %15

50:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %81, %50
  %52 = load i32, ptr %8, align 4, !tbaa !5
  %53 = icmp slt i32 %52, 2
  br i1 %53, label %55, label %54

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

55:                                               ; preds = %51
  %56 = load i32, ptr %8, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  %58 = mul nsw i32 10, %57
  %59 = trunc i32 %58 to i16
  store i16 %59, ptr %4, align 2, !tbaa !9
  %60 = invoke noundef zeroext i1 @_ZNK5LListIsE8retrieveERs(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 2 dereferenceable(2) %4)
          to label %61 unwind label %73

61:                                               ; preds = %55
  %62 = zext i1 %60 to i8
  store i8 %62, ptr %3, align 1, !tbaa !11
  %63 = load i8, ptr %3, align 1, !tbaa !11, !range !13, !noundef !14
  %64 = trunc i8 %63 to i1
  br i1 %64, label %65, label %77

65:                                               ; preds = %61
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
          to label %67 unwind label %73

67:                                               ; preds = %65
  %68 = load i16, ptr %4, align 2, !tbaa !9
  %69 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8) %66, i16 noundef signext %68)
          to label %70 unwind label %73

70:                                               ; preds = %67
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %72 unwind label %73

72:                                               ; preds = %70
  br label %77

73:                                               ; preds = %77, %70, %67, %65, %55
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %5, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %122

77:                                               ; preds = %72, %61
  %78 = load i8, ptr %3, align 1, !tbaa !11, !range !13, !noundef !14
  %79 = trunc i8 %78 to i1
  invoke void @_Z12displayLListbR5LListIsE(i1 noundef zeroext %79, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %80 unwind label %73

80:                                               ; preds = %77
  br label %81

81:                                               ; preds = %80
  %82 = load i32, ptr %8, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %8, align 4, !tbaa !5
  br label %51, !llvm.loop !17

84:                                               ; preds = %54
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %86 unwind label %15

86:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %117, %86
  %88 = load i32, ptr %9, align 4, !tbaa !5
  %89 = icmp slt i32 %88, 5
  br i1 %89, label %91, label %90

90:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %120

91:                                               ; preds = %87
  %92 = load i32, ptr %9, align 4, !tbaa !5
  %93 = sub nsw i32 5, %92
  %94 = mul nsw i32 10, %93
  %95 = trunc i32 %94 to i16
  store i16 %95, ptr %4, align 2, !tbaa !9
  %96 = invoke noundef zeroext i1 @_ZN5LListIsE6removeERs(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 2 dereferenceable(2) %4)
          to label %97 unwind label %109

97:                                               ; preds = %91
  %98 = zext i1 %96 to i8
  store i8 %98, ptr %3, align 1, !tbaa !11
  %99 = load i8, ptr %3, align 1, !tbaa !11, !range !13, !noundef !14
  %100 = trunc i8 %99 to i1
  br i1 %100, label %101, label %113

101:                                              ; preds = %97
  %102 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
          to label %103 unwind label %109

103:                                              ; preds = %101
  %104 = load i16, ptr %4, align 2, !tbaa !9
  %105 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8) %102, i16 noundef signext %104)
          to label %106 unwind label %109

106:                                              ; preds = %103
  %107 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %108 unwind label %109

108:                                              ; preds = %106
  br label %113

109:                                              ; preds = %113, %106, %103, %101, %91
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %5, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %122

113:                                              ; preds = %108, %97
  %114 = load i8, ptr %3, align 1, !tbaa !11, !range !13, !noundef !14
  %115 = trunc i8 %114 to i1
  invoke void @_Z12displayLListbR5LListIsE(i1 noundef zeroext %115, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %116 unwind label %109

116:                                              ; preds = %113
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %9, align 4, !tbaa !5
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %9, align 4, !tbaa !5
  br label %87, !llvm.loop !18

120:                                              ; preds = %90
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #6
  call void @_ZN5LListIsED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %121 = load i32, ptr %1, align 4
  ret i32 %121

122:                                              ; preds = %109, %73, %37, %15
  call void @llvm.lifetime.end.p0(i64 2, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #6
  call void @_ZN5LListIsED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %123

123:                                              ; preds = %122
  %124 = load ptr, ptr %5, align 8
  %125 = load i32, ptr %6, align 4
  %126 = insertvalue { ptr, i32 } poison, ptr %124, 0
  %127 = insertvalue { ptr, i32 } %126, i32 %125, 1
  resume { ptr, i32 } %127
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z10checkStateR5LListIsE(ptr noundef nonnull align 8 dereferenceable(8)) #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5LListIsE6insertERKs(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 2 dereferenceable(2)) #3 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) #4

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8), i16 noundef signext) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12displayLListbR5LListIsE(i1 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

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

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

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

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


; 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.LList = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 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.LList, align 8
  %2 = alloca i16, align 2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @_ZN5LListIsEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %2) #6
  invoke void @_Z10checkStateR5LListIsE(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %.preheader23 unwind label %5

.preheader23:                                     ; preds = %0, %22
  %.018 = phi i32 [ %8, %22 ], [ 0, %0 ]
  %exitcond.not = icmp eq i32 %.018, 5
  br i1 %exitcond.not, label %3, label %7

3:                                                ; preds = %.preheader23
  %4 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader22 unwind label %5

5:                                                ; preds = %23, %3, %0
  %6 = landingpad { ptr, i32 }
          cleanup
  br label %88

7:                                                ; preds = %.preheader23
  %8 = add nuw nsw i32 %.018, 1
  %9 = trunc nuw i32 %8 to i16
  %10 = mul nuw nsw i16 %9, 10
  store i16 %10, ptr %2, align 2, !tbaa !5
  %11 = invoke noundef zeroext i1 @_ZN5LListIsE6insertERKs(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 2 dereferenceable(2) %2)
          to label %12 unwind label %20

12:                                               ; preds = %7
  br i1 %11, label %13, label %22

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

15:                                               ; preds = %13
  %16 = load i16, ptr %2, align 2, !tbaa !5
  %17 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8) %14, i16 noundef signext %16)
          to label %18 unwind label %20

18:                                               ; preds = %15
  %19 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %22 unwind label %20

20:                                               ; preds = %22, %18, %15, %13, %7
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %88

22:                                               ; preds = %18, %12
  invoke void @_Z12displayLListbR5LListIsE(i1 noundef zeroext %11, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %.preheader23 unwind label %20, !llvm.loop !9

.preheader22:                                     ; preds = %3, %40
  %.017 = phi i32 [ %27, %40 ], [ 0, %3 ]
  %exitcond25.not = icmp eq i32 %.017, 2
  br i1 %exitcond25.not, label %23, label %26

23:                                               ; preds = %.preheader22
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader.preheader unwind label %5

.preheader.preheader:                             ; preds = %23
  store i16 50, ptr %2, align 2, !tbaa !5
  %25 = call noundef zeroext i1 @_ZN5LListIsE6removeERs(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 2 dereferenceable(2) %2)
  br i1 %25, label %41, label %50

26:                                               ; preds = %.preheader22
  %27 = add nuw nsw i32 %.017, 1
  %28 = trunc nuw i32 %27 to i16
  %29 = mul nuw nsw i16 %28, 10
  store i16 %29, ptr %2, align 2, !tbaa !5
  %30 = call noundef zeroext i1 @_ZNK5LListIsE8retrieveERs(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 2 dereferenceable(2) %2)
  br i1 %30, label %31, label %40

31:                                               ; preds = %26
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
          to label %33 unwind label %38

33:                                               ; preds = %31
  %34 = load i16, ptr %2, align 2, !tbaa !5
  %35 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8) %32, i16 noundef signext %34)
          to label %36 unwind label %38

36:                                               ; preds = %33
  %37 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %40 unwind label %38

38:                                               ; preds = %40, %36, %33, %31
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %88

40:                                               ; preds = %36, %26
  invoke void @_Z12displayLListbR5LListIsE(i1 noundef zeroext %30, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %.preheader22 unwind label %38, !llvm.loop !11

41:                                               ; preds = %.preheader.preheader
  %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %43 unwind label %48

43:                                               ; preds = %41
  %44 = load i16, ptr %2, align 2, !tbaa !5
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8) %42, i16 noundef signext %44)
          to label %46 unwind label %48

46:                                               ; preds = %43
  %47 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %50 unwind label %48

48:                                               ; preds = %86, %84, %81, %79, %77, %75, %72, %70, %68, %66, %63, %61, %59, %57, %54, %52, %50, %46, %43, %41
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %88

50:                                               ; preds = %46, %.preheader.preheader
  invoke void @_Z12displayLListbR5LListIsE(i1 noundef zeroext %25, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %.preheader.1 unwind label %48

.preheader.1:                                     ; preds = %50
  store i16 40, ptr %2, align 2, !tbaa !5
  %51 = call noundef zeroext i1 @_ZN5LListIsE6removeERs(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 2 dereferenceable(2) %2)
  br i1 %51, label %52, label %59

52:                                               ; preds = %.preheader.1
  %53 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %54 unwind label %48

54:                                               ; preds = %52
  %55 = load i16, ptr %2, align 2, !tbaa !5
  %56 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8) %53, i16 noundef signext %55)
          to label %57 unwind label %48

57:                                               ; preds = %54
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %59 unwind label %48

59:                                               ; preds = %57, %.preheader.1
  invoke void @_Z12displayLListbR5LListIsE(i1 noundef zeroext %51, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %.preheader.2 unwind label %48

.preheader.2:                                     ; preds = %59
  store i16 30, ptr %2, align 2, !tbaa !5
  %60 = call noundef zeroext i1 @_ZN5LListIsE6removeERs(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 2 dereferenceable(2) %2)
  br i1 %60, label %61, label %68

61:                                               ; preds = %.preheader.2
  %62 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %63 unwind label %48

63:                                               ; preds = %61
  %64 = load i16, ptr %2, align 2, !tbaa !5
  %65 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8) %62, i16 noundef signext %64)
          to label %66 unwind label %48

66:                                               ; preds = %63
  %67 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %68 unwind label %48

68:                                               ; preds = %66, %.preheader.2
  invoke void @_Z12displayLListbR5LListIsE(i1 noundef zeroext %60, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %.preheader.3 unwind label %48

.preheader.3:                                     ; preds = %68
  store i16 20, ptr %2, align 2, !tbaa !5
  %69 = call noundef zeroext i1 @_ZN5LListIsE6removeERs(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 2 dereferenceable(2) %2)
  br i1 %69, label %70, label %77

70:                                               ; preds = %.preheader.3
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %72 unwind label %48

72:                                               ; preds = %70
  %73 = load i16, ptr %2, align 2, !tbaa !5
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8) %71, i16 noundef signext %73)
          to label %75 unwind label %48

75:                                               ; preds = %72
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %77 unwind label %48

77:                                               ; preds = %75, %.preheader.3
  invoke void @_Z12displayLListbR5LListIsE(i1 noundef zeroext %69, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %.preheader.4 unwind label %48

.preheader.4:                                     ; preds = %77
  store i16 10, ptr %2, align 2, !tbaa !5
  %78 = call noundef zeroext i1 @_ZN5LListIsE6removeERs(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 2 dereferenceable(2) %2)
  br i1 %78, label %79, label %86

79:                                               ; preds = %.preheader.4
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %81 unwind label %48

81:                                               ; preds = %79
  %82 = load i16, ptr %2, align 2, !tbaa !5
  %83 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8) %80, i16 noundef signext %82)
          to label %84 unwind label %48

84:                                               ; preds = %81
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %86 unwind label %48

86:                                               ; preds = %84, %.preheader.4
  invoke void @_Z12displayLListbR5LListIsE(i1 noundef zeroext %78, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %87 unwind label %48

87:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %2) #6
  call void @_ZN5LListIsED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0

88:                                               ; preds = %48, %38, %20, %5
  %.pn = phi { ptr, i32 } [ %21, %20 ], [ %39, %38 ], [ %49, %48 ], [ %6, %5 ]
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %2) #6
  call void @_ZN5LListIsED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %1) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  resume { ptr, i32 } %.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 dso_local void @_ZN5LListIsEC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN5LListIsE6insertERKs(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 2 dereferenceable(2)) local_unnamed_addr #3 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 #4

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEs(ptr noundef nonnull align 8 dereferenceable(8), i16 noundef signext) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12displayLListbR5LListIsE(i1 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"short", !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}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass