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

; 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.21" = type { %"class.sc_dt::sc_bv_base" }
%struct.cycle_model = type <{ %"class.sc_core::sc_module", %"class.sc_core::sc_in", ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, [65536 x i32], [65536 x i32], [2048 x i32], i32, [8 x i32], [4 x i8], ptr, i32, i32, i32, [4 x i8] }>
%"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.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] }
%"class.sc_core::sc_process_host" = type { ptr }
%"class.sc_core::sc_sensitive" = type { ptr, i32, ptr }
%"class.sc_core::sc_sensitive_pos" = type { ptr, i32, ptr }
%"class.sc_core::sc_sensitive_neg" = type { ptr, i32, ptr }
%"class.sc_core::sc_in" = type { %"class.sc_core::sc_port", ptr, ptr, ptr, ptr }
%"class.sc_core::sc_port" = type { %"class.sc_core::sc_port_b" }
%"class.sc_core::sc_port_b" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.8" }
%"class.sc_core::sc_port_base" = type { %"class.sc_core::sc_object", ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@ALL_CYCLES = external dso_local global i8, align 1
@_ZN7sc_core23SC_ID_ASSERTION_FAILED_E = external constant [0 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [118 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11cycle_model14exec_bus_cycleE14bus_cycle_typeiiPi(ptr noundef nonnull align 8 dereferenceable(533052) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef %4) #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca i8, align 1
  %17 = alloca i8, align 1
  %18 = alloca i8, align 1
  %19 = alloca i8, align 1
  %20 = alloca i32, align 4
  %21 = alloca i8, align 1
  %22 = alloca i8, align 1
  %23 = alloca i8, align 1
  %24 = alloca i8, align 1
  %25 = alloca i8, align 1
  %26 = alloca i8, align 1
  %27 = alloca i8, align 1
  %28 = alloca %"class.sc_dt::sc_bv", align 8
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca i8, align 1
  %32 = alloca i8, align 1
  %33 = alloca %"class.sc_dt::sc_bv.21", align 8
  %34 = alloca i8, align 1
  %35 = alloca i8, align 1
  %36 = alloca i8, align 1
  %37 = alloca %"class.sc_dt::sc_bv.21", align 8
  %38 = alloca i8, align 1
  %39 = alloca i8, align 1
  %40 = alloca i8, align 1
  %41 = alloca i8, align 1
  %42 = alloca i8, align 1
  %43 = alloca i8, align 1
  %44 = alloca i8, align 1
  %45 = alloca i8, align 1
  %46 = alloca i8, align 1
  %47 = alloca i8, align 1
  %48 = alloca i8, align 1
  %49 = alloca i8, align 1
  %50 = alloca i8, align 1
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !11
  store i32 %3, ptr %9, align 4, !tbaa !11
  store ptr %4, ptr %10, align 8, !tbaa !5
  %51 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !11
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %128

54:                                               ; preds = %5
  %55 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 21
  %56 = load i32, ptr %55, align 8, !tbaa !13
  %57 = icmp sgt i32 %56, 0
  br i1 %57, label %61, label %58

58:                                               ; preds = %54
  %59 = load i8, ptr @ALL_CYCLES, align 1, !tbaa !44, !range !45, !noundef !46
  %60 = trunc i8 %59 to i1
  br i1 %60, label %61, label %124

61:                                               ; preds = %58, %54
  %62 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 9
  %63 = load ptr, ptr %62, align 8, !tbaa !47
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #4
  store i8 0, ptr %13, align 1, !tbaa !44
  %64 = load ptr, ptr %63, align 8, !tbaa !48
  %65 = getelementptr inbounds ptr, ptr %64, i64 14
  %66 = load ptr, ptr %65, align 8
  call void %66(ptr noundef nonnull align 8 dereferenceable(224) %63, ptr noundef nonnull align 1 dereferenceable(1) %13)
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  %67 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 5
  %68 = load ptr, ptr %67, align 8, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #4
  store i8 1, ptr %14, align 1, !tbaa !44
  %69 = load ptr, ptr %68, align 8, !tbaa !48
  %70 = getelementptr inbounds ptr, ptr %69, i64 14
  %71 = load ptr, ptr %70, align 8
  call void %71(ptr noundef nonnull align 8 dereferenceable(224) %68, ptr noundef nonnull align 1 dereferenceable(1) %14)
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #4
  %72 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 7
  %73 = load ptr, ptr %72, align 8, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #4
  store i8 1, ptr %15, align 1, !tbaa !44
  %74 = load ptr, ptr %73, align 8, !tbaa !48
  %75 = getelementptr inbounds ptr, ptr %74, i64 14
  %76 = load ptr, ptr %75, align 8
  call void %76(ptr noundef nonnull align 8 dereferenceable(224) %73, ptr noundef nonnull align 1 dereferenceable(1) %15)
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  %77 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 6
  %78 = load ptr, ptr %77, align 8, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #4
  store i8 1, ptr %16, align 1, !tbaa !44
  %79 = load ptr, ptr %78, align 8, !tbaa !48
  %80 = getelementptr inbounds ptr, ptr %79, i64 14
  %81 = load ptr, ptr %80, align 8
  call void %81(ptr noundef nonnull align 8 dereferenceable(224) %78, ptr noundef nonnull align 1 dereferenceable(1) %16)
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  %82 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 8
  %83 = load ptr, ptr %82, align 8, !tbaa !53
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #4
  store i8 1, ptr %17, align 1, !tbaa !44
  %84 = load ptr, ptr %83, align 8, !tbaa !48
  %85 = getelementptr inbounds ptr, ptr %84, i64 14
  %86 = load ptr, ptr %85, align 8
  call void %86(ptr noundef nonnull align 8 dereferenceable(224) %83, ptr noundef nonnull align 1 dereferenceable(1) %17)
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  %87 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 11
  %88 = load ptr, ptr %87, align 8, !tbaa !54
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #4
  store i8 0, ptr %18, align 1, !tbaa !44
  %89 = load ptr, ptr %88, align 8, !tbaa !48
  %90 = getelementptr inbounds ptr, ptr %89, i64 14
  %91 = load ptr, ptr %90, align 8
  call void %91(ptr noundef nonnull align 8 dereferenceable(224) %88, ptr noundef nonnull align 1 dereferenceable(1) %18)
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #4
  %92 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 12
  %93 = load ptr, ptr %92, align 8, !tbaa !55
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #4
  store i8 0, ptr %19, align 1, !tbaa !44
  %94 = load ptr, ptr %93, align 8, !tbaa !48
  %95 = getelementptr inbounds ptr, ptr %94, i64 14
  %96 = load ptr, ptr %95, align 8
  call void %96(ptr noundef nonnull align 8 dereferenceable(224) %93, ptr noundef nonnull align 1 dereferenceable(1) %19)
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #4
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %51)
  br label %97

97:                                               ; preds = %101, %61
  %98 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 1
  %99 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %98)
  %100 = xor i1 %99, true
  br i1 %100, label %101, label %102

101:                                              ; preds = %97
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %51)
  br label %97, !llvm.loop !56

102:                                              ; preds = %97
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %51)
  br label %103

103:                                              ; preds = %107, %102
  %104 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 1
  %105 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %104)
  %106 = xor i1 %105, true
  br i1 %106, label %107, label %108

107:                                              ; preds = %103
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %51)
  br label %103, !llvm.loop !58

108:                                              ; preds = %103
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %51)
  br label %109

109:                                              ; preds = %113, %108
  %110 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 1
  %111 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %110)
  %112 = xor i1 %111, true
  br i1 %112, label %113, label %114

113:                                              ; preds = %109
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %51)
  br label %109, !llvm.loop !59

114:                                              ; preds = %109
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %51)
  br label %115

115:                                              ; preds = %119, %114
  %116 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 1
  %117 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %116)
  %118 = xor i1 %117, true
  br i1 %118, label %119, label %120

119:                                              ; preds = %115
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %51)
  br label %115, !llvm.loop !60

120:                                              ; preds = %115
  %121 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 21
  %122 = load i32, ptr %121, align 8, !tbaa !13
  %123 = sub nsw i32 %122, 1
  store i32 %123, ptr %121, align 8, !tbaa !13
  br label %124

124:                                              ; preds = %120, %58
  %125 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 22
  %126 = load i32, ptr %125, align 4, !tbaa !61
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %125, align 4, !tbaa !61
  store i32 1, ptr %20, align 4
  br label %469

128:                                              ; preds = %5
  br label %129

129:                                              ; preds = %448, %128
  %130 = load i32, ptr %11, align 4, !tbaa !11
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %11, align 4, !tbaa !11
  %132 = load i32, ptr %12, align 4, !tbaa !11
  %133 = icmp eq i32 %132, 0
  br i1 %133, label %134, label %195

134:                                              ; preds = %129
  %135 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 9
  %136 = load ptr, ptr %135, align 8, !tbaa !47
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #4
  store i8 1, ptr %21, align 1, !tbaa !44
  %137 = load ptr, ptr %136, align 8, !tbaa !48
  %138 = getelementptr inbounds ptr, ptr %137, i64 14
  %139 = load ptr, ptr %138, align 8
  call void %139(ptr noundef nonnull align 8 dereferenceable(224) %136, ptr noundef nonnull align 1 dereferenceable(1) %21)
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #4
  %140 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 5
  %141 = load ptr, ptr %140, align 8, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #4
  store i8 1, ptr %22, align 1, !tbaa !44
  %142 = load ptr, ptr %141, align 8, !tbaa !48
  %143 = getelementptr inbounds ptr, ptr %142, i64 14
  %144 = load ptr, ptr %143, align 8
  call void %144(ptr noundef nonnull align 8 dereferenceable(224) %141, ptr noundef nonnull align 1 dereferenceable(1) %22)
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #4
  %145 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 7
  %146 = load ptr, ptr %145, align 8, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #4
  store i8 1, ptr %23, align 1, !tbaa !44
  %147 = load ptr, ptr %146, align 8, !tbaa !48
  %148 = getelementptr inbounds ptr, ptr %147, i64 14
  %149 = load ptr, ptr %148, align 8
  call void %149(ptr noundef nonnull align 8 dereferenceable(224) %146, ptr noundef nonnull align 1 dereferenceable(1) %23)
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #4
  %150 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 6
  %151 = load ptr, ptr %150, align 8, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #4
  store i8 1, ptr %24, align 1, !tbaa !44
  %152 = load ptr, ptr %151, align 8, !tbaa !48
  %153 = getelementptr inbounds ptr, ptr %152, i64 14
  %154 = load ptr, ptr %153, align 8
  call void %154(ptr noundef nonnull align 8 dereferenceable(224) %151, ptr noundef nonnull align 1 dereferenceable(1) %24)
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #4
  %155 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 8
  %156 = load ptr, ptr %155, align 8, !tbaa !53
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #4
  store i8 1, ptr %25, align 1, !tbaa !44
  %157 = load ptr, ptr %156, align 8, !tbaa !48
  %158 = getelementptr inbounds ptr, ptr %157, i64 14
  %159 = load ptr, ptr %158, align 8
  call void %159(ptr noundef nonnull align 8 dereferenceable(224) %156, ptr noundef nonnull align 1 dereferenceable(1) %25)
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #4
  %160 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 11
  %161 = load ptr, ptr %160, align 8, !tbaa !54
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #4
  store i8 0, ptr %26, align 1, !tbaa !44
  %162 = load ptr, ptr %161, align 8, !tbaa !48
  %163 = getelementptr inbounds ptr, ptr %162, i64 14
  %164 = load ptr, ptr %163, align 8
  call void %164(ptr noundef nonnull align 8 dereferenceable(224) %161, ptr noundef nonnull align 1 dereferenceable(1) %26)
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #4
  %165 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 12
  %166 = load ptr, ptr %165, align 8, !tbaa !55
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #4
  store i8 0, ptr %27, align 1, !tbaa !44
  %167 = load ptr, ptr %166, align 8, !tbaa !48
  %168 = getelementptr inbounds ptr, ptr %167, i64 14
  %169 = load ptr, ptr %168, align 8
  call void %169(ptr noundef nonnull align 8 dereferenceable(224) %166, ptr noundef nonnull align 1 dereferenceable(1) %27)
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #4
  %170 = load i32, ptr %7, align 4, !tbaa !9
  %171 = icmp eq i32 %170, 2
  br i1 %171, label %172, label %194

172:                                              ; preds = %134
  %173 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 3
  %174 = load ptr, ptr %173, align 8, !tbaa !62
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #4
  %175 = load i32, ptr %9, align 4, !tbaa !11
  call void @_ZN5sc_dt5sc_bvILi8EEC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %28, i32 noundef %175)
  %176 = load ptr, ptr %174, align 8, !tbaa !48
  %177 = getelementptr inbounds ptr, ptr %176, i64 9
  %178 = load ptr, ptr %177, align 8
  invoke void %178(ptr noundef nonnull align 8 dereferenceable(232) %174, ptr noundef nonnull align 8 dereferenceable(24) %28)
          to label %179 unwind label %190

179:                                              ; preds = %172
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #4
  %180 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 11
  %181 = load ptr, ptr %180, align 8, !tbaa !54
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #4
  store i8 1, ptr %31, align 1, !tbaa !44
  %182 = load ptr, ptr %181, align 8, !tbaa !48
  %183 = getelementptr inbounds ptr, ptr %182, i64 14
  %184 = load ptr, ptr %183, align 8
  call void %184(ptr noundef nonnull align 8 dereferenceable(224) %181, ptr noundef nonnull align 1 dereferenceable(1) %31)
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #4
  %185 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 12
  %186 = load ptr, ptr %185, align 8, !tbaa !55
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #4
  store i8 1, ptr %32, align 1, !tbaa !44
  %187 = load ptr, ptr %186, align 8, !tbaa !48
  %188 = getelementptr inbounds ptr, ptr %187, i64 14
  %189 = load ptr, ptr %188, align 8
  call void %189(ptr noundef nonnull align 8 dereferenceable(224) %186, ptr noundef nonnull align 1 dereferenceable(1) %32)
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #4
  br label %194

190:                                              ; preds = %172
  %191 = landingpad { ptr, i32 }
          cleanup
  %192 = extractvalue { ptr, i32 } %191, 0
  store ptr %192, ptr %29, align 8
  %193 = extractvalue { ptr, i32 } %191, 1
  store i32 %193, ptr %30, align 4
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #4
  br label %470

194:                                              ; preds = %179, %134
  br label %195

195:                                              ; preds = %194, %129
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %51)
  br label %196

196:                                              ; preds = %200, %195
  %197 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 1
  %198 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %197)
  %199 = xor i1 %198, true
  br i1 %199, label %200, label %201

200:                                              ; preds = %196
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %51)
  br label %196, !llvm.loop !63

201:                                              ; preds = %196
  %202 = load i32, ptr %12, align 4, !tbaa !11
  %203 = icmp eq i32 %202, 0
  br i1 %203, label %204, label %259

204:                                              ; preds = %201
  %205 = load i32, ptr %7, align 4, !tbaa !9
  switch i32 %205, label %257 [
    i32 1, label %206
    i32 2, label %234
  ]

206:                                              ; preds = %204
  %207 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 2
  %208 = load ptr, ptr %207, align 8, !tbaa !64
  call void @llvm.lifetime.start.p0(i64 24, ptr %33) #4
  %209 = load i32, ptr %8, align 4, !tbaa !11
  %210 = and i32 %209, 65535
  call void @_ZN5sc_dt5sc_bvILi16EEC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %33, i32 noundef %210)
  %211 = load ptr, ptr %208, align 8, !tbaa !48
  %212 = getelementptr inbounds ptr, ptr %211, i64 9
  %213 = load ptr, ptr %212, align 8
  invoke void %213(ptr noundef nonnull align 8 dereferenceable(232) %208, ptr noundef nonnull align 8 dereferenceable(24) %33)
          to label %214 unwind label %230

214:                                              ; preds = %206
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %33) #4
  %215 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 11
  %216 = load ptr, ptr %215, align 8, !tbaa !54
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #4
  store i8 1, ptr %34, align 1, !tbaa !44
  %217 = load ptr, ptr %216, align 8, !tbaa !48
  %218 = getelementptr inbounds ptr, ptr %217, i64 14
  %219 = load ptr, ptr %218, align 8
  call void %219(ptr noundef nonnull align 8 dereferenceable(224) %216, ptr noundef nonnull align 1 dereferenceable(1) %34)
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #4
  %220 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 12
  %221 = load ptr, ptr %220, align 8, !tbaa !55
  call void @llvm.lifetime.start.p0(i64 1, ptr %35) #4
  store i8 1, ptr %35, align 1, !tbaa !44
  %222 = load ptr, ptr %221, align 8, !tbaa !48
  %223 = getelementptr inbounds ptr, ptr %222, i64 14
  %224 = load ptr, ptr %223, align 8
  call void %224(ptr noundef nonnull align 8 dereferenceable(224) %221, ptr noundef nonnull align 1 dereferenceable(1) %35)
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #4
  %225 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 13
  %226 = load ptr, ptr %225, align 8, !tbaa !65
  call void @llvm.lifetime.start.p0(i64 1, ptr %36) #4
  store i8 1, ptr %36, align 1, !tbaa !44
  %227 = load ptr, ptr %226, align 8, !tbaa !48
  %228 = getelementptr inbounds ptr, ptr %227, i64 14
  %229 = load ptr, ptr %228, align 8
  call void %229(ptr noundef nonnull align 8 dereferenceable(224) %226, ptr noundef nonnull align 1 dereferenceable(1) %36)
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #4
  br label %258

230:                                              ; preds = %206
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %29, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %30, align 4
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %33) #4
  br label %470

234:                                              ; preds = %204
  %235 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 2
  %236 = load ptr, ptr %235, align 8, !tbaa !64
  call void @llvm.lifetime.start.p0(i64 24, ptr %37) #4
  %237 = load i32, ptr %8, align 4, !tbaa !11
  %238 = and i32 %237, 65535
  call void @_ZN5sc_dt5sc_bvILi16EEC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %37, i32 noundef %238)
  %239 = load ptr, ptr %236, align 8, !tbaa !48
  %240 = getelementptr inbounds ptr, ptr %239, i64 9
  %241 = load ptr, ptr %240, align 8
  invoke void %241(ptr noundef nonnull align 8 dereferenceable(232) %236, ptr noundef nonnull align 8 dereferenceable(24) %37)
          to label %242 unwind label %253

242:                                              ; preds = %234
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %37) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %37) #4
  %243 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 12
  %244 = load ptr, ptr %243, align 8, !tbaa !55
  call void @llvm.lifetime.start.p0(i64 1, ptr %38) #4
  store i8 0, ptr %38, align 1, !tbaa !44
  %245 = load ptr, ptr %244, align 8, !tbaa !48
  %246 = getelementptr inbounds ptr, ptr %245, i64 14
  %247 = load ptr, ptr %246, align 8
  call void %247(ptr noundef nonnull align 8 dereferenceable(224) %244, ptr noundef nonnull align 1 dereferenceable(1) %38)
  call void @llvm.lifetime.end.p0(i64 1, ptr %38) #4
  %248 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 13
  %249 = load ptr, ptr %248, align 8, !tbaa !65
  call void @llvm.lifetime.start.p0(i64 1, ptr %39) #4
  store i8 1, ptr %39, align 1, !tbaa !44
  %250 = load ptr, ptr %249, align 8, !tbaa !48
  %251 = getelementptr inbounds ptr, ptr %250, i64 14
  %252 = load ptr, ptr %251, align 8
  call void %252(ptr noundef nonnull align 8 dereferenceable(224) %249, ptr noundef nonnull align 1 dereferenceable(1) %39)
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #4
  br label %258

253:                                              ; preds = %234
  %254 = landingpad { ptr, i32 }
          cleanup
  %255 = extractvalue { ptr, i32 } %254, 0
  store ptr %255, ptr %29, align 8
  %256 = extractvalue { ptr, i32 } %254, 1
  store i32 %256, ptr %30, align 4
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %37) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %37) #4
  br label %470

257:                                              ; preds = %204
  br label %258

258:                                              ; preds = %257, %242, %214
  br label %259

259:                                              ; preds = %258, %201
  %260 = load i32, ptr %12, align 4, !tbaa !11
  %261 = icmp eq i32 %260, 0
  br i1 %261, label %262, label %274

262:                                              ; preds = %259
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %51)
  br label %263

263:                                              ; preds = %267, %262
  %264 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 1
  %265 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7negedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %264)
  %266 = xor i1 %265, true
  br i1 %266, label %267, label %268

267:                                              ; preds = %263
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %51)
  br label %263, !llvm.loop !66

268:                                              ; preds = %263
  %269 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 9
  %270 = load ptr, ptr %269, align 8, !tbaa !47
  call void @llvm.lifetime.start.p0(i64 1, ptr %40) #4
  store i8 0, ptr %40, align 1, !tbaa !44
  %271 = load ptr, ptr %270, align 8, !tbaa !48
  %272 = getelementptr inbounds ptr, ptr %271, i64 14
  %273 = load ptr, ptr %272, align 8
  call void %273(ptr noundef nonnull align 8 dereferenceable(224) %270, ptr noundef nonnull align 1 dereferenceable(1) %40)
  call void @llvm.lifetime.end.p0(i64 1, ptr %40) #4
  br label %274

274:                                              ; preds = %268, %259
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %51)
  br label %275

275:                                              ; preds = %279, %274
  %276 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 1
  %277 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %276)
  %278 = xor i1 %277, true
  br i1 %278, label %279, label %280

279:                                              ; preds = %275
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %51)
  br label %275, !llvm.loop !67

280:                                              ; preds = %275
  %281 = load i32, ptr %12, align 4, !tbaa !11
  %282 = icmp eq i32 %281, 0
  br i1 %282, label %283, label %319

283:                                              ; preds = %280
  %284 = load i32, ptr %7, align 4, !tbaa !9
  switch i32 %284, label %317 [
    i32 1, label %285
    i32 2, label %306
  ]

285:                                              ; preds = %283
  %286 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 11
  %287 = load ptr, ptr %286, align 8, !tbaa !54
  call void @llvm.lifetime.start.p0(i64 1, ptr %41) #4
  store i8 0, ptr %41, align 1, !tbaa !44
  %288 = load ptr, ptr %287, align 8, !tbaa !48
  %289 = getelementptr inbounds ptr, ptr %288, i64 14
  %290 = load ptr, ptr %289, align 8
  call void %290(ptr noundef nonnull align 8 dereferenceable(224) %287, ptr noundef nonnull align 1 dereferenceable(1) %41)
  call void @llvm.lifetime.end.p0(i64 1, ptr %41) #4
  %291 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 12
  %292 = load ptr, ptr %291, align 8, !tbaa !55
  call void @llvm.lifetime.start.p0(i64 1, ptr %42) #4
  store i8 0, ptr %42, align 1, !tbaa !44
  %293 = load ptr, ptr %292, align 8, !tbaa !48
  %294 = getelementptr inbounds ptr, ptr %293, i64 14
  %295 = load ptr, ptr %294, align 8
  call void %295(ptr noundef nonnull align 8 dereferenceable(224) %292, ptr noundef nonnull align 1 dereferenceable(1) %42)
  call void @llvm.lifetime.end.p0(i64 1, ptr %42) #4
  %296 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 23
  %297 = load i32, ptr %296, align 8, !tbaa !68
  %298 = icmp eq i32 %297, 0
  br i1 %298, label %299, label %305

299:                                              ; preds = %285
  %300 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 6
  %301 = load ptr, ptr %300, align 8, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 1, ptr %43) #4
  store i8 0, ptr %43, align 1, !tbaa !44
  %302 = load ptr, ptr %301, align 8, !tbaa !48
  %303 = getelementptr inbounds ptr, ptr %302, i64 14
  %304 = load ptr, ptr %303, align 8
  call void %304(ptr noundef nonnull align 8 dereferenceable(224) %301, ptr noundef nonnull align 1 dereferenceable(1) %43)
  call void @llvm.lifetime.end.p0(i64 1, ptr %43) #4
  br label %305

305:                                              ; preds = %299, %285
  br label %318

306:                                              ; preds = %283
  %307 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 23
  %308 = load i32, ptr %307, align 8, !tbaa !68
  %309 = icmp eq i32 %308, 0
  br i1 %309, label %310, label %316

310:                                              ; preds = %306
  %311 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 5
  %312 = load ptr, ptr %311, align 8, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 1, ptr %44) #4
  store i8 0, ptr %44, align 1, !tbaa !44
  %313 = load ptr, ptr %312, align 8, !tbaa !48
  %314 = getelementptr inbounds ptr, ptr %313, i64 14
  %315 = load ptr, ptr %314, align 8
  call void %315(ptr noundef nonnull align 8 dereferenceable(224) %312, ptr noundef nonnull align 1 dereferenceable(1) %44)
  call void @llvm.lifetime.end.p0(i64 1, ptr %44) #4
  br label %316

316:                                              ; preds = %310, %306
  br label %318

317:                                              ; preds = %283
  br label %318

318:                                              ; preds = %317, %316, %305
  br label %319

319:                                              ; preds = %318, %280
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %51)
  br label %320

320:                                              ; preds = %324, %319
  %321 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 1
  %322 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %321)
  %323 = xor i1 %322, true
  br i1 %323, label %324, label %325

324:                                              ; preds = %320
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %51)
  br label %320, !llvm.loop !69

325:                                              ; preds = %320
  %326 = load i32, ptr %12, align 4, !tbaa !11
  %327 = icmp eq i32 %326, 0
  br i1 %327, label %328, label %360

328:                                              ; preds = %325
  %329 = load i32, ptr %7, align 4, !tbaa !9
  switch i32 %329, label %358 [
    i32 1, label %330
    i32 2, label %344
  ]

330:                                              ; preds = %328
  %331 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 23
  %332 = load i32, ptr %331, align 8, !tbaa !68
  %333 = icmp sgt i32 %332, 0
  br i1 %333, label %334, label %343

334:                                              ; preds = %330
  %335 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 23
  %336 = load i32, ptr %335, align 8, !tbaa !68
  %337 = add nsw i32 %336, 1
  store i32 %337, ptr %12, align 4, !tbaa !11
  %338 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 6
  %339 = load ptr, ptr %338, align 8, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 1, ptr %45) #4
  store i8 0, ptr %45, align 1, !tbaa !44
  %340 = load ptr, ptr %339, align 8, !tbaa !48
  %341 = getelementptr inbounds ptr, ptr %340, i64 14
  %342 = load ptr, ptr %341, align 8
  call void %342(ptr noundef nonnull align 8 dereferenceable(224) %339, ptr noundef nonnull align 1 dereferenceable(1) %45)
  call void @llvm.lifetime.end.p0(i64 1, ptr %45) #4
  br label %343

343:                                              ; preds = %334, %330
  br label %359

344:                                              ; preds = %328
  %345 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 23
  %346 = load i32, ptr %345, align 8, !tbaa !68
  %347 = icmp sgt i32 %346, 0
  br i1 %347, label %348, label %357

348:                                              ; preds = %344
  %349 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 23
  %350 = load i32, ptr %349, align 8, !tbaa !68
  %351 = add nsw i32 %350, 1
  store i32 %351, ptr %12, align 4, !tbaa !11
  %352 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 5
  %353 = load ptr, ptr %352, align 8, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 1, ptr %46) #4
  store i8 0, ptr %46, align 1, !tbaa !44
  %354 = load ptr, ptr %353, align 8, !tbaa !48
  %355 = getelementptr inbounds ptr, ptr %354, i64 14
  %356 = load ptr, ptr %355, align 8
  call void %356(ptr noundef nonnull align 8 dereferenceable(224) %353, ptr noundef nonnull align 1 dereferenceable(1) %46)
  call void @llvm.lifetime.end.p0(i64 1, ptr %46) #4
  br label %357

357:                                              ; preds = %348, %344
  br label %359

358:                                              ; preds = %328
  br label %359

359:                                              ; preds = %358, %357, %343
  br label %398

360:                                              ; preds = %325
  %361 = load i32, ptr %12, align 4, !tbaa !11
  %362 = icmp eq i32 %361, 1
  br i1 %362, label %363, label %397

363:                                              ; preds = %360
  %364 = load i32, ptr %7, align 4, !tbaa !9
  switch i32 %364, label %395 [
    i32 1, label %365
    i32 2, label %384
  ]

365:                                              ; preds = %363
  %366 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 23
  %367 = load i32, ptr %366, align 8, !tbaa !68
  %368 = icmp sgt i32 %367, 0
  br i1 %368, label %369, label %383

369:                                              ; preds = %365
  %370 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 4
  %371 = load ptr, ptr %370, align 8, !tbaa !70
  %372 = load ptr, ptr %371, align 8, !tbaa !48
  %373 = getelementptr inbounds ptr, ptr %372, i64 5
  %374 = load ptr, ptr %373, align 8
  %375 = call noundef nonnull align 8 dereferenceable(24) ptr %374(ptr noundef nonnull align 8 dereferenceable(232) %371)
  %376 = call noundef i32 @_ZNK5sc_dt8sc_proxyINS_10sc_bv_baseEE7to_uintEv(ptr noundef nonnull align 8 dereferenceable(8) %375)
  %377 = load ptr, ptr %10, align 8, !tbaa !5
  store i32 %376, ptr %377, align 4, !tbaa !11
  %378 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 6
  %379 = load ptr, ptr %378, align 8, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 1, ptr %47) #4
  store i8 1, ptr %47, align 1, !tbaa !44
  %380 = load ptr, ptr %379, align 8, !tbaa !48
  %381 = getelementptr inbounds ptr, ptr %380, i64 14
  %382 = load ptr, ptr %381, align 8
  call void %382(ptr noundef nonnull align 8 dereferenceable(224) %379, ptr noundef nonnull align 1 dereferenceable(1) %47)
  call void @llvm.lifetime.end.p0(i64 1, ptr %47) #4
  br label %383

383:                                              ; preds = %369, %365
  br label %396

384:                                              ; preds = %363
  %385 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 23
  %386 = load i32, ptr %385, align 8, !tbaa !68
  %387 = icmp sgt i32 %386, 0
  br i1 %387, label %388, label %394

388:                                              ; preds = %384
  %389 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 5
  %390 = load ptr, ptr %389, align 8, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 1, ptr %48) #4
  store i8 1, ptr %48, align 1, !tbaa !44
  %391 = load ptr, ptr %390, align 8, !tbaa !48
  %392 = getelementptr inbounds ptr, ptr %391, i64 14
  %393 = load ptr, ptr %392, align 8
  call void %393(ptr noundef nonnull align 8 dereferenceable(224) %390, ptr noundef nonnull align 1 dereferenceable(1) %48)
  call void @llvm.lifetime.end.p0(i64 1, ptr %48) #4
  br label %394

394:                                              ; preds = %388, %384
  br label %396

395:                                              ; preds = %363
  br label %396

396:                                              ; preds = %395, %394, %383
  br label %397

397:                                              ; preds = %396, %360
  br label %398

398:                                              ; preds = %397, %359
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %51)
  br label %399

399:                                              ; preds = %403, %398
  %400 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 1
  %401 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %400)
  %402 = xor i1 %401, true
  br i1 %402, label %403, label %404

403:                                              ; preds = %399
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %51)
  br label %399, !llvm.loop !71

404:                                              ; preds = %399
  %405 = load i32, ptr %12, align 4, !tbaa !11
  %406 = icmp sgt i32 %405, 0
  br i1 %406, label %407, label %410

407:                                              ; preds = %404
  %408 = load i32, ptr %12, align 4, !tbaa !11
  %409 = add nsw i32 %408, -1
  store i32 %409, ptr %12, align 4, !tbaa !11
  br label %410

410:                                              ; preds = %407, %404
  %411 = load i32, ptr %12, align 4, !tbaa !11
  %412 = icmp eq i32 %411, 0
  br i1 %412, label %413, label %447

413:                                              ; preds = %410
  %414 = load i32, ptr %7, align 4, !tbaa !9
  switch i32 %414, label %445 [
    i32 1, label %415
    i32 2, label %434
  ]

415:                                              ; preds = %413
  %416 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 23
  %417 = load i32, ptr %416, align 8, !tbaa !68
  %418 = icmp eq i32 %417, 0
  br i1 %418, label %419, label %433

419:                                              ; preds = %415
  %420 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 6
  %421 = load ptr, ptr %420, align 8, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 1, ptr %49) #4
  store i8 1, ptr %49, align 1, !tbaa !44
  %422 = load ptr, ptr %421, align 8, !tbaa !48
  %423 = getelementptr inbounds ptr, ptr %422, i64 14
  %424 = load ptr, ptr %423, align 8
  call void %424(ptr noundef nonnull align 8 dereferenceable(224) %421, ptr noundef nonnull align 1 dereferenceable(1) %49)
  call void @llvm.lifetime.end.p0(i64 1, ptr %49) #4
  %425 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 4
  %426 = load ptr, ptr %425, align 8, !tbaa !70
  %427 = load ptr, ptr %426, align 8, !tbaa !48
  %428 = getelementptr inbounds ptr, ptr %427, i64 5
  %429 = load ptr, ptr %428, align 8
  %430 = call noundef nonnull align 8 dereferenceable(24) ptr %429(ptr noundef nonnull align 8 dereferenceable(232) %426)
  %431 = call noundef i32 @_ZNK5sc_dt8sc_proxyINS_10sc_bv_baseEE7to_uintEv(ptr noundef nonnull align 8 dereferenceable(8) %430)
  %432 = load ptr, ptr %10, align 8, !tbaa !5
  store i32 %431, ptr %432, align 4, !tbaa !11
  br label %433

433:                                              ; preds = %419, %415
  br label %446

434:                                              ; preds = %413
  %435 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 23
  %436 = load i32, ptr %435, align 8, !tbaa !68
  %437 = icmp eq i32 %436, 0
  br i1 %437, label %438, label %444

438:                                              ; preds = %434
  %439 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 5
  %440 = load ptr, ptr %439, align 8, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 1, ptr %50) #4
  store i8 1, ptr %50, align 1, !tbaa !44
  %441 = load ptr, ptr %440, align 8, !tbaa !48
  %442 = getelementptr inbounds ptr, ptr %441, i64 14
  %443 = load ptr, ptr %442, align 8
  call void %443(ptr noundef nonnull align 8 dereferenceable(224) %440, ptr noundef nonnull align 1 dereferenceable(1) %50)
  call void @llvm.lifetime.end.p0(i64 1, ptr %50) #4
  br label %444

444:                                              ; preds = %438, %434
  br label %446

445:                                              ; preds = %413
  br label %446

446:                                              ; preds = %445, %444, %433
  br label %447

447:                                              ; preds = %446, %410
  br label %448

448:                                              ; preds = %447
  %449 = load i32, ptr %12, align 4, !tbaa !11
  %450 = icmp sgt i32 %449, 0
  br i1 %450, label %129, label %451, !llvm.loop !72

451:                                              ; preds = %448
  %452 = load i32, ptr %11, align 4, !tbaa !11
  %453 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 23
  %454 = load i32, ptr %453, align 8, !tbaa !68
  %455 = add nsw i32 %454, 1
  %456 = icmp eq i32 %452, %455
  br i1 %456, label %457, label %458

457:                                              ; preds = %451
  br label %459

458:                                              ; preds = %451
  call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef @.str.9, ptr noundef @.str.10, i32 noundef 1262)
  br label %459

459:                                              ; preds = %458, %457
  %460 = phi i32 [ 0, %457 ], [ 0, %458 ]
  %461 = load i32, ptr %11, align 4, !tbaa !11
  %462 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 22
  %463 = load i32, ptr %462, align 4, !tbaa !61
  %464 = add nsw i32 %463, %461
  store i32 %464, ptr %462, align 4, !tbaa !61
  %465 = load i32, ptr %11, align 4, !tbaa !11
  %466 = getelementptr inbounds %struct.cycle_model, ptr %51, i32 0, i32 21
  %467 = load i32, ptr %466, align 8, !tbaa !13
  %468 = sub nsw i32 %467, %465
  store i32 %468, ptr %466, align 8, !tbaa !13
  store i32 1, ptr %20, align 4
  br label %469

469:                                              ; preds = %459, %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  ret void

470:                                              ; preds = %253, %230, %190
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %471

471:                                              ; preds = %470
  %472 = load ptr, ptr %29, align 8
  %473 = load i32, ptr %30, align 4
  %474 = insertvalue { ptr, i32 } poison, ptr %472, 0
  %475 = insertvalue { ptr, i32 } %474, i32 %473, 1
  resume { ptr, i32 } %475
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184)) #1 align 2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7negedgeEv(ptr noundef nonnull align 8 dereferenceable(184)) #1 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)) #1 align 2

declare void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { "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 = !{!"_ZTS14bus_cycle_type", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 533040}
!14 = !{!"_ZTS11cycle_model", !15, i64 0, !36, i64 232, !6, i64 416, !6, i64 424, !6, i64 432, !6, i64 440, !6, i64 448, !6, i64 456, !6, i64 464, !6, i64 472, !6, i64 480, !6, i64 488, !6, i64 496, !6, i64 504, !7, i64 512, !7, i64 262656, !7, i64 524800, !12, i64 532992, !7, i64 532996, !6, i64 533032, !12, i64 533040, !12, i64 533044, !12, i64 533048}
!15 = !{!"_ZTSN7sc_core9sc_moduleE", !16, i64 0, !28, i64 112, !29, i64 120, !31, i64 144, !33, i64 168, !35, i64 192, !6, i64 200, !12, i64 208, !6, i64 216, !6, i64 224}
!16 = !{!"_ZTSN7sc_core9sc_objectE", !6, i64 8, !17, i64 16, !21, i64 40, !25, i64 64, !6, i64 96, !6, i64 104}
!17 = !{!"_ZTSSt6vectorIPN7sc_core8sc_eventESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core8sc_eventESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSSt6vectorIPN7sc_core9sc_objectESaIS2_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core9sc_objectESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !26, i64 0, !27, i64 8, !7, i64 16}
!26 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!27 = !{!"long", !7, i64 0}
!28 = !{!"_ZTSN7sc_core15sc_process_hostE"}
!29 = !{!"_ZTSN7sc_core12sc_sensitiveE", !6, i64 0, !30, i64 8, !6, i64 16}
!30 = !{!"_ZTSN7sc_core12sc_sensitiveUt_E", !7, i64 0}
!31 = !{!"_ZTSN7sc_core16sc_sensitive_posE", !6, i64 0, !32, i64 8, !6, i64 16}
!32 = !{!"_ZTSN7sc_core16sc_sensitive_posUt_E", !7, i64 0}
!33 = !{!"_ZTSN7sc_core16sc_sensitive_negE", !6, i64 0, !34, i64 8, !6, i64 16}
!34 = !{!"_ZTSN7sc_core16sc_sensitive_negUt_E", !7, i64 0}
!35 = !{!"bool", !7, i64 0}
!36 = !{!"_ZTSN7sc_core5sc_inIbEE", !37, i64 0, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176}
!37 = !{!"_ZTSN7sc_core7sc_portINS_15sc_signal_in_ifIbEELi1ELNS_14sc_port_policyE0EEE", !38, i64 0}
!38 = !{!"_ZTSN7sc_core9sc_port_bINS_15sc_signal_in_ifIbEEEE", !39, i64 0, !6, i64 120, !40, i64 128}
!39 = !{!"_ZTSN7sc_core12sc_port_baseE", !16, i64 0, !6, i64 112}
!40 = !{!"_ZTSSt6vectorIPN7sc_core15sc_signal_in_ifIbEESaIS3_EE", !41, i64 0}
!41 = !{!"_ZTSSt12_Vector_baseIPN7sc_core15sc_signal_in_ifIbEESaIS3_EE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core15sc_signal_in_ifIbEESaIS3_EE12_Vector_implE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseIPN7sc_core15sc_signal_in_ifIbEESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!44 = !{!35, !35, i64 0}
!45 = !{i8 0, i8 2}
!46 = !{}
!47 = !{!14, !6, i64 472}
!48 = !{!49, !49, i64 0}
!49 = !{!"vtable pointer", !8, i64 0}
!50 = !{!14, !6, i64 440}
!51 = !{!14, !6, i64 456}
!52 = !{!14, !6, i64 448}
!53 = !{!14, !6, i64 464}
!54 = !{!14, !6, i64 488}
!55 = !{!14, !6, i64 496}
!56 = distinct !{!56, !57}
!57 = !{!"llvm.loop.mustprogress"}
!58 = distinct !{!58, !57}
!59 = distinct !{!59, !57}
!60 = distinct !{!60, !57}
!61 = !{!14, !12, i64 533044}
!62 = !{!14, !6, i64 424}
!63 = distinct !{!63, !57}
!64 = !{!14, !6, i64 416}
!65 = !{!14, !6, i64 504}
!66 = distinct !{!66, !57}
!67 = distinct !{!67, !57}
!68 = !{!14, !12, i64 533048}
!69 = distinct !{!69, !57}
!70 = !{!14, !6, i64 432}
!71 = distinct !{!71, !57}
!72 = distinct !{!72, !57}


; 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.21" = type { %"class.sc_dt::sc_bv_base" }

@ALL_CYCLES = external dso_local local_unnamed_addr global i8, align 1
@_ZN7sc_core23SC_ID_ASSERTION_FAILED_E = external constant [0 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [118 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11cycle_model14exec_bus_cycleE14bus_cycle_typeiiPi(ptr noundef nonnull align 8 dereferenceable(533052) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, ptr nocapture noundef writeonly %4) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca i8, align 1
  %7 = alloca i8, align 1
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca i8, align 1
  %17 = alloca i8, align 1
  %18 = alloca i8, align 1
  %19 = alloca i8, align 1
  %20 = alloca %"class.sc_dt::sc_bv", align 8
  %21 = alloca i8, align 1
  %22 = alloca i8, align 1
  %23 = alloca %"class.sc_dt::sc_bv.21", align 8
  %24 = alloca i8, align 1
  %25 = alloca i8, align 1
  %26 = alloca i8, align 1
  %27 = alloca %"class.sc_dt::sc_bv.21", align 8
  %28 = alloca i8, align 1
  %29 = alloca i8, align 1
  %30 = alloca i8, align 1
  %31 = alloca i8, align 1
  %32 = alloca i8, align 1
  %33 = alloca i8, align 1
  %34 = alloca i8, align 1
  %35 = alloca i8, align 1
  %36 = alloca i8, align 1
  %37 = alloca i8, align 1
  %38 = alloca i8, align 1
  %39 = alloca i8, align 1
  %40 = alloca i8, align 1
  %41 = icmp eq i32 %1, 0
  br i1 %41, label %57, label %.preheader

.preheader:                                       ; preds = %5
  %42 = getelementptr inbounds i8, ptr %0, i64 472
  %43 = getelementptr inbounds i8, ptr %0, i64 440
  %44 = getelementptr inbounds i8, ptr %0, i64 456
  %45 = getelementptr inbounds i8, ptr %0, i64 448
  %46 = getelementptr inbounds i8, ptr %0, i64 464
  %47 = getelementptr inbounds i8, ptr %0, i64 488
  %48 = getelementptr inbounds i8, ptr %0, i64 496
  %49 = icmp eq i32 %1, 2
  %50 = getelementptr inbounds i8, ptr %0, i64 424
  %51 = getelementptr inbounds i8, ptr %0, i64 232
  %52 = getelementptr inbounds i8, ptr %0, i64 416
  %53 = and i32 %2, 65535
  %54 = getelementptr inbounds i8, ptr %0, i64 504
  %55 = getelementptr inbounds i8, ptr %0, i64 533048
  %56 = getelementptr inbounds i8, ptr %0, i64 432
  br label %115

57:                                               ; preds = %5
  %58 = getelementptr inbounds i8, ptr %0, i64 533040
  %59 = load i32, ptr %58, align 8, !tbaa !5
  %60 = icmp sgt i32 %59, 0
  br i1 %60, label %64, label %61

61:                                               ; preds = %57
  %62 = load i8, ptr @ALL_CYCLES, align 1, !tbaa !40, !range !41, !noundef !42
  %63 = trunc nuw i8 %62 to i1
  br i1 %63, label %64, label %111

64:                                               ; preds = %61, %57
  %65 = getelementptr inbounds i8, ptr %0, i64 472
  %66 = load ptr, ptr %65, align 8, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #4
  store i8 0, ptr %6, align 1, !tbaa !40
  %67 = load ptr, ptr %66, align 8, !tbaa !44
  %68 = getelementptr inbounds i8, ptr %67, i64 112
  %69 = load ptr, ptr %68, align 8
  call void %69(ptr noundef nonnull align 8 dereferenceable(224) %66, ptr noundef nonnull align 1 dereferenceable(1) %6)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #4
  %70 = getelementptr inbounds i8, ptr %0, i64 440
  %71 = load ptr, ptr %70, align 8, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  store i8 1, ptr %7, align 1, !tbaa !40
  %72 = load ptr, ptr %71, align 8, !tbaa !44
  %73 = getelementptr inbounds i8, ptr %72, i64 112
  %74 = load ptr, ptr %73, align 8
  call void %74(ptr noundef nonnull align 8 dereferenceable(224) %71, ptr noundef nonnull align 1 dereferenceable(1) %7)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  %75 = getelementptr inbounds i8, ptr %0, i64 456
  %76 = load ptr, ptr %75, align 8, !tbaa !47
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #4
  store i8 1, ptr %8, align 1, !tbaa !40
  %77 = load ptr, ptr %76, align 8, !tbaa !44
  %78 = getelementptr inbounds i8, ptr %77, i64 112
  %79 = load ptr, ptr %78, align 8
  call void %79(ptr noundef nonnull align 8 dereferenceable(224) %76, ptr noundef nonnull align 1 dereferenceable(1) %8)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #4
  %80 = getelementptr inbounds i8, ptr %0, i64 448
  %81 = load ptr, ptr %80, align 8, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #4
  store i8 1, ptr %9, align 1, !tbaa !40
  %82 = load ptr, ptr %81, align 8, !tbaa !44
  %83 = getelementptr inbounds i8, ptr %82, i64 112
  %84 = load ptr, ptr %83, align 8
  call void %84(ptr noundef nonnull align 8 dereferenceable(224) %81, ptr noundef nonnull align 1 dereferenceable(1) %9)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #4
  %85 = getelementptr inbounds i8, ptr %0, i64 464
  %86 = load ptr, ptr %85, align 8, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #4
  store i8 1, ptr %10, align 1, !tbaa !40
  %87 = load ptr, ptr %86, align 8, !tbaa !44
  %88 = getelementptr inbounds i8, ptr %87, i64 112
  %89 = load ptr, ptr %88, align 8
  call void %89(ptr noundef nonnull align 8 dereferenceable(224) %86, ptr noundef nonnull align 1 dereferenceable(1) %10)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #4
  %90 = getelementptr inbounds i8, ptr %0, i64 488
  %91 = load ptr, ptr %90, align 8, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #4
  store i8 0, ptr %11, align 1, !tbaa !40
  %92 = load ptr, ptr %91, align 8, !tbaa !44
  %93 = getelementptr inbounds i8, ptr %92, i64 112
  %94 = load ptr, ptr %93, align 8
  call void %94(ptr noundef nonnull align 8 dereferenceable(224) %91, ptr noundef nonnull align 1 dereferenceable(1) %11)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #4
  %95 = getelementptr inbounds i8, ptr %0, i64 496
  %96 = load ptr, ptr %95, align 8, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #4
  store i8 0, ptr %12, align 1, !tbaa !40
  %97 = load ptr, ptr %96, align 8, !tbaa !44
  %98 = getelementptr inbounds i8, ptr %97, i64 112
  %99 = load ptr, ptr %98, align 8
  call void %99(ptr noundef nonnull align 8 dereferenceable(224) %96, ptr noundef nonnull align 1 dereferenceable(1) %12)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #4
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %100 = getelementptr inbounds i8, ptr %0, i64 232
  %101 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %100)
  br i1 %101, label %._crit_edge55, label %.lr.ph54

.lr.ph54:                                         ; preds = %64, %.lr.ph54
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %102 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %100)
  br i1 %102, label %._crit_edge55, label %.lr.ph54, !llvm.loop !52

._crit_edge55:                                    ; preds = %.lr.ph54, %64
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %103 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %100)
  br i1 %103, label %._crit_edge58, label %.lr.ph57

.lr.ph57:                                         ; preds = %._crit_edge55, %.lr.ph57
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %104 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %100)
  br i1 %104, label %._crit_edge58, label %.lr.ph57, !llvm.loop !54

._crit_edge58:                                    ; preds = %.lr.ph57, %._crit_edge55
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %105 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %100)
  br i1 %105, label %._crit_edge61, label %.lr.ph60

.lr.ph60:                                         ; preds = %._crit_edge58, %.lr.ph60
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %106 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %100)
  br i1 %106, label %._crit_edge61, label %.lr.ph60, !llvm.loop !55

._crit_edge61:                                    ; preds = %.lr.ph60, %._crit_edge58
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %107 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %100)
  br i1 %107, label %._crit_edge64, label %.lr.ph63

.lr.ph63:                                         ; preds = %._crit_edge61, %.lr.ph63
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %108 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %100)
  br i1 %108, label %._crit_edge64, label %.lr.ph63, !llvm.loop !56

._crit_edge64:                                    ; preds = %.lr.ph63, %._crit_edge61
  %109 = load i32, ptr %58, align 8, !tbaa !5
  %110 = add nsw i32 %109, -1
  store i32 %110, ptr %58, align 8, !tbaa !5
  br label %111

111:                                              ; preds = %._crit_edge64, %61
  %112 = getelementptr inbounds i8, ptr %0, i64 533044
  %113 = load i32, ptr %112, align 4, !tbaa !57
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %112, align 4, !tbaa !57
  br label %322

115:                                              ; preds = %._crit_edge52, %.preheader
  %.030 = phi i32 [ %116, %._crit_edge52 ], [ 0, %.preheader ]
  %.029 = phi i32 [ %288, %._crit_edge52 ], [ 0, %.preheader ]
  %116 = add nuw nsw i32 %.030, 1
  %117 = icmp eq i32 %.029, 0
  br i1 %117, label %118, label %163

118:                                              ; preds = %115
  %119 = load ptr, ptr %42, align 8, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #4
  store i8 1, ptr %13, align 1, !tbaa !40
  %120 = load ptr, ptr %119, align 8, !tbaa !44
  %121 = getelementptr inbounds i8, ptr %120, i64 112
  %122 = load ptr, ptr %121, align 8
  call void %122(ptr noundef nonnull align 8 dereferenceable(224) %119, ptr noundef nonnull align 1 dereferenceable(1) %13)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #4
  %123 = load ptr, ptr %43, align 8, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #4
  store i8 1, ptr %14, align 1, !tbaa !40
  %124 = load ptr, ptr %123, align 8, !tbaa !44
  %125 = getelementptr inbounds i8, ptr %124, i64 112
  %126 = load ptr, ptr %125, align 8
  call void %126(ptr noundef nonnull align 8 dereferenceable(224) %123, ptr noundef nonnull align 1 dereferenceable(1) %14)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #4
  %127 = load ptr, ptr %44, align 8, !tbaa !47
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #4
  store i8 1, ptr %15, align 1, !tbaa !40
  %128 = load ptr, ptr %127, align 8, !tbaa !44
  %129 = getelementptr inbounds i8, ptr %128, i64 112
  %130 = load ptr, ptr %129, align 8
  call void %130(ptr noundef nonnull align 8 dereferenceable(224) %127, ptr noundef nonnull align 1 dereferenceable(1) %15)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #4
  %131 = load ptr, ptr %45, align 8, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #4
  store i8 1, ptr %16, align 1, !tbaa !40
  %132 = load ptr, ptr %131, align 8, !tbaa !44
  %133 = getelementptr inbounds i8, ptr %132, i64 112
  %134 = load ptr, ptr %133, align 8
  call void %134(ptr noundef nonnull align 8 dereferenceable(224) %131, ptr noundef nonnull align 1 dereferenceable(1) %16)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #4
  %135 = load ptr, ptr %46, align 8, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #4
  store i8 1, ptr %17, align 1, !tbaa !40
  %136 = load ptr, ptr %135, align 8, !tbaa !44
  %137 = getelementptr inbounds i8, ptr %136, i64 112
  %138 = load ptr, ptr %137, align 8
  call void %138(ptr noundef nonnull align 8 dereferenceable(224) %135, ptr noundef nonnull align 1 dereferenceable(1) %17)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #4
  %139 = load ptr, ptr %47, align 8, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %18) #4
  store i8 0, ptr %18, align 1, !tbaa !40
  %140 = load ptr, ptr %139, align 8, !tbaa !44
  %141 = getelementptr inbounds i8, ptr %140, i64 112
  %142 = load ptr, ptr %141, align 8
  call void %142(ptr noundef nonnull align 8 dereferenceable(224) %139, ptr noundef nonnull align 1 dereferenceable(1) %18)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #4
  %143 = load ptr, ptr %48, align 8, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %19) #4
  store i8 0, ptr %19, align 1, !tbaa !40
  %144 = load ptr, ptr %143, align 8, !tbaa !44
  %145 = getelementptr inbounds i8, ptr %144, i64 112
  %146 = load ptr, ptr %145, align 8
  call void %146(ptr noundef nonnull align 8 dereferenceable(224) %143, ptr noundef nonnull align 1 dereferenceable(1) %19)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #4
  br i1 %49, label %147, label %163

147:                                              ; preds = %118
  %148 = load ptr, ptr %50, align 8, !tbaa !58
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #4
  call void @_ZN5sc_dt5sc_bvILi8EEC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %20, i32 noundef %3)
  %149 = load ptr, ptr %148, align 8, !tbaa !44
  %150 = getelementptr inbounds i8, ptr %149, i64 72
  %151 = load ptr, ptr %150, align 8
  invoke void %151(ptr noundef nonnull align 8 dereferenceable(232) %148, ptr noundef nonnull align 8 dereferenceable(24) %20)
          to label %152 unwind label %161

152:                                              ; preds = %147
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #4
  %153 = load ptr, ptr %47, align 8, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %21) #4
  store i8 1, ptr %21, align 1, !tbaa !40
  %154 = load ptr, ptr %153, align 8, !tbaa !44
  %155 = getelementptr inbounds i8, ptr %154, i64 112
  %156 = load ptr, ptr %155, align 8
  call void %156(ptr noundef nonnull align 8 dereferenceable(224) %153, ptr noundef nonnull align 1 dereferenceable(1) %21)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #4
  %157 = load ptr, ptr %48, align 8, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %22) #4
  store i8 1, ptr %22, align 1, !tbaa !40
  %158 = load ptr, ptr %157, align 8, !tbaa !44
  %159 = getelementptr inbounds i8, ptr %158, i64 112
  %160 = load ptr, ptr %159, align 8
  call void %160(ptr noundef nonnull align 8 dereferenceable(224) %157, ptr noundef nonnull align 1 dereferenceable(1) %22)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #4
  br label %163

161:                                              ; preds = %147
  %162 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #4
  br label %323

163:                                              ; preds = %118, %152, %115
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %164 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %51)
  br i1 %164, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %163, %.lr.ph
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %165 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %51)
  br i1 %165, label %._crit_edge, label %.lr.ph, !llvm.loop !59

._crit_edge:                                      ; preds = %.lr.ph, %163
  br i1 %117, label %166, label %.critedge

166:                                              ; preds = %._crit_edge
  switch i32 %1, label %203 [
    i32 1, label %167
    i32 2, label %187
  ]

167:                                              ; preds = %166
  %168 = load ptr, ptr %52, align 8, !tbaa !60
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %23) #4
  call void @_ZN5sc_dt5sc_bvILi16EEC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %53)
  %169 = load ptr, ptr %168, align 8, !tbaa !44
  %170 = getelementptr inbounds i8, ptr %169, i64 72
  %171 = load ptr, ptr %170, align 8
  invoke void %171(ptr noundef nonnull align 8 dereferenceable(232) %168, ptr noundef nonnull align 8 dereferenceable(24) %23)
          to label %172 unwind label %185

172:                                              ; preds = %167
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %23) #4
  %173 = load ptr, ptr %47, align 8, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %24) #4
  store i8 1, ptr %24, align 1, !tbaa !40
  %174 = load ptr, ptr %173, align 8, !tbaa !44
  %175 = getelementptr inbounds i8, ptr %174, i64 112
  %176 = load ptr, ptr %175, align 8
  call void %176(ptr noundef nonnull align 8 dereferenceable(224) %173, ptr noundef nonnull align 1 dereferenceable(1) %24)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %24) #4
  %177 = load ptr, ptr %48, align 8, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %25) #4
  store i8 1, ptr %25, align 1, !tbaa !40
  %178 = load ptr, ptr %177, align 8, !tbaa !44
  %179 = getelementptr inbounds i8, ptr %178, i64 112
  %180 = load ptr, ptr %179, align 8
  call void %180(ptr noundef nonnull align 8 dereferenceable(224) %177, ptr noundef nonnull align 1 dereferenceable(1) %25)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %25) #4
  %181 = load ptr, ptr %54, align 8, !tbaa !61
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %26) #4
  store i8 1, ptr %26, align 1, !tbaa !40
  %182 = load ptr, ptr %181, align 8, !tbaa !44
  %183 = getelementptr inbounds i8, ptr %182, i64 112
  %184 = load ptr, ptr %183, align 8
  call void %184(ptr noundef nonnull align 8 dereferenceable(224) %181, ptr noundef nonnull align 1 dereferenceable(1) %26)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %26) #4
  br label %203

185:                                              ; preds = %167
  %186 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %23) #4
  br label %323

187:                                              ; preds = %166
  %188 = load ptr, ptr %52, align 8, !tbaa !60
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %27) #4
  call void @_ZN5sc_dt5sc_bvILi16EEC2Ei(ptr noundef nonnull align 8 dereferenceable(24) %27, i32 noundef %53)
  %189 = load ptr, ptr %188, align 8, !tbaa !44
  %190 = getelementptr inbounds i8, ptr %189, i64 72
  %191 = load ptr, ptr %190, align 8
  invoke void %191(ptr noundef nonnull align 8 dereferenceable(232) %188, ptr noundef nonnull align 8 dereferenceable(24) %27)
          to label %192 unwind label %201

192:                                              ; preds = %187
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %27) #4
  %193 = load ptr, ptr %48, align 8, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %28) #4
  store i8 0, ptr %28, align 1, !tbaa !40
  %194 = load ptr, ptr %193, align 8, !tbaa !44
  %195 = getelementptr inbounds i8, ptr %194, i64 112
  %196 = load ptr, ptr %195, align 8
  call void %196(ptr noundef nonnull align 8 dereferenceable(224) %193, ptr noundef nonnull align 1 dereferenceable(1) %28)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %28) #4
  %197 = load ptr, ptr %54, align 8, !tbaa !61
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %29) #4
  store i8 1, ptr %29, align 1, !tbaa !40
  %198 = load ptr, ptr %197, align 8, !tbaa !44
  %199 = getelementptr inbounds i8, ptr %198, i64 112
  %200 = load ptr, ptr %199, align 8
  call void %200(ptr noundef nonnull align 8 dereferenceable(224) %197, ptr noundef nonnull align 1 dereferenceable(1) %29)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %29) #4
  br label %203

201:                                              ; preds = %187
  %202 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt10sc_bv_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %27) #4
  br label %323

203:                                              ; preds = %166, %192, %172
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %204 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7negedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %51)
  br i1 %204, label %._crit_edge44, label %.lr.ph43

.lr.ph43:                                         ; preds = %203, %.lr.ph43
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %205 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7negedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %51)
  br i1 %205, label %._crit_edge44, label %.lr.ph43, !llvm.loop !62

._crit_edge44:                                    ; preds = %.lr.ph43, %203
  %206 = load ptr, ptr %42, align 8, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %30) #4
  store i8 0, ptr %30, align 1, !tbaa !40
  %207 = load ptr, ptr %206, align 8, !tbaa !44
  %208 = getelementptr inbounds i8, ptr %207, i64 112
  %209 = load ptr, ptr %208, align 8
  call void %209(ptr noundef nonnull align 8 dereferenceable(224) %206, ptr noundef nonnull align 1 dereferenceable(1) %30)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %30) #4
  br label %.critedge

.critedge:                                        ; preds = %._crit_edge, %._crit_edge44
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %210 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %51)
  br i1 %210, label %._crit_edge46, label %.lr.ph45

.lr.ph45:                                         ; preds = %.critedge, %.lr.ph45
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %211 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %51)
  br i1 %211, label %._crit_edge46, label %.lr.ph45, !llvm.loop !63

._crit_edge46:                                    ; preds = %.lr.ph45, %.critedge
  br i1 %117, label %212, label %237

212:                                              ; preds = %._crit_edge46
  switch i32 %1, label %237 [
    i32 1, label %213
    i32 2, label %229
  ]

213:                                              ; preds = %212
  %214 = load ptr, ptr %47, align 8, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %31) #4
  store i8 0, ptr %31, align 1, !tbaa !40
  %215 = load ptr, ptr %214, align 8, !tbaa !44
  %216 = getelementptr inbounds i8, ptr %215, i64 112
  %217 = load ptr, ptr %216, align 8
  call void %217(ptr noundef nonnull align 8 dereferenceable(224) %214, ptr noundef nonnull align 1 dereferenceable(1) %31)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %31) #4
  %218 = load ptr, ptr %48, align 8, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %32) #4
  store i8 0, ptr %32, align 1, !tbaa !40
  %219 = load ptr, ptr %218, align 8, !tbaa !44
  %220 = getelementptr inbounds i8, ptr %219, i64 112
  %221 = load ptr, ptr %220, align 8
  call void %221(ptr noundef nonnull align 8 dereferenceable(224) %218, ptr noundef nonnull align 1 dereferenceable(1) %32)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %32) #4
  %222 = load i32, ptr %55, align 8, !tbaa !64
  %223 = icmp eq i32 %222, 0
  br i1 %223, label %224, label %237

224:                                              ; preds = %213
  %225 = load ptr, ptr %45, align 8, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %33) #4
  store i8 0, ptr %33, align 1, !tbaa !40
  %226 = load ptr, ptr %225, align 8, !tbaa !44
  %227 = getelementptr inbounds i8, ptr %226, i64 112
  %228 = load ptr, ptr %227, align 8
  call void %228(ptr noundef nonnull align 8 dereferenceable(224) %225, ptr noundef nonnull align 1 dereferenceable(1) %33)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %33) #4
  br label %237

229:                                              ; preds = %212
  %230 = load i32, ptr %55, align 8, !tbaa !64
  %231 = icmp eq i32 %230, 0
  br i1 %231, label %232, label %237

232:                                              ; preds = %229
  %233 = load ptr, ptr %43, align 8, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %34) #4
  store i8 0, ptr %34, align 1, !tbaa !40
  %234 = load ptr, ptr %233, align 8, !tbaa !44
  %235 = getelementptr inbounds i8, ptr %234, i64 112
  %236 = load ptr, ptr %235, align 8
  call void %236(ptr noundef nonnull align 8 dereferenceable(224) %233, ptr noundef nonnull align 1 dereferenceable(1) %34)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %34) #4
  br label %237

237:                                              ; preds = %224, %213, %232, %229, %212, %._crit_edge46
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %238 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %51)
  br i1 %238, label %._crit_edge49, label %.lr.ph48

.lr.ph48:                                         ; preds = %237, %.lr.ph48
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %239 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %51)
  br i1 %239, label %._crit_edge49, label %.lr.ph48, !llvm.loop !65

._crit_edge49:                                    ; preds = %.lr.ph48, %237
  br i1 %117, label %240, label %259

240:                                              ; preds = %._crit_edge49
  switch i32 %1, label %284 [
    i32 1, label %241
    i32 2, label %250
  ]

241:                                              ; preds = %240
  %242 = load i32, ptr %55, align 8, !tbaa !64
  %243 = icmp sgt i32 %242, 0
  br i1 %243, label %244, label %284

244:                                              ; preds = %241
  %245 = add nuw nsw i32 %242, 1
  %246 = load ptr, ptr %45, align 8, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %35) #4
  store i8 0, ptr %35, align 1, !tbaa !40
  %247 = load ptr, ptr %246, align 8, !tbaa !44
  %248 = getelementptr inbounds i8, ptr %247, i64 112
  %249 = load ptr, ptr %248, align 8
  call void %249(ptr noundef nonnull align 8 dereferenceable(224) %246, ptr noundef nonnull align 1 dereferenceable(1) %35)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %35) #4
  br label %284

250:                                              ; preds = %240
  %251 = load i32, ptr %55, align 8, !tbaa !64
  %252 = icmp sgt i32 %251, 0
  br i1 %252, label %253, label %284

253:                                              ; preds = %250
  %254 = add nuw nsw i32 %251, 1
  %255 = load ptr, ptr %43, align 8, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %36) #4
  store i8 0, ptr %36, align 1, !tbaa !40
  %256 = load ptr, ptr %255, align 8, !tbaa !44
  %257 = getelementptr inbounds i8, ptr %256, i64 112
  %258 = load ptr, ptr %257, align 8
  call void %258(ptr noundef nonnull align 8 dereferenceable(224) %255, ptr noundef nonnull align 1 dereferenceable(1) %36)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %36) #4
  br label %284

259:                                              ; preds = %._crit_edge49
  %260 = icmp eq i32 %.029, 1
  br i1 %260, label %261, label %284

261:                                              ; preds = %259
  switch i32 %1, label %284 [
    i32 1, label %262
    i32 2, label %276
  ]

262:                                              ; preds = %261
  %263 = load i32, ptr %55, align 8, !tbaa !64
  %264 = icmp sgt i32 %263, 0
  br i1 %264, label %265, label %284

265:                                              ; preds = %262
  %266 = load ptr, ptr %56, align 8, !tbaa !66
  %267 = load ptr, ptr %266, align 8, !tbaa !44
  %268 = getelementptr inbounds i8, ptr %267, i64 40
  %269 = load ptr, ptr %268, align 8
  %270 = call noundef nonnull align 8 dereferenceable(24) ptr %269(ptr noundef nonnull align 8 dereferenceable(232) %266)
  %271 = call noundef i32 @_ZNK5sc_dt8sc_proxyINS_10sc_bv_baseEE7to_uintEv(ptr noundef nonnull align 8 dereferenceable(8) %270)
  store i32 %271, ptr %4, align 4, !tbaa !67
  %272 = load ptr, ptr %45, align 8, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %37) #4
  store i8 1, ptr %37, align 1, !tbaa !40
  %273 = load ptr, ptr %272, align 8, !tbaa !44
  %274 = getelementptr inbounds i8, ptr %273, i64 112
  %275 = load ptr, ptr %274, align 8
  call void %275(ptr noundef nonnull align 8 dereferenceable(224) %272, ptr noundef nonnull align 1 dereferenceable(1) %37)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %37) #4
  br label %284

276:                                              ; preds = %261
  %277 = load i32, ptr %55, align 8, !tbaa !64
  %278 = icmp sgt i32 %277, 0
  br i1 %278, label %279, label %284

279:                                              ; preds = %276
  %280 = load ptr, ptr %43, align 8, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %38) #4
  store i8 1, ptr %38, align 1, !tbaa !40
  %281 = load ptr, ptr %280, align 8, !tbaa !44
  %282 = getelementptr inbounds i8, ptr %281, i64 112
  %283 = load ptr, ptr %282, align 8
  call void %283(ptr noundef nonnull align 8 dereferenceable(224) %280, ptr noundef nonnull align 1 dereferenceable(1) %38)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %38) #4
  br label %284

284:                                              ; preds = %259, %261, %276, %279, %262, %265, %244, %241, %253, %250, %240
  %.1 = phi i32 [ 0, %240 ], [ %254, %253 ], [ 0, %250 ], [ %245, %244 ], [ 0, %241 ], [ 1, %261 ], [ 1, %279 ], [ 1, %276 ], [ 1, %265 ], [ 1, %262 ], [ %.029, %259 ]
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %285 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %51)
  br i1 %285, label %._crit_edge52, label %.lr.ph51

.lr.ph51:                                         ; preds = %284, %.lr.ph51
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %286 = call noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7posedgeEv(ptr noundef nonnull align 8 dereferenceable(184) %51)
  br i1 %286, label %._crit_edge52, label %.lr.ph51, !llvm.loop !68

._crit_edge52:                                    ; preds = %.lr.ph51, %284
  %287 = icmp slt i32 %.1, 2
  %288 = add nsw i32 %.1, -1
  br i1 %287, label %289, label %115, !llvm.loop !69

289:                                              ; preds = %._crit_edge52
  switch i32 %1, label %.thread [
    i32 1, label %290
    i32 2, label %304
  ]

290:                                              ; preds = %289
  %291 = load i32, ptr %55, align 8, !tbaa !64
  %292 = icmp eq i32 %291, 0
  br i1 %292, label %293, label %.thread

293:                                              ; preds = %290
  %294 = load ptr, ptr %45, align 8, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %39) #4
  store i8 1, ptr %39, align 1, !tbaa !40
  %295 = load ptr, ptr %294, align 8, !tbaa !44
  %296 = getelementptr inbounds i8, ptr %295, i64 112
  %297 = load ptr, ptr %296, align 8
  call void %297(ptr noundef nonnull align 8 dereferenceable(224) %294, ptr noundef nonnull align 1 dereferenceable(1) %39)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %39) #4
  %298 = load ptr, ptr %56, align 8, !tbaa !66
  %299 = load ptr, ptr %298, align 8, !tbaa !44
  %300 = getelementptr inbounds i8, ptr %299, i64 40
  %301 = load ptr, ptr %300, align 8
  %302 = call noundef nonnull align 8 dereferenceable(24) ptr %301(ptr noundef nonnull align 8 dereferenceable(232) %298)
  %303 = call noundef i32 @_ZNK5sc_dt8sc_proxyINS_10sc_bv_baseEE7to_uintEv(ptr noundef nonnull align 8 dereferenceable(8) %302)
  store i32 %303, ptr %4, align 4, !tbaa !67
  br label %.thread

304:                                              ; preds = %289
  %305 = load i32, ptr %55, align 8, !tbaa !64
  %306 = icmp eq i32 %305, 0
  br i1 %306, label %307, label %.thread

307:                                              ; preds = %304
  %308 = load ptr, ptr %43, align 8, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %40) #4
  store i8 1, ptr %40, align 1, !tbaa !40
  %309 = load ptr, ptr %308, align 8, !tbaa !44
  %310 = getelementptr inbounds i8, ptr %309, i64 112
  %311 = load ptr, ptr %310, align 8
  call void %311(ptr noundef nonnull align 8 dereferenceable(224) %308, ptr noundef nonnull align 1 dereferenceable(1) %40)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %40) #4
  br label %.thread

.thread:                                          ; preds = %293, %290, %307, %304, %289
  %312 = load i32, ptr %55, align 8, !tbaa !64
  %313 = icmp eq i32 %.030, %312
  br i1 %313, label %315, label %314

314:                                              ; preds = %.thread
  call void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 3, ptr noundef nonnull @_ZN7sc_core23SC_ID_ASSERTION_FAILED_E, ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.10, i32 noundef 1262)
  br label %315

315:                                              ; preds = %.thread, %314
  %316 = getelementptr inbounds i8, ptr %0, i64 533044
  %317 = load i32, ptr %316, align 4, !tbaa !57
  %318 = add nsw i32 %317, %116
  store i32 %318, ptr %316, align 4, !tbaa !57
  %319 = getelementptr inbounds i8, ptr %0, i64 533040
  %320 = load i32, ptr %319, align 8, !tbaa !5
  %321 = sub nsw i32 %320, %116
  store i32 %321, ptr %319, align 8, !tbaa !5
  br label %322

322:                                              ; preds = %315, %111
  ret void

323:                                              ; preds = %201, %185, %161
  %.pn = phi { ptr, i32 } [ %202, %201 ], [ %186, %185 ], [ %162, %161 ]
  resume { ptr, i32 } %.pn
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7sc_core5sc_inIbE7negedgeEv(ptr noundef nonnull align 8 dereferenceable(184)) local_unnamed_addr #1 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 #1 align 2

declare void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { "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, !31, i64 533040}
!6 = !{!"_ZTS11cycle_model", !7, i64 0, !32, i64 232, !9, i64 416, !9, i64 424, !9, i64 432, !9, i64 440, !9, i64 448, !9, i64 456, !9, i64 464, !9, i64 472, !9, i64 480, !9, i64 488, !9, i64 496, !9, i64 504, !10, i64 512, !10, i64 262656, !10, i64 524800, !31, i64 532992, !10, i64 532996, !9, i64 533032, !31, i64 533040, !31, i64 533044, !31, i64 533048}
!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 = !{!30, !30, i64 0}
!41 = !{i8 0, i8 2}
!42 = !{}
!43 = !{!6, !9, i64 472}
!44 = !{!45, !45, i64 0}
!45 = !{!"vtable pointer", !11, i64 0}
!46 = !{!6, !9, i64 440}
!47 = !{!6, !9, i64 456}
!48 = !{!6, !9, i64 448}
!49 = !{!6, !9, i64 464}
!50 = !{!6, !9, i64 488}
!51 = !{!6, !9, i64 496}
!52 = distinct !{!52, !53}
!53 = !{!"llvm.loop.mustprogress"}
!54 = distinct !{!54, !53}
!55 = distinct !{!55, !53}
!56 = distinct !{!56, !53}
!57 = !{!6, !31, i64 533044}
!58 = !{!6, !9, i64 424}
!59 = distinct !{!59, !53}
!60 = !{!6, !9, i64 416}
!61 = !{!6, !9, i64 504}
!62 = distinct !{!62, !53}
!63 = distinct !{!63, !53}
!64 = !{!6, !31, i64 533048}
!65 = distinct !{!65, !53}
!66 = !{!6, !9, i64 432}
!67 = !{!31, !31, i64 0}
!68 = distinct !{!68, !53}
!69 = distinct !{!69, !53}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass