; LLVM IR from gem5/gem5 :: src/systemc/tests/systemc/utils/sc_vector/test08 (test08)

; 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.sc_core::sc_vector" = type { %"class.sc_core::sc_vector_base" }
%"class.sc_core::sc_vector_base" = type { %"class.sc_core::sc_object", %"class.std::vector.8", ptr }
%"class.sc_core::sc_object" = type { ptr, ptr, %"class.std::vector", %"class.std::vector.0", %"class.std::__cxx11::basic_string", ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<void *, std::allocator<void *>>::_Vector_impl" }
%"struct.std::_Vector_base<void *, std::allocator<void *>>::_Vector_impl" = type { %"struct.std::_Vector_base<void *, std::allocator<void *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<void *, std::allocator<void *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_vector.13" = type { %"class.sc_core::sc_vector_base" }
%"class.sc_core::sc_vector_assembly" = type { ptr, i64, ptr }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@_ZN7sc_core23SC_ID_ASSERTION_FAILED_E = external constant [0 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [70 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local i32 @sc_main(i32 noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca %"class.sc_core::sc_vector", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.sc_core::sc_vector.13", align 8
  %9 = alloca %"class.sc_core::sc_vector_assembly", align 8
  %10 = alloca %"class.sc_core::sc_vector_assembly", align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  %11 = call noundef i32 @_ZN7sc_core17sc_report_handler11set_actionsENS_11sc_severityEj(i32 noundef 2, i32 noundef 8)
  call void @llvm.lifetime.start.p0(i64 144, ptr %5) #5
  call void @_ZN7sc_core9sc_vectorINS_8sc_eventEEC2EPKcm(ptr noundef nonnull align 8 dereferenceable(144) %5, ptr noundef @.str, i64 noundef 1)
  %12 = invoke noundef i64 @_ZNK7sc_core14sc_vector_base4sizeEv(ptr noundef nonnull align 8 dereferenceable(144) %5)
          to label %13 unwind label %61

13:                                               ; preds = %2
  %14 = icmp eq i64 %12, 1
  br i1 %14, label %15, label %16

15:                                               ; preds = %13
  br label %18

16:                                               ; preds = %13
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 46)
          to label %17 unwind label %61

17:                                               ; preds = %16
  br label %18

18:                                               ; preds = %17, %15
  %19 = phi i32 [ 0, %15 ], [ 0, %17 ]
  %20 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7sc_core14sc_vector_base12get_elementsEv(ptr noundef nonnull align 8 dereferenceable(144) %5)
          to label %21 unwind label %61

21:                                               ; preds = %18
  %22 = call noundef i64 @_ZNKSt6vectorIPN7sc_core9sc_objectESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #5
  %23 = icmp eq i64 %22, 0
  br i1 %23, label %24, label %25

24:                                               ; preds = %21
  br label %27

25:                                               ; preds = %21
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef @.str.4, ptr noundef @.str.3, i32 noundef 48)
          to label %26 unwind label %61

26:                                               ; preds = %25
  br label %27

27:                                               ; preds = %26, %24
  %28 = phi i32 [ 0, %24 ], [ 0, %26 ]
  call void @llvm.lifetime.start.p0(i64 144, ptr %8) #5
  invoke void @_ZN7sc_core9sc_vectorI3fooEC2EPKcm(ptr noundef nonnull align 8 dereferenceable(144) %8, ptr noundef @.str.5, i64 noundef 1)
          to label %29 unwind label %65

29:                                               ; preds = %27
  %30 = invoke noundef i64 @_ZNK7sc_core14sc_vector_base4sizeEv(ptr noundef nonnull align 8 dereferenceable(144) %8)
          to label %31 unwind label %69

31:                                               ; preds = %29
  %32 = icmp eq i64 %30, 1
  br i1 %32, label %33, label %34

33:                                               ; preds = %31
  br label %36

34:                                               ; preds = %31
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef @.str.6, ptr noundef @.str.3, i32 noundef 52)
          to label %35 unwind label %69

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35, %33
  %37 = phi i32 [ 0, %33 ], [ 0, %35 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #5
  invoke void @_ZN7sc_core18sc_assemble_vectorI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_18sc_vector_assemblyIT_T0_EERNS_9sc_vectorIS9_EEMS9_SA_(ptr dead_on_unwind writable sret(%"class.sc_core::sc_vector_assembly") align 8 %9, ptr noundef nonnull align 8 dereferenceable(144) %8, i64 0)
          to label %38 unwind label %73

38:                                               ; preds = %36
  %39 = invoke noundef i64 @_ZNK7sc_core18sc_vector_assemblyI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %40 unwind label %77

40:                                               ; preds = %38
  %41 = icmp eq i64 %39, 1
  br i1 %41, label %42, label %43

42:                                               ; preds = %40
  br label %45

43:                                               ; preds = %40
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef @.str.7, ptr noundef @.str.3, i32 noundef 53)
          to label %44 unwind label %77

44:                                               ; preds = %43
  br label %45

45:                                               ; preds = %44, %42
  %46 = phi i32 [ 0, %42 ], [ 0, %44 ]
  call void @_ZN7sc_core18sc_vector_assemblyI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  invoke void @_ZN7sc_core18sc_assemble_vectorI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_18sc_vector_assemblyIT_T0_EERNS_9sc_vectorIS9_EEMS9_SA_(ptr dead_on_unwind writable sret(%"class.sc_core::sc_vector_assembly") align 8 %10, ptr noundef nonnull align 8 dereferenceable(144) %8, i64 0)
          to label %47 unwind label %82

47:                                               ; preds = %45
  %48 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7sc_core18sc_vector_assemblyI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE12get_elementsEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %49 unwind label %86

49:                                               ; preds = %47
  %50 = call noundef i64 @_ZNKSt6vectorIPN7sc_core9sc_objectESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #5
  %51 = icmp eq i64 %50, 0
  br i1 %51, label %52, label %53

52:                                               ; preds = %49
  br label %55

53:                                               ; preds = %49
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef @.str.8, ptr noundef @.str.3, i32 noundef 56)
          to label %54 unwind label %86

54:                                               ; preds = %53
  br label %55

55:                                               ; preds = %54, %52
  %56 = phi i32 [ 0, %52 ], [ 0, %54 ]
  call void @_ZN7sc_core18sc_vector_assemblyI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.9)
          to label %58 unwind label %69

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

60:                                               ; preds = %58
  call void @_ZN7sc_core9sc_vectorI3fooED2Ev(ptr noundef nonnull align 8 dereferenceable(144) %8) #5
  call void @llvm.lifetime.end.p0(i64 144, ptr %8) #5
  call void @_ZN7sc_core9sc_vectorINS_8sc_eventEED2Ev(ptr noundef nonnull align 8 dereferenceable(144) %5) #5
  call void @llvm.lifetime.end.p0(i64 144, ptr %5) #5
  ret i32 0

61:                                               ; preds = %25, %18, %16, %2
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %6, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %7, align 4
  br label %93

65:                                               ; preds = %27
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %6, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %7, align 4
  br label %92

69:                                               ; preds = %58, %55, %34, %29
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %6, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %7, align 4
  br label %91

73:                                               ; preds = %36
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %6, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %7, align 4
  br label %81

77:                                               ; preds = %43, %38
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %6, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %7, align 4
  call void @_ZN7sc_core18sc_vector_assemblyI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  br label %81

81:                                               ; preds = %77, %73
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  br label %91

82:                                               ; preds = %45
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %6, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %7, align 4
  br label %90

86:                                               ; preds = %53, %47
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %6, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %7, align 4
  call void @_ZN7sc_core18sc_vector_assemblyI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  br label %90

90:                                               ; preds = %86, %82
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  br label %91

91:                                               ; preds = %90, %81, %69
  call void @_ZN7sc_core9sc_vectorI3fooED2Ev(ptr noundef nonnull align 8 dereferenceable(144) %8) #5
  br label %92

92:                                               ; preds = %91, %65
  call void @llvm.lifetime.end.p0(i64 144, ptr %8) #5
  br label %93

93:                                               ; preds = %92, %61
  call void @_ZN7sc_core9sc_vectorINS_8sc_eventEED2Ev(ptr noundef nonnull align 8 dereferenceable(144) %5) #5
  call void @llvm.lifetime.end.p0(i64 144, ptr %5) #5
  br label %94

94:                                               ; preds = %93
  %95 = load ptr, ptr %6, align 8
  %96 = load i32, ptr %7, align 4
  %97 = insertvalue { ptr, i32 } poison, ptr %95, 0
  %98 = insertvalue { ptr, i32 } %97, i32 %96, 1
  resume { ptr, i32 } %98
}

declare noundef i32 @_ZN7sc_core17sc_report_handler11set_actionsENS_11sc_severityEj(i32 noundef, i32 noundef) #1

; 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 @_ZN7sc_core9sc_vectorINS_8sc_eventEEC2EPKcm(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef, i64 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7sc_core14sc_vector_base4sizeEv(ptr noundef nonnull align 8 dereferenceable(144)) #3 align 2

declare i32 @__gxx_personality_v0(...)

declare void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7sc_core14sc_vector_base12get_elementsEv(ptr noundef nonnull align 8 dereferenceable(144)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIPN7sc_core9sc_objectESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7sc_core9sc_vectorI3fooEC2EPKcm(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef, i64 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7sc_core18sc_assemble_vectorI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_18sc_vector_assemblyIT_T0_EERNS_9sc_vectorIS9_EEMS9_SA_(ptr dead_on_unwind noalias writable sret(%"class.sc_core::sc_vector_assembly") align 8, ptr noundef nonnull align 8 dereferenceable(144), i64) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7sc_core18sc_vector_assemblyI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7sc_core18sc_vector_assemblyI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 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: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7sc_core18sc_vector_assemblyI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE12get_elementsEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 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 nounwind uwtable
declare dso_local void @_ZN7sc_core9sc_vectorI3fooED2Ev(ptr noundef nonnull align 8 dereferenceable(144)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7sc_core9sc_vectorINS_8sc_eventEED2Ev(ptr noundef nonnull align 8 dereferenceable(144)) unnamed_addr #3 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 = { "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 = { 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 #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 = { 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 = !{!"any pointer", !7, i64 0}


; 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.sc_core::sc_vector" = type { %"class.sc_core::sc_vector_base" }
%"class.sc_core::sc_vector_base" = type { %"class.sc_core::sc_object", %"class.std::vector.8", ptr }
%"class.sc_core::sc_object" = type { ptr, ptr, %"class.std::vector", %"class.std::vector.0", %"class.std::__cxx11::basic_string", ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<void *, std::allocator<void *>>::_Vector_impl" }
%"struct.std::_Vector_base<void *, std::allocator<void *>>::_Vector_impl" = type { %"struct.std::_Vector_base<void *, std::allocator<void *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<void *, std::allocator<void *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_vector.13" = type { %"class.sc_core::sc_vector_base" }
%"class.sc_core::sc_vector_assembly" = type { ptr, i64, ptr }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@_ZN7sc_core23SC_ID_ASSERTION_FAILED_E = external constant [0 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [70 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @sc_main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.sc_core::sc_vector", align 8
  %4 = alloca %"class.sc_core::sc_vector.13", align 8
  %5 = alloca %"class.sc_core::sc_vector_assembly", align 8
  %6 = alloca %"class.sc_core::sc_vector_assembly", align 8
  %7 = tail call noundef i32 @_ZN7sc_core17sc_report_handler11set_actionsENS_11sc_severityEj(i32 noundef 2, i32 noundef 8)
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %3) #5
  call void @_ZN7sc_core9sc_vectorINS_8sc_eventEEC2EPKcm(ptr noundef nonnull align 8 dereferenceable(144) %3, ptr noundef nonnull @.str, i64 noundef 1)
  %8 = call noundef i64 @_ZNK7sc_core14sc_vector_base4sizeEv(ptr noundef nonnull align 8 dereferenceable(144) %3)
  %9 = icmp eq i64 %8, 1
  br i1 %9, label %11, label %10

10:                                               ; preds = %2
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef nonnull @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 46)
          to label %11 unwind label %39

11:                                               ; preds = %10, %2
  %12 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7sc_core14sc_vector_base12get_elementsEv(ptr noundef nonnull align 8 dereferenceable(144) %3)
          to label %13 unwind label %39

13:                                               ; preds = %11
  %14 = call noundef i64 @_ZNKSt6vectorIPN7sc_core9sc_objectESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  %15 = icmp eq i64 %14, 0
  br i1 %15, label %17, label %16

16:                                               ; preds = %13
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef nonnull @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.3, i32 noundef 48)
          to label %17 unwind label %39

17:                                               ; preds = %16, %13
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %4) #5
  invoke void @_ZN7sc_core9sc_vectorI3fooEC2EPKcm(ptr noundef nonnull align 8 dereferenceable(144) %4, ptr noundef nonnull @.str.5, i64 noundef 1)
          to label %18 unwind label %41

18:                                               ; preds = %17
  %19 = call noundef i64 @_ZNK7sc_core14sc_vector_base4sizeEv(ptr noundef nonnull align 8 dereferenceable(144) %4)
  %20 = icmp eq i64 %19, 1
  br i1 %20, label %22, label %21

21:                                               ; preds = %18
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef nonnull @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.3, i32 noundef 52)
          to label %22 unwind label %43

22:                                               ; preds = %21, %18
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  invoke void @_ZN7sc_core18sc_assemble_vectorI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_18sc_vector_assemblyIT_T0_EERNS_9sc_vectorIS9_EEMS9_SA_(ptr dead_on_unwind nonnull writable sret(%"class.sc_core::sc_vector_assembly") align 8 %5, ptr noundef nonnull align 8 dereferenceable(144) %4, i64 0)
          to label %23 unwind label %45

23:                                               ; preds = %22
  %24 = call noundef i64 @_ZNK7sc_core18sc_vector_assemblyI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %25 = icmp eq i64 %24, 1
  br i1 %25, label %27, label %26

26:                                               ; preds = %23
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef nonnull @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.3, i32 noundef 53)
          to label %27 unwind label %47

27:                                               ; preds = %26, %23
  call void @_ZN7sc_core18sc_vector_assemblyI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  invoke void @_ZN7sc_core18sc_assemble_vectorI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_18sc_vector_assemblyIT_T0_EERNS_9sc_vectorIS9_EEMS9_SA_(ptr dead_on_unwind nonnull writable sret(%"class.sc_core::sc_vector_assembly") align 8 %6, ptr noundef nonnull align 8 dereferenceable(144) %4, i64 0)
          to label %28 unwind label %50

28:                                               ; preds = %27
  %29 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7sc_core18sc_vector_assemblyI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE12get_elementsEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %30 unwind label %52

30:                                               ; preds = %28
  %31 = call noundef i64 @_ZNKSt6vectorIPN7sc_core9sc_objectESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #5
  %32 = icmp eq i64 %31, 0
  br i1 %32, label %34, label %33

33:                                               ; preds = %30
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef nonnull @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.3, i32 noundef 56)
          to label %34 unwind label %52

34:                                               ; preds = %33, %30
  call void @_ZN7sc_core18sc_vector_assemblyI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  %35 = 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.9)
          to label %36 unwind label %43

36:                                               ; preds = %34
  %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 %38 unwind label %43

38:                                               ; preds = %36
  call void @_ZN7sc_core9sc_vectorI3fooED2Ev(ptr noundef nonnull align 8 dereferenceable(144) %4) #5
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %4) #5
  call void @_ZN7sc_core9sc_vectorINS_8sc_eventEED2Ev(ptr noundef nonnull align 8 dereferenceable(144) %3) #5
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %3) #5
  ret i32 0

39:                                               ; preds = %16, %11, %10
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %57

41:                                               ; preds = %17
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %56

43:                                               ; preds = %36, %34, %21
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %55

45:                                               ; preds = %22
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %49

47:                                               ; preds = %26
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7sc_core18sc_vector_assemblyI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %49

49:                                               ; preds = %47, %45
  %.pn = phi { ptr, i32 } [ %48, %47 ], [ %46, %45 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  br label %55

50:                                               ; preds = %27
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %54

52:                                               ; preds = %33, %28
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7sc_core18sc_vector_assemblyI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  br label %54

54:                                               ; preds = %52, %50
  %.pn7 = phi { ptr, i32 } [ %53, %52 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  br label %55

55:                                               ; preds = %54, %49, %43
  %.pn9 = phi { ptr, i32 } [ %44, %43 ], [ %.pn7, %54 ], [ %.pn, %49 ]
  call void @_ZN7sc_core9sc_vectorI3fooED2Ev(ptr noundef nonnull align 8 dereferenceable(144) %4) #5
  br label %56

56:                                               ; preds = %55, %41
  %.pn9.pn = phi { ptr, i32 } [ %.pn9, %55 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %4) #5
  br label %57

57:                                               ; preds = %56, %39
  %.pn9.pn.pn = phi { ptr, i32 } [ %.pn9.pn, %56 ], [ %40, %39 ]
  call void @_ZN7sc_core9sc_vectorINS_8sc_eventEED2Ev(ptr noundef nonnull align 8 dereferenceable(144) %3) #5
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn9.pn.pn
}

declare noundef i32 @_ZN7sc_core17sc_report_handler11set_actionsENS_11sc_severityEj(i32 noundef, i32 noundef) local_unnamed_addr #1

; 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 @_ZN7sc_core9sc_vectorINS_8sc_eventEEC2EPKcm(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef, i64 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7sc_core14sc_vector_base4sizeEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

declare void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7sc_core14sc_vector_base12get_elementsEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIPN7sc_core9sc_objectESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7sc_core9sc_vectorI3fooEC2EPKcm(ptr noundef nonnull align 8 dereferenceable(144), ptr noundef, i64 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7sc_core18sc_assemble_vectorI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_18sc_vector_assemblyIT_T0_EERNS_9sc_vectorIS9_EEMS9_SA_(ptr dead_on_unwind noalias writable sret(%"class.sc_core::sc_vector_assembly") align 8, ptr noundef nonnull align 8 dereferenceable(144), i64) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7sc_core18sc_vector_assemblyI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7sc_core18sc_vector_assemblyI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 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: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7sc_core18sc_vector_assemblyI3fooNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE12get_elementsEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 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

; 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 #0 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 nounwind uwtable
declare dso_local void @_ZN7sc_core9sc_vectorI3fooED2Ev(ptr noundef nonnull align 8 dereferenceable(144)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7sc_core9sc_vectorINS_8sc_eventEED2Ev(ptr noundef nonnull align 8 dereferenceable(144)) unnamed_addr #3 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 = { "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 = { 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 #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 = { 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)"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass