; LLVM IR from gem5/gem5 :: src/systemc/tests/systemc/examples/trie/trie.ll (ZN2lc6threadEv)

; 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_uint.45" = type { %"class.sc_dt::sc_uint_base" }
%"class.sc_dt::sc_uint_base" = type { %"class.sc_dt::sc_value_base", i64, i32, i32 }
%"class.sc_dt::sc_value_base" = type { ptr }
%"class.sc_dt::sc_uint" = type { %"class.sc_dt::sc_uint_base" }
%"class.sc_dt::sc_uint.46" = type { %"class.sc_dt::sc_uint_base" }
%struct.lc = type { %"class.sc_core::sc_module", %"class.sc_core::sc_out", %"class.sc_core::sc_in", %"class.sc_core::sc_in.20", %"class.sc_core::sc_in.28", %"class.sc_core::sc_in", %"class.sc_core::sc_out", %"class.sc_core::sc_out.36", %"class.sc_core::sc_in", %"class.sc_core::sc_in", [1024 x %"class.sc_dt::sc_uint"], %"class.sc_dt::sc_uint" }
%"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.20" = type { %"class.sc_core::sc_port.21", ptr, ptr }
%"class.sc_core::sc_port.21" = type { %"class.sc_core::sc_port_b.22" }
%"class.sc_core::sc_port_b.22" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.23" }
%"class.sc_core::sc_port_base" = type { %"class.sc_core::sc_object", ptr }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<sc_dt::sc_uint<2>> *, std::allocator<sc_core::sc_signal_in_if<sc_dt::sc_uint<2>> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<sc_dt::sc_uint<2>> *, std::allocator<sc_core::sc_signal_in_if<sc_dt::sc_uint<2>> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<sc_dt::sc_uint<2>> *, std::allocator<sc_core::sc_signal_in_if<sc_dt::sc_uint<2>> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<sc_dt::sc_uint<2>> *, std::allocator<sc_core::sc_signal_in_if<sc_dt::sc_uint<2>> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_in.28" = type { %"class.sc_core::sc_port.29", ptr, ptr }
%"class.sc_core::sc_port.29" = type { %"class.sc_core::sc_port_b.30" }
%"class.sc_core::sc_port_b.30" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.31" }
%"class.std::vector.31" = type { %"struct.std::_Vector_base.32" }
%"struct.std::_Vector_base.32" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<sc_dt::sc_uint<32>> *, std::allocator<sc_core::sc_signal_in_if<sc_dt::sc_uint<32>> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<sc_dt::sc_uint<32>> *, std::allocator<sc_core::sc_signal_in_if<sc_dt::sc_uint<32>> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<sc_dt::sc_uint<32>> *, std::allocator<sc_core::sc_signal_in_if<sc_dt::sc_uint<32>> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<sc_dt::sc_uint<32>> *, std::allocator<sc_core::sc_signal_in_if<sc_dt::sc_uint<32>> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_out" = type { %"class.sc_core::sc_inout" }
%"class.sc_core::sc_inout" = type { %"class.sc_core::sc_port", ptr, 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.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<bool> *, std::allocator<sc_core::sc_signal_inout_if<bool> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<bool> *, std::allocator<sc_core::sc_signal_inout_if<bool> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<bool> *, std::allocator<sc_core::sc_signal_inout_if<bool> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<bool> *, std::allocator<sc_core::sc_signal_inout_if<bool> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_out.36" = type { %"class.sc_core::sc_inout.37" }
%"class.sc_core::sc_inout.37" = type { %"class.sc_core::sc_port.38", ptr, ptr, ptr }
%"class.sc_core::sc_port.38" = type { %"class.sc_core::sc_port_b.39" }
%"class.sc_core::sc_port_b.39" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.40" }
%"class.std::vector.40" = type { %"struct.std::_Vector_base.41" }
%"struct.std::_Vector_base.41" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<sc_dt::sc_uint<32>> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_uint<32>> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<sc_dt::sc_uint<32>> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_uint<32>> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<sc_dt::sc_uint<32>> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_uint<32>> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<sc_dt::sc_uint<32>> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_uint<32>> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_in" = type { %"class.sc_core::sc_port.13", ptr, ptr, ptr, ptr }
%"class.sc_core::sc_port.13" = type { %"class.sc_core::sc_port_b.14" }
%"class.sc_core::sc_port_b.14" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.15" }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2lc6threadEv(ptr noundef nonnull align 8 dereferenceable(26464) %0) #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i8, align 1
  %4 = alloca i8, align 1
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca %"class.sc_dt::sc_uint.45", align 8
  %8 = alloca %"class.sc_dt::sc_uint", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.sc_dt::sc_uint", align 8
  %12 = alloca %"class.sc_dt::sc_uint.46", align 8
  %13 = alloca %"class.sc_dt::sc_uint", align 8
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca i8, align 1
  %17 = alloca i8, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %18 = load ptr, ptr %2, align 8
  %19 = getelementptr inbounds %struct.lc, ptr %18, i32 0, i32 8
  %20 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK7sc_core5sc_inIbEcvRKbEv(ptr noundef nonnull align 8 dereferenceable(184) %19)
  %21 = load i8, ptr %20, align 1, !tbaa !9, !range !11, !noundef !12
  %22 = trunc i8 %21 to i1
  br i1 %22, label %28, label %23

23:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #4
  store i8 1, ptr %3, align 1, !tbaa !9
  %24 = getelementptr inbounds %struct.lc, ptr %18, i32 0, i32 1
  %25 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192) %24, ptr noundef nonnull align 1 dereferenceable(1) %3)
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #4
  store i8 0, ptr %4, align 1, !tbaa !9
  %26 = getelementptr inbounds %struct.lc, ptr %18, i32 0, i32 6
  %27 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192) %26, ptr noundef nonnull align 1 dereferenceable(1) %4)
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #4
  call void @_ZN7sc_core9sc_module4waitEi(ptr noundef nonnull align 8 dereferenceable(232) %18, i32 noundef 1)
  br label %28

28:                                               ; preds = %23, %1
  br label %29

29:                                               ; preds = %159, %28
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #4
  call void @_ZN5sc_dt7sc_uintILi2EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7)
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #4
  invoke void @_ZN5sc_dt7sc_uintILi32EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %30 unwind label %63

30:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #4
  invoke void @_ZN5sc_dt7sc_uintILi32EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %31 unwind label %67

31:                                               ; preds = %30
  br label %32

32:                                               ; preds = %50, %31
  %33 = getelementptr inbounds %struct.lc, ptr %18, i32 0, i32 2
  %34 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNK7sc_core5sc_inIbE4readEv(ptr noundef nonnull align 8 dereferenceable(184) %33)
          to label %35 unwind label %71

35:                                               ; preds = %32
  %36 = load i8, ptr %34, align 1, !tbaa !9, !range !11, !noundef !12
  %37 = trunc i8 %36 to i1
  %38 = zext i1 %37 to i8
  store i8 %38, ptr %5, align 1, !tbaa !9
  %39 = getelementptr inbounds %struct.lc, ptr %18, i32 0, i32 3
  %40 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7sc_core5sc_inIN5sc_dt7sc_uintILi2EEEE4readEv(ptr noundef nonnull align 8 dereferenceable(168) %39)
          to label %41 unwind label %71

41:                                               ; preds = %35
  %42 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi2EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %40)
          to label %43 unwind label %71

43:                                               ; preds = %41
  %44 = getelementptr inbounds %struct.lc, ptr %18, i32 0, i32 4
  %45 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7sc_core5sc_inIN5sc_dt7sc_uintILi32EEEE4readEv(ptr noundef nonnull align 8 dereferenceable(168) %44)
          to label %46 unwind label %71

46:                                               ; preds = %43
  %47 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi32EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %45)
          to label %48 unwind label %71

48:                                               ; preds = %46
  invoke void @_ZN7sc_core9sc_module4waitEi(ptr noundef nonnull align 8 dereferenceable(232) %18, i32 noundef 1)
          to label %49 unwind label %71

49:                                               ; preds = %48
  br label %50

50:                                               ; preds = %49
  %51 = load i8, ptr %5, align 1, !tbaa !9, !range !11, !noundef !12
  %52 = trunc i8 %51 to i1
  %53 = xor i1 %52, true
  br i1 %53, label %32, label %54, !llvm.loop !13

54:                                               ; preds = %50
  %55 = invoke noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %56 unwind label %71

56:                                               ; preds = %54
  %57 = icmp eq i64 %55, 0
  br i1 %57, label %58, label %75

58:                                               ; preds = %56
  %59 = getelementptr inbounds %struct.lc, ptr %18, i32 0, i32 11
  %60 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi32EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %59, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %61 unwind label %71

61:                                               ; preds = %58
  invoke void @_ZN7sc_core9sc_module4waitEi(ptr noundef nonnull align 8 dereferenceable(232) %18, i32 noundef 1)
          to label %62 unwind label %71

62:                                               ; preds = %61
  br label %159

63:                                               ; preds = %29
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %9, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %10, align 4
  br label %162

67:                                               ; preds = %30
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %9, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %10, align 4
  br label %161

71:                                               ; preds = %122, %117, %105, %102, %90, %88, %86, %83, %79, %75, %61, %58, %54, %48, %46, %43, %41, %35, %32
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %9, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %10, align 4
  br label %160

75:                                               ; preds = %56
  %76 = invoke noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %77 unwind label %71

77:                                               ; preds = %75
  %78 = icmp eq i64 %76, 1
  br i1 %78, label %79, label %88

79:                                               ; preds = %77
  %80 = getelementptr inbounds %struct.lc, ptr %18, i32 0, i32 10
  %81 = getelementptr inbounds %struct.lc, ptr %18, i32 0, i32 11
  %82 = invoke noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %81)
          to label %83 unwind label %71

83:                                               ; preds = %79
  %84 = getelementptr inbounds [1024 x %"class.sc_dt::sc_uint"], ptr %80, i64 0, i64 %82
  %85 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi32EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %84, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %86 unwind label %71

86:                                               ; preds = %83
  invoke void @_ZN7sc_core9sc_module4waitEi(ptr noundef nonnull align 8 dereferenceable(232) %18, i32 noundef 1)
          to label %87 unwind label %71

87:                                               ; preds = %86
  br label %158

88:                                               ; preds = %77
  %89 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt12sc_uint_baseixEi(ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef 1)
          to label %90 unwind label %71

90:                                               ; preds = %88
  %91 = invoke noundef i64 @_ZNK5sc_dt16sc_uint_bitref_rcvyEv(ptr noundef nonnull align 8 dereferenceable(24) %89)
          to label %92 unwind label %71

92:                                               ; preds = %90
  %93 = icmp eq i64 %91, 1
  br i1 %93, label %94, label %157

94:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #4
  invoke void @_ZN5sc_dt7sc_uintILi32EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %95 unwind label %127

95:                                               ; preds = %94
  invoke void @_ZN2lc6lookupEN5sc_dt7sc_uintILi32EEE(ptr dead_on_unwind writable sret(%"class.sc_dt::sc_uint.46") align 8 %12, ptr noundef nonnull align 8 dereferenceable(26464) %18, ptr noundef %13)
          to label %96 unwind label %131

96:                                               ; preds = %95
  %97 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi32EEaSERKNS_12sc_uint_baseE(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %98 unwind label %135

98:                                               ; preds = %96
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #4
  store i8 0, ptr %14, align 1, !tbaa !9
  %99 = getelementptr inbounds %struct.lc, ptr %18, i32 0, i32 1
  %100 = invoke noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192) %99, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %101 unwind label %141

101:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #4
  br label %102

102:                                              ; preds = %110, %101
  %103 = getelementptr inbounds %struct.lc, ptr %18, i32 0, i32 5
  %104 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNK7sc_core5sc_inIbE4readEv(ptr noundef nonnull align 8 dereferenceable(184) %103)
          to label %105 unwind label %71

105:                                              ; preds = %102
  %106 = load i8, ptr %104, align 1, !tbaa !9, !range !11, !noundef !12
  %107 = trunc i8 %106 to i1
  %108 = zext i1 %107 to i8
  store i8 %108, ptr %6, align 1, !tbaa !9
  invoke void @_ZN7sc_core9sc_module4waitEi(ptr noundef nonnull align 8 dereferenceable(232) %18, i32 noundef 1)
          to label %109 unwind label %71

109:                                              ; preds = %105
  br label %110

110:                                              ; preds = %109
  %111 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %112 = trunc i8 %111 to i1
  %113 = xor i1 %112, true
  br i1 %113, label %102, label %114, !llvm.loop !15

114:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #4
  store i8 1, ptr %15, align 1, !tbaa !9
  %115 = getelementptr inbounds %struct.lc, ptr %18, i32 0, i32 6
  %116 = invoke noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192) %115, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %117 unwind label %145

117:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  %118 = getelementptr inbounds %struct.lc, ptr %18, i32 0, i32 7
  invoke void @_ZN7sc_core8sc_inoutIN5sc_dt7sc_uintILi32EEEE5writeERKS3_(ptr noundef nonnull align 8 dereferenceable(176) %118, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %119 unwind label %71

119:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #4
  store i8 1, ptr %16, align 1, !tbaa !9
  %120 = getelementptr inbounds %struct.lc, ptr %18, i32 0, i32 1
  %121 = invoke noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192) %120, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %122 unwind label %149

122:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  invoke void @_ZN7sc_core9sc_module4waitEi(ptr noundef nonnull align 8 dereferenceable(232) %18, i32 noundef 1)
          to label %123 unwind label %71

123:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #4
  store i8 0, ptr %17, align 1, !tbaa !9
  %124 = getelementptr inbounds %struct.lc, ptr %18, i32 0, i32 6
  %125 = invoke noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192) %124, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %126 unwind label %153

126:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  br label %157

127:                                              ; preds = %94
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %9, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %10, align 4
  br label %140

131:                                              ; preds = %95
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %9, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %10, align 4
  br label %139

135:                                              ; preds = %96
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %9, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %10, align 4
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  br label %139

139:                                              ; preds = %135, %131
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  br label %140

140:                                              ; preds = %139, %127
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  br label %160

141:                                              ; preds = %98
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %9, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #4
  br label %160

145:                                              ; preds = %114
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %9, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  br label %160

149:                                              ; preds = %119
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %9, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  br label %160

153:                                              ; preds = %123
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %9, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  br label %160

157:                                              ; preds = %126, %92
  br label %158

158:                                              ; preds = %157, %87
  br label %159

159:                                              ; preds = %158, %62
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  br label %29, !llvm.loop !16

160:                                              ; preds = %153, %149, %145, %141, %140, %71
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  br label %161

161:                                              ; preds = %160, %67
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  br label %162

162:                                              ; preds = %161, %63
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  br label %163

163:                                              ; preds = %162
  %164 = load ptr, ptr %9, align 8
  %165 = load i32, ptr %10, align 4
  %166 = insertvalue { ptr, i32 } poison, ptr %164, 0
  %167 = insertvalue { ptr, i32 } %166, i32 %165, 1
  resume { ptr, i32 } %167
}

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZNK5sc_dt16sc_uint_bitref_rcvyEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

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

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

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


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

%"class.sc_dt::sc_uint.45" = type { %"class.sc_dt::sc_uint_base" }
%"class.sc_dt::sc_uint_base" = type { %"class.sc_dt::sc_value_base", i64, i32, i32 }
%"class.sc_dt::sc_value_base" = type { ptr }
%"class.sc_dt::sc_uint" = type { %"class.sc_dt::sc_uint_base" }
%"class.sc_dt::sc_uint.46" = type { %"class.sc_dt::sc_uint_base" }

; Function Attrs: mustprogress noreturn uwtable
define dso_local void @_ZN2lc6threadEv(ptr noundef nonnull align 8 dereferenceable(26464) %0) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i8, align 1
  %3 = alloca i8, align 1
  %4 = alloca %"class.sc_dt::sc_uint.45", align 8
  %5 = alloca %"class.sc_dt::sc_uint", align 8
  %6 = alloca %"class.sc_dt::sc_uint", align 8
  %7 = alloca %"class.sc_dt::sc_uint.46", align 8
  %8 = alloca %"class.sc_dt::sc_uint", align 8
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = getelementptr inbounds i8, ptr %0, i64 1496
  %14 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK7sc_core5sc_inIbEcvRKbEv(ptr noundef nonnull align 8 dereferenceable(184) %13)
  %15 = load i8, ptr %14, align 1, !tbaa !5, !range !9, !noundef !10
  %16 = trunc nuw i8 %15 to i1
  br i1 %16, label %22, label %17

17:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #5
  store i8 1, ptr %2, align 1, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %0, i64 232
  %19 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192) %18, ptr noundef nonnull align 1 dereferenceable(1) %2)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  store i8 0, ptr %3, align 1, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %0, i64 1128
  %21 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192) %20, ptr noundef nonnull align 1 dereferenceable(1) %3)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  call void @_ZN7sc_core9sc_module4waitEi(ptr noundef nonnull align 8 dereferenceable(232) %0, i32 noundef 1)
  br label %22

22:                                               ; preds = %17, %1
  %23 = getelementptr inbounds i8, ptr %0, i64 424
  %24 = getelementptr inbounds i8, ptr %0, i64 608
  %25 = getelementptr inbounds i8, ptr %0, i64 776
  %26 = getelementptr inbounds i8, ptr %0, i64 232
  %27 = getelementptr inbounds i8, ptr %0, i64 944
  %28 = getelementptr inbounds i8, ptr %0, i64 1128
  %29 = getelementptr inbounds i8, ptr %0, i64 1320
  %30 = getelementptr inbounds i8, ptr %0, i64 1864
  %31 = getelementptr inbounds i8, ptr %0, i64 26440
  br label %32

32:                                               ; preds = %103, %22
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_ZN5sc_dt7sc_uintILi2EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  invoke void @_ZN5sc_dt7sc_uintILi32EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %33 unwind label %48

33:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  invoke void @_ZN5sc_dt7sc_uintILi32EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %.preheader unwind label %50

.preheader:                                       ; preds = %33, %44
  %34 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNK7sc_core5sc_inIbE4readEv(ptr noundef nonnull align 8 dereferenceable(184) %23)
          to label %35 unwind label %.loopexit.split-lp.loopexit

35:                                               ; preds = %.preheader
  %36 = load i8, ptr %34, align 1, !tbaa !5, !range !9, !noundef !10
  %37 = trunc nuw i8 %36 to i1
  %38 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7sc_core5sc_inIN5sc_dt7sc_uintILi2EEEE4readEv(ptr noundef nonnull align 8 dereferenceable(168) %24)
          to label %39 unwind label %.loopexit.split-lp.loopexit

39:                                               ; preds = %35
  %40 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi2EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %38)
  %41 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7sc_core5sc_inIN5sc_dt7sc_uintILi32EEEE4readEv(ptr noundef nonnull align 8 dereferenceable(168) %25)
          to label %42 unwind label %.loopexit.split-lp.loopexit

42:                                               ; preds = %39
  %43 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi32EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %41)
  invoke void @_ZN7sc_core9sc_module4waitEi(ptr noundef nonnull align 8 dereferenceable(232) %0, i32 noundef 1)
          to label %44 unwind label %.loopexit.split-lp.loopexit

44:                                               ; preds = %42
  br i1 %37, label %45, label %.preheader, !llvm.loop !11

45:                                               ; preds = %44
  %46 = call noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %47 = icmp eq i64 %46, 0
  br i1 %47, label %.invoke, label %52

48:                                               ; preds = %32
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %105

50:                                               ; preds = %33
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %104

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

.loopexit.split-lp.loopexit:                      ; preds = %42, %39, %35, %.preheader
  %lpad.loopexit15 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp:             ; preds = %.invoke, %83, %80, %61, %59
  %lpad.loopexit.split-lp16 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

52:                                               ; preds = %45
  %53 = call noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %54 = icmp eq i64 %53, 1
  br i1 %54, label %55, label %59

55:                                               ; preds = %52
  %56 = call noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24) %31)
  %57 = getelementptr inbounds [1024 x %"class.sc_dt::sc_uint"], ptr %30, i64 0, i64 %56
  br label %.invoke

.invoke:                                          ; preds = %45, %55
  %.sink = phi ptr [ %57, %55 ], [ %31, %45 ]
  %58 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi32EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %.sink, ptr noundef nonnull align 8 dereferenceable(24) %5)
  invoke void @_ZN7sc_core9sc_module4waitEi(ptr noundef nonnull align 8 dereferenceable(232) %0, i32 noundef 1)
          to label %103 unwind label %.loopexit.split-lp.loopexit.split-lp

59:                                               ; preds = %52
  %60 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt12sc_uint_baseixEi(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef 1)
          to label %61 unwind label %.loopexit.split-lp.loopexit.split-lp

61:                                               ; preds = %59
  %62 = invoke noundef i64 @_ZNK5sc_dt16sc_uint_bitref_rcvyEv(ptr noundef nonnull align 8 dereferenceable(24) %60)
          to label %63 unwind label %.loopexit.split-lp.loopexit.split-lp

63:                                               ; preds = %61
  %64 = icmp eq i64 %62, 1
  br i1 %64, label %65, label %103

65:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  invoke void @_ZN5sc_dt7sc_uintILi32EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %66 unwind label %87

66:                                               ; preds = %65
  invoke void @_ZN2lc6lookupEN5sc_dt7sc_uintILi32EEE(ptr dead_on_unwind nonnull writable sret(%"class.sc_dt::sc_uint.46") align 8 %7, ptr noundef nonnull align 8 dereferenceable(26464) %0, ptr noundef nonnull %8)
          to label %67 unwind label %89

67:                                               ; preds = %66
  %68 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi32EEaSERKNS_12sc_uint_baseE(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %69 unwind label %91

69:                                               ; preds = %67
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  store i8 0, ptr %9, align 1, !tbaa !5
  %70 = invoke noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192) %26, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %71 unwind label %95

71:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  br label %72

72:                                               ; preds = %76, %71
  %73 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNK7sc_core5sc_inIbE4readEv(ptr noundef nonnull align 8 dereferenceable(184) %27)
          to label %74 unwind label %.loopexit

74:                                               ; preds = %72
  %75 = load i8, ptr %73, align 1, !tbaa !5, !range !9, !noundef !10
  invoke void @_ZN7sc_core9sc_module4waitEi(ptr noundef nonnull align 8 dereferenceable(232) %0, i32 noundef 1)
          to label %76 unwind label %.loopexit

76:                                               ; preds = %74
  %77 = trunc nuw i8 %75 to i1
  br i1 %77, label %78, label %72, !llvm.loop !13

78:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #5
  store i8 1, ptr %10, align 1, !tbaa !5
  %79 = invoke noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192) %28, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %80 unwind label %97

80:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #5
  invoke void @_ZN7sc_core8sc_inoutIN5sc_dt7sc_uintILi32EEEE5writeERKS3_(ptr noundef nonnull align 8 dereferenceable(176) %29, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %81 unwind label %.loopexit.split-lp.loopexit.split-lp

81:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #5
  store i8 1, ptr %11, align 1, !tbaa !5
  %82 = invoke noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192) %26, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %83 unwind label %99

83:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  invoke void @_ZN7sc_core9sc_module4waitEi(ptr noundef nonnull align 8 dereferenceable(232) %0, i32 noundef 1)
          to label %84 unwind label %.loopexit.split-lp.loopexit.split-lp

84:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #5
  store i8 0, ptr %12, align 1, !tbaa !5
  %85 = invoke noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192) %28, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %86 unwind label %101

86:                                               ; preds = %84
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  br label %103

87:                                               ; preds = %65
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %94

89:                                               ; preds = %66
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %93

91:                                               ; preds = %67
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  br label %93

93:                                               ; preds = %91, %89
  %.pn = phi { ptr, i32 } [ %92, %91 ], [ %90, %89 ]
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  br label %94

94:                                               ; preds = %93, %87
  %.pn.pn = phi { ptr, i32 } [ %.pn, %93 ], [ %88, %87 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  br label %.loopexit.split-lp

95:                                               ; preds = %69
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  br label %.loopexit.split-lp

97:                                               ; preds = %78
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #5
  br label %.loopexit.split-lp

99:                                               ; preds = %81
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  br label %.loopexit.split-lp

101:                                              ; preds = %84
  %102 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  br label %.loopexit.split-lp

103:                                              ; preds = %.invoke, %86, %63
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  br label %32, !llvm.loop !14

.loopexit.split-lp:                               ; preds = %.loopexit, %.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %101, %99, %97, %95, %94
  %.pn11 = phi { ptr, i32 } [ %102, %101 ], [ %100, %99 ], [ %98, %97 ], [ %96, %95 ], [ %.pn.pn, %94 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit15, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp16, %.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  br label %104

104:                                              ; preds = %.loopexit.split-lp, %50
  %.pn11.pn = phi { ptr, i32 } [ %.pn11, %.loopexit.split-lp ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %105

105:                                              ; preds = %104, %48
  %.pn11.pn.pn = phi { ptr, i32 } [ %.pn11.pn, %104 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @_ZN5sc_dt13sc_value_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn11.pn.pn
}

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK5sc_dt12sc_uint_basecvyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZNK5sc_dt16sc_uint_bitref_rcvyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2lc6lookupEN5sc_dt7sc_uintILi32EEE(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::sc_uint.46") align 8, ptr noundef nonnull align 8 dereferenceable(26464), ptr noundef) local_unnamed_addr #1 align 2

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

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

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

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

attributes #0 = { mustprogress noreturn uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass