; LLVM IR from gem5/gem5 :: src/systemc/tests/systemc/misc/communication/reslv/test1 (test1)

; 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_signal_resolved" = type { %"class.sc_core::sc_signal", %"class.std::vector.13", %"class.std::vector.18" }
%"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, %"class.sc_dt::sc_logic", i64, ptr, %"class.sc_dt::sc_logic", 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.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] }
%"struct.sc_core::sc_writer_policy_check" = type { %"struct.sc_core::sc_writer_policy_check_delta" }
%"struct.sc_core::sc_writer_policy_check_delta" = type { %"struct.sc_core::sc_writer_policy_check_write" }
%"struct.sc_core::sc_writer_policy_check_write" = type { i8, ptr }
%"class.sc_dt::sc_logic" = type { i32 }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<sc_core::sc_process_b *, std::allocator<sc_core::sc_process_b *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_process_b *, std::allocator<sc_core::sc_process_b *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_process_b *, std::allocator<sc_core::sc_process_b *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_process_b *, std::allocator<sc_core::sc_process_b *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<sc_dt::sc_logic, std::allocator<sc_dt::sc_logic>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_dt::sc_logic, std::allocator<sc_dt::sc_logic>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_dt::sc_logic, std::allocator<sc_dt::sc_logic>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_dt::sc_logic, std::allocator<sc_dt::sc_logic>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_signal.23" = type { %"class.sc_core::sc_signal_inout_if.24", %"class.sc_core::sc_prim_channel", %"struct.sc_core::sc_writer_policy_check.27", ptr, i8, i64, ptr, i8, ptr, ptr }
%"class.sc_core::sc_signal_inout_if.24" = type { %"class.sc_core::sc_signal_in_if.25", %"class.sc_core::sc_signal_write_if.26" }
%"class.sc_core::sc_signal_in_if.25" = type { %"class.sc_core::sc_interface" }
%"class.sc_core::sc_signal_write_if.26" = type { %"class.sc_core::sc_interface" }
%"struct.sc_core::sc_writer_policy_check.27" = 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.proc1 = type { %"class.sc_core::sc_module", ptr, %"class.sc_core::sc_in" }
%"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_in" = type { %"class.sc_core::sc_port", ptr, ptr, ptr, ptr }
%"class.sc_core::sc_port" = type { %"class.sc_core::sc_port_b" }
%"class.sc_core::sc_port_b" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.8" }
%"class.sc_core::sc_port_base" = type { %"class.sc_core::sc_object", ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_module_name" = type <{ ptr, ptr, ptr, ptr, i8, [7 x i8] }>
%struct.proc2 = type { %"class.sc_core::sc_module", ptr, %"class.sc_core::sc_in" }
%struct.proc3 = type { %"class.sc_core::sc_module", ptr }

@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local i32 @sc_main(i32 noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca %"class.sc_core::sc_signal_resolved", align 8
  %6 = alloca %"class.sc_core::sc_signal.23", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct.proc1, align 8
  %10 = alloca %"class.sc_core::sc_module_name", align 8
  %11 = alloca %struct.proc2, align 8
  %12 = alloca %"class.sc_core::sc_module_name", align 8
  %13 = alloca %struct.proc3, align 8
  %14 = alloca %"class.sc_core::sc_module_name", align 8
  %15 = alloca i8, align 1
  %16 = alloca i32, align 4
  %17 = alloca i8, align 1
  %18 = alloca i8, align 1
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 256, ptr %5) #6
  call void @_ZN7sc_core18sc_signal_resolvedC1Ev(ptr noundef nonnull align 8 dereferenceable(256) %5)
  call void @llvm.lifetime.start.p0(i64 224, ptr %6) #6
  invoke void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(224) %6)
          to label %19 unwind label %34

19:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 424, ptr %9) #6
  invoke void @_ZN7sc_core14sc_module_nameC1EPKc(ptr noundef nonnull align 8 dereferenceable(33) %10, ptr noundef @.str.5)
          to label %20 unwind label %38

20:                                               ; preds = %19
  invoke void @_ZN5proc1C2EN7sc_core14sc_module_nameERNS0_18sc_signal_resolvedERNS0_9sc_signalIbLNS0_16sc_writer_policyE0EEE(ptr noundef nonnull align 8 dereferenceable(424) %9, ptr noundef %10, ptr noundef nonnull align 8 dereferenceable(256) %5, ptr noundef nonnull align 8 dereferenceable(224) %6)
          to label %21 unwind label %42

21:                                               ; preds = %20
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %10) #6
  call void @llvm.lifetime.start.p0(i64 424, ptr %11) #6
  invoke void @_ZN7sc_core14sc_module_nameC1EPKc(ptr noundef nonnull align 8 dereferenceable(33) %12, ptr noundef @.str.6)
          to label %22 unwind label %46

22:                                               ; preds = %21
  invoke void @_ZN5proc2C2EN7sc_core14sc_module_nameERNS0_18sc_signal_resolvedERNS0_9sc_signalIbLNS0_16sc_writer_policyE0EEE(ptr noundef nonnull align 8 dereferenceable(424) %11, ptr noundef %12, ptr noundef nonnull align 8 dereferenceable(256) %5, ptr noundef nonnull align 8 dereferenceable(224) %6)
          to label %23 unwind label %50

23:                                               ; preds = %22
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %12) #6
  call void @llvm.lifetime.start.p0(i64 240, ptr %13) #6
  invoke void @_ZN7sc_core14sc_module_nameC1EPKc(ptr noundef nonnull align 8 dereferenceable(33) %14, ptr noundef @.str.7)
          to label %24 unwind label %54

24:                                               ; preds = %23
  invoke void @_ZN5proc3C2EN7sc_core14sc_module_nameERKNS0_18sc_signal_resolvedE(ptr noundef nonnull align 8 dereferenceable(240) %13, ptr noundef %14, ptr noundef nonnull align 8 dereferenceable(256) %5)
          to label %25 unwind label %58

25:                                               ; preds = %24
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %14) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %26 unwind label %62

26:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  store i8 1, ptr %15, align 1, !tbaa !11
  %27 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %6, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %28 unwind label %66

28:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 10, i32 noundef 2, i32 noundef 1)
          to label %29 unwind label %62

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

30:                                               ; preds = %77, %29
  %31 = load i32, ptr %16, align 4, !tbaa !5
  %32 = icmp slt i32 %31, 3
  br i1 %32, label %70, label %33

33:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %93

34:                                               ; preds = %2
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %7, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %8, align 4
  br label %98

38:                                               ; preds = %19
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %7, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %8, align 4
  br label %97

42:                                               ; preds = %20
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %7, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %8, align 4
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %10) #6
  br label %97

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

50:                                               ; preds = %22
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %7, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %8, align 4
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %12) #6
  br label %96

54:                                               ; preds = %23
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %7, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %8, align 4
  br label %95

58:                                               ; preds = %24
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %7, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %8, align 4
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %14) #6
  br label %95

62:                                               ; preds = %28, %25
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %7, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %8, align 4
  br label %94

66:                                               ; preds = %26
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %7, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  br label %94

70:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  store i8 0, ptr %17, align 1, !tbaa !11
  %71 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %6, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %72 unwind label %80

72:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 10, i32 noundef 2, i32 noundef 1)
          to label %73 unwind label %84

73:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #6
  store i8 1, ptr %18, align 1, !tbaa !11
  %74 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %6, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %75 unwind label %88

75:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 10, i32 noundef 2, i32 noundef 1)
          to label %76 unwind label %84

76:                                               ; preds = %75
  br label %77

77:                                               ; preds = %76
  %78 = load i32, ptr %16, align 4, !tbaa !5
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %16, align 4, !tbaa !5
  br label %30, !llvm.loop !13

80:                                               ; preds = %70
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %7, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  br label %92

84:                                               ; preds = %75, %72
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %7, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %8, align 4
  br label %92

88:                                               ; preds = %73
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %7, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  br label %92

92:                                               ; preds = %88, %84, %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %94

93:                                               ; preds = %33
  call void @_ZN7sc_core9sc_moduleD2Ev(ptr noundef nonnull align 8 dereferenceable(240) %13) #6
  call void @llvm.lifetime.end.p0(i64 240, ptr %13) #6
  call void @_ZN5proc2D2Ev(ptr noundef nonnull align 8 dereferenceable(424) %11) #6
  call void @llvm.lifetime.end.p0(i64 424, ptr %11) #6
  call void @_ZN5proc1D2Ev(ptr noundef nonnull align 8 dereferenceable(424) %9) #6
  call void @llvm.lifetime.end.p0(i64 424, ptr %9) #6
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %6) #6
  call void @llvm.lifetime.end.p0(i64 224, ptr %6) #6
  call void @_ZN7sc_core18sc_signal_resolvedD1Ev(ptr noundef nonnull align 8 dereferenceable(256) %5) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr %5) #6
  ret i32 0

94:                                               ; preds = %92, %66, %62
  call void @_ZN7sc_core9sc_moduleD2Ev(ptr noundef nonnull align 8 dereferenceable(240) %13) #6
  br label %95

95:                                               ; preds = %94, %58, %54
  call void @llvm.lifetime.end.p0(i64 240, ptr %13) #6
  call void @_ZN5proc2D2Ev(ptr noundef nonnull align 8 dereferenceable(424) %11) #6
  br label %96

96:                                               ; preds = %95, %50, %46
  call void @llvm.lifetime.end.p0(i64 424, ptr %11) #6
  call void @_ZN5proc1D2Ev(ptr noundef nonnull align 8 dereferenceable(424) %9) #6
  br label %97

97:                                               ; preds = %96, %42, %38
  call void @llvm.lifetime.end.p0(i64 424, ptr %9) #6
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %6) #6
  br label %98

98:                                               ; preds = %97, %34
  call void @llvm.lifetime.end.p0(i64 224, ptr %6) #6
  call void @_ZN7sc_core18sc_signal_resolvedD1Ev(ptr noundef nonnull align 8 dereferenceable(256) %5) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr %5) #6
  br label %99

99:                                               ; preds = %98
  %100 = load ptr, ptr %7, align 8
  %101 = load i32, ptr %8, align 4
  %102 = insertvalue { ptr, i32 } poison, ptr %100, 0
  %103 = insertvalue { ptr, i32 } %102, i32 %101, 1
  resume { ptr, i32 } %103
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef, i32 noundef, i32 noundef) #4

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

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

; Function Attrs: nounwind
declare void @_ZN7sc_core9sc_moduleD2Ev(ptr noundef nonnull align 8 dereferenceable(232)) unnamed_addr #3

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

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { 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 #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { nounwind }

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.sc_core::sc_signal_resolved" = type { %"class.sc_core::sc_signal", %"class.std::vector.13", %"class.std::vector.18" }
%"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, %"class.sc_dt::sc_logic", i64, ptr, %"class.sc_dt::sc_logic", 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.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] }
%"struct.sc_core::sc_writer_policy_check" = type { %"struct.sc_core::sc_writer_policy_check_delta" }
%"struct.sc_core::sc_writer_policy_check_delta" = type { %"struct.sc_core::sc_writer_policy_check_write" }
%"struct.sc_core::sc_writer_policy_check_write" = type { i8, ptr }
%"class.sc_dt::sc_logic" = type { i32 }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<sc_core::sc_process_b *, std::allocator<sc_core::sc_process_b *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_process_b *, std::allocator<sc_core::sc_process_b *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_process_b *, std::allocator<sc_core::sc_process_b *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_process_b *, std::allocator<sc_core::sc_process_b *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<sc_dt::sc_logic, std::allocator<sc_dt::sc_logic>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_dt::sc_logic, std::allocator<sc_dt::sc_logic>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_dt::sc_logic, std::allocator<sc_dt::sc_logic>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_dt::sc_logic, std::allocator<sc_dt::sc_logic>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_signal.23" = type { %"class.sc_core::sc_signal_inout_if.24", %"class.sc_core::sc_prim_channel", %"struct.sc_core::sc_writer_policy_check.27", ptr, i8, i64, ptr, i8, ptr, ptr }
%"class.sc_core::sc_signal_inout_if.24" = type { %"class.sc_core::sc_signal_in_if.25", %"class.sc_core::sc_signal_write_if.26" }
%"class.sc_core::sc_signal_in_if.25" = type { %"class.sc_core::sc_interface" }
%"class.sc_core::sc_signal_write_if.26" = type { %"class.sc_core::sc_interface" }
%"struct.sc_core::sc_writer_policy_check.27" = 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.proc1 = type { %"class.sc_core::sc_module", ptr, %"class.sc_core::sc_in" }
%"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_in" = type { %"class.sc_core::sc_port", ptr, ptr, ptr, ptr }
%"class.sc_core::sc_port" = type { %"class.sc_core::sc_port_b" }
%"class.sc_core::sc_port_b" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.8" }
%"class.sc_core::sc_port_base" = type { %"class.sc_core::sc_object", ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_module_name" = type <{ ptr, ptr, ptr, ptr, i8, [7 x i8] }>
%struct.proc2 = type { %"class.sc_core::sc_module", ptr, %"class.sc_core::sc_in" }
%struct.proc3 = type { %"class.sc_core::sc_module", ptr }

@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @sc_main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.sc_core::sc_signal_resolved", align 8
  %4 = alloca %"class.sc_core::sc_signal.23", align 8
  %5 = alloca %struct.proc1, align 8
  %6 = alloca %"class.sc_core::sc_module_name", align 8
  %7 = alloca %struct.proc2, align 8
  %8 = alloca %"class.sc_core::sc_module_name", align 8
  %9 = alloca %struct.proc3, align 8
  %10 = alloca %"class.sc_core::sc_module_name", align 8
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %3) #6
  call void @_ZN7sc_core18sc_signal_resolvedC1Ev(ptr noundef nonnull align 8 dereferenceable(256) %3)
  call void @llvm.lifetime.start.p0(i64 224, ptr nonnull %4) #6
  invoke void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(224) %4)
          to label %14 unwind label %25

14:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 424, ptr nonnull %5) #6
  invoke void @_ZN7sc_core14sc_module_nameC1EPKc(ptr noundef nonnull align 8 dereferenceable(33) %6, ptr noundef nonnull @.str.5)
          to label %15 unwind label %27

15:                                               ; preds = %14
  invoke void @_ZN5proc1C2EN7sc_core14sc_module_nameERNS0_18sc_signal_resolvedERNS0_9sc_signalIbLNS0_16sc_writer_policyE0EEE(ptr noundef nonnull align 8 dereferenceable(424) %5, ptr noundef nonnull %6, ptr noundef nonnull align 8 dereferenceable(256) %3, ptr noundef nonnull align 8 dereferenceable(224) %4)
          to label %16 unwind label %29

16:                                               ; preds = %15
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %6) #6
  call void @llvm.lifetime.start.p0(i64 424, ptr nonnull %7) #6
  invoke void @_ZN7sc_core14sc_module_nameC1EPKc(ptr noundef nonnull align 8 dereferenceable(33) %8, ptr noundef nonnull @.str.6)
          to label %17 unwind label %31

17:                                               ; preds = %16
  invoke void @_ZN5proc2C2EN7sc_core14sc_module_nameERNS0_18sc_signal_resolvedERNS0_9sc_signalIbLNS0_16sc_writer_policyE0EEE(ptr noundef nonnull align 8 dereferenceable(424) %7, ptr noundef nonnull %8, ptr noundef nonnull align 8 dereferenceable(256) %3, ptr noundef nonnull align 8 dereferenceable(224) %4)
          to label %18 unwind label %33

18:                                               ; preds = %17
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %8) #6
  call void @llvm.lifetime.start.p0(i64 240, ptr nonnull %9) #6
  invoke void @_ZN7sc_core14sc_module_nameC1EPKc(ptr noundef nonnull align 8 dereferenceable(33) %10, ptr noundef nonnull @.str.7)
          to label %19 unwind label %35

19:                                               ; preds = %18
  invoke void @_ZN5proc3C2EN7sc_core14sc_module_nameERKNS0_18sc_signal_resolvedE(ptr noundef nonnull align 8 dereferenceable(240) %9, ptr noundef nonnull %10, ptr noundef nonnull align 8 dereferenceable(256) %3)
          to label %20 unwind label %37

20:                                               ; preds = %19
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %10) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %21 unwind label %39

21:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  store i8 1, ptr %11, align 1, !tbaa !5
  %22 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %4, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %23 unwind label %41

23:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 10, i32 noundef 2, i32 noundef 1)
          to label %.preheader.preheader unwind label %39

.preheader.preheader:                             ; preds = %23
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #6
  store i8 0, ptr %12, align 1, !tbaa !5
  %24 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %4, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %43 unwind label %58

25:                                               ; preds = %2
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %68

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

29:                                               ; preds = %15
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %6) #6
  br label %67

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

33:                                               ; preds = %17
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %8) #6
  br label %66

35:                                               ; preds = %18
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %65

37:                                               ; preds = %19
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %10) #6
  br label %65

39:                                               ; preds = %23, %20
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %64

41:                                               ; preds = %21
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  br label %64

43:                                               ; preds = %.preheader.preheader
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 10, i32 noundef 2, i32 noundef 1)
          to label %44 unwind label %60

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #6
  store i8 1, ptr %13, align 1, !tbaa !5
  %45 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %4, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %46 unwind label %62

46:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 10, i32 noundef 2, i32 noundef 1)
          to label %.preheader.1 unwind label %60

.preheader.1:                                     ; preds = %46
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #6
  store i8 0, ptr %12, align 1, !tbaa !5
  %47 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %4, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %48 unwind label %58

48:                                               ; preds = %.preheader.1
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 10, i32 noundef 2, i32 noundef 1)
          to label %49 unwind label %60

49:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #6
  store i8 1, ptr %13, align 1, !tbaa !5
  %50 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %4, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %51 unwind label %62

51:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 10, i32 noundef 2, i32 noundef 1)
          to label %.preheader.2 unwind label %60

.preheader.2:                                     ; preds = %51
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #6
  store i8 0, ptr %12, align 1, !tbaa !5
  %52 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %4, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %53 unwind label %58

53:                                               ; preds = %.preheader.2
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 10, i32 noundef 2, i32 noundef 1)
          to label %54 unwind label %60

54:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #6
  store i8 1, ptr %13, align 1, !tbaa !5
  %55 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %4, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %56 unwind label %62

56:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 10, i32 noundef 2, i32 noundef 1)
          to label %57 unwind label %60

57:                                               ; preds = %56
  call void @_ZN7sc_core9sc_moduleD2Ev(ptr noundef nonnull align 8 dereferenceable(240) %9) #6
  call void @llvm.lifetime.end.p0(i64 240, ptr nonnull %9) #6
  call void @_ZN5proc2D2Ev(ptr noundef nonnull align 8 dereferenceable(424) %7) #6
  call void @llvm.lifetime.end.p0(i64 424, ptr nonnull %7) #6
  call void @_ZN5proc1D2Ev(ptr noundef nonnull align 8 dereferenceable(424) %5) #6
  call void @llvm.lifetime.end.p0(i64 424, ptr nonnull %5) #6
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %4) #6
  call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %4) #6
  call void @_ZN7sc_core18sc_signal_resolvedD1Ev(ptr noundef nonnull align 8 dereferenceable(256) %3) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %3) #6
  ret i32 0

58:                                               ; preds = %.preheader.2, %.preheader.1, %.preheader.preheader
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  br label %64

60:                                               ; preds = %56, %53, %51, %48, %46, %43
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %64

62:                                               ; preds = %54, %49, %44
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  br label %64

64:                                               ; preds = %58, %60, %62, %41, %39
  %.pn.pn = phi { ptr, i32 } [ %40, %39 ], [ %42, %41 ], [ %61, %60 ], [ %63, %62 ], [ %59, %58 ]
  call void @_ZN7sc_core9sc_moduleD2Ev(ptr noundef nonnull align 8 dereferenceable(240) %9) #6
  br label %65

65:                                               ; preds = %64, %37, %35
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %64 ], [ %38, %37 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 240, ptr nonnull %9) #6
  call void @_ZN5proc2D2Ev(ptr noundef nonnull align 8 dereferenceable(424) %7) #6
  br label %66

66:                                               ; preds = %65, %33, %31
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %65 ], [ %34, %33 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 424, ptr nonnull %7) #6
  call void @_ZN5proc1D2Ev(ptr noundef nonnull align 8 dereferenceable(424) %5) #6
  br label %67

67:                                               ; preds = %66, %29, %27
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %66 ], [ %30, %29 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 424, ptr nonnull %5) #6
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %4) #6
  br label %68

68:                                               ; preds = %67, %25
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %67 ], [ %26, %25 ]
  call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %4) #6
  call void @_ZN7sc_core18sc_signal_resolvedD1Ev(ptr noundef nonnull align 8 dereferenceable(256) %3) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #0 align 2

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

; Function Attrs: nounwind
declare void @_ZN7sc_core9sc_moduleD2Ev(ptr noundef nonnull align 8 dereferenceable(232)) unnamed_addr #3

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

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { 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 #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { nounwind }

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

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


; Effective O3 passes: GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass