; LLVM IR from gem5/gem5 :: src/systemc/tests/systemc/misc/stars/star114477 (test)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.sc_core::sc_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.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_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 }
%"class.sc_core::sc_signal.28" = type { %"class.sc_core::sc_signal_inout_if.29", %"class.sc_core::sc_prim_channel", %"struct.sc_core::sc_writer_policy_check", ptr, %"class.sc_dt::sc_bv", i64, %"class.sc_dt::sc_bv" }
%"class.sc_core::sc_signal_inout_if.29" = type { %"class.sc_core::sc_signal_in_if.30", %"class.sc_core::sc_signal_write_if.31" }
%"class.sc_core::sc_signal_in_if.30" = type { %"class.sc_core::sc_interface" }
%"class.sc_core::sc_signal_write_if.31" = type { %"class.sc_core::sc_interface" }
%"class.sc_dt::sc_bv" = type { %"class.sc_dt::sc_bv_base" }
%"class.sc_dt::sc_bv_base" = type { %"class.sc_dt::sc_proxy", i32, i32, ptr }
%"class.sc_dt::sc_proxy" = type { ptr }
%"class.sc_core::sc_signal.32" = type <{ %"class.sc_core::sc_signal_inout_if.33", %"class.sc_core::sc_prim_channel", %"struct.sc_core::sc_writer_policy_check", ptr, i32, [4 x i8], i64, i32, [4 x i8] }>
%"class.sc_core::sc_signal_inout_if.33" = type { %"class.sc_core::sc_signal_in_if.34", %"class.sc_core::sc_signal_write_if.35" }
%"class.sc_core::sc_signal_in_if.34" = type { %"class.sc_core::sc_interface" }
%"class.sc_core::sc_signal_write_if.35" = type { %"class.sc_core::sc_interface" }
%struct.fun = type { %"class.sc_core::sc_module", %"class.sc_core::sc_in", %"class.sc_core::sc_in.13", %"class.sc_dt::sc_bv", %"class.sc_dt::sc_bv", %"class.sc_dt::sc_bv", %"class.sc_core::sc_out", %"class.sc_core::sc_out" }
%"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_in.13" = type { %"class.sc_core::sc_port.14", ptr, ptr }
%"class.sc_core::sc_port.14" = type { %"class.sc_core::sc_port_b.15" }
%"class.sc_core::sc_port_b.15" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.16" }
%"class.std::vector.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<int> *, std::allocator<sc_core::sc_signal_in_if<int> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<int> *, std::allocator<sc_core::sc_signal_in_if<int> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<int> *, std::allocator<sc_core::sc_signal_in_if<int> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<int> *, std::allocator<sc_core::sc_signal_in_if<int> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_out" = type { %"class.sc_core::sc_inout" }
%"class.sc_core::sc_inout" = type { %"class.sc_core::sc_port.21", ptr, ptr, ptr }
%"class.sc_core::sc_port.21" = type { %"class.sc_core::sc_port_b.22" }
%"class.sc_core::sc_port_b.22" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.23" }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<sc_dt::sc_bv<9>> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_bv<9>> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<sc_dt::sc_bv<9>> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_bv<9>> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<sc_dt::sc_bv<9>> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_bv<9>> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<sc_dt::sc_bv<9>> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_bv<9>> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_module_name" = type <{ ptr, ptr, ptr, ptr, i8, [7 x i8] }>

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local i32 @sc_main(i32 noundef %0, ptr noundef %1) #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca %"class.sc_core::sc_signal", align 8
  %6 = alloca %"class.sc_core::sc_signal.28", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.sc_core::sc_signal.28", align 8
  %10 = alloca %"class.sc_core::sc_signal.32", align 8
  %11 = alloca %struct.fun, align 8
  %12 = alloca %"class.sc_core::sc_module_name", align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  %16 = alloca i8, align 1
  %17 = alloca i32, align 4
  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 224, ptr %5) #7
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(224) %5)
  call void @llvm.lifetime.start.p0(i64 232, ptr %6) #7
  invoke void @_ZN7sc_core9sc_signalIN5sc_dt5sc_bvILi9EEELNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(232) %6)
          to label %18 unwind label %38

18:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 232, ptr %9) #7
  invoke void @_ZN7sc_core9sc_signalIN5sc_dt5sc_bvILi9EEELNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(232) %9)
          to label %19 unwind label %42

19:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 200, ptr %10) #7
  invoke void @_ZN7sc_core9sc_signalIiLNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(196) %10)
          to label %20 unwind label %46

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 1008, ptr %11) #7
  invoke void @_ZN7sc_core14sc_module_nameC1EPKc(ptr noundef nonnull align 8 dereferenceable(33) %12, ptr noundef @.str)
          to label %21 unwind label %50

21:                                               ; preds = %20
  invoke void @_ZN3funC2EN7sc_core14sc_module_nameE(ptr noundef nonnull align 8 dereferenceable(1008) %11, ptr noundef %12)
          to label %22 unwind label %54

22:                                               ; preds = %21
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %12) #7
  %23 = getelementptr inbounds %struct.fun, ptr %11, i32 0, i32 1
  invoke void @_ZN7sc_core5sc_inIbEclERKNS_15sc_signal_in_ifIbEE(ptr noundef nonnull align 8 dereferenceable(184) %23, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %24 unwind label %58

24:                                               ; preds = %22
  %25 = getelementptr inbounds %struct.fun, ptr %11, i32 0, i32 2
  invoke void @_ZN7sc_core5sc_inIiEclERKNS_15sc_signal_in_ifIiEE(ptr noundef nonnull align 8 dereferenceable(168) %25, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %26 unwind label %58

26:                                               ; preds = %24
  %27 = getelementptr inbounds %struct.fun, ptr %11, i32 0, i32 6
  invoke void @_ZN7sc_core9sc_port_bINS_18sc_signal_inout_ifIN5sc_dt5sc_bvILi9EEEEEEclERS5_(ptr noundef nonnull align 8 dereferenceable(152) %27, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %28 unwind label %58

28:                                               ; preds = %26
  %29 = getelementptr inbounds %struct.fun, ptr %11, i32 0, i32 7
  invoke void @_ZN7sc_core9sc_port_bINS_18sc_signal_inout_ifIN5sc_dt5sc_bvILi9EEEEEEclERS5_(ptr noundef nonnull align 8 dereferenceable(152) %29, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %30 unwind label %58

30:                                               ; preds = %28
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 0, i32 noundef 2, i32 noundef 1)
          to label %31 unwind label %58

31:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  %32 = invoke noundef nonnull align 8 dereferenceable(196) ptr @_ZN7sc_core9sc_signalIiLNS_16sc_writer_policyE0EEaSERKi(ptr noundef nonnull align 8 dereferenceable(196) %10, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %33 unwind label %62

33:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %87, %33
  %35 = load i32, ptr %14, align 4, !tbaa !5
  %36 = icmp slt i32 %35, 10
  br i1 %36, label %66, label %37

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

38:                                               ; preds = %2
  %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 %112

42:                                               ; preds = %18
  %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
  br label %111

46:                                               ; preds = %19
  %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 %110

50:                                               ; preds = %20
  %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
  br label %109

54:                                               ; preds = %21
  %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
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %12) #7
  br label %109

58:                                               ; preds = %30, %28, %26, %24, %22
  %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
  br label %108

62:                                               ; preds = %31
  %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
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %108

66:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #7
  store i8 1, ptr %15, align 1, !tbaa !11
  invoke void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EE5writeERKb(ptr noundef nonnull align 8 dereferenceable(224) %5, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %67 unwind label %90

67:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 5, i32 noundef 2, i32 noundef 1)
          to label %68 unwind label %94

68:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #7
  store i8 0, ptr %16, align 1, !tbaa !11
  invoke void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EE5writeERKb(ptr noundef nonnull align 8 dereferenceable(224) %5, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %69 unwind label %98

69:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 5, i32 noundef 2, i32 noundef 1)
          to label %70 unwind label %94

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %71 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core9sc_signalIiLNS_16sc_writer_policyE0EEcvRKiEv(ptr noundef nonnull align 8 dereferenceable(196) %10)
          to label %72 unwind label %102

72:                                               ; preds = %70
  %73 = load i32, ptr %71, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %17, align 4, !tbaa !5
  %75 = invoke noundef nonnull align 8 dereferenceable(196) ptr @_ZN7sc_core9sc_signalIiLNS_16sc_writer_policyE0EEaSERKi(ptr noundef nonnull align 8 dereferenceable(196) %10, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %76 unwind label %102

76:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  %77 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
          to label %78 unwind label %94

78:                                               ; preds = %76
  %79 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_corelsIN5sc_dt5sc_bvILi9EEELNS_16sc_writer_policyE0EEERSoS5_RKNS_9sc_signalIT_XT0_EEE(ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef nonnull align 8 dereferenceable(232) %6)
          to label %80 unwind label %94

80:                                               ; preds = %78
  %81 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %79, ptr noundef @.str.3)
          to label %82 unwind label %94

82:                                               ; preds = %80
  %83 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_corelsIN5sc_dt5sc_bvILi9EEELNS_16sc_writer_policyE0EEERSoS5_RKNS_9sc_signalIT_XT0_EEE(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull align 8 dereferenceable(232) %9)
          to label %84 unwind label %94

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

86:                                               ; preds = %84
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %14, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %14, align 4, !tbaa !5
  br label %34, !llvm.loop !13

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

94:                                               ; preds = %84, %82, %80, %78, %76, %69, %67
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %7, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %8, align 4
  br label %106

98:                                               ; preds = %68
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %7, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  br label %106

102:                                              ; preds = %72, %70
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %7, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %106

106:                                              ; preds = %102, %98, %94, %90
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %108

107:                                              ; preds = %37
  call void @_ZN3funD2Ev(ptr noundef nonnull align 8 dereferenceable(1008) %11) #7
  call void @llvm.lifetime.end.p0(i64 1008, ptr %11) #7
  call void @_ZN7sc_core9sc_signalIiLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(196) %10) #7
  call void @llvm.lifetime.end.p0(i64 200, ptr %10) #7
  call void @_ZN7sc_core9sc_signalIN5sc_dt5sc_bvILi9EEELNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(232) %9) #7
  call void @llvm.lifetime.end.p0(i64 232, ptr %9) #7
  call void @_ZN7sc_core9sc_signalIN5sc_dt5sc_bvILi9EEELNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(232) %6) #7
  call void @llvm.lifetime.end.p0(i64 232, ptr %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 %5) #7
  ret i32 0

108:                                              ; preds = %106, %62, %58
  call void @_ZN3funD2Ev(ptr noundef nonnull align 8 dereferenceable(1008) %11) #7
  br label %109

109:                                              ; preds = %108, %54, %50
  call void @llvm.lifetime.end.p0(i64 1008, ptr %11) #7
  call void @_ZN7sc_core9sc_signalIiLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(196) %10) #7
  br label %110

110:                                              ; preds = %109, %46
  call void @llvm.lifetime.end.p0(i64 200, ptr %10) #7
  call void @_ZN7sc_core9sc_signalIN5sc_dt5sc_bvILi9EEELNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(232) %9) #7
  br label %111

111:                                              ; preds = %110, %42
  call void @llvm.lifetime.end.p0(i64 232, ptr %9) #7
  call void @_ZN7sc_core9sc_signalIN5sc_dt5sc_bvILi9EEELNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(232) %6) #7
  br label %112

112:                                              ; preds = %111, %38
  call void @llvm.lifetime.end.p0(i64 232, ptr %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 %5) #7
  br label %113

113:                                              ; preds = %112
  %114 = load ptr, ptr %7, align 8
  %115 = load i32, ptr %8, align 4
  %116 = insertvalue { ptr, i32 } poison, ptr %114, 0
  %117 = insertvalue { ptr, i32 } %116, i32 %115, 1
  resume { ptr, i32 } %117
}

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

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

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

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 @_ZN3funC2EN7sc_core14sc_module_nameE(ptr noundef nonnull align 8 dereferenceable(1008), ptr noundef) unnamed_addr #1 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 @_ZN7sc_core5sc_inIbEclERKNS_15sc_signal_in_ifIbEE(ptr noundef nonnull align 8 dereferenceable(184), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7sc_core9sc_port_bINS_18sc_signal_inout_ifIN5sc_dt5sc_bvILi9EEEEEEclERS5_(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef nonnull align 8 dereferenceable(16)) #1 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(196) ptr @_ZN7sc_core9sc_signalIiLNS_16sc_writer_policyE0EEaSERKi(ptr noundef nonnull align 8 dereferenceable(196), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core9sc_signalIiLNS_16sc_writer_policyE0EEcvRKiEv(ptr noundef nonnull align 8 dereferenceable(196)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_corelsIN5sc_dt5sc_bvILi9EEELNS_16sc_writer_policyE0EEERSoS5_RKNS_9sc_signalIT_XT0_EEE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(232)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { 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 = !{!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.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.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_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 }
%"class.sc_core::sc_signal.28" = type { %"class.sc_core::sc_signal_inout_if.29", %"class.sc_core::sc_prim_channel", %"struct.sc_core::sc_writer_policy_check", ptr, %"class.sc_dt::sc_bv", i64, %"class.sc_dt::sc_bv" }
%"class.sc_core::sc_signal_inout_if.29" = type { %"class.sc_core::sc_signal_in_if.30", %"class.sc_core::sc_signal_write_if.31" }
%"class.sc_core::sc_signal_in_if.30" = type { %"class.sc_core::sc_interface" }
%"class.sc_core::sc_signal_write_if.31" = type { %"class.sc_core::sc_interface" }
%"class.sc_dt::sc_bv" = type { %"class.sc_dt::sc_bv_base" }
%"class.sc_dt::sc_bv_base" = type { %"class.sc_dt::sc_proxy", i32, i32, ptr }
%"class.sc_dt::sc_proxy" = type { ptr }
%"class.sc_core::sc_signal.32" = type <{ %"class.sc_core::sc_signal_inout_if.33", %"class.sc_core::sc_prim_channel", %"struct.sc_core::sc_writer_policy_check", ptr, i32, [4 x i8], i64, i32, [4 x i8] }>
%"class.sc_core::sc_signal_inout_if.33" = type { %"class.sc_core::sc_signal_in_if.34", %"class.sc_core::sc_signal_write_if.35" }
%"class.sc_core::sc_signal_in_if.34" = type { %"class.sc_core::sc_interface" }
%"class.sc_core::sc_signal_write_if.35" = type { %"class.sc_core::sc_interface" }
%struct.fun = type { %"class.sc_core::sc_module", %"class.sc_core::sc_in", %"class.sc_core::sc_in.13", %"class.sc_dt::sc_bv", %"class.sc_dt::sc_bv", %"class.sc_dt::sc_bv", %"class.sc_core::sc_out", %"class.sc_core::sc_out" }
%"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_in.13" = type { %"class.sc_core::sc_port.14", ptr, ptr }
%"class.sc_core::sc_port.14" = type { %"class.sc_core::sc_port_b.15" }
%"class.sc_core::sc_port_b.15" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.16" }
%"class.std::vector.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<int> *, std::allocator<sc_core::sc_signal_in_if<int> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<int> *, std::allocator<sc_core::sc_signal_in_if<int> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<int> *, std::allocator<sc_core::sc_signal_in_if<int> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<int> *, std::allocator<sc_core::sc_signal_in_if<int> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_out" = type { %"class.sc_core::sc_inout" }
%"class.sc_core::sc_inout" = type { %"class.sc_core::sc_port.21", ptr, ptr, ptr }
%"class.sc_core::sc_port.21" = type { %"class.sc_core::sc_port_b.22" }
%"class.sc_core::sc_port_b.22" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.23" }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<sc_dt::sc_bv<9>> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_bv<9>> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<sc_dt::sc_bv<9>> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_bv<9>> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<sc_dt::sc_bv<9>> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_bv<9>> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<sc_dt::sc_bv<9>> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_bv<9>> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_module_name" = type <{ ptr, ptr, ptr, ptr, i8, [7 x i8] }>

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

13:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 232, ptr nonnull %5) #7
  invoke void @_ZN7sc_core9sc_signalIN5sc_dt5sc_bvILi9EEELNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(232) %5)
          to label %14 unwind label %32

14:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %6) #7
  invoke void @_ZN7sc_core9sc_signalIiLNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(196) %6)
          to label %15 unwind label %34

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

16:                                               ; preds = %15
  invoke void @_ZN3funC2EN7sc_core14sc_module_nameE(ptr noundef nonnull align 8 dereferenceable(1008) %7, ptr noundef nonnull %8)
          to label %17 unwind label %38

17:                                               ; preds = %16
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %8) #7
  %18 = getelementptr inbounds i8, ptr %7, i64 232
  invoke void @_ZN7sc_core5sc_inIbEclERKNS_15sc_signal_in_ifIbEE(ptr noundef nonnull align 8 dereferenceable(184) %18, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %19 unwind label %40

19:                                               ; preds = %17
  %20 = getelementptr inbounds i8, ptr %7, i64 416
  invoke void @_ZN7sc_core5sc_inIiEclERKNS_15sc_signal_in_ifIiEE(ptr noundef nonnull align 8 dereferenceable(168) %20, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %21 unwind label %40

21:                                               ; preds = %19
  %22 = getelementptr inbounds i8, ptr %7, i64 656
  invoke void @_ZN7sc_core9sc_port_bINS_18sc_signal_inout_ifIN5sc_dt5sc_bvILi9EEEEEEclERS5_(ptr noundef nonnull align 8 dereferenceable(152) %22, ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %23 unwind label %40

23:                                               ; preds = %21
  %24 = getelementptr inbounds i8, ptr %7, i64 832
  invoke void @_ZN7sc_core9sc_port_bINS_18sc_signal_inout_ifIN5sc_dt5sc_bvILi9EEEEEEclERS5_(ptr noundef nonnull align 8 dereferenceable(152) %24, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %25 unwind label %40

25:                                               ; preds = %23
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 0, i32 noundef 2, i32 noundef 1)
          to label %26 unwind label %40

26:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  %27 = invoke noundef nonnull align 8 dereferenceable(196) ptr @_ZN7sc_core9sc_signalIiLNS_16sc_writer_policyE0EEaSERKi(ptr noundef nonnull align 8 dereferenceable(196) %6, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %28 unwind label %42

28:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  br label %44

29:                                               ; preds = %64
  call void @_ZN3funD2Ev(ptr noundef nonnull align 8 dereferenceable(1008) %7) #7
  call void @llvm.lifetime.end.p0(i64 1008, ptr nonnull %7) #7
  call void @_ZN7sc_core9sc_signalIiLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(196) %6) #7
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %6) #7
  call void @_ZN7sc_core9sc_signalIN5sc_dt5sc_bvILi9EEELNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(232) %5) #7
  call void @llvm.lifetime.end.p0(i64 232, ptr nonnull %5) #7
  call void @_ZN7sc_core9sc_signalIN5sc_dt5sc_bvILi9EEELNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(232) %4) #7
  call void @llvm.lifetime.end.p0(i64 232, ptr nonnull %4) #7
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %3) #7
  call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %3) #7
  ret i32 0

30:                                               ; preds = %2
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %78

32:                                               ; preds = %13
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %77

34:                                               ; preds = %14
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %76

36:                                               ; preds = %15
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %75

38:                                               ; preds = %16
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %8) #7
  br label %75

40:                                               ; preds = %25, %23, %21, %19, %17
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %74

42:                                               ; preds = %26
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  br label %74

44:                                               ; preds = %28, %64
  %.016 = phi i32 [ 0, %28 ], [ %65, %64 ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #7
  store i8 1, ptr %10, align 1, !tbaa !9
  invoke void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EE5writeERKb(ptr noundef nonnull align 8 dereferenceable(224) %3, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %45 unwind label %66

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

46:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #7
  store i8 0, ptr %11, align 1, !tbaa !9
  invoke void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EE5writeERKb(ptr noundef nonnull align 8 dereferenceable(224) %3, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %47 unwind label %70

47:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 5, i32 noundef 2, i32 noundef 1)
          to label %48 unwind label %68

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  %49 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core9sc_signalIiLNS_16sc_writer_policyE0EEcvRKiEv(ptr noundef nonnull align 8 dereferenceable(196) %6)
          to label %50 unwind label %72

50:                                               ; preds = %48
  %51 = load i32, ptr %49, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %12, align 4, !tbaa !5
  %53 = invoke noundef nonnull align 8 dereferenceable(196) ptr @_ZN7sc_core9sc_signalIiLNS_16sc_writer_policyE0EEaSERKi(ptr noundef nonnull align 8 dereferenceable(196) %6, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %54 unwind label %72

54:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  %55 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %56 unwind label %68

56:                                               ; preds = %54
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_corelsIN5sc_dt5sc_bvILi9EEELNS_16sc_writer_policyE0EEERSoS5_RKNS_9sc_signalIT_XT0_EEE(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull align 8 dereferenceable(232) %4)
          to label %58 unwind label %68

58:                                               ; preds = %56
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull @.str.3)
          to label %60 unwind label %68

60:                                               ; preds = %58
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_corelsIN5sc_dt5sc_bvILi9EEELNS_16sc_writer_policyE0EEERSoS5_RKNS_9sc_signalIT_XT0_EEE(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull align 8 dereferenceable(232) %5)
          to label %62 unwind label %68

62:                                               ; preds = %60
  %63 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %64 unwind label %68

64:                                               ; preds = %62
  %65 = add nuw nsw i32 %.016, 1
  %exitcond.not = icmp eq i32 %65, 10
  br i1 %exitcond.not, label %29, label %44, !llvm.loop !11

66:                                               ; preds = %44
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  br label %74

68:                                               ; preds = %62, %60, %58, %56, %54, %47, %45
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %74

70:                                               ; preds = %46
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  br label %74

72:                                               ; preds = %50, %48
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  br label %74

74:                                               ; preds = %66, %68, %70, %72, %42, %40
  %.pn.pn = phi { ptr, i32 } [ %43, %42 ], [ %41, %40 ], [ %69, %68 ], [ %73, %72 ], [ %71, %70 ], [ %67, %66 ]
  call void @_ZN3funD2Ev(ptr noundef nonnull align 8 dereferenceable(1008) %7) #7
  br label %75

75:                                               ; preds = %74, %38, %36
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %74 ], [ %39, %38 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 1008, ptr nonnull %7) #7
  call void @_ZN7sc_core9sc_signalIiLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(196) %6) #7
  br label %76

76:                                               ; preds = %75, %34
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %75 ], [ %35, %34 ]
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %6) #7
  call void @_ZN7sc_core9sc_signalIN5sc_dt5sc_bvILi9EEELNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(232) %5) #7
  br label %77

77:                                               ; preds = %76, %32
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %76 ], [ %33, %32 ]
  call void @llvm.lifetime.end.p0(i64 232, ptr nonnull %5) #7
  call void @_ZN7sc_core9sc_signalIN5sc_dt5sc_bvILi9EEELNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(232) %4) #7
  br label %78

78:                                               ; preds = %77, %30
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %77 ], [ %31, %30 ]
  call void @llvm.lifetime.end.p0(i64 232, ptr nonnull %4) #7
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %3) #7
  call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn
}

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

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

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

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 @_ZN3funC2EN7sc_core14sc_module_nameE(ptr noundef nonnull align 8 dereferenceable(1008), ptr noundef) unnamed_addr #1 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 @_ZN7sc_core5sc_inIbEclERKNS_15sc_signal_in_ifIbEE(ptr noundef nonnull align 8 dereferenceable(184), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7sc_core5sc_inIiEclERKNS_15sc_signal_in_ifIiEE(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7sc_core9sc_port_bINS_18sc_signal_inout_ifIN5sc_dt5sc_bvILi9EEEEEEclERS5_(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 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(196) ptr @_ZN7sc_core9sc_signalIiLNS_16sc_writer_policyE0EEaSERKi(ptr noundef nonnull align 8 dereferenceable(196), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core9sc_signalIiLNS_16sc_writer_policyE0EEcvRKiEv(ptr noundef nonnull align 8 dereferenceable(196)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN7sc_corelsIN5sc_dt5sc_bvILi9EEELNS_16sc_writer_policyE0EEERSoS5_RKNS_9sc_signalIT_XT0_EEE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(232)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

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

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

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


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