; LLVM IR from gem5/gem5 :: src/systemc/tests/systemc/tracing/wif_trace/test11/test11.ll (ZN5proc15entryEv)

; 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_logic" = type { i32 }
%"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_lv" = type { %"class.sc_dt::sc_lv_base" }
%"class.sc_dt::sc_lv_base" = type { %"class.sc_dt::sc_proxy.0", i32, i32, ptr, ptr }
%"class.sc_dt::sc_proxy.0" = type { ptr }
%"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 }>
%"class.sc_dt::sc_bitref.14" = type { %"class.sc_dt::sc_bitref_r.base.16", [4 x i8] }
%"class.sc_dt::sc_bitref_r.base.16" = type <{ ptr, i32 }>
%struct.proc1 = type { %"class.sc_core::sc_module", %"class.sc_core::sc_in", i8, %"class.sc_dt::sc_logic", %"class.sc_dt::sc_bv", %"class.sc_dt::sc_lv" }
%"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 }

@_ZN5sc_dt10SC_LOGIC_1E = external global %"class.sc_dt::sc_logic", align 4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5proc15entryEv(ptr noundef nonnull align 8 dereferenceable(480) %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_lv", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.sc_dt::sc_bitref", align 8
  %9 = alloca %"class.sc_dt::sc_bitref", align 8
  %10 = alloca %"class.sc_dt::sc_bitref.14", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #4
  call void @_ZN5sc_dt5sc_bvILi4EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3)
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #4
  invoke void @_ZN5sc_dt5sc_lvILi4EEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %12 unwind label %44

12:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  %13 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %3, i32 noundef 0)
          to label %14 unwind label %48

14:                                               ; preds = %12
  %15 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt5sc_lvILi4EEaSEi(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 0)
          to label %16 unwind label %48

16:                                               ; preds = %14
  invoke void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %11)
          to label %17 unwind label %48

17:                                               ; preds = %16
  br label %18

18:                                               ; preds = %43, %17
  br label %19

19:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #4
  %20 = load i32, ptr %7, align 4, !tbaa !9
  invoke void @_ZN5sc_dt8sc_proxyINS_10sc_bv_baseEEixEi(ptr dead_on_unwind writable sret(%"class.sc_dt::sc_bitref") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %20)
          to label %21 unwind label %52

21:                                               ; preds = %19
  %22 = invoke noundef zeroext i1 @_ZNK5sc_dt11sc_bitref_rINS_10sc_bv_baseEEcvKbEv(ptr noundef nonnull align 8 dereferenceable(12) %8)
          to label %23 unwind label %52

23:                                               ; preds = %21
  %24 = zext i1 %22 to i32
  %25 = xor i32 %24, 1
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #4
  %26 = load i32, ptr %7, align 4, !tbaa !9
  invoke void @_ZN5sc_dt8sc_proxyINS_10sc_bv_baseEEixEi(ptr dead_on_unwind writable sret(%"class.sc_dt::sc_bitref") align 8 %9, ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %26)
          to label %27 unwind label %56

27:                                               ; preds = %23
  %28 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN5sc_dt9sc_bitrefINS_10sc_bv_baseEEaSEi(ptr noundef nonnull align 8 dereferenceable(12) %9, i32 noundef %25)
          to label %29 unwind label %56

29:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #4
  %30 = load i32, ptr %7, align 4, !tbaa !9
  invoke void @_ZN5sc_dt8sc_proxyINS_10sc_lv_baseEEixEi(ptr dead_on_unwind writable sret(%"class.sc_dt::sc_bitref.14") align 8 %10, ptr noundef nonnull align 8 dereferenceable(8) %4, i32 noundef %30)
          to label %31 unwind label %61

31:                                               ; preds = %29
  %32 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN5sc_dt9sc_bitrefINS_10sc_lv_baseEEeOERKNS_8sc_logicE(ptr noundef nonnull align 8 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(4) @_ZN5sc_dt10SC_LOGIC_1E)
          to label %33 unwind label %61

33:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #4
  %34 = load i32, ptr %7, align 4, !tbaa !9
  %35 = add nsw i32 %34, 1
  %36 = srem i32 %35, 4
  store i32 %36, ptr %7, align 4, !tbaa !9
  %37 = getelementptr inbounds %struct.proc1, ptr %11, i32 0, i32 4
  %38 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %39 unwind label %48

39:                                               ; preds = %33
  %40 = getelementptr inbounds %struct.proc1, ptr %11, i32 0, i32 5
  %41 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt5sc_lvILi4EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %40, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %42 unwind label %48

42:                                               ; preds = %39
  invoke void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %11)
          to label %43 unwind label %48

43:                                               ; preds = %42
  br label %18, !llvm.loop !11

44:                                               ; preds = %1
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %5, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %6, align 4
  br label %66

48:                                               ; preds = %42, %39, %33, %16, %14, %12
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %5, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %6, align 4
  br label %65

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

56:                                               ; preds = %27, %23
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %5, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #4
  br label %60

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

61:                                               ; preds = %31, %29
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %5, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #4
  br label %65

65:                                               ; preds = %61, %60, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @_ZN5sc_dt10sc_lv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  br label %66

66:                                               ; preds = %65, %44
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #4
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #4
  br label %67

67:                                               ; preds = %66
  %68 = load ptr, ptr %5, align 8
  %69 = load i32, ptr %6, align 4
  %70 = insertvalue { ptr, i32 } poison, ptr %68, 0
  %71 = insertvalue { ptr, i32 } %70, i32 %69, 1
  resume { ptr, i32 } %71
}

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

declare i32 @__gxx_personality_v0(...)

; 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 nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt5sc_lvILi4EEaSEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZN5sc_dt9sc_bitrefINS_10sc_bv_baseEEaSEi(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef) #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 @_ZN5sc_dt8sc_proxyINS_10sc_lv_baseEEixEi(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::sc_bitref.14") align 8, ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSERKS1_(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(32) ptr @_ZN5sc_dt5sc_lvILi4EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt10sc_lv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 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 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 = { 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 #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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !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.sc_dt::sc_logic" = type { i32 }
%"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_lv" = type { %"class.sc_dt::sc_lv_base" }
%"class.sc_dt::sc_lv_base" = type { %"class.sc_dt::sc_proxy.0", i32, i32, ptr, ptr }
%"class.sc_dt::sc_proxy.0" = type { ptr }
%"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 }>
%"class.sc_dt::sc_bitref.14" = type { %"class.sc_dt::sc_bitref_r.base.16", [4 x i8] }
%"class.sc_dt::sc_bitref_r.base.16" = type <{ ptr, i32 }>

@_ZN5sc_dt10SC_LOGIC_1E = external global %"class.sc_dt::sc_logic", align 4

; Function Attrs: mustprogress noreturn uwtable
define dso_local void @_ZN5proc15entryEv(ptr noundef nonnull align 8 dereferenceable(480) %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_lv", align 8
  %4 = alloca %"class.sc_dt::sc_bitref", align 8
  %5 = alloca %"class.sc_dt::sc_bitref", align 8
  %6 = alloca %"class.sc_dt::sc_bitref.14", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #5
  call void @_ZN5sc_dt5sc_bvILi4EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #5
  invoke void @_ZN5sc_dt5sc_lvILi4EEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %7 unwind label %32

7:                                                ; preds = %1
  %8 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef 0)
          to label %9 unwind label %.loopexit.split-lp

9:                                                ; preds = %7
  %10 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt5sc_lvILi4EEaSEi(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef 0)
          to label %11 unwind label %.loopexit.split-lp

11:                                               ; preds = %9
  invoke void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %11
  %12 = getelementptr inbounds i8, ptr %0, i64 424
  %13 = getelementptr inbounds i8, ptr %0, i64 448
  br label %14

14:                                               ; preds = %.preheader, %31
  %.0 = phi i32 [ %27, %31 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  invoke void @_ZN5sc_dt8sc_proxyINS_10sc_bv_baseEEixEi(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::sc_bitref") align 8 %4, ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %.0)
          to label %15 unwind label %34

15:                                               ; preds = %14
  %16 = invoke noundef zeroext i1 @_ZNK5sc_dt11sc_bitref_rINS_10sc_bv_baseEEcvKbEv(ptr noundef nonnull align 8 dereferenceable(12) %4)
          to label %17 unwind label %34

17:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  invoke void @_ZN5sc_dt8sc_proxyINS_10sc_bv_baseEEixEi(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::sc_bitref") align 8 %5, ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %.0)
          to label %18 unwind label %36

18:                                               ; preds = %17
  %19 = xor i1 %16, true
  %20 = zext i1 %19 to i32
  %21 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN5sc_dt9sc_bitrefINS_10sc_bv_baseEEaSEi(ptr noundef nonnull align 8 dereferenceable(12) %5, i32 noundef %20)
          to label %22 unwind label %36

22:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  invoke void @_ZN5sc_dt8sc_proxyINS_10sc_lv_baseEEixEi(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::sc_bitref.14") align 8 %6, ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %.0)
          to label %23 unwind label %39

23:                                               ; preds = %22
  %24 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN5sc_dt9sc_bitrefINS_10sc_lv_baseEEeOERKNS_8sc_logicE(ptr noundef nonnull align 8 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(4) @_ZN5sc_dt10SC_LOGIC_1E)
          to label %25 unwind label %39

25:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  %26 = add nsw i32 %.0, 1
  %27 = srem i32 %26, 4
  %28 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %29 unwind label %.loopexit

29:                                               ; preds = %25
  %30 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt5sc_lvILi4EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %31 unwind label %.loopexit

31:                                               ; preds = %29
  invoke void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
          to label %14 unwind label %.loopexit, !llvm.loop !5

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

.loopexit:                                        ; preds = %25, %29, %31
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %41

.loopexit.split-lp:                               ; preds = %7, %9, %11
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %41

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

36:                                               ; preds = %18, %17
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %38

38:                                               ; preds = %36, %34
  %.pn = phi { ptr, i32 } [ %37, %36 ], [ %35, %34 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %41

39:                                               ; preds = %23, %22
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %41

41:                                               ; preds = %.loopexit, %.loopexit.split-lp, %39, %38
  %.pn11 = phi { ptr, i32 } [ %40, %39 ], [ %.pn, %38 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN5sc_dt10sc_lv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  br label %42

42:                                               ; preds = %41, %32
  %.pn11.pn = phi { ptr, i32 } [ %.pn11, %41 ], [ %33, %32 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn11.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_lvILi4EEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; 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 nonnull align 8 dereferenceable(32) ptr @_ZN5sc_dt5sc_lvILi4EEaSEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #2 align 2

; 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 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_baseEEcvKbEv(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(12) ptr @_ZN5sc_dt9sc_bitrefINS_10sc_bv_baseEEaSEi(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef) local_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 @_ZN5sc_dt8sc_proxyINS_10sc_lv_baseEEixEi(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::sc_bitref.14") align 8, ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZN5sc_dt9sc_bitrefINS_10sc_lv_baseEEeOERKNS_8sc_logicE(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt5sc_bvILi4EEaSERKS1_(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(32) ptr @_ZN5sc_dt5sc_lvILi4EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 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 = { 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 = { 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 #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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass