; LLVM IR from gem5/gem5 :: src/systemc/tests/systemc/misc/synth/add_chain_FUNC/add_chain.ll (ZN9add_chain5entryEv)

; 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_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_dt::sc_bv.0" = type { %"class.sc_dt::sc_bv_base" }
%"class.sc_dt::sc_bitref" = type { %"class.sc_dt::sc_bitref_r.base", [4 x i8] }
%"class.sc_dt::sc_bitref_r.base" = type <{ ptr, i32 }>
%struct.add_chain = type { %"class.sc_core::sc_module", %"class.sc_core::sc_in", ptr, ptr, ptr, ptr }
%"class.sc_core::sc_module" = type { %"class.sc_core::sc_object", %"class.sc_core::sc_process_host", %"class.sc_core::sc_sensitive", %"class.sc_core::sc_sensitive_pos", %"class.sc_core::sc_sensitive_neg", i8, ptr, i32, ptr, ptr }
%"class.sc_core::sc_object" = type { ptr, ptr, %"class.std::vector", %"class.std::vector.1", %"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.1" = type { %"struct.std::_Vector_base.2" }
%"struct.std::_Vector_base.2" = type { %"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.sc_core::sc_process_host" = type { ptr }
%"class.sc_core::sc_sensitive" = type { ptr, i32, ptr }
%"class.sc_core::sc_sensitive_pos" = type { ptr, i32, ptr }
%"class.sc_core::sc_sensitive_neg" = type { ptr, i32, ptr }
%"class.sc_core::sc_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.9" }
%"class.sc_core::sc_port_base" = type { %"class.sc_core::sc_object", ptr }
%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = 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 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9add_chain5entryEv(ptr noundef nonnull align 8 dereferenceable(448) %0) #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.sc_dt::sc_bv", align 8
  %4 = alloca %"class.sc_dt::sc_bv.0", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.sc_dt::sc_bv", align 8
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca %"class.sc_dt::sc_bitref", align 8
  %12 = alloca i8, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %13 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #3
  call void @_ZN5sc_dt5sc_bvILi4EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #3
  invoke void @_ZN5sc_dt5sc_bvILi8EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %14 unwind label %50

14:                                               ; preds = %1
  %15 = getelementptr inbounds %struct.add_chain, ptr %13, i32 0, i32 4
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #3
  invoke void @_ZN5sc_dt5sc_bvILi4EEC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef 0)
          to label %17 unwind label %54

17:                                               ; preds = %14
  %18 = load ptr, ptr %16, align 8, !tbaa !41
  %19 = getelementptr inbounds ptr, ptr %18, i64 9
  %20 = load ptr, ptr %19, align 8
  invoke void %20(ptr noundef nonnull align 8 dereferenceable(208) %16, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %21 unwind label %58

21:                                               ; preds = %17
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #3
  %22 = getelementptr inbounds %struct.add_chain, ptr %13, i32 0, i32 5
  %23 = load ptr, ptr %22, align 8, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #3
  store i8 1, ptr %8, align 1, !tbaa !44
  %24 = load ptr, ptr %23, align 8, !tbaa !41
  %25 = getelementptr inbounds ptr, ptr %24, i64 14
  %26 = load ptr, ptr %25, align 8
  invoke void %26(ptr noundef nonnull align 8 dereferenceable(200) %23, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %27 unwind label %63

27:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #3
  invoke void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %13)
          to label %28 unwind label %67

28:                                               ; preds = %27
  br label %29

29:                                               ; preds = %111, %28
  br label %30

30:                                               ; preds = %29
  %31 = getelementptr inbounds %struct.add_chain, ptr %13, i32 0, i32 3
  %32 = load ptr, ptr %31, align 8, !tbaa !45
  %33 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7sc_core9sc_signalIN5sc_dt5sc_bvILi8EEELNS_16sc_writer_policyE3EEcvRKS3_Ev(ptr noundef nonnull align 8 dereferenceable(208) %32)
          to label %34 unwind label %67

34:                                               ; preds = %30
  %35 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi8EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %33)
          to label %36 unwind label %67

36:                                               ; preds = %34
  %37 = getelementptr inbounds %struct.add_chain, ptr %13, i32 0, i32 5
  %38 = load ptr, ptr %37, align 8, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #3
  store i8 0, ptr %9, align 1, !tbaa !44
  %39 = load ptr, ptr %38, align 8, !tbaa !41
  %40 = getelementptr inbounds ptr, ptr %39, i64 14
  %41 = load ptr, ptr %40, align 8
  invoke void %41(ptr noundef nonnull align 8 dereferenceable(200) %38, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %42 unwind label %71

42:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #3
  invoke void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %13)
          to label %43 unwind label %67

43:                                               ; preds = %42
  %44 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %3, i32 noundef 0)
          to label %45 unwind label %67

45:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !46
  br label %46

46:                                               ; preds = %86, %45
  %47 = load i32, ptr %10, align 4, !tbaa !46
  %48 = icmp sle i32 %47, 7
  br i1 %48, label %75, label %49

49:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %98

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

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

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

62:                                               ; preds = %58, %54
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #3
  br label %116

63:                                               ; preds = %21
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %5, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #3
  br label %116

67:                                               ; preds = %110, %98, %43, %42, %34, %30, %27
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %5, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %6, align 4
  br label %116

71:                                               ; preds = %36
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %5, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #3
  br label %116

75:                                               ; preds = %46
  %76 = invoke noundef i32 @_ZNK5sc_dt8sc_proxyINS_10sc_bv_baseEE7to_uintEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %77 unwind label %89

77:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #3
  %78 = load i32, ptr %10, align 4, !tbaa !46
  invoke void @_ZN5sc_dt8sc_proxyINS_10sc_bv_baseEEixEi(ptr dead_on_unwind writable sret(%"class.sc_dt::sc_bitref") align 8 %11, ptr noundef nonnull align 8 dereferenceable(8) %4, i32 noundef %78)
          to label %79 unwind label %93

79:                                               ; preds = %77
  %80 = invoke noundef zeroext i1 @_ZNK5sc_dt11sc_bitref_rINS_10sc_bv_baseEE7to_boolEv(ptr noundef nonnull align 8 dereferenceable(12) %11)
          to label %81 unwind label %93

81:                                               ; preds = %79
  %82 = zext i1 %80 to i32
  %83 = add i32 %76, %82
  %84 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSEj(ptr noundef nonnull align 8 dereferenceable(24) %3, i32 noundef %83)
          to label %85 unwind label %93

85:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #3
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %10, align 4, !tbaa !46
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %10, align 4, !tbaa !46
  br label %46, !llvm.loop !47

89:                                               ; preds = %75
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %5, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %6, align 4
  br label %97

93:                                               ; preds = %81, %79, %77
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %5, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #3
  br label %97

97:                                               ; preds = %93, %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %116

98:                                               ; preds = %49
  %99 = getelementptr inbounds %struct.add_chain, ptr %13, i32 0, i32 4
  %100 = load ptr, ptr %99, align 8, !tbaa !9
  %101 = load ptr, ptr %100, align 8, !tbaa !41
  %102 = getelementptr inbounds ptr, ptr %101, i64 9
  %103 = load ptr, ptr %102, align 8
  invoke void %103(ptr noundef nonnull align 8 dereferenceable(208) %100, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %104 unwind label %67

104:                                              ; preds = %98
  %105 = getelementptr inbounds %struct.add_chain, ptr %13, i32 0, i32 5
  %106 = load ptr, ptr %105, align 8, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #3
  store i8 1, ptr %12, align 1, !tbaa !44
  %107 = load ptr, ptr %106, align 8, !tbaa !41
  %108 = getelementptr inbounds ptr, ptr %107, i64 14
  %109 = load ptr, ptr %108, align 8
  invoke void %109(ptr noundef nonnull align 8 dereferenceable(200) %106, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %110 unwind label %112

110:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #3
  invoke void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %13)
          to label %111 unwind label %67

111:                                              ; preds = %110
  br label %29, !llvm.loop !49

112:                                              ; preds = %104
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %5, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #3
  br label %116

116:                                              ; preds = %112, %97, %71, %67, %63, %62
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #3
  br label %117

117:                                              ; preds = %116, %50
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #3
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #3
  br label %118

118:                                              ; preds = %117
  %119 = load ptr, ptr %5, align 8
  %120 = load i32, ptr %6, align 4
  %121 = insertvalue { ptr, i32 } poison, ptr %119, 0
  %122 = insertvalue { ptr, i32 } %121, i32 %120, 1
  resume { ptr, i32 } %122
}

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5sc_dt5sc_bvILi4EEC2Ei(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) unnamed_addr #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: mustprogress uwtable
declare dso_local void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7sc_core9sc_signalIN5sc_dt5sc_bvILi8EEELNS_16sc_writer_policyE3EEcvRKS3_Ev(ptr noundef nonnull align 8 dereferenceable(208)) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK5sc_dt8sc_proxyINS_10sc_bv_baseEE7to_uintEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5sc_dt8sc_proxyINS_10sc_bv_baseEEixEi(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::sc_bitref") align 8, ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt11sc_bitref_rINS_10sc_bv_baseEE7to_boolEv(ptr noundef nonnull align 8 dereferenceable(12)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSEj(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 432}
!10 = !{!"_ZTS9add_chain", !11, i64 0, !33, i64 232, !6, i64 416, !6, i64 424, !6, i64 432, !6, i64 440}
!11 = !{!"_ZTSN7sc_core9sc_moduleE", !12, i64 0, !24, i64 112, !25, i64 120, !27, i64 144, !29, i64 168, !31, i64 192, !6, i64 200, !32, i64 208, !6, i64 216, !6, i64 224}
!12 = !{!"_ZTSN7sc_core9sc_objectE", !6, i64 8, !13, i64 16, !17, i64 40, !21, i64 64, !6, i64 96, !6, i64 104}
!13 = !{!"_ZTSSt6vectorIPN7sc_core8sc_eventESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSSt6vectorIPN7sc_core9sc_objectESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !22, i64 0, !23, i64 8, !7, i64 16}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_ZTSN7sc_core15sc_process_hostE"}
!25 = !{!"_ZTSN7sc_core12sc_sensitiveE", !6, i64 0, !26, i64 8, !6, i64 16}
!26 = !{!"_ZTSN7sc_core12sc_sensitiveUt_E", !7, i64 0}
!27 = !{!"_ZTSN7sc_core16sc_sensitive_posE", !6, i64 0, !28, i64 8, !6, i64 16}
!28 = !{!"_ZTSN7sc_core16sc_sensitive_posUt_E", !7, i64 0}
!29 = !{!"_ZTSN7sc_core16sc_sensitive_negE", !6, i64 0, !30, i64 8, !6, i64 16}
!30 = !{!"_ZTSN7sc_core16sc_sensitive_negUt_E", !7, i64 0}
!31 = !{!"bool", !7, i64 0}
!32 = !{!"int", !7, i64 0}
!33 = !{!"_ZTSN7sc_core5sc_inIbEE", !34, i64 0, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176}
!34 = !{!"_ZTSN7sc_core7sc_portINS_15sc_signal_in_ifIbEELi1ELNS_14sc_port_policyE0EEE", !35, i64 0}
!35 = !{!"_ZTSN7sc_core9sc_port_bINS_15sc_signal_in_ifIbEEEE", !36, i64 0, !6, i64 120, !37, i64 128}
!36 = !{!"_ZTSN7sc_core12sc_port_baseE", !12, i64 0, !6, i64 112}
!37 = !{!"_ZTSSt6vectorIPN7sc_core15sc_signal_in_ifIbEESaIS3_EE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseIPN7sc_core15sc_signal_in_ifIbEESaIS3_EE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core15sc_signal_in_ifIbEESaIS3_EE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core15sc_signal_in_ifIbEESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!41 = !{!42, !42, i64 0}
!42 = !{!"vtable pointer", !8, i64 0}
!43 = !{!10, !6, i64 440}
!44 = !{!31, !31, i64 0}
!45 = !{!10, !6, i64 424}
!46 = !{!32, !32, i64 0}
!47 = distinct !{!47, !48}
!48 = !{!"llvm.loop.mustprogress"}
!49 = distinct !{!49, !48}


; 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_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_dt::sc_bv.0" = type { %"class.sc_dt::sc_bv_base" }
%"class.sc_dt::sc_bitref" = type { %"class.sc_dt::sc_bitref_r.base", [4 x i8] }
%"class.sc_dt::sc_bitref_r.base" = type <{ ptr, i32 }>

; Function Attrs: mustprogress noreturn uwtable
define dso_local void @_ZN9add_chain5entryEv(ptr noundef nonnull align 8 dereferenceable(448) %0) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.sc_dt::sc_bv", align 8
  %3 = alloca %"class.sc_dt::sc_bv.0", align 8
  %4 = alloca %"class.sc_dt::sc_bv", align 8
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca %"class.sc_dt::sc_bitref", align 8
  %8 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #4
  call void @_ZN5sc_dt5sc_bvILi4EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  invoke void @_ZN5sc_dt5sc_bvILi8EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %9 unwind label %38

9:                                                ; preds = %1
  %10 = getelementptr inbounds i8, ptr %0, i64 432
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  invoke void @_ZN5sc_dt5sc_bvILi4EEC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef 0)
          to label %12 unwind label %40

12:                                               ; preds = %9
  %13 = load ptr, ptr %11, align 8, !tbaa !40
  %14 = getelementptr inbounds i8, ptr %13, i64 72
  %15 = load ptr, ptr %14, align 8
  invoke void %15(ptr noundef nonnull align 8 dereferenceable(208) %11, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %16 unwind label %42

16:                                               ; preds = %12
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  %17 = getelementptr inbounds i8, ptr %0, i64 440
  %18 = load ptr, ptr %17, align 8, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #4
  store i8 1, ptr %5, align 1, !tbaa !43
  %19 = load ptr, ptr %18, align 8, !tbaa !40
  %20 = getelementptr inbounds i8, ptr %19, i64 112
  %21 = load ptr, ptr %20, align 8
  invoke void %21(ptr noundef nonnull align 8 dereferenceable(200) %18, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %22 unwind label %45

22:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  invoke void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
          to label %.preheader15 unwind label %.loopexit.split-lp

.preheader15:                                     ; preds = %22
  %23 = getelementptr inbounds i8, ptr %0, i64 424
  br label %24

24:                                               ; preds = %.preheader15, %126
  %25 = load ptr, ptr %23, align 8, !tbaa !44
  %26 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7sc_core9sc_signalIN5sc_dt5sc_bvILi8EEELNS_16sc_writer_policyE3EEcvRKS3_Ev(ptr noundef nonnull align 8 dereferenceable(208) %25)
          to label %27 unwind label %.loopexit

27:                                               ; preds = %24
  %28 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi8EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %26)
          to label %29 unwind label %.loopexit

29:                                               ; preds = %27
  %30 = load ptr, ptr %17, align 8, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #4
  store i8 0, ptr %6, align 1, !tbaa !43
  %31 = load ptr, ptr %30, align 8, !tbaa !40
  %32 = getelementptr inbounds i8, ptr %31, i64 112
  %33 = load ptr, ptr %32, align 8
  invoke void %33(ptr noundef nonnull align 8 dereferenceable(200) %30, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %34 unwind label %47

34:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #4
  invoke void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
          to label %35 unwind label %.loopexit

35:                                               ; preds = %34
  %36 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef 0)
          to label %.preheader.preheader unwind label %.loopexit

.preheader.preheader:                             ; preds = %35
  %37 = invoke noundef i32 @_ZNK5sc_dt8sc_proxyINS_10sc_bv_baseEE7to_uintEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %49 unwind label %117

38:                                               ; preds = %1
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %130

40:                                               ; preds = %9
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %44

42:                                               ; preds = %12
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  br label %44

44:                                               ; preds = %42, %40
  %.pn = phi { ptr, i32 } [ %43, %42 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  br label %129

45:                                               ; preds = %16
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  br label %129

.loopexit:                                        ; preds = %24, %27, %34, %35, %112, %126
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %129

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

47:                                               ; preds = %29
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #4
  br label %129

49:                                               ; preds = %.preheader.preheader
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  invoke void @_ZN5sc_dt8sc_proxyINS_10sc_bv_baseEEixEi(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::sc_bitref") align 8 %7, ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef 0)
          to label %50 unwind label %119

50:                                               ; preds = %49
  %51 = invoke noundef zeroext i1 @_ZNK5sc_dt11sc_bitref_rINS_10sc_bv_baseEE7to_boolEv(ptr noundef nonnull align 8 dereferenceable(12) %7)
          to label %52 unwind label %119

52:                                               ; preds = %50
  %53 = zext i1 %51 to i32
  %54 = add i32 %37, %53
  %55 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSEj(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %54)
          to label %.preheader.1 unwind label %119

.preheader.1:                                     ; preds = %52
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  %56 = invoke noundef i32 @_ZNK5sc_dt8sc_proxyINS_10sc_bv_baseEE7to_uintEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %57 unwind label %117

57:                                               ; preds = %.preheader.1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  invoke void @_ZN5sc_dt8sc_proxyINS_10sc_bv_baseEEixEi(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::sc_bitref") align 8 %7, ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef 1)
          to label %58 unwind label %119

58:                                               ; preds = %57
  %59 = invoke noundef zeroext i1 @_ZNK5sc_dt11sc_bitref_rINS_10sc_bv_baseEE7to_boolEv(ptr noundef nonnull align 8 dereferenceable(12) %7)
          to label %60 unwind label %119

60:                                               ; preds = %58
  %61 = zext i1 %59 to i32
  %62 = add i32 %56, %61
  %63 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSEj(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %62)
          to label %.preheader.2 unwind label %119

.preheader.2:                                     ; preds = %60
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  %64 = invoke noundef i32 @_ZNK5sc_dt8sc_proxyINS_10sc_bv_baseEE7to_uintEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %65 unwind label %117

65:                                               ; preds = %.preheader.2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  invoke void @_ZN5sc_dt8sc_proxyINS_10sc_bv_baseEEixEi(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::sc_bitref") align 8 %7, ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef 2)
          to label %66 unwind label %119

66:                                               ; preds = %65
  %67 = invoke noundef zeroext i1 @_ZNK5sc_dt11sc_bitref_rINS_10sc_bv_baseEE7to_boolEv(ptr noundef nonnull align 8 dereferenceable(12) %7)
          to label %68 unwind label %119

68:                                               ; preds = %66
  %69 = zext i1 %67 to i32
  %70 = add i32 %64, %69
  %71 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSEj(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %70)
          to label %.preheader.3 unwind label %119

.preheader.3:                                     ; preds = %68
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  %72 = invoke noundef i32 @_ZNK5sc_dt8sc_proxyINS_10sc_bv_baseEE7to_uintEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %73 unwind label %117

73:                                               ; preds = %.preheader.3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  invoke void @_ZN5sc_dt8sc_proxyINS_10sc_bv_baseEEixEi(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::sc_bitref") align 8 %7, ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef 3)
          to label %74 unwind label %119

74:                                               ; preds = %73
  %75 = invoke noundef zeroext i1 @_ZNK5sc_dt11sc_bitref_rINS_10sc_bv_baseEE7to_boolEv(ptr noundef nonnull align 8 dereferenceable(12) %7)
          to label %76 unwind label %119

76:                                               ; preds = %74
  %77 = zext i1 %75 to i32
  %78 = add i32 %72, %77
  %79 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSEj(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %78)
          to label %.preheader.4 unwind label %119

.preheader.4:                                     ; preds = %76
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  %80 = invoke noundef i32 @_ZNK5sc_dt8sc_proxyINS_10sc_bv_baseEE7to_uintEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %81 unwind label %117

81:                                               ; preds = %.preheader.4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  invoke void @_ZN5sc_dt8sc_proxyINS_10sc_bv_baseEEixEi(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::sc_bitref") align 8 %7, ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef 4)
          to label %82 unwind label %119

82:                                               ; preds = %81
  %83 = invoke noundef zeroext i1 @_ZNK5sc_dt11sc_bitref_rINS_10sc_bv_baseEE7to_boolEv(ptr noundef nonnull align 8 dereferenceable(12) %7)
          to label %84 unwind label %119

84:                                               ; preds = %82
  %85 = zext i1 %83 to i32
  %86 = add i32 %80, %85
  %87 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSEj(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %86)
          to label %.preheader.5 unwind label %119

.preheader.5:                                     ; preds = %84
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  %88 = invoke noundef i32 @_ZNK5sc_dt8sc_proxyINS_10sc_bv_baseEE7to_uintEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %89 unwind label %117

89:                                               ; preds = %.preheader.5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  invoke void @_ZN5sc_dt8sc_proxyINS_10sc_bv_baseEEixEi(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::sc_bitref") align 8 %7, ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef 5)
          to label %90 unwind label %119

90:                                               ; preds = %89
  %91 = invoke noundef zeroext i1 @_ZNK5sc_dt11sc_bitref_rINS_10sc_bv_baseEE7to_boolEv(ptr noundef nonnull align 8 dereferenceable(12) %7)
          to label %92 unwind label %119

92:                                               ; preds = %90
  %93 = zext i1 %91 to i32
  %94 = add i32 %88, %93
  %95 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSEj(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %94)
          to label %.preheader.6 unwind label %119

.preheader.6:                                     ; preds = %92
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  %96 = invoke noundef i32 @_ZNK5sc_dt8sc_proxyINS_10sc_bv_baseEE7to_uintEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %97 unwind label %117

97:                                               ; preds = %.preheader.6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  invoke void @_ZN5sc_dt8sc_proxyINS_10sc_bv_baseEEixEi(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::sc_bitref") align 8 %7, ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef 6)
          to label %98 unwind label %119

98:                                               ; preds = %97
  %99 = invoke noundef zeroext i1 @_ZNK5sc_dt11sc_bitref_rINS_10sc_bv_baseEE7to_boolEv(ptr noundef nonnull align 8 dereferenceable(12) %7)
          to label %100 unwind label %119

100:                                              ; preds = %98
  %101 = zext i1 %99 to i32
  %102 = add i32 %96, %101
  %103 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSEj(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %102)
          to label %.preheader.7 unwind label %119

.preheader.7:                                     ; preds = %100
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  %104 = invoke noundef i32 @_ZNK5sc_dt8sc_proxyINS_10sc_bv_baseEE7to_uintEv(ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %105 unwind label %117

105:                                              ; preds = %.preheader.7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  invoke void @_ZN5sc_dt8sc_proxyINS_10sc_bv_baseEEixEi(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::sc_bitref") align 8 %7, ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef 7)
          to label %106 unwind label %119

106:                                              ; preds = %105
  %107 = invoke noundef zeroext i1 @_ZNK5sc_dt11sc_bitref_rINS_10sc_bv_baseEE7to_boolEv(ptr noundef nonnull align 8 dereferenceable(12) %7)
          to label %108 unwind label %119

108:                                              ; preds = %106
  %109 = zext i1 %107 to i32
  %110 = add i32 %104, %109
  %111 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSEj(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %110)
          to label %112 unwind label %119

112:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = load ptr, ptr %113, align 8, !tbaa !40
  %115 = getelementptr inbounds i8, ptr %114, i64 72
  %116 = load ptr, ptr %115, align 8
  invoke void %116(ptr noundef nonnull align 8 dereferenceable(208) %113, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %121 unwind label %.loopexit

117:                                              ; preds = %.preheader.7, %.preheader.6, %.preheader.5, %.preheader.4, %.preheader.3, %.preheader.2, %.preheader.1, %.preheader.preheader
  %118 = landingpad { ptr, i32 }
          cleanup
  br label %129

119:                                              ; preds = %108, %106, %105, %100, %98, %97, %92, %90, %89, %84, %82, %81, %76, %74, %73, %68, %66, %65, %60, %58, %57, %52, %50, %49
  %120 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  br label %129

121:                                              ; preds = %112
  %122 = load ptr, ptr %17, align 8, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #4
  store i8 1, ptr %8, align 1, !tbaa !43
  %123 = load ptr, ptr %122, align 8, !tbaa !40
  %124 = getelementptr inbounds i8, ptr %123, i64 112
  %125 = load ptr, ptr %124, align 8
  invoke void %125(ptr noundef nonnull align 8 dereferenceable(200) %122, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %126 unwind label %127

126:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #4
  invoke void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
          to label %24 unwind label %.loopexit, !llvm.loop !45

127:                                              ; preds = %121
  %128 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #4
  br label %129

129:                                              ; preds = %.loopexit, %.loopexit.split-lp, %117, %119, %127, %47, %45, %44
  %.pn11.pn = phi { ptr, i32 } [ %128, %127 ], [ %48, %47 ], [ %46, %45 ], [ %.pn, %44 ], [ %120, %119 ], [ %118, %117 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  br label %130

130:                                              ; preds = %129, %38
  %.pn11.pn.pn = phi { ptr, i32 } [ %.pn11.pn, %129 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn11.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 @_ZN5sc_dt5sc_bvILi4EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5sc_dt5sc_bvILi4EEC2Ei(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) unnamed_addr #2 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: mustprogress uwtable
declare dso_local void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7sc_core9sc_signalIN5sc_dt5sc_bvILi8EEELNS_16sc_writer_policyE3EEcvRKS3_Ev(ptr noundef nonnull align 8 dereferenceable(208)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK5sc_dt8sc_proxyINS_10sc_bv_baseEE7to_uintEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5sc_dt8sc_proxyINS_10sc_bv_baseEEixEi(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::sc_bitref") align 8, ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt11sc_bitref_rINS_10sc_bv_baseEE7to_boolEv(ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSEj(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #2 align 2

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

attributes #0 = { mustprogress noreturn 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !9, i64 432}
!6 = !{!"_ZTS9add_chain", !7, i64 0, !32, i64 232, !9, i64 416, !9, i64 424, !9, i64 432, !9, i64 440}
!7 = !{!"_ZTSN7sc_core9sc_moduleE", !8, i64 0, !23, i64 112, !24, i64 120, !26, i64 144, !28, i64 168, !30, i64 192, !9, i64 200, !31, i64 208, !9, i64 216, !9, i64 224}
!8 = !{!"_ZTSN7sc_core9sc_objectE", !9, i64 8, !12, i64 16, !16, i64 40, !20, i64 64, !9, i64 96, !9, i64 104}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTSSt6vectorIPN7sc_core8sc_eventESaIS2_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!16 = !{!"_ZTSSt6vectorIPN7sc_core9sc_objectESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !22, i64 8, !10, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!22 = !{!"long", !10, i64 0}
!23 = !{!"_ZTSN7sc_core15sc_process_hostE"}
!24 = !{!"_ZTSN7sc_core12sc_sensitiveE", !9, i64 0, !25, i64 8, !9, i64 16}
!25 = !{!"_ZTSN7sc_core12sc_sensitiveUt_E", !10, i64 0}
!26 = !{!"_ZTSN7sc_core16sc_sensitive_posE", !9, i64 0, !27, i64 8, !9, i64 16}
!27 = !{!"_ZTSN7sc_core16sc_sensitive_posUt_E", !10, i64 0}
!28 = !{!"_ZTSN7sc_core16sc_sensitive_negE", !9, i64 0, !29, i64 8, !9, i64 16}
!29 = !{!"_ZTSN7sc_core16sc_sensitive_negUt_E", !10, i64 0}
!30 = !{!"bool", !10, i64 0}
!31 = !{!"int", !10, i64 0}
!32 = !{!"_ZTSN7sc_core5sc_inIbEE", !33, i64 0, !9, i64 152, !9, i64 160, !9, i64 168, !9, i64 176}
!33 = !{!"_ZTSN7sc_core7sc_portINS_15sc_signal_in_ifIbEELi1ELNS_14sc_port_policyE0EEE", !34, i64 0}
!34 = !{!"_ZTSN7sc_core9sc_port_bINS_15sc_signal_in_ifIbEEEE", !35, i64 0, !9, i64 120, !36, i64 128}
!35 = !{!"_ZTSN7sc_core12sc_port_baseE", !8, i64 0, !9, i64 112}
!36 = !{!"_ZTSSt6vectorIPN7sc_core15sc_signal_in_ifIbEESaIS3_EE", !37, i64 0}
!37 = !{!"_ZTSSt12_Vector_baseIPN7sc_core15sc_signal_in_ifIbEESaIS3_EE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core15sc_signal_in_ifIbEESaIS3_EE12_Vector_implE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core15sc_signal_in_ifIbEESaIS3_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!40 = !{!41, !41, i64 0}
!41 = !{!"vtable pointer", !11, i64 0}
!42 = !{!6, !9, i64 440}
!43 = !{!30, !30, i64 0}
!44 = !{!6, !9, i64 424}
!45 = distinct !{!45, !46}
!46 = !{!"llvm.loop.mustprogress"}


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