; LLVM IR from gem5/gem5 :: src/systemc/tests/systemc/misc/sim_tests/irq (irq)

; 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" = 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 }
%struct.proc1 = type { %"class.sc_core::sc_module", %"class.sc_core::sc_in", [5 x %"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] }>

@.str = 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 i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %"class.sc_core::sc_signal", align 8
  %7 = alloca [5 x %"class.sc_core::sc_signal"], align 16
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %struct.proc1, align 8
  %11 = alloca %"class.sc_core::sc_module_name", align 8
  %12 = alloca i32, align 4
  %13 = alloca i8, align 1
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  %16 = alloca i8, align 1
  %17 = alloca i8, align 1
  %18 = alloca i8, align 1
  %19 = alloca i8, align 1
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 224, ptr %6) #6
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(224) %6)
  call void @llvm.lifetime.start.p0(i64 1120, ptr %7) #6
  %20 = getelementptr inbounds [5 x %"class.sc_core::sc_signal"], ptr %7, i32 0, i32 0
  %21 = getelementptr inbounds %"class.sc_core::sc_signal", ptr %20, i64 5
  br label %22

22:                                               ; preds = %24, %2
  %23 = phi ptr [ %20, %2 ], [ %25, %24 ]
  invoke void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(224) %23)
          to label %24 unwind label %35

24:                                               ; preds = %22
  %25 = getelementptr inbounds %"class.sc_core::sc_signal", ptr %23, i64 1
  %26 = icmp eq ptr %25, %21
  br i1 %26, label %27, label %22

27:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 1336, ptr %10) #6
  invoke void @_ZN7sc_core14sc_module_nameC1EPKc(ptr noundef nonnull align 8 dereferenceable(33) %11, ptr noundef @.str)
          to label %28 unwind label %45

28:                                               ; preds = %27
  %29 = getelementptr inbounds [5 x %"class.sc_core::sc_signal"], ptr %7, i64 0, i64 0
  invoke void @_ZN5proc1C2EN7sc_core14sc_module_nameERNS0_9sc_signalIbLNS0_16sc_writer_policyE0EEEPS4_(ptr noundef nonnull align 8 dereferenceable(1336) %10, ptr noundef %11, ptr noundef nonnull align 8 dereferenceable(224) %6, ptr noundef %29)
          to label %30 unwind label %49

30:                                               ; preds = %28
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %59, %30
  %32 = load i32, ptr %12, align 4, !tbaa !5
  %33 = icmp slt i32 %32, 5
  br i1 %33, label %53, label %34

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

35:                                               ; preds = %22
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %8, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %9, align 4
  %39 = icmp eq ptr %20, %23
  br i1 %39, label %44, label %40

40:                                               ; preds = %40, %35
  %41 = phi ptr [ %23, %35 ], [ %42, %40 ]
  %42 = getelementptr inbounds %"class.sc_core::sc_signal", ptr %41, i64 -1
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %42) #6
  %43 = icmp eq ptr %42, %20
  br i1 %43, label %44, label %40

44:                                               ; preds = %40, %35
  br label %142

45:                                               ; preds = %27
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %8, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %9, align 4
  br label %128

49:                                               ; preds = %28
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %8, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %9, align 4
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %11) #6
  br label %128

53:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #6
  store i8 0, ptr %13, align 1, !tbaa !11
  %54 = load i32, ptr %12, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [5 x %"class.sc_core::sc_signal"], ptr %7, i64 0, i64 %55
  %57 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %56, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %58 unwind label %62

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

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

62:                                               ; preds = %53
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %8, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %127

66:                                               ; preds = %34
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 0, i32 noundef 2, i32 noundef 1)
          to label %67 unwind label %72

67:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %96, %67
  %69 = load i32, ptr %14, align 4, !tbaa !5
  %70 = icmp slt i32 %69, 5
  br i1 %70, label %76, label %71

71:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %124

72:                                               ; preds = %66
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %8, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %9, align 4
  br label %127

76:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  store i8 0, ptr %15, align 1, !tbaa !11
  %77 = 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 %78 unwind label %99

78:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %79 unwind label %103

79:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #6
  store i8 1, ptr %16, align 1, !tbaa !11
  %80 = load i32, ptr %14, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [5 x %"class.sc_core::sc_signal"], ptr %7, i64 0, i64 %81
  %83 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %82, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %84 unwind label %107

84:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  store i8 1, ptr %17, align 1, !tbaa !11
  %85 = 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 %86 unwind label %111

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

87:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #6
  store i8 0, ptr %18, align 1, !tbaa !11
  %88 = 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 %89 unwind label %115

89:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #6
  store i8 0, ptr %19, align 1, !tbaa !11
  %90 = load i32, ptr %14, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [5 x %"class.sc_core::sc_signal"], ptr %7, i64 0, i64 %91
  %93 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %92, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %94 unwind label %119

94:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %95 unwind label %103

95:                                               ; preds = %94
  br label %96

96:                                               ; preds = %95
  %97 = load i32, ptr %14, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %14, align 4, !tbaa !5
  br label %68, !llvm.loop !15

99:                                               ; preds = %76
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %8, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  br label %123

103:                                              ; preds = %94, %86, %78
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %8, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %9, align 4
  br label %123

107:                                              ; preds = %79
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %8, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  br label %123

111:                                              ; preds = %84
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %8, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  br label %123

115:                                              ; preds = %87
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %8, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  br label %123

119:                                              ; preds = %89
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %8, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  br label %123

123:                                              ; preds = %119, %115, %111, %107, %103, %99
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %127

124:                                              ; preds = %71
  store i32 0, ptr %3, align 4
  call void @_ZN5proc1D2Ev(ptr noundef nonnull align 8 dereferenceable(1336) %10) #6
  call void @llvm.lifetime.end.p0(i64 1336, ptr %10) #6
  %125 = getelementptr inbounds [5 x %"class.sc_core::sc_signal"], ptr %7, i32 0, i32 0
  %126 = getelementptr inbounds %"class.sc_core::sc_signal", ptr %125, i64 5
  br label %131

127:                                              ; preds = %123, %72, %62
  call void @_ZN5proc1D2Ev(ptr noundef nonnull align 8 dereferenceable(1336) %10) #6
  br label %128

128:                                              ; preds = %127, %49, %45
  call void @llvm.lifetime.end.p0(i64 1336, ptr %10) #6
  %129 = getelementptr inbounds [5 x %"class.sc_core::sc_signal"], ptr %7, i32 0, i32 0
  %130 = getelementptr inbounds %"class.sc_core::sc_signal", ptr %129, i64 5
  br label %137

131:                                              ; preds = %131, %124
  %132 = phi ptr [ %126, %124 ], [ %133, %131 ]
  %133 = getelementptr inbounds %"class.sc_core::sc_signal", ptr %132, i64 -1
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %133) #6
  %134 = icmp eq ptr %133, %125
  br i1 %134, label %135, label %131

135:                                              ; preds = %131
  call void @llvm.lifetime.end.p0(i64 1120, ptr %7) #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
  %136 = load i32, ptr %3, align 4
  ret i32 %136

137:                                              ; preds = %137, %128
  %138 = phi ptr [ %130, %128 ], [ %139, %137 ]
  %139 = getelementptr inbounds %"class.sc_core::sc_signal", ptr %138, i64 -1
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %139) #6
  %140 = icmp eq ptr %139, %129
  br i1 %140, label %141, label %137

141:                                              ; preds = %137
  br label %142

142:                                              ; preds = %141, %44
  call void @llvm.lifetime.end.p0(i64 1120, ptr %7) #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
  br label %143

143:                                              ; preds = %142
  %144 = load ptr, ptr %8, align 8
  %145 = load i32, ptr %9, align 4
  %146 = insertvalue { ptr, i32 } poison, ptr %144, 0
  %147 = insertvalue { ptr, i32 } %146, i32 %145, 1
  resume { ptr, i32 } %147
}

; 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_core9sc_signalIbLNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(224)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; 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: 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5proc1D2Ev(ptr noundef nonnull align 8 dereferenceable(1336)) 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 = { 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 #3 = { "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"}
!15 = distinct !{!15, !14}


; 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" = 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 }
%struct.proc1 = type { %"class.sc_core::sc_module", %"class.sc_core::sc_in", [5 x %"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] }>

@.str = 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", align 8
  %4 = alloca [5 x %"class.sc_core::sc_signal"], align 16
  %5 = alloca %struct.proc1, align 8
  %6 = alloca %"class.sc_core::sc_module_name", align 8
  %7 = alloca i8, align 1
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 224, ptr nonnull %3) #6
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(224) %3)
  call void @llvm.lifetime.start.p0(i64 1120, ptr nonnull %4) #6
  invoke void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(224) %4)
          to label %13 unwind label %22

13:                                               ; preds = %2
  %.ptr.1 = getelementptr inbounds i8, ptr %4, i64 224
  invoke void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(224) %.ptr.1)
          to label %14 unwind label %.preheader25.preheader

14:                                               ; preds = %13
  %.ptr.2 = getelementptr inbounds i8, ptr %4, i64 448
  invoke void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(224) %.ptr.2)
          to label %15 unwind label %.preheader25.preheader

15:                                               ; preds = %14
  %.ptr.3 = getelementptr inbounds i8, ptr %4, i64 672
  invoke void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(224) %.ptr.3)
          to label %16 unwind label %.preheader25.preheader

16:                                               ; preds = %15
  %.ptr.4 = getelementptr inbounds i8, ptr %4, i64 896
  invoke void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(224) %.ptr.4)
          to label %17 unwind label %.preheader25.preheader

17:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 1336, ptr nonnull %5) #6
  invoke void @_ZN7sc_core14sc_module_nameC1EPKc(ptr noundef nonnull align 8 dereferenceable(33) %6, ptr noundef nonnull @.str)
          to label %18 unwind label %26

18:                                               ; preds = %17
  invoke void @_ZN5proc1C2EN7sc_core14sc_module_nameERNS0_9sc_signalIbLNS0_16sc_writer_policyE0EEEPS4_(ptr noundef nonnull align 8 dereferenceable(1336) %5, ptr noundef nonnull %6, ptr noundef nonnull align 8 dereferenceable(224) %3, ptr noundef nonnull %4)
          to label %19 unwind label %28

19:                                               ; preds = %18
  call void @_ZN7sc_core14sc_module_nameD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %6) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #6
  store i8 0, ptr %7, align 1, !tbaa !5
  %20 = 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) %7)
          to label %30 unwind label %39

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

22:                                               ; preds = %2
  %lpad.thr_comm.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.preheader25.preheader:                           ; preds = %13, %14, %15, %16
  %.ptr.lcssa.ph = phi ptr [ %.ptr.4, %16 ], [ %.ptr.3, %15 ], [ %.ptr.2, %14 ], [ %.ptr.1, %13 ]
  %lpad.thr_comm = landingpad { ptr, i32 }
          cleanup
  br label %.preheader25

.preheader25:                                     ; preds = %.preheader25.preheader, %.preheader25
  %23 = phi ptr [ %24, %.preheader25 ], [ %.ptr.lcssa.ph, %.preheader25.preheader ]
  %24 = getelementptr inbounds i8, ptr %23, i64 -224
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %24) #6
  %25 = icmp eq ptr %24, %4
  br i1 %25, label %.loopexit, label %.preheader25

26:                                               ; preds = %17
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.loopexit

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

30:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #6
  store i8 0, ptr %7, align 1, !tbaa !5
  %31 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %.ptr.1, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %32 unwind label %39

32:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #6
  store i8 0, ptr %7, align 1, !tbaa !5
  %33 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %.ptr.2, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %34 unwind label %39

34:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #6
  store i8 0, ptr %7, align 1, !tbaa !5
  %35 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %.ptr.3, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %36 unwind label %39

36:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #6
  store i8 0, ptr %7, align 1, !tbaa !5
  %37 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %.ptr.4, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %38 unwind label %39

38:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 0, i32 noundef 2, i32 noundef 1)
          to label %.preheader.preheader unwind label %41

39:                                               ; preds = %36, %34, %32, %30, %19
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  br label %119

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

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

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #6
  store i8 1, ptr %9, 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) %9)
          to label %46 unwind label %111

46:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #6
  store i8 1, ptr %10, 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) %3, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %48 unwind label %113

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

49:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  store i8 0, ptr %11, 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) %3, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %51 unwind label %115

51:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  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 %117

53:                                               ; preds = %51
  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 1, i32 noundef 2, i32 noundef 1)
          to label %.preheader.1 unwind label %109

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

55:                                               ; preds = %.preheader.1
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %56 unwind label %109

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

58:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #6
  store i8 1, ptr %10, align 1, !tbaa !5
  %59 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %3, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %60 unwind label %113

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

61:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  store i8 0, ptr %11, align 1, !tbaa !5
  %62 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %3, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %63 unwind label %115

63:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #6
  store i8 0, ptr %12, align 1, !tbaa !5
  %64 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %.ptr.1, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %65 unwind label %117

65:                                               ; preds = %63
  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 1, i32 noundef 2, i32 noundef 1)
          to label %.preheader.2 unwind label %109

.preheader.2:                                     ; preds = %65
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  store i8 0, ptr %8, align 1, !tbaa !5
  %66 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %3, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %67 unwind label %107

67:                                               ; preds = %.preheader.2
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %68 unwind label %109

68:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #6
  store i8 1, ptr %9, align 1, !tbaa !5
  %69 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %.ptr.2, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %70 unwind label %111

70:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #6
  store i8 1, ptr %10, align 1, !tbaa !5
  %71 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %3, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %72 unwind label %113

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

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

75:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #6
  store i8 0, ptr %12, align 1, !tbaa !5
  %76 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %.ptr.2, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %77 unwind label %117

77:                                               ; preds = %75
  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 1, i32 noundef 2, i32 noundef 1)
          to label %.preheader.3 unwind label %109

.preheader.3:                                     ; preds = %77
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  store i8 0, ptr %8, align 1, !tbaa !5
  %78 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %3, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %79 unwind label %107

79:                                               ; preds = %.preheader.3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %80 unwind label %109

80:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #6
  store i8 1, ptr %9, align 1, !tbaa !5
  %81 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %.ptr.3, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %82 unwind label %111

82:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #6
  store i8 1, ptr %10, align 1, !tbaa !5
  %83 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %3, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %84 unwind label %113

84:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %85 unwind label %109

85:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  store i8 0, ptr %11, align 1, !tbaa !5
  %86 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %3, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %87 unwind label %115

87:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #6
  store i8 0, ptr %12, align 1, !tbaa !5
  %88 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %.ptr.3, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %89 unwind label %117

89:                                               ; preds = %87
  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 1, i32 noundef 2, i32 noundef 1)
          to label %.preheader.4 unwind label %109

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

91:                                               ; preds = %.preheader.4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %92 unwind label %109

92:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #6
  store i8 1, ptr %9, align 1, !tbaa !5
  %93 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %.ptr.4, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %94 unwind label %111

94:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #6
  store i8 1, ptr %10, align 1, !tbaa !5
  %95 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %3, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %96 unwind label %113

96:                                               ; preds = %94
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %97 unwind label %109

97:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  store i8 0, ptr %11, align 1, !tbaa !5
  %98 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %3, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %99 unwind label %115

99:                                               ; preds = %97
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #6
  store i8 0, ptr %12, align 1, !tbaa !5
  %100 = invoke noundef nonnull align 8 dereferenceable(224) ptr @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EEaSERKb(ptr noundef nonnull align 8 dereferenceable(224) %.ptr.4, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %101 unwind label %117

101:                                              ; preds = %99
  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 1, i32 noundef 2, i32 noundef 1)
          to label %102 unwind label %109

102:                                              ; preds = %101
  call void @_ZN5proc1D2Ev(ptr noundef nonnull align 8 dereferenceable(1336) %5) #6
  call void @llvm.lifetime.end.p0(i64 1336, ptr nonnull %5) #6
  %103 = getelementptr inbounds i8, ptr %4, i64 896
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %103) #6
  %104 = getelementptr inbounds i8, ptr %4, i64 672
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %104) #6
  %105 = getelementptr inbounds i8, ptr %4, i64 448
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %105) #6
  %106 = getelementptr inbounds i8, ptr %4, i64 224
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %106) #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 1120, ptr nonnull %4) #6
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %3) #6
  call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %3) #6
  ret i32 0

107:                                              ; preds = %.preheader.4, %.preheader.3, %.preheader.2, %.preheader.1, %.preheader.preheader
  %108 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  br label %119

109:                                              ; preds = %101, %96, %91, %89, %84, %79, %77, %72, %67, %65, %60, %55, %53, %48, %43
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %119

111:                                              ; preds = %92, %80, %68, %56, %44
  %112 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  br label %119

113:                                              ; preds = %94, %82, %70, %58, %46
  %114 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  br label %119

115:                                              ; preds = %97, %85, %73, %61, %49
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  br label %119

117:                                              ; preds = %99, %87, %75, %63, %51
  %118 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  br label %119

119:                                              ; preds = %107, %109, %111, %113, %115, %117, %41, %39
  %.pn21 = phi { ptr, i32 } [ %40, %39 ], [ %42, %41 ], [ %110, %109 ], [ %118, %117 ], [ %116, %115 ], [ %114, %113 ], [ %112, %111 ], [ %108, %107 ]
  call void @_ZN5proc1D2Ev(ptr noundef nonnull align 8 dereferenceable(1336) %5) #6
  br label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %119, %28, %26
  %.pn21.pn = phi { ptr, i32 } [ %.pn21, %119 ], [ %29, %28 ], [ %27, %26 ]
  call void @llvm.lifetime.end.p0(i64 1336, ptr nonnull %5) #6
  %120 = getelementptr inbounds i8, ptr %4, i64 896
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %120) #6
  %121 = getelementptr inbounds i8, ptr %4, i64 672
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %121) #6
  %122 = getelementptr inbounds i8, ptr %4, i64 448
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %122) #6
  %123 = getelementptr inbounds i8, ptr %4, i64 224
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %123) #6
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %4) #6
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader25, %22, %.loopexit.loopexit
  %.pn21.pn.pn = phi { ptr, i32 } [ %lpad.thr_comm.split-lp, %22 ], [ %.pn21.pn, %.loopexit.loopexit ], [ %lpad.thr_comm, %.preheader25 ]
  call void @llvm.lifetime.end.p0(i64 1120, ptr nonnull %4) #6
  call void @_ZN7sc_core9sc_signalIbLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(224) %3) #6
  call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn21.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_core9sc_signalIbLNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(224)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; 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: 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5proc1D2Ev(ptr noundef nonnull align 8 dereferenceable(1336)) 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 = { 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 #3 = { "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: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass