; LLVM IR from gem5/gem5 :: ext/systemc/src/sysc/kernel/sc_module.ll (ZN7sc_core9sc_moduleC2ERKNS_14sc_module_nameE)

; 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.sc_core::sc_module" = type { %"class.sc_core::sc_object", %"class.sc_core::sc_process_host", %"class.sc_core::sc_sensitive", %"class.sc_core::sc_sensitive_pos", %"class.sc_core::sc_sensitive_neg", i8, ptr, i32, ptr, 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.sc_core::sc_process_host" = type { ptr }
%"class.sc_core::sc_sensitive" = type { ptr, i32, ptr }
%"class.sc_core::sc_sensitive_pos" = type { ptr, i32, ptr }
%"class.sc_core::sc_sensitive_neg" = type { ptr, i32, ptr }
%"class.sc_core::sc_module_name" = type <{ ptr, ptr, ptr, ptr, i8, [7 x i8] }>

@_ZTVN7sc_core9sc_moduleE = external dso_local unnamed_addr constant { [21 x ptr], [4 x ptr] }, align 8
@_ZN7sc_core30SC_ID_SC_MODULE_NAME_REQUIRED_E = external constant [0 x i8], align 1
@.str = external hidden unnamed_addr constant [85 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK7sc_core9sc_object10simcontextEv(ptr noundef nonnull align 8 dereferenceable(112)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv() #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7sc_core13sc_simcontext18get_object_managerEv(ptr noundef nonnull align 8 dereferenceable(344)) #4 align 2

declare noundef ptr @_ZN7sc_core17sc_object_manager24top_of_module_name_stackEv(ptr noundef nonnull align 8 dereferenceable(105)) #5

declare noundef ptr @_ZNK7sc_core14sc_module_namecvPKcEv(ptr noundef nonnull align 8 dereferenceable(33)) #5

declare void @_ZN7sc_core9sc_objectC2EPKc(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef) unnamed_addr #5

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

declare void @_ZN7sc_core12sc_sensitiveC1EPNS_9sc_moduleE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) unnamed_addr #5

declare void @_ZN7sc_core16sc_sensitive_posC1EPNS_9sc_moduleE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) unnamed_addr #5

declare void @_ZN7sc_core16sc_sensitive_negC1EPNS_9sc_moduleE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) unnamed_addr #5

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

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

; Function Attrs: nounwind
declare void @_ZN7sc_core16sc_sensitive_negD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #6

; Function Attrs: nounwind
declare void @_ZN7sc_core16sc_sensitive_posD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #6

; Function Attrs: nounwind
declare void @_ZN7sc_core12sc_sensitiveD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #6

; Function Attrs: nounwind
declare void @_ZN7sc_core9sc_objectD2Ev(ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #6

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7sc_core9sc_moduleC2ERKNS_14sc_module_nameE(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef nonnull align 8 dereferenceable(33) %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %8 = load ptr, ptr %3, align 8
  %9 = call noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
  %10 = call noundef ptr @_ZN7sc_core13sc_simcontext18get_object_managerEv(ptr noundef nonnull align 8 dereferenceable(344) %9)
  %11 = call noundef ptr @_ZN7sc_core17sc_object_manager24top_of_module_name_stackEv(ptr noundef nonnull align 8 dereferenceable(105) %10)
  %12 = call noundef ptr @_ZNK7sc_core14sc_module_namecvPKcEv(ptr noundef nonnull align 8 dereferenceable(33) %11)
  call void @_ZN7sc_core9sc_objectC2EPKc(ptr noundef nonnull align 8 dereferenceable(112) %8, ptr noundef %12)
  %13 = getelementptr inbounds i8, ptr %8, i64 112
  invoke void @_ZN7sc_core15sc_process_hostC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %14 unwind label %42

14:                                               ; preds = %2
  store ptr getelementptr inbounds inrange(-16, 152) ({ [21 x ptr], [4 x ptr] }, ptr @_ZTVN7sc_core9sc_moduleE, i32 0, i32 0, i32 2), ptr %8, align 8, !tbaa !9
  %15 = getelementptr inbounds i8, ptr %8, i64 112
  store ptr getelementptr inbounds inrange(-16, 16) ({ [21 x ptr], [4 x ptr] }, ptr @_ZTVN7sc_core9sc_moduleE, i32 0, i32 1, i32 2), ptr %15, align 8, !tbaa !9
  %16 = getelementptr inbounds %"class.sc_core::sc_module", ptr %8, i32 0, i32 2
  invoke void @_ZN7sc_core12sc_sensitiveC1EPNS_9sc_moduleE(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef %8)
          to label %17 unwind label %46

17:                                               ; preds = %14
  %18 = getelementptr inbounds %"class.sc_core::sc_module", ptr %8, i32 0, i32 3
  invoke void @_ZN7sc_core16sc_sensitive_posC1EPNS_9sc_moduleE(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef %8)
          to label %19 unwind label %50

19:                                               ; preds = %17
  %20 = getelementptr inbounds %"class.sc_core::sc_module", ptr %8, i32 0, i32 4
  invoke void @_ZN7sc_core16sc_sensitive_negC1EPNS_9sc_moduleE(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef %8)
          to label %21 unwind label %54

21:                                               ; preds = %19
  %22 = getelementptr inbounds %"class.sc_core::sc_module", ptr %8, i32 0, i32 5
  store i8 0, ptr %22, align 8, !tbaa !11
  %23 = getelementptr inbounds %"class.sc_core::sc_module", ptr %8, i32 0, i32 6
  store ptr null, ptr %23, align 8, !tbaa !34
  %24 = getelementptr inbounds %"class.sc_core::sc_module", ptr %8, i32 0, i32 7
  store i32 0, ptr %24, align 8, !tbaa !35
  %25 = getelementptr inbounds %"class.sc_core::sc_module", ptr %8, i32 0, i32 8
  store ptr null, ptr %25, align 8, !tbaa !36
  %26 = getelementptr inbounds %"class.sc_core::sc_module", ptr %8, i32 0, i32 9
  store ptr null, ptr %26, align 8, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %27 = invoke noundef ptr @_ZNK7sc_core9sc_object10simcontextEv(ptr noundef nonnull align 8 dereferenceable(112) %8)
          to label %28 unwind label %58

28:                                               ; preds = %21
  %29 = invoke noundef ptr @_ZN7sc_core13sc_simcontext18get_object_managerEv(ptr noundef nonnull align 8 dereferenceable(344) %27)
          to label %30 unwind label %58

30:                                               ; preds = %28
  %31 = invoke noundef ptr @_ZN7sc_core17sc_object_manager24top_of_module_name_stackEv(ptr noundef nonnull align 8 dereferenceable(105) %29)
          to label %32 unwind label %58

32:                                               ; preds = %30
  store ptr %31, ptr %7, align 8, !tbaa !5
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = icmp eq ptr null, %33
  br i1 %34, label %40, label %35

35:                                               ; preds = %32
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = getelementptr inbounds %"class.sc_core::sc_module_name", ptr %36, i32 0, i32 1
  %38 = load ptr, ptr %37, align 8, !tbaa !38
  %39 = icmp ne ptr null, %38
  br i1 %39, label %40, label %62

40:                                               ; preds = %35, %32
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef @_ZN7sc_core30SC_ID_SC_MODULE_NAME_REQUIRED_E, ptr noundef null, ptr noundef @.str, i32 noundef 222)
          to label %41 unwind label %58

41:                                               ; preds = %40
  br label %62

42:                                               ; preds = %2
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %5, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %6, align 4
  br label %72

46:                                               ; preds = %14
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %5, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %6, align 4
  br label %70

50:                                               ; preds = %17
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %5, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %6, align 4
  br label %69

54:                                               ; preds = %19
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %5, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %6, align 4
  br label %68

58:                                               ; preds = %63, %62, %40, %30, %28, %21
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %5, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @_ZN7sc_core16sc_sensitive_negD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  br label %68

62:                                               ; preds = %41, %35
  invoke void @_ZN7sc_core9sc_module14sc_module_initEv(ptr noundef nonnull align 8 dereferenceable(232) %8)
          to label %63 unwind label %58

63:                                               ; preds = %62
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN7sc_core14sc_module_name10set_moduleEPNS_9sc_moduleE(ptr noundef nonnull align 8 dereferenceable(33) %64, ptr noundef %8)
          to label %65 unwind label %58

65:                                               ; preds = %63
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = getelementptr inbounds %"class.sc_core::sc_module", ptr %8, i32 0, i32 9
  store ptr %66, ptr %67, align 8, !tbaa !37
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  ret void

68:                                               ; preds = %58, %54
  call void @_ZN7sc_core16sc_sensitive_posD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  br label %69

69:                                               ; preds = %68, %50
  call void @_ZN7sc_core12sc_sensitiveD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #7
  br label %70

70:                                               ; preds = %69, %46
  %71 = getelementptr inbounds i8, ptr %8, i64 112
  call void @_ZN7sc_core15sc_process_hostD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %71) #7
  br label %72

72:                                               ; preds = %70, %42
  call void @_ZN7sc_core9sc_objectD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %8) #7
  br label %73

73:                                               ; preds = %72
  %74 = load ptr, ptr %5, align 8
  %75 = load i32, ptr %6, align 4
  %76 = insertvalue { ptr, i32 } poison, ptr %74, 0
  %77 = insertvalue { ptr, i32 } %76, i32 %75, 1
  resume { ptr, i32 } %77
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 "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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !32, i64 192}
!12 = !{!"_ZTSN7sc_core9sc_moduleE", !13, i64 0, !25, i64 112, !26, i64 120, !28, i64 144, !30, i64 168, !32, i64 192, !6, i64 200, !33, i64 208, !6, i64 216, !6, i64 224}
!13 = !{!"_ZTSN7sc_core9sc_objectE", !6, i64 8, !14, i64 16, !18, i64 40, !22, i64 64, !6, i64 96, !6, i64 104}
!14 = !{!"_ZTSSt6vectorIPN7sc_core8sc_eventESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"_ZTSSt6vectorIPN7sc_core9sc_objectESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !23, i64 0, !24, i64 8, !7, i64 16}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!24 = !{!"long", !7, i64 0}
!25 = !{!"_ZTSN7sc_core15sc_process_hostE"}
!26 = !{!"_ZTSN7sc_core12sc_sensitiveE", !6, i64 0, !27, i64 8, !6, i64 16}
!27 = !{!"_ZTSN7sc_core12sc_sensitiveUt_E", !7, i64 0}
!28 = !{!"_ZTSN7sc_core16sc_sensitive_posE", !6, i64 0, !29, i64 8, !6, i64 16}
!29 = !{!"_ZTSN7sc_core16sc_sensitive_posUt_E", !7, i64 0}
!30 = !{!"_ZTSN7sc_core16sc_sensitive_negE", !6, i64 0, !31, i64 8, !6, i64 16}
!31 = !{!"_ZTSN7sc_core16sc_sensitive_negUt_E", !7, i64 0}
!32 = !{!"bool", !7, i64 0}
!33 = !{!"int", !7, i64 0}
!34 = !{!12, !6, i64 200}
!35 = !{!12, !33, i64 208}
!36 = !{!12, !6, i64 216}
!37 = !{!12, !6, i64 224}
!38 = !{!39, !6, i64 8}
!39 = !{!"_ZTSN7sc_core14sc_module_nameE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !32, i64 32}


; 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"

@_ZTVN7sc_core9sc_moduleE = external dso_local unnamed_addr constant { [21 x ptr], [4 x ptr] }, align 8
@_ZN7sc_core30SC_ID_SC_MODULE_NAME_REQUIRED_E = external constant [0 x i8], align 1
@.str = external hidden unnamed_addr constant [85 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv() local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN7sc_core13sc_simcontext18get_object_managerEv(ptr noundef nonnull align 8 dereferenceable(344)) local_unnamed_addr #3 align 2

declare noundef ptr @_ZN7sc_core17sc_object_manager24top_of_module_name_stackEv(ptr noundef nonnull align 8 dereferenceable(105)) local_unnamed_addr #4

declare noundef ptr @_ZNK7sc_core14sc_module_namecvPKcEv(ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #4

declare void @_ZN7sc_core9sc_objectC2EPKc(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef) unnamed_addr #4

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

declare void @_ZN7sc_core12sc_sensitiveC1EPNS_9sc_moduleE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) unnamed_addr #4

declare void @_ZN7sc_core16sc_sensitive_posC1EPNS_9sc_moduleE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) unnamed_addr #4

declare void @_ZN7sc_core16sc_sensitive_negC1EPNS_9sc_moduleE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7sc_core14sc_module_name10set_moduleEPNS_9sc_moduleE(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: nounwind
declare void @_ZN7sc_core16sc_sensitive_negD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5

; Function Attrs: nounwind
declare void @_ZN7sc_core16sc_sensitive_posD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5

; Function Attrs: nounwind
declare void @_ZN7sc_core12sc_sensitiveD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5

; Function Attrs: nounwind
declare void @_ZN7sc_core9sc_objectD2Ev(ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7sc_core9sc_moduleC2ERKNS_14sc_module_nameE(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr nocapture noundef nonnull readnone align 8 dereferenceable(33) %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = tail call noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
  %4 = tail call noundef ptr @_ZN7sc_core13sc_simcontext18get_object_managerEv(ptr noundef nonnull align 8 dereferenceable(344) %3)
  %5 = tail call noundef ptr @_ZN7sc_core17sc_object_manager24top_of_module_name_stackEv(ptr noundef nonnull align 8 dereferenceable(105) %4)
  %6 = tail call noundef ptr @_ZNK7sc_core14sc_module_namecvPKcEv(ptr noundef nonnull align 8 dereferenceable(33) %5)
  tail call void @_ZN7sc_core9sc_objectC2EPKc(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef %6)
  %7 = getelementptr inbounds i8, ptr %0, i64 112
  tail call void @_ZN7sc_core15sc_process_hostC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7)
  store ptr getelementptr inbounds inrange(-16, 152) (i8, ptr @_ZTVN7sc_core9sc_moduleE, i64 16), ptr %0, align 8, !tbaa !5
  store ptr getelementptr inbounds inrange(-16, 16) (i8, ptr @_ZTVN7sc_core9sc_moduleE, i64 184), ptr %7, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 120
  invoke void @_ZN7sc_core12sc_sensitiveC1EPNS_9sc_moduleE(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %0)
          to label %9 unwind label %27

9:                                                ; preds = %2
  %10 = getelementptr inbounds i8, ptr %0, i64 144
  invoke void @_ZN7sc_core16sc_sensitive_posC1EPNS_9sc_moduleE(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull %0)
          to label %11 unwind label %29

11:                                               ; preds = %9
  %12 = getelementptr inbounds i8, ptr %0, i64 168
  invoke void @_ZN7sc_core16sc_sensitive_negC1EPNS_9sc_moduleE(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull %0)
          to label %13 unwind label %31

13:                                               ; preds = %11
  %14 = getelementptr inbounds i8, ptr %0, i64 192
  store i8 0, ptr %14, align 8, !tbaa !8
  %15 = getelementptr inbounds i8, ptr %0, i64 200
  store ptr null, ptr %15, align 8, !tbaa !33
  %16 = getelementptr inbounds i8, ptr %0, i64 208
  store i32 0, ptr %16, align 8, !tbaa !34
  %17 = getelementptr inbounds i8, ptr %0, i64 216
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %17, i8 0, i64 16, i1 false)
  %18 = tail call noundef ptr @_ZNK7sc_core9sc_object10simcontextEv(ptr noundef nonnull align 8 dereferenceable(112) %0)
  %19 = tail call noundef ptr @_ZN7sc_core13sc_simcontext18get_object_managerEv(ptr noundef nonnull align 8 dereferenceable(344) %18)
  %20 = invoke noundef ptr @_ZN7sc_core17sc_object_manager24top_of_module_name_stackEv(ptr noundef nonnull align 8 dereferenceable(105) %19)
          to label %21 unwind label %33

21:                                               ; preds = %13
  %22 = icmp eq ptr %20, null
  br i1 %22, label %26, label %23

23:                                               ; preds = %21
  %24 = getelementptr inbounds i8, ptr %20, i64 8
  %25 = load ptr, ptr %24, align 8, !tbaa !35
  %.not = icmp eq ptr %25, null
  br i1 %.not, label %35, label %26

26:                                               ; preds = %23, %21
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 2, ptr noundef nonnull @_ZN7sc_core30SC_ID_SC_MODULE_NAME_REQUIRED_E, ptr noundef null, ptr noundef nonnull @.str, i32 noundef 222)
          to label %35 unwind label %33

27:                                               ; preds = %2
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %40

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

31:                                               ; preds = %11
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %38

33:                                               ; preds = %35, %26, %13
  %34 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN7sc_core16sc_sensitive_negD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  br label %38

35:                                               ; preds = %26, %23
  invoke void @_ZN7sc_core9sc_module14sc_module_initEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
          to label %36 unwind label %33

36:                                               ; preds = %35
  %37 = getelementptr inbounds i8, ptr %0, i64 224
  tail call void @_ZN7sc_core14sc_module_name10set_moduleEPNS_9sc_moduleE(ptr noundef nonnull align 8 dereferenceable(33) %20, ptr noundef nonnull %0)
  store ptr %20, ptr %37, align 8, !tbaa !37
  ret void

38:                                               ; preds = %33, %31
  %.pn = phi { ptr, i32 } [ %34, %33 ], [ %32, %31 ]
  tail call void @_ZN7sc_core16sc_sensitive_posD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  br label %39

39:                                               ; preds = %38, %29
  %.pn.pn = phi { ptr, i32 } [ %.pn, %38 ], [ %30, %29 ]
  tail call void @_ZN7sc_core12sc_sensitiveD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  br label %40

40:                                               ; preds = %39, %27
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %39 ], [ %28, %27 ]
  tail call void @_ZN7sc_core15sc_process_hostD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  tail call void @_ZN7sc_core9sc_objectD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %0) #7
  resume { ptr, i32 } %.pn.pn.pn
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { 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 #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !31, i64 192}
!9 = !{!"_ZTSN7sc_core9sc_moduleE", !10, i64 0, !24, i64 112, !25, i64 120, !27, i64 144, !29, i64 168, !31, i64 192, !11, i64 200, !32, i64 208, !11, i64 216, !11, i64 224}
!10 = !{!"_ZTSN7sc_core9sc_objectE", !11, i64 8, !13, i64 16, !17, i64 40, !21, i64 64, !11, i64 96, !11, i64 104}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !7, i64 0}
!13 = !{!"_ZTSSt6vectorIPN7sc_core8sc_eventESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!17 = !{!"_ZTSSt6vectorIPN7sc_core9sc_objectESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !22, i64 0, !23, i64 8, !12, i64 16}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !11, i64 0}
!23 = !{!"long", !12, i64 0}
!24 = !{!"_ZTSN7sc_core15sc_process_hostE"}
!25 = !{!"_ZTSN7sc_core12sc_sensitiveE", !11, i64 0, !26, i64 8, !11, i64 16}
!26 = !{!"_ZTSN7sc_core12sc_sensitiveUt_E", !12, i64 0}
!27 = !{!"_ZTSN7sc_core16sc_sensitive_posE", !11, i64 0, !28, i64 8, !11, i64 16}
!28 = !{!"_ZTSN7sc_core16sc_sensitive_posUt_E", !12, i64 0}
!29 = !{!"_ZTSN7sc_core16sc_sensitive_negE", !11, i64 0, !30, i64 8, !11, i64 16}
!30 = !{!"_ZTSN7sc_core16sc_sensitive_negUt_E", !12, i64 0}
!31 = !{!"bool", !12, i64 0}
!32 = !{!"int", !12, i64 0}
!33 = !{!9, !11, i64 200}
!34 = !{!9, !32, i64 208}
!35 = !{!36, !11, i64 8}
!36 = !{!"_ZTSN7sc_core14sc_module_nameE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !31, i64 32}
!37 = !{!9, !11, i64 224}


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