; LLVM IR from gem5/gem5 :: src/systemc/tests/systemc/1666-2011-compliance/stepwise_simulation (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.sc_core::sc_time" = type { i64 }
%"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_signal" = type { %"class.sc_core::sc_signal_inout_if", %"class.sc_core::sc_prim_channel", %"struct.sc_core::sc_writer_policy_check", ptr, i8, i64, ptr, i8, ptr, ptr }
%"class.sc_core::sc_signal_inout_if" = type { %"class.sc_core::sc_signal_in_if", %"class.sc_core::sc_signal_write_if" }
%"class.sc_core::sc_signal_in_if" = type { %"class.sc_core::sc_interface" }
%"class.sc_core::sc_interface" = type { ptr }
%"class.sc_core::sc_signal_write_if" = type { %"class.sc_core::sc_interface" }
%"class.sc_core::sc_prim_channel" = type { %"class.sc_core::sc_object", ptr, ptr }
%"class.sc_core::sc_object" = type { ptr, ptr, %"class.std::vector", %"class.std::vector.3", %"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.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = 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] }
%"struct.sc_core::sc_writer_policy_check" = type { %"struct.sc_core::sc_writer_policy_check_port", %"struct.sc_core::sc_writer_policy_check_write" }
%"struct.sc_core::sc_writer_policy_check_port" = type { ptr }
%"struct.sc_core::sc_writer_policy_check_write" = type { i8, ptr }
%struct.echo = type <{ %"class.sc_core::sc_module", [2 x %"class.sc_core::sc_event"], i32, [4 x i8] }>
%"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_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_event" = type { %"class.std::__cxx11::basic_string", ptr, ptr, i32, i32, ptr, %"class.std::vector.8", %"class.std::vector.8", %"class.std::vector.13", %"class.std::vector.13" }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<sc_core::sc_method_process *, std::allocator<sc_core::sc_method_process *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_method_process *, std::allocator<sc_core::sc_method_process *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_method_process *, std::allocator<sc_core::sc_method_process *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_method_process *, std::allocator<sc_core::sc_method_process *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_module_name" = type <{ ptr, ptr, ptr, ptr, i8, [7 x i8] }>

@_ZL5delay = external hidden global %"class.sc_core::sc_time", align 8
@_ZN7sc_core12SC_ZERO_TIMEE = external global %"class.sc_core::sc_time", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZN7sc_core23SC_ID_ASSERTION_FAILED_E = external constant [0 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [134 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [8 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_core13sc_time_stampEv() #4

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

declare void @_ZN7sc_core8sc_startERKNS_7sc_timeENS_20sc_starvation_policyE(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

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

; 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_time", align 8
  %6 = alloca %"class.sc_core::sc_time", align 8
  %7 = alloca %"class.sc_core::sc_signal", align 8
  %8 = alloca %struct.echo, align 8
  %9 = alloca %"class.sc_core::sc_module_name", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.sc_core::sc_time", align 8
  %14 = alloca %"class.sc_core::sc_time", align 8
  %15 = alloca %"class.sc_core::sc_time", align 8
  %16 = alloca %"class.sc_core::sc_time", align 8
  %17 = alloca %"class.sc_core::sc_time", align 8
  %18 = alloca i8, align 1
  %19 = alloca %"class.sc_core::sc_time", align 8
  %20 = alloca %"class.sc_core::sc_time", align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  %21 = call noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
  %22 = call noundef zeroext i1 @_ZN7sc_core19sc_pending_activityEPKNS_13sc_simcontextE(ptr noundef %21)
  br i1 %22, label %24, label %23

23:                                               ; preds = %2
  br label %25

24:                                               ; preds = %2
  call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef @.str.12, ptr noundef @.str.6, i32 noundef 118)
  br label %25

25:                                               ; preds = %24, %23
  %26 = phi i32 [ 0, %23 ], [ 0, %24 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %27 = call noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
  call void @_ZN7sc_core27sc_time_to_pending_activityEPKNS_13sc_simcontextE(ptr dead_on_unwind writable sret(%"class.sc_core::sc_time") align 8 %5, ptr noundef %27)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_core11sc_max_timeEv()
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_core13sc_time_stampEv()
  call void @_ZN7sc_coremiERKNS_7sc_timeES2_(ptr dead_on_unwind writable sret(%"class.sc_core::sc_time") align 8 %6, ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29)
  %30 = call noundef zeroext i1 @_ZNK7sc_core7sc_timeeqERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  br i1 %30, label %31, label %32

31:                                               ; preds = %25
  br label %33

32:                                               ; preds = %25
  call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef @.str.13, ptr noundef @.str.6, i32 noundef 120)
  br label %33

33:                                               ; preds = %32, %31
  %34 = phi i32 [ 0, %31 ], [ 0, %32 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 224, ptr %7) #7
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEC1EPKc(ptr noundef nonnull align 8 dereferenceable(224) %7, ptr noundef @.str.14)
  call void @llvm.lifetime.start.p0(i64 560, ptr %8) #7
  invoke void @_ZN7sc_core14sc_module_nameC1EPKc(ptr noundef nonnull align 8 dereferenceable(33) %9, ptr noundef @.str.15)
          to label %35 unwind label %41

35:                                               ; preds = %33
  invoke void @_ZN4echoC2EN7sc_core14sc_module_nameE(ptr noundef nonnull align 8 dereferenceable(556) %8, ptr noundef %9)
          to label %36 unwind label %45

36:                                               ; preds = %35
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %9) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %59, %36
  %38 = load i32, ptr %12, align 4, !tbaa !5
  %39 = icmp slt i32 %38, 2
  br i1 %39, label %49, label %40

40:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %66

41:                                               ; preds = %33
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %10, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %11, align 4
  br label %207

45:                                               ; preds = %35
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %10, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %11, align 4
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %9) #7
  br label %207

49:                                               ; preds = %37
  %50 = getelementptr inbounds %struct.echo, ptr %8, i32 0, i32 1
  %51 = load i32, ptr %12, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [2 x %"class.sc_core::sc_event"], ptr %50, i64 0, i64 %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %54 = load i32, ptr %12, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  %56 = sitofp i32 %55 to double
  invoke void @_ZN7sc_coremlEdRKNS_7sc_timeE(ptr dead_on_unwind writable sret(%"class.sc_core::sc_time") align 8 %13, double noundef %56, ptr noundef nonnull align 8 dereferenceable(8) @_ZL5delay)
          to label %57 unwind label %62

57:                                               ; preds = %49
  invoke void @_ZN7sc_core8sc_event6notifyERKNS_7sc_timeE(ptr noundef nonnull align 8 dereferenceable(160) %53, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %58 unwind label %62

58:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %59

59:                                               ; preds = %58
  %60 = load i32, ptr %12, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %12, align 4, !tbaa !5
  br label %37, !llvm.loop !11

62:                                               ; preds = %57, %49
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %10, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %206

66:                                               ; preds = %40
  %67 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %68 unwind label %127

68:                                               ; preds = %66
  %69 = invoke noundef zeroext i1 @_ZN7sc_core34sc_pending_activity_at_future_timeEPKNS_13sc_simcontextE(ptr noundef %67)
          to label %70 unwind label %127

70:                                               ; preds = %68
  br i1 %69, label %71, label %72

71:                                               ; preds = %70
  br label %74

72:                                               ; preds = %70
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef @.str.16, ptr noundef @.str.6, i32 noundef 129)
          to label %73 unwind label %127

73:                                               ; preds = %72
  br label %74

74:                                               ; preds = %73, %71
  %75 = phi i32 [ 0, %71 ], [ 0, %73 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %76 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %77 unwind label %131

77:                                               ; preds = %74
  invoke void @_ZN7sc_core27sc_time_to_pending_activityEPKNS_13sc_simcontextE(ptr dead_on_unwind writable sret(%"class.sc_core::sc_time") align 8 %14, ptr noundef %76)
          to label %78 unwind label %131

78:                                               ; preds = %77
  %79 = invoke noundef zeroext i1 @_ZNK7sc_core7sc_timeeqERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) @_ZL5delay)
          to label %80 unwind label %131

80:                                               ; preds = %78
  br i1 %79, label %81, label %82

81:                                               ; preds = %80
  br label %84

82:                                               ; preds = %80
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef @.str.17, ptr noundef @.str.6, i32 noundef 130)
          to label %83 unwind label %131

83:                                               ; preds = %82
  br label %84

84:                                               ; preds = %83, %81
  %85 = phi i32 [ 0, %81 ], [ 0, %83 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  invoke void @_Z7do_stepRKN7sc_core7sc_timeE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN7sc_core12SC_ZERO_TIMEE)
          to label %86 unwind label %127

86:                                               ; preds = %84
  br label %87

87:                                               ; preds = %126, %86
  %88 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %89 unwind label %127

89:                                               ; preds = %87
  %90 = invoke noundef zeroext i1 @_ZN7sc_core19sc_pending_activityEPKNS_13sc_simcontextE(ptr noundef %88)
          to label %91 unwind label %127

91:                                               ; preds = %89
  br i1 %90, label %92, label %147

92:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %93 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %94 unwind label %127

94:                                               ; preds = %92
  %95 = invoke noundef zeroext i1 @_ZN7sc_core35sc_pending_activity_at_current_timeEPKNS_13sc_simcontextE(ptr noundef %93)
          to label %96 unwind label %127

96:                                               ; preds = %94
  br i1 %95, label %103, label %97

97:                                               ; preds = %96
  %98 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %99 unwind label %135

99:                                               ; preds = %97
  invoke void @_ZN7sc_core27sc_time_to_pending_activityEPKNS_13sc_simcontextE(ptr dead_on_unwind writable sret(%"class.sc_core::sc_time") align 8 %15, ptr noundef %98)
          to label %100 unwind label %135

100:                                              ; preds = %99
  %101 = invoke noundef zeroext i1 @_ZNK7sc_core7sc_timegtERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) @_ZN7sc_core12SC_ZERO_TIMEE)
          to label %102 unwind label %135

102:                                              ; preds = %100
  br i1 %101, label %103, label %104

103:                                              ; preds = %102, %96
  br label %106

104:                                              ; preds = %102
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef @.str.18, ptr noundef @.str.6, i32 noundef 137)
          to label %105 unwind label %135

105:                                              ; preds = %104
  br label %106

106:                                              ; preds = %105, %103
  %107 = phi i32 [ 0, %103 ], [ 0, %105 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %108 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %109 unwind label %127

109:                                              ; preds = %106
  %110 = invoke noundef zeroext i1 @_ZN7sc_core34sc_pending_activity_at_future_timeEPKNS_13sc_simcontextE(ptr noundef %108)
          to label %111 unwind label %127

111:                                              ; preds = %109
  br i1 %110, label %118, label %112

112:                                              ; preds = %111
  %113 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %114 unwind label %139

114:                                              ; preds = %112
  invoke void @_ZN7sc_core27sc_time_to_pending_activityEPKNS_13sc_simcontextE(ptr dead_on_unwind writable sret(%"class.sc_core::sc_time") align 8 %16, ptr noundef %113)
          to label %115 unwind label %139

115:                                              ; preds = %114
  %116 = invoke noundef zeroext i1 @_ZNK7sc_core7sc_timeeqERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) @_ZN7sc_core12SC_ZERO_TIMEE)
          to label %117 unwind label %139

117:                                              ; preds = %115
  br i1 %116, label %118, label %119

118:                                              ; preds = %117, %111
  br label %121

119:                                              ; preds = %117
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef @.str.19, ptr noundef @.str.6, i32 noundef 140)
          to label %120 unwind label %139

120:                                              ; preds = %119
  br label %121

121:                                              ; preds = %120, %118
  %122 = phi i32 [ 0, %118 ], [ 0, %120 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %123 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %124 unwind label %143

124:                                              ; preds = %121
  invoke void @_ZN7sc_core27sc_time_to_pending_activityEPKNS_13sc_simcontextE(ptr dead_on_unwind writable sret(%"class.sc_core::sc_time") align 8 %17, ptr noundef %123)
          to label %125 unwind label %143

125:                                              ; preds = %124
  invoke void @_Z7do_stepRKN7sc_core7sc_timeE(ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %126 unwind label %143

126:                                              ; preds = %125
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %87, !llvm.loop !13

127:                                              ; preds = %190, %187, %170, %166, %164, %162, %160, %156, %154, %109, %106, %94, %92, %89, %87, %84, %72, %68, %66
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %10, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %11, align 4
  br label %206

131:                                              ; preds = %82, %78, %77, %74
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %10, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %206

135:                                              ; preds = %104, %100, %99, %97
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %10, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %206

139:                                              ; preds = %119, %115, %114, %112
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %10, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %206

143:                                              ; preds = %125, %124, %121
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %10, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %206

147:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #7
  %148 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNK7sc_core9sc_signalIbLNS_16sc_writer_policyE0EE4readEv(ptr noundef nonnull align 8 dereferenceable(224) %7)
          to label %149 unwind label %193

149:                                              ; preds = %147
  %150 = load i8, ptr %148, align 1, !tbaa !14, !range !16, !noundef !17
  %151 = trunc i8 %150 to i1
  %152 = xor i1 %151, true
  %153 = zext i1 %152 to i8
  store i8 %153, ptr %18, align 1, !tbaa !14
  invoke void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EE5writeERKb(ptr noundef nonnull align 8 dereferenceable(224) %7, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %154 unwind label %193

154:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  %155 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %156 unwind label %127

156:                                              ; preds = %154
  %157 = invoke noundef zeroext i1 @_ZN7sc_core35sc_pending_activity_at_current_timeEPKNS_13sc_simcontextE(ptr noundef %155)
          to label %158 unwind label %127

158:                                              ; preds = %156
  br i1 %157, label %159, label %160

159:                                              ; preds = %158
  br label %162

160:                                              ; preds = %158
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef @.str.20, ptr noundef @.str.6, i32 noundef 156)
          to label %161 unwind label %127

161:                                              ; preds = %160
  br label %162

162:                                              ; preds = %161, %159
  %163 = phi i32 [ 0, %159 ], [ 0, %161 ]
  invoke void @_ZN7sc_core8sc_startERKNS_7sc_timeENS_20sc_starvation_policyE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN7sc_core12SC_ZERO_TIMEE, i32 noundef 1)
          to label %164 unwind label %127

164:                                              ; preds = %162
  %165 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %166 unwind label %127

166:                                              ; preds = %164
  %167 = invoke noundef zeroext i1 @_ZN7sc_core19sc_pending_activityEPKNS_13sc_simcontextE(ptr noundef %165)
          to label %168 unwind label %127

168:                                              ; preds = %166
  br i1 %167, label %170, label %169

169:                                              ; preds = %168
  br label %172

170:                                              ; preds = %168
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef @.str.12, ptr noundef @.str.6, i32 noundef 159)
          to label %171 unwind label %127

171:                                              ; preds = %170
  br label %172

172:                                              ; preds = %171, %169
  %173 = phi i32 [ 0, %169 ], [ 0, %171 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %174 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %175 unwind label %197

175:                                              ; preds = %172
  invoke void @_ZN7sc_core27sc_time_to_pending_activityEPKNS_13sc_simcontextE(ptr dead_on_unwind writable sret(%"class.sc_core::sc_time") align 8 %19, ptr noundef %174)
          to label %176 unwind label %197

176:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %177 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_core11sc_max_timeEv()
          to label %178 unwind label %201

178:                                              ; preds = %176
  %179 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_core13sc_time_stampEv()
          to label %180 unwind label %201

180:                                              ; preds = %178
  invoke void @_ZN7sc_coremiERKNS_7sc_timeES2_(ptr dead_on_unwind writable sret(%"class.sc_core::sc_time") align 8 %20, ptr noundef nonnull align 8 dereferenceable(8) %177, ptr noundef nonnull align 8 dereferenceable(8) %179)
          to label %181 unwind label %201

181:                                              ; preds = %180
  %182 = invoke noundef zeroext i1 @_ZNK7sc_core7sc_timeeqERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %183 unwind label %201

183:                                              ; preds = %181
  br i1 %182, label %184, label %185

184:                                              ; preds = %183
  br label %187

185:                                              ; preds = %183
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef @.str.13, ptr noundef @.str.6, i32 noundef 161)
          to label %186 unwind label %201

186:                                              ; preds = %185
  br label %187

187:                                              ; preds = %186, %184
  %188 = phi i32 [ 0, %184 ], [ 0, %186 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  %189 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.21)
          to label %190 unwind label %127

190:                                              ; preds = %187
  %191 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %189, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %192 unwind label %127

192:                                              ; preds = %190
  call void @_ZN4echoD2Ev(ptr noundef nonnull align 8 dereferenceable(556) %8) #7
  call void @llvm.lifetime.end.p0(i64 560, ptr %8) #7
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %7) #7
  call void @llvm.lifetime.end.p0(i64 224, ptr %7) #7
  ret i32 0

193:                                              ; preds = %149, %147
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %10, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  br label %206

197:                                              ; preds = %175, %172
  %198 = landingpad { ptr, i32 }
          cleanup
  %199 = extractvalue { ptr, i32 } %198, 0
  store ptr %199, ptr %10, align 8
  %200 = extractvalue { ptr, i32 } %198, 1
  store i32 %200, ptr %11, align 4
  br label %205

201:                                              ; preds = %185, %181, %180, %178, %176
  %202 = landingpad { ptr, i32 }
          cleanup
  %203 = extractvalue { ptr, i32 } %202, 0
  store ptr %203, ptr %10, align 8
  %204 = extractvalue { ptr, i32 } %202, 1
  store i32 %204, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %205

205:                                              ; preds = %201, %197
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %206

206:                                              ; preds = %205, %193, %143, %139, %135, %131, %127, %62
  call void @_ZN4echoD2Ev(ptr noundef nonnull align 8 dereferenceable(556) %8) #7
  br label %207

207:                                              ; preds = %206, %45, %41
  call void @llvm.lifetime.end.p0(i64 560, ptr %8) #7
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %7) #7
  call void @llvm.lifetime.end.p0(i64 224, ptr %7) #7
  br label %208

208:                                              ; preds = %207
  %209 = load ptr, ptr %10, align 8
  %210 = load i32, ptr %11, align 4
  %211 = insertvalue { ptr, i32 } poison, ptr %209, 0
  %212 = insertvalue { ptr, i32 } %211, i32 %210, 1
  resume { ptr, i32 } %212
}

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

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

declare void @_ZN7sc_core27sc_time_to_pending_activityEPKNS_13sc_simcontextE(ptr dead_on_unwind writable sret(%"class.sc_core::sc_time") align 8, ptr noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7sc_coremiERKNS_7sc_timeES2_(ptr dead_on_unwind noalias writable sret(%"class.sc_core::sc_time") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_core11sc_max_timeEv() #4

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

declare void @_ZN7sc_core14sc_module_nameC1EPKc(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef) unnamed_addr #4

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

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

declare void @_ZN7sc_core8sc_event6notifyERKNS_7sc_timeE(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7sc_coremlEdRKNS_7sc_timeE(ptr dead_on_unwind noalias writable sret(%"class.sc_core::sc_time") align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

declare void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EE5writeERKb(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4

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

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

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { "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 = { 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 #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 = !{!"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}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}


; 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.sc_core::sc_time" = type { i64 }
%"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_signal" = type { %"class.sc_core::sc_signal_inout_if", %"class.sc_core::sc_prim_channel", %"struct.sc_core::sc_writer_policy_check", ptr, i8, i64, ptr, i8, ptr, ptr }
%"class.sc_core::sc_signal_inout_if" = type { %"class.sc_core::sc_signal_in_if", %"class.sc_core::sc_signal_write_if" }
%"class.sc_core::sc_signal_in_if" = type { %"class.sc_core::sc_interface" }
%"class.sc_core::sc_interface" = type { ptr }
%"class.sc_core::sc_signal_write_if" = type { %"class.sc_core::sc_interface" }
%"class.sc_core::sc_prim_channel" = type { %"class.sc_core::sc_object", ptr, ptr }
%"class.sc_core::sc_object" = type { ptr, ptr, %"class.std::vector", %"class.std::vector.3", %"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.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = 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] }
%"struct.sc_core::sc_writer_policy_check" = type { %"struct.sc_core::sc_writer_policy_check_port", %"struct.sc_core::sc_writer_policy_check_write" }
%"struct.sc_core::sc_writer_policy_check_port" = type { ptr }
%"struct.sc_core::sc_writer_policy_check_write" = type { i8, ptr }
%struct.echo = type <{ %"class.sc_core::sc_module", [2 x %"class.sc_core::sc_event"], i32, [4 x i8] }>
%"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_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_event" = type { %"class.std::__cxx11::basic_string", ptr, ptr, i32, i32, ptr, %"class.std::vector.8", %"class.std::vector.8", %"class.std::vector.13", %"class.std::vector.13" }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<sc_core::sc_method_process *, std::allocator<sc_core::sc_method_process *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_method_process *, std::allocator<sc_core::sc_method_process *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_method_process *, std::allocator<sc_core::sc_method_process *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_method_process *, std::allocator<sc_core::sc_method_process *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_thread_process *, std::allocator<sc_core::sc_thread_process *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_module_name" = type <{ ptr, ptr, ptr, ptr, i8, [7 x i8] }>

@_ZL5delay = external hidden global %"class.sc_core::sc_time", align 8
@_ZN7sc_core12SC_ZERO_TIMEE = external global %"class.sc_core::sc_time", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZN7sc_core23SC_ID_ASSERTION_FAILED_E = external constant [0 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [134 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [8 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

declare void @_ZN7sc_core8sc_startERKNS_7sc_timeENS_20sc_starvation_policyE(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_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: 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_time", align 8
  %4 = alloca %"class.sc_core::sc_time", align 8
  %5 = alloca %"class.sc_core::sc_signal", align 8
  %6 = alloca %struct.echo, align 8
  %7 = alloca %"class.sc_core::sc_module_name", align 8
  %8 = alloca %"class.sc_core::sc_time", align 8
  %9 = alloca %"class.sc_core::sc_time", align 8
  %10 = alloca %"class.sc_core::sc_time", align 8
  %11 = alloca %"class.sc_core::sc_time", align 8
  %12 = alloca %"class.sc_core::sc_time", align 8
  %13 = alloca i8, align 1
  %14 = alloca %"class.sc_core::sc_time", align 8
  %15 = alloca %"class.sc_core::sc_time", align 8
  %16 = tail call noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
  %17 = tail call noundef zeroext i1 @_ZN7sc_core19sc_pending_activityEPKNS_13sc_simcontextE(ptr noundef %16)
  br i1 %17, label %18, label %19

18:                                               ; preds = %2
  tail call 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.12, ptr noundef nonnull @.str.6, i32 noundef 118)
  br label %19

19:                                               ; preds = %2, %18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %20 = tail call noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
  call void @_ZN7sc_core27sc_time_to_pending_activityEPKNS_13sc_simcontextE(ptr dead_on_unwind nonnull writable sret(%"class.sc_core::sc_time") align 8 %3, ptr noundef %20)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_core11sc_max_timeEv()
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_core13sc_time_stampEv()
  call void @_ZN7sc_coremiERKNS_7sc_timeES2_(ptr dead_on_unwind nonnull writable sret(%"class.sc_core::sc_time") align 8 %4, ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22)
  %23 = call noundef zeroext i1 @_ZNK7sc_core7sc_timeeqERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  br i1 %23, label %25, label %24

24:                                               ; preds = %19
  call 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.13, ptr noundef nonnull @.str.6, i32 noundef 120)
  br label %25

25:                                               ; preds = %19, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 224, ptr nonnull %5) #7
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEC1EPKc(ptr noundef nonnull align 8 dereferenceable(224) %5, ptr noundef nonnull @.str.14)
  call void @llvm.lifetime.start.p0(i64 560, ptr nonnull %6) #7
  invoke void @_ZN7sc_core14sc_module_nameC1EPKc(ptr noundef nonnull align 8 dereferenceable(33) %7, ptr noundef nonnull @.str.15)
          to label %26 unwind label %28

26:                                               ; preds = %25
  invoke void @_ZN4echoC2EN7sc_core14sc_module_nameE(ptr noundef nonnull align 8 dereferenceable(556) %6, ptr noundef nonnull %7)
          to label %27 unwind label %30

27:                                               ; preds = %26
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  invoke void @_ZN7sc_coremlEdRKNS_7sc_timeE(ptr dead_on_unwind nonnull writable sret(%"class.sc_core::sc_time") align 8 %8, double noundef 1.000000e+00, ptr noundef nonnull align 8 dereferenceable(8) @_ZL5delay)
          to label %32 unwind label %39

28:                                               ; preds = %25
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %132

30:                                               ; preds = %26
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %7) #7
  br label %132

32:                                               ; preds = %27
  %33 = getelementptr inbounds i8, ptr %6, i64 232
  invoke void @_ZN7sc_core8sc_event6notifyERKNS_7sc_timeE(ptr noundef nonnull align 8 dereferenceable(160) %33, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %34 unwind label %39

34:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  invoke void @_ZN7sc_coremlEdRKNS_7sc_timeE(ptr dead_on_unwind nonnull writable sret(%"class.sc_core::sc_time") align 8 %8, double noundef 2.000000e+00, ptr noundef nonnull align 8 dereferenceable(8) @_ZL5delay)
          to label %35 unwind label %39

35:                                               ; preds = %34
  %36 = getelementptr inbounds i8, ptr %6, i64 392
  invoke void @_ZN7sc_core8sc_event6notifyERKNS_7sc_timeE(ptr noundef nonnull align 8 dereferenceable(160) %36, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %37 unwind label %39

37:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  %38 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %41 unwind label %.loopexit.split-lp

39:                                               ; preds = %35, %34, %32, %27
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %131

41:                                               ; preds = %37
  %42 = invoke noundef zeroext i1 @_ZN7sc_core34sc_pending_activity_at_future_timeEPKNS_13sc_simcontextE(ptr noundef %38)
          to label %43 unwind label %.loopexit.split-lp

43:                                               ; preds = %41
  br i1 %42, label %45, label %44

44:                                               ; preds = %43
  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.16, ptr noundef nonnull @.str.6, i32 noundef 129)
          to label %45 unwind label %.loopexit.split-lp

45:                                               ; preds = %44, %43
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %46 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %47 unwind label %83

47:                                               ; preds = %45
  invoke void @_ZN7sc_core27sc_time_to_pending_activityEPKNS_13sc_simcontextE(ptr dead_on_unwind nonnull writable sret(%"class.sc_core::sc_time") align 8 %9, ptr noundef %46)
          to label %48 unwind label %83

48:                                               ; preds = %47
  %49 = call noundef zeroext i1 @_ZNK7sc_core7sc_timeeqERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) @_ZL5delay)
  br i1 %49, label %51, label %50

50:                                               ; preds = %48
  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.17, ptr noundef nonnull @.str.6, i32 noundef 130)
          to label %51 unwind label %83

51:                                               ; preds = %50, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  invoke void @_Z7do_stepRKN7sc_core7sc_timeE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN7sc_core12SC_ZERO_TIMEE)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %51, %82
  %52 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %53 unwind label %.loopexit

53:                                               ; preds = %.preheader
  %54 = invoke noundef zeroext i1 @_ZN7sc_core19sc_pending_activityEPKNS_13sc_simcontextE(ptr noundef %52)
          to label %55 unwind label %.loopexit

55:                                               ; preds = %53
  br i1 %54, label %56, label %91

56:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %57 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %58 unwind label %.loopexit

58:                                               ; preds = %56
  %59 = invoke noundef zeroext i1 @_ZN7sc_core35sc_pending_activity_at_current_timeEPKNS_13sc_simcontextE(ptr noundef %57)
          to label %60 unwind label %.loopexit

60:                                               ; preds = %58
  br i1 %59, label %67, label %61

61:                                               ; preds = %60
  %62 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %63 unwind label %85

63:                                               ; preds = %61
  invoke void @_ZN7sc_core27sc_time_to_pending_activityEPKNS_13sc_simcontextE(ptr dead_on_unwind nonnull writable sret(%"class.sc_core::sc_time") align 8 %10, ptr noundef %62)
          to label %64 unwind label %85

64:                                               ; preds = %63
  %65 = call noundef zeroext i1 @_ZNK7sc_core7sc_timegtERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) @_ZN7sc_core12SC_ZERO_TIMEE)
  br i1 %65, label %67, label %66

66:                                               ; preds = %64
  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.18, ptr noundef nonnull @.str.6, i32 noundef 137)
          to label %67 unwind label %85

67:                                               ; preds = %66, %60, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %68 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %69 unwind label %.loopexit

69:                                               ; preds = %67
  %70 = invoke noundef zeroext i1 @_ZN7sc_core34sc_pending_activity_at_future_timeEPKNS_13sc_simcontextE(ptr noundef %68)
          to label %71 unwind label %.loopexit

71:                                               ; preds = %69
  br i1 %70, label %78, label %72

72:                                               ; preds = %71
  %73 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %74 unwind label %87

74:                                               ; preds = %72
  invoke void @_ZN7sc_core27sc_time_to_pending_activityEPKNS_13sc_simcontextE(ptr dead_on_unwind nonnull writable sret(%"class.sc_core::sc_time") align 8 %11, ptr noundef %73)
          to label %75 unwind label %87

75:                                               ; preds = %74
  %76 = call noundef zeroext i1 @_ZNK7sc_core7sc_timeeqERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) @_ZN7sc_core12SC_ZERO_TIMEE)
  br i1 %76, label %78, label %77

77:                                               ; preds = %75
  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.19, ptr noundef nonnull @.str.6, i32 noundef 140)
          to label %78 unwind label %87

78:                                               ; preds = %77, %71, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %79 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %80 unwind label %89

80:                                               ; preds = %78
  invoke void @_ZN7sc_core27sc_time_to_pending_activityEPKNS_13sc_simcontextE(ptr dead_on_unwind nonnull writable sret(%"class.sc_core::sc_time") align 8 %12, ptr noundef %79)
          to label %81 unwind label %89

81:                                               ; preds = %80
  invoke void @_Z7do_stepRKN7sc_core7sc_timeE(ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %82 unwind label %89

82:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  br label %.preheader, !llvm.loop !5

.loopexit:                                        ; preds = %.preheader, %53, %56, %58, %67, %69
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %131

.loopexit.split-lp:                               ; preds = %37, %41, %44, %51, %95, %97, %100, %101, %102, %104, %107, %119, %121
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %131

83:                                               ; preds = %50, %47, %45
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %131

85:                                               ; preds = %66, %63, %61
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %131

87:                                               ; preds = %77, %74, %72
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %131

89:                                               ; preds = %81, %80, %78
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  br label %131

91:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #7
  %92 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK7sc_core9sc_signalIbLNS_16sc_writer_policyE0EE4readEv(ptr noundef nonnull align 8 dereferenceable(224) %5)
  %93 = load i8, ptr %92, align 1, !tbaa !7, !range !11, !noundef !12
  %94 = xor i8 %93, 1
  store i8 %94, ptr %13, align 1, !tbaa !7
  invoke void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EE5writeERKb(ptr noundef nonnull align 8 dereferenceable(224) %5, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %95 unwind label %124

95:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #7
  %96 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %97 unwind label %.loopexit.split-lp

97:                                               ; preds = %95
  %98 = invoke noundef zeroext i1 @_ZN7sc_core35sc_pending_activity_at_current_timeEPKNS_13sc_simcontextE(ptr noundef %96)
          to label %99 unwind label %.loopexit.split-lp

99:                                               ; preds = %97
  br i1 %98, label %101, label %100

100:                                              ; preds = %99
  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.20, ptr noundef nonnull @.str.6, i32 noundef 156)
          to label %101 unwind label %.loopexit.split-lp

101:                                              ; preds = %100, %99
  invoke void @_ZN7sc_core8sc_startERKNS_7sc_timeENS_20sc_starvation_policyE(ptr noundef nonnull align 8 dereferenceable(8) @_ZN7sc_core12SC_ZERO_TIMEE, i32 noundef 1)
          to label %102 unwind label %.loopexit.split-lp

102:                                              ; preds = %101
  %103 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %104 unwind label %.loopexit.split-lp

104:                                              ; preds = %102
  %105 = invoke noundef zeroext i1 @_ZN7sc_core19sc_pending_activityEPKNS_13sc_simcontextE(ptr noundef %103)
          to label %106 unwind label %.loopexit.split-lp

106:                                              ; preds = %104
  br i1 %105, label %107, label %108

107:                                              ; preds = %106
  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.12, ptr noundef nonnull @.str.6, i32 noundef 159)
          to label %108 unwind label %.loopexit.split-lp

108:                                              ; preds = %107, %106
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %109 = invoke noundef ptr @_ZN7sc_core22sc_get_curr_simcontextEv()
          to label %110 unwind label %126

110:                                              ; preds = %108
  invoke void @_ZN7sc_core27sc_time_to_pending_activityEPKNS_13sc_simcontextE(ptr dead_on_unwind nonnull writable sret(%"class.sc_core::sc_time") align 8 %14, ptr noundef %109)
          to label %111 unwind label %126

111:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_core11sc_max_timeEv()
          to label %113 unwind label %128

113:                                              ; preds = %111
  %114 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_core13sc_time_stampEv()
          to label %115 unwind label %128

115:                                              ; preds = %113
  invoke void @_ZN7sc_coremiERKNS_7sc_timeES2_(ptr dead_on_unwind nonnull writable sret(%"class.sc_core::sc_time") align 8 %15, ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef nonnull align 8 dereferenceable(8) %114)
          to label %116 unwind label %128

116:                                              ; preds = %115
  %117 = call noundef zeroext i1 @_ZNK7sc_core7sc_timeeqERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15)
  br i1 %117, label %119, label %118

118:                                              ; preds = %116
  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.13, ptr noundef nonnull @.str.6, i32 noundef 161)
          to label %119 unwind label %128

119:                                              ; preds = %118, %116
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  %120 = 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.21)
          to label %121 unwind label %.loopexit.split-lp

121:                                              ; preds = %119
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %120, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %123 unwind label %.loopexit.split-lp

123:                                              ; preds = %121
  call void @_ZN4echoD2Ev(ptr noundef nonnull align 8 dereferenceable(556) %6) #7
  call void @llvm.lifetime.end.p0(i64 560, ptr nonnull %6) #7
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %5) #7
  call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %5) #7
  ret i32 0

124:                                              ; preds = %91
  %125 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #7
  br label %131

126:                                              ; preds = %110, %108
  %127 = landingpad { ptr, i32 }
          cleanup
  br label %130

128:                                              ; preds = %118, %115, %113, %111
  %129 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  br label %130

130:                                              ; preds = %128, %126
  %.pn = phi { ptr, i32 } [ %129, %128 ], [ %127, %126 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %131

131:                                              ; preds = %.loopexit, %.loopexit.split-lp, %130, %124, %89, %87, %85, %83, %39
  %.pn10 = phi { ptr, i32 } [ %40, %39 ], [ %90, %89 ], [ %88, %87 ], [ %86, %85 ], [ %.pn, %130 ], [ %125, %124 ], [ %84, %83 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN4echoD2Ev(ptr noundef nonnull align 8 dereferenceable(556) %6) #7
  br label %132

132:                                              ; preds = %131, %30, %28
  %.pn10.pn = phi { ptr, i32 } [ %.pn10, %131 ], [ %31, %30 ], [ %29, %28 ]
  call void @llvm.lifetime.end.p0(i64 560, ptr nonnull %6) #7
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %5) #7
  call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %5) #7
  resume { ptr, i32 } %.pn10.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7sc_core19sc_pending_activityEPKNS_13sc_simcontextE(ptr noundef) local_unnamed_addr #3

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

declare void @_ZN7sc_core27sc_time_to_pending_activityEPKNS_13sc_simcontextE(ptr dead_on_unwind writable sret(%"class.sc_core::sc_time") align 8, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7sc_coremiERKNS_7sc_timeES2_(ptr dead_on_unwind noalias writable sret(%"class.sc_core::sc_time") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

declare void @_ZN7sc_core14sc_module_nameC1EPKc(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef) unnamed_addr #4

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

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

declare void @_ZN7sc_core8sc_event6notifyERKNS_7sc_timeE(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7sc_coremlEdRKNS_7sc_timeE(ptr dead_on_unwind noalias writable sret(%"class.sc_core::sc_time") align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7sc_core34sc_pending_activity_at_future_timeEPKNS_13sc_simcontextE(ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7sc_core35sc_pending_activity_at_current_timeEPKNS_13sc_simcontextE(ptr noundef) local_unnamed_addr #3

declare void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EE5writeERKb(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4

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

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

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

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { "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 = { 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 #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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"bool", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{i8 0, i8 2}
!12 = !{}


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