; LLVM IR from gem5/gem5 :: src/systemc/tests/systemc/communication/sc_signal/datatypes/test02 (test02)

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%class.my_datatype = type { i32 }
%"class.sc_core::sc_signal" = type <{ %"class.sc_core::sc_signal_inout_if", %"class.sc_core::sc_prim_channel", %"struct.sc_core::sc_writer_policy_check", ptr, %class.my_datatype, [4 x i8], i64, %class.my_datatype, [4 x i8] }>
%"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 }

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local i32 @sc_main(i32 noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca %class.my_datatype, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.sc_core::sc_signal", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %class.my_datatype, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @_ZN11my_datatypeC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef 123)
  invoke void @_ZNK11my_datatype5printERSo(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout)
          to label %12 unwind label %24

12:                                               ; preds = %2
  %13 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %14 unwind label %24

14:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 200, ptr %8) #5
  invoke void @_ZN7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(196) %8)
          to label %15 unwind label %28

15:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %16 = invoke noundef ptr @_ZN7sc_core24sc_create_vcd_trace_fileEPKc(ptr noundef @.str)
          to label %17 unwind label %32

17:                                               ; preds = %15
  store ptr %16, ptr %9, align 8, !tbaa !9
  %18 = load ptr, ptr %9, align 8, !tbaa !9
  invoke void @_ZN7sc_core8sc_traceI11my_datatypeEEvPNS_13sc_trace_fileERKNS_15sc_signal_in_ifIT_EEPKc(ptr noundef %18, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef @.str.2)
          to label %19 unwind label %32

19:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %49, %19
  %21 = load i32, ptr %10, align 4, !tbaa !5
  %22 = icmp slt i32 %21, 10
  br i1 %22, label %36, label %23

23:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %66

24:                                               ; preds = %12, %2
  %25 = landingpad { ptr, i32 }
          cleanup
  %26 = extractvalue { ptr, i32 } %25, 0
  store ptr %26, ptr %6, align 8
  %27 = extractvalue { ptr, i32 } %25, 1
  store i32 %27, ptr %7, align 4
  br label %71

28:                                               ; preds = %14
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %6, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %7, align 4
  br label %70

32:                                               ; preds = %66, %17, %15
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %6, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %7, align 4
  br label %69

36:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %37 = load i32, ptr %10, align 4, !tbaa !5
  %38 = sub nsw i32 10, %37
  invoke void @_ZN11my_datatypeC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %11, i32 noundef %38)
          to label %39 unwind label %52

39:                                               ; preds = %36
  %40 = invoke noundef nonnull align 8 dereferenceable(196) ptr @_ZN7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(196) %8, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %41 unwind label %56

41:                                               ; preds = %39
  call void @_ZN11my_datatypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %42 unwind label %61

42:                                               ; preds = %41
  %43 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EE4readEv(ptr noundef nonnull align 8 dereferenceable(196) %8)
          to label %44 unwind label %61

44:                                               ; preds = %42
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK11my_datatype(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 4 dereferenceable(4) %43)
          to label %46 unwind label %61

46:                                               ; preds = %44
  %47 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %48 unwind label %61

48:                                               ; preds = %46
  br label %49

49:                                               ; preds = %48
  %50 = load i32, ptr %10, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %10, align 4, !tbaa !5
  br label %20, !llvm.loop !11

52:                                               ; preds = %36
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %6, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %7, align 4
  br label %60

56:                                               ; preds = %39
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %6, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %7, align 4
  call void @_ZN11my_datatypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %11) #5
  br label %60

60:                                               ; preds = %56, %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %65

61:                                               ; preds = %46, %44, %42, %41
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %6, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %7, align 4
  br label %65

65:                                               ; preds = %61, %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %69

66:                                               ; preds = %23
  %67 = load ptr, ptr %9, align 8, !tbaa !9
  invoke void @_ZN7sc_core23sc_close_vcd_trace_fileEPNS_13sc_trace_fileE(ptr noundef %67)
          to label %68 unwind label %32

68:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @_ZN7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(196) %8) #5
  call void @llvm.lifetime.end.p0(i64 200, ptr %8) #5
  call void @_ZN11my_datatypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret i32 0

69:                                               ; preds = %65, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @_ZN7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(196) %8) #5
  br label %70

70:                                               ; preds = %69, %28
  call void @llvm.lifetime.end.p0(i64 200, ptr %8) #5
  br label %71

71:                                               ; preds = %70, %24
  call void @_ZN11my_datatypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %72

72:                                               ; preds = %71
  %73 = load ptr, ptr %6, align 8
  %74 = load i32, ptr %7, align 4
  %75 = insertvalue { ptr, i32 } poison, ptr %73, 0
  %76 = insertvalue { ptr, i32 } %75, i32 %74, 1
  resume { ptr, i32 } %76
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11my_datatypeC2Ei(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

declare noundef ptr @_ZN7sc_core24sc_create_vcd_trace_fileEPKc(ptr noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7sc_core8sc_traceI11my_datatypeEEvPNS_13sc_trace_fileERKNS_15sc_signal_in_ifIT_EEPKc(ptr noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11my_datatypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 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) #3

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

declare void @_ZN7sc_core23sc_close_vcd_trace_fileEPNS_13sc_trace_fileE(ptr noundef) #4

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

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

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


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%class.my_datatype = type { i32 }
%"class.sc_core::sc_signal" = type <{ %"class.sc_core::sc_signal_inout_if", %"class.sc_core::sc_prim_channel", %"struct.sc_core::sc_writer_policy_check", ptr, %class.my_datatype, [4 x i8], i64, %class.my_datatype, [4 x i8] }>
%"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 }

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

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

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

; 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.my_datatype, align 4
  %4 = alloca %"class.sc_core::sc_signal", align 8
  %5 = alloca %class.my_datatype, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @_ZN11my_datatypeC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %3, i32 noundef 123)
  invoke void @_ZNK11my_datatype5printERSo(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout)
          to label %6 unwind label %13

6:                                                ; preds = %2
  %7 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %8 unwind label %13

8:                                                ; preds = %6
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %4) #5
  invoke void @_ZN7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EEC1Ev(ptr noundef nonnull align 8 dereferenceable(196) %4)
          to label %9 unwind label %15

9:                                                ; preds = %8
  %10 = invoke noundef ptr @_ZN7sc_core24sc_create_vcd_trace_fileEPKc(ptr noundef nonnull @.str)
          to label %11 unwind label %17

11:                                               ; preds = %9
  invoke void @_ZN7sc_core8sc_traceI11my_datatypeEEvPNS_13sc_trace_fileERKNS_15sc_signal_in_ifIT_EEPKc(ptr noundef %10, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull @.str.2)
          to label %.preheader.preheader unwind label %17

.preheader.preheader:                             ; preds = %11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @_ZN11my_datatypeC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef 10)
  %12 = invoke noundef nonnull align 8 dereferenceable(196) ptr @_ZN7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(196) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %19 unwind label %89

13:                                               ; preds = %6, %2
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %96

15:                                               ; preds = %8
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %95

17:                                               ; preds = %88, %11, %9
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %94

19:                                               ; preds = %.preheader.preheader
  call void @_ZN11my_datatypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %20 unwind label %91

20:                                               ; preds = %19
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EE4readEv(ptr noundef nonnull align 8 dereferenceable(196) %4)
  %22 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK11my_datatype(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %23 unwind label %91

23:                                               ; preds = %20
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader.1 unwind label %91

.preheader.1:                                     ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @_ZN11my_datatypeC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef 9)
  %25 = invoke noundef nonnull align 8 dereferenceable(196) ptr @_ZN7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(196) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %26 unwind label %89

26:                                               ; preds = %.preheader.1
  call void @_ZN11my_datatypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %27 unwind label %91

27:                                               ; preds = %26
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EE4readEv(ptr noundef nonnull align 8 dereferenceable(196) %4)
  %29 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK11my_datatype(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 4 dereferenceable(4) %28)
          to label %30 unwind label %91

30:                                               ; preds = %27
  %31 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader.2 unwind label %91

.preheader.2:                                     ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @_ZN11my_datatypeC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef 8)
  %32 = invoke noundef nonnull align 8 dereferenceable(196) ptr @_ZN7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(196) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %33 unwind label %89

33:                                               ; preds = %.preheader.2
  call void @_ZN11my_datatypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %34 unwind label %91

34:                                               ; preds = %33
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EE4readEv(ptr noundef nonnull align 8 dereferenceable(196) %4)
  %36 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK11my_datatype(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 4 dereferenceable(4) %35)
          to label %37 unwind label %91

37:                                               ; preds = %34
  %38 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader.3 unwind label %91

.preheader.3:                                     ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @_ZN11my_datatypeC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef 7)
  %39 = invoke noundef nonnull align 8 dereferenceable(196) ptr @_ZN7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(196) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %40 unwind label %89

40:                                               ; preds = %.preheader.3
  call void @_ZN11my_datatypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %41 unwind label %91

41:                                               ; preds = %40
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EE4readEv(ptr noundef nonnull align 8 dereferenceable(196) %4)
  %43 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK11my_datatype(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 4 dereferenceable(4) %42)
          to label %44 unwind label %91

44:                                               ; preds = %41
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader.4 unwind label %91

.preheader.4:                                     ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @_ZN11my_datatypeC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef 6)
  %46 = invoke noundef nonnull align 8 dereferenceable(196) ptr @_ZN7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(196) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %47 unwind label %89

47:                                               ; preds = %.preheader.4
  call void @_ZN11my_datatypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %48 unwind label %91

48:                                               ; preds = %47
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EE4readEv(ptr noundef nonnull align 8 dereferenceable(196) %4)
  %50 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK11my_datatype(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 4 dereferenceable(4) %49)
          to label %51 unwind label %91

51:                                               ; preds = %48
  %52 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader.5 unwind label %91

.preheader.5:                                     ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @_ZN11my_datatypeC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef 5)
  %53 = invoke noundef nonnull align 8 dereferenceable(196) ptr @_ZN7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(196) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %54 unwind label %89

54:                                               ; preds = %.preheader.5
  call void @_ZN11my_datatypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %55 unwind label %91

55:                                               ; preds = %54
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EE4readEv(ptr noundef nonnull align 8 dereferenceable(196) %4)
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK11my_datatype(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 4 dereferenceable(4) %56)
          to label %58 unwind label %91

58:                                               ; preds = %55
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader.6 unwind label %91

.preheader.6:                                     ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @_ZN11my_datatypeC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef 4)
  %60 = invoke noundef nonnull align 8 dereferenceable(196) ptr @_ZN7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(196) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %61 unwind label %89

61:                                               ; preds = %.preheader.6
  call void @_ZN11my_datatypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %62 unwind label %91

62:                                               ; preds = %61
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EE4readEv(ptr noundef nonnull align 8 dereferenceable(196) %4)
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK11my_datatype(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 4 dereferenceable(4) %63)
          to label %65 unwind label %91

65:                                               ; preds = %62
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader.7 unwind label %91

.preheader.7:                                     ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @_ZN11my_datatypeC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef 3)
  %67 = invoke noundef nonnull align 8 dereferenceable(196) ptr @_ZN7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(196) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %68 unwind label %89

68:                                               ; preds = %.preheader.7
  call void @_ZN11my_datatypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %69 unwind label %91

69:                                               ; preds = %68
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EE4readEv(ptr noundef nonnull align 8 dereferenceable(196) %4)
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK11my_datatype(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 4 dereferenceable(4) %70)
          to label %72 unwind label %91

72:                                               ; preds = %69
  %73 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader.8 unwind label %91

.preheader.8:                                     ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @_ZN11my_datatypeC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef 2)
  %74 = invoke noundef nonnull align 8 dereferenceable(196) ptr @_ZN7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(196) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %75 unwind label %89

75:                                               ; preds = %.preheader.8
  call void @_ZN11my_datatypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %76 unwind label %91

76:                                               ; preds = %75
  %77 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EE4readEv(ptr noundef nonnull align 8 dereferenceable(196) %4)
  %78 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK11my_datatype(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 4 dereferenceable(4) %77)
          to label %79 unwind label %91

79:                                               ; preds = %76
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %78, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader.9 unwind label %91

.preheader.9:                                     ; preds = %79
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @_ZN11my_datatypeC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef 1)
  %81 = invoke noundef nonnull align 8 dereferenceable(196) ptr @_ZN7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(196) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %82 unwind label %89

82:                                               ; preds = %.preheader.9
  call void @_ZN11my_datatypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  invoke void @_ZN7sc_core8sc_startEiNS_12sc_time_unitENS_20sc_starvation_policyE(i32 noundef 1, i32 noundef 2, i32 noundef 1)
          to label %83 unwind label %91

83:                                               ; preds = %82
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EE4readEv(ptr noundef nonnull align 8 dereferenceable(196) %4)
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRK11my_datatype(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 4 dereferenceable(4) %84)
          to label %86 unwind label %91

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

88:                                               ; preds = %86
  invoke void @_ZN7sc_core23sc_close_vcd_trace_fileEPNS_13sc_trace_fileE(ptr noundef %10)
          to label %93 unwind label %17

89:                                               ; preds = %.preheader.9, %.preheader.8, %.preheader.7, %.preheader.6, %.preheader.5, %.preheader.4, %.preheader.3, %.preheader.2, %.preheader.1, %.preheader.preheader
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN11my_datatypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %94

91:                                               ; preds = %86, %83, %82, %79, %76, %75, %72, %69, %68, %65, %62, %61, %58, %55, %54, %51, %48, %47, %44, %41, %40, %37, %34, %33, %30, %27, %26, %23, %20, %19
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %94

93:                                               ; preds = %88
  call void @_ZN7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(196) %4) #5
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %4) #5
  call void @_ZN11my_datatypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  ret i32 0

94:                                               ; preds = %89, %91, %17
  %.pn.pn = phi { ptr, i32 } [ %18, %17 ], [ %92, %91 ], [ %90, %89 ]
  call void @_ZN7sc_core9sc_signalI11my_datatypeLNS_16sc_writer_policyE0EED1Ev(ptr noundef nonnull align 8 dereferenceable(196) %4) #5
  br label %95

95:                                               ; preds = %94, %15
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %94 ], [ %16, %15 ]
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %4) #5
  br label %96

96:                                               ; preds = %95, %13
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %95 ], [ %14, %13 ]
  call void @_ZN11my_datatypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn.pn.pn.pn
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11my_datatypeC2Ei(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

declare noundef ptr @_ZN7sc_core24sc_create_vcd_trace_fileEPKc(ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7sc_core8sc_traceI11my_datatypeEEvPNS_13sc_trace_fileERKNS_15sc_signal_in_ifIT_EEPKc(ptr noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11my_datatypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4)) 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: 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 #3

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

declare void @_ZN7sc_core23sc_close_vcd_trace_fileEPNS_13sc_trace_fileE(ptr noundef) local_unnamed_addr #4

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

!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)"}


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