; LLVM IR from gem5/gem5 :: src/systemc/tests/systemc/misc/unit/structs/test3/test3.ll (ZN10arraytypes5entryEv)

; 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"

%struct.arr_struct1 = type { [4 x [4 x i8]] }
%struct.arr_struct2 = type { [4 x [4 x %"class.sc_dt::sc_uint"]] }
%"class.sc_dt::sc_uint" = 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_bit" = type { i8 }
%struct.arraytypes = type { %"class.sc_core::sc_module", %"class.sc_core::sc_in", %"class.sc_core::sc_in", %"class.sc_core::sc_in.13", %"class.sc_core::sc_in.21", %"class.sc_core::sc_out", %"class.sc_core::sc_out.36" }
%"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 }
%"class.sc_core::sc_in.13" = type { %"class.sc_core::sc_port.14", ptr, ptr }
%"class.sc_core::sc_port.14" = type { %"class.sc_core::sc_port_b.15" }
%"class.sc_core::sc_port_b.15" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.16" }
%"class.std::vector.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<arr_struct1> *, std::allocator<sc_core::sc_signal_in_if<arr_struct1> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<arr_struct1> *, std::allocator<sc_core::sc_signal_in_if<arr_struct1> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<arr_struct1> *, std::allocator<sc_core::sc_signal_in_if<arr_struct1> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<arr_struct1> *, std::allocator<sc_core::sc_signal_in_if<arr_struct1> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_in.21" = type { %"class.sc_core::sc_port.22", ptr, ptr }
%"class.sc_core::sc_port.22" = type { %"class.sc_core::sc_port_b.23" }
%"class.sc_core::sc_port_b.23" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.24" }
%"class.std::vector.24" = type { %"struct.std::_Vector_base.25" }
%"struct.std::_Vector_base.25" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<sc_dt::sc_lv<1>> *, std::allocator<sc_core::sc_signal_in_if<sc_dt::sc_lv<1>> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<sc_dt::sc_lv<1>> *, std::allocator<sc_core::sc_signal_in_if<sc_dt::sc_lv<1>> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<sc_dt::sc_lv<1>> *, std::allocator<sc_core::sc_signal_in_if<sc_dt::sc_lv<1>> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<sc_dt::sc_lv<1>> *, std::allocator<sc_core::sc_signal_in_if<sc_dt::sc_lv<1>> *>>::_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.29", ptr, 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_inout_if<arr_struct2> *, std::allocator<sc_core::sc_signal_inout_if<arr_struct2> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<arr_struct2> *, std::allocator<sc_core::sc_signal_inout_if<arr_struct2> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<arr_struct2> *, std::allocator<sc_core::sc_signal_inout_if<arr_struct2> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<arr_struct2> *, std::allocator<sc_core::sc_signal_inout_if<arr_struct2> *>>::_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_bit> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_bit> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<sc_dt::sc_bit> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_bit> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<sc_dt::sc_bit> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_bit> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<sc_dt::sc_bit> *, std::allocator<sc_core::sc_signal_inout_if<sc_dt::sc_bit> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10arraytypes5entryEv(ptr noundef nonnull align 8 dereferenceable(1288) %0) #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca [4 x [4 x i8]], align 16
  %4 = alloca %struct.arr_struct1, align 1
  %5 = alloca %struct.arr_struct2, align 8
  %6 = alloca %"class.sc_dt::sc_bit", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.sc_dt::sc_bit", align 1
  %15 = alloca %"class.sc_dt::sc_bit", align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %16 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 384, ptr %5) #6
  call void @_ZN11arr_struct2C2Ev(ptr noundef nonnull align 8 dereferenceable(384) %5)
  %17 = getelementptr inbounds %struct.arraytypes, ptr %16, i32 0, i32 6
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #6
  invoke void @_ZN5sc_dt6sc_bitC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %6, i32 noundef 0)
          to label %18 unwind label %31

18:                                               ; preds = %1
  invoke void @_ZN7sc_core8sc_inoutIN5sc_dt6sc_bitEE5writeERKS2_(ptr noundef nonnull align 8 dereferenceable(176) %17, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %19 unwind label %35

19:                                               ; preds = %18
  call void @_ZN5sc_dt6sc_bitD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  invoke void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %16)
          to label %20 unwind label %40

20:                                               ; preds = %19
  br label %21

21:                                               ; preds = %130, %20
  br label %22

22:                                               ; preds = %21
  br label %23

23:                                               ; preds = %30, %22
  %24 = getelementptr inbounds %struct.arraytypes, ptr %16, i32 0, i32 4
  %25 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7sc_core5sc_inIN5sc_dt5sc_lvILi1EEEE4readEv(ptr noundef nonnull align 8 dereferenceable(168) %24)
          to label %26 unwind label %40

26:                                               ; preds = %23
  %27 = invoke noundef zeroext i1 @_ZNK5sc_dt8sc_proxyINS_10sc_lv_baseEEeqEPKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef @.str)
          to label %28 unwind label %40

28:                                               ; preds = %26
  br i1 %27, label %29, label %44

29:                                               ; preds = %28
  invoke void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %16)
          to label %30 unwind label %40

30:                                               ; preds = %29
  br label %23, !llvm.loop !9

31:                                               ; preds = %1
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %7, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %8, align 4
  br label %39

35:                                               ; preds = %18
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %7, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %8, align 4
  call void @_ZN5sc_dt6sc_bitD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  br label %39

39:                                               ; preds = %35, %31
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  br label %149

40:                                               ; preds = %129, %125, %121, %119, %45, %44, %29, %26, %23, %19
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %7, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %8, align 4
  br label %149

44:                                               ; preds = %28
  invoke void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %16)
          to label %45 unwind label %40

45:                                               ; preds = %44
  %46 = getelementptr inbounds %struct.arraytypes, ptr %16, i32 0, i32 3
  %47 = invoke noundef nonnull align 1 dereferenceable(16) ptr @_ZNK7sc_core5sc_inI11arr_struct1E4readEv(ptr noundef nonnull align 8 dereferenceable(168) %46)
          to label %48 unwind label %40

48:                                               ; preds = %45
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %4, ptr align 1 %47, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !13
  br label %49

49:                                               ; preds = %77, %48
  %50 = load i32, ptr %9, align 4, !tbaa !13
  %51 = icmp slt i32 %50, 4
  br i1 %51, label %53, label %52

52:                                               ; preds = %49
  store i32 6, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %80

53:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !13
  br label %54

54:                                               ; preds = %73, %53
  %55 = load i32, ptr %11, align 4, !tbaa !13
  %56 = icmp slt i32 %55, 4
  br i1 %56, label %58, label %57

57:                                               ; preds = %54
  store i32 9, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %76

58:                                               ; preds = %54
  %59 = getelementptr inbounds %struct.arr_struct1, ptr %4, i32 0, i32 0
  %60 = load i32, ptr %9, align 4, !tbaa !13
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [4 x [4 x i8]], ptr %59, i64 0, i64 %61
  %63 = load i32, ptr %11, align 4, !tbaa !13
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [4 x i8], ptr %62, i64 0, i64 %64
  %66 = load i8, ptr %65, align 1, !tbaa !12
  %67 = load i32, ptr %9, align 4, !tbaa !13
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [4 x [4 x i8]], ptr %3, i64 0, i64 %68
  %70 = load i32, ptr %11, align 4, !tbaa !13
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [4 x i8], ptr %69, i64 0, i64 %71
  store i8 %66, ptr %72, align 1, !tbaa !12
  br label %73

73:                                               ; preds = %58
  %74 = load i32, ptr %11, align 4, !tbaa !13
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %11, align 4, !tbaa !13
  br label %54, !llvm.loop !15

76:                                               ; preds = %57
  br label %77

77:                                               ; preds = %76
  %78 = load i32, ptr %9, align 4, !tbaa !13
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %9, align 4, !tbaa !13
  br label %49, !llvm.loop !16

80:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !13
  br label %81

81:                                               ; preds = %116, %80
  %82 = load i32, ptr %12, align 4, !tbaa !13
  %83 = icmp slt i32 %82, 4
  br i1 %83, label %85, label %84

84:                                               ; preds = %81
  store i32 12, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %119

85:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !13
  br label %86

86:                                               ; preds = %108, %85
  %87 = load i32, ptr %13, align 4, !tbaa !13
  %88 = icmp slt i32 %87, 4
  br i1 %88, label %90, label %89

89:                                               ; preds = %86
  store i32 15, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %115

90:                                               ; preds = %86
  %91 = load i32, ptr %13, align 4, !tbaa !13
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [4 x [4 x i8]], ptr %3, i64 0, i64 %92
  %94 = load i32, ptr %12, align 4, !tbaa !13
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [4 x i8], ptr %93, i64 0, i64 %95
  %97 = load i8, ptr %96, align 1, !tbaa !12
  %98 = sext i8 %97 to i32
  %99 = getelementptr inbounds %struct.arr_struct2, ptr %5, i32 0, i32 0
  %100 = load i32, ptr %12, align 4, !tbaa !13
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [4 x [4 x %"class.sc_dt::sc_uint"]], ptr %99, i64 0, i64 %101
  %103 = load i32, ptr %13, align 4, !tbaa !13
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [4 x %"class.sc_dt::sc_uint"], ptr %102, i64 0, i64 %104
  %106 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi8EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %105, i32 noundef %98)
          to label %107 unwind label %111

107:                                              ; preds = %90
  br label %108

108:                                              ; preds = %107
  %109 = load i32, ptr %13, align 4, !tbaa !13
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %13, align 4, !tbaa !13
  br label %86, !llvm.loop !17

111:                                              ; preds = %90
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %7, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %149

115:                                              ; preds = %89
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %12, align 4, !tbaa !13
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %12, align 4, !tbaa !13
  br label %81, !llvm.loop !18

119:                                              ; preds = %84
  %120 = getelementptr inbounds %struct.arraytypes, ptr %16, i32 0, i32 5
  invoke void @_ZN7sc_core8sc_inoutI11arr_struct2E5writeERKS1_(ptr noundef nonnull align 8 dereferenceable(176) %120, ptr noundef nonnull align 8 dereferenceable(384) %5)
          to label %121 unwind label %40

121:                                              ; preds = %119
  invoke void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %16)
          to label %122 unwind label %40

122:                                              ; preds = %121
  %123 = getelementptr inbounds %struct.arraytypes, ptr %16, i32 0, i32 6
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  invoke void @_ZN5sc_dt6sc_bitC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %14, i32 noundef 1)
          to label %124 unwind label %131

124:                                              ; preds = %122
  invoke void @_ZN7sc_core8sc_inoutIN5sc_dt6sc_bitEE5writeERKS2_(ptr noundef nonnull align 8 dereferenceable(176) %123, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %125 unwind label %135

125:                                              ; preds = %124
  call void @_ZN5sc_dt6sc_bitD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  invoke void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %16)
          to label %126 unwind label %40

126:                                              ; preds = %125
  %127 = getelementptr inbounds %struct.arraytypes, ptr %16, i32 0, i32 6
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  invoke void @_ZN5sc_dt6sc_bitC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %15, i32 noundef 0)
          to label %128 unwind label %140

128:                                              ; preds = %126
  invoke void @_ZN7sc_core8sc_inoutIN5sc_dt6sc_bitEE5writeERKS2_(ptr noundef nonnull align 8 dereferenceable(176) %127, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %129 unwind label %144

129:                                              ; preds = %128
  call void @_ZN5sc_dt6sc_bitD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  invoke void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %16)
          to label %130 unwind label %40

130:                                              ; preds = %129
  br label %21, !llvm.loop !19

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

135:                                              ; preds = %124
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %7, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %8, align 4
  call void @_ZN5sc_dt6sc_bitD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  br label %139

139:                                              ; preds = %135, %131
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  br label %149

140:                                              ; preds = %126
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %7, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %8, align 4
  br label %148

144:                                              ; preds = %128
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %7, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %8, align 4
  call void @_ZN5sc_dt6sc_bitD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  br label %148

148:                                              ; preds = %144, %140
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  br label %149

149:                                              ; preds = %148, %139, %111, %40, %39
  call void @_ZN11arr_struct2D2Ev(ptr noundef nonnull align 8 dereferenceable(384) %5) #6
  call void @llvm.lifetime.end.p0(i64 384, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #6
  br label %150

150:                                              ; preds = %149
  %151 = load ptr, ptr %7, align 8
  %152 = load i32, ptr %8, align 4
  %153 = insertvalue { ptr, i32 } poison, ptr %151, 0
  %154 = insertvalue { ptr, i32 } %153, i32 %152, 1
  resume { ptr, i32 } %154
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK5sc_dt8sc_proxyINS_10sc_lv_baseEEeqEPKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

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

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

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


; 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"

%struct.arr_struct2 = type { [4 x [4 x %"class.sc_dt::sc_uint"]] }
%"class.sc_dt::sc_uint" = 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_bit" = type { i8 }

@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress noreturn uwtable
define dso_local void @_ZN10arraytypes5entryEv(ptr noundef nonnull align 8 dereferenceable(1288) %0) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %struct.arr_struct2, align 8
  %3 = alloca %"class.sc_dt::sc_bit", align 1
  %4 = alloca %"class.sc_dt::sc_bit", align 1
  %5 = alloca %"class.sc_dt::sc_bit", align 1
  call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %2) #6
  call void @_ZN11arr_struct2C2Ev(ptr noundef nonnull align 8 dereferenceable(384) %2)
  %6 = getelementptr inbounds i8, ptr %0, i64 1112
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #6
  invoke void @_ZN5sc_dt6sc_bitC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %3, i32 noundef 0)
          to label %7 unwind label %33

7:                                                ; preds = %1
  invoke void @_ZN7sc_core8sc_inoutIN5sc_dt6sc_bitEE5writeERKS2_(ptr noundef nonnull align 8 dereferenceable(176) %6, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %8 unwind label %35

8:                                                ; preds = %7
  call void @_ZN5sc_dt6sc_bitD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  invoke void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
          to label %.preheader35 unwind label %.loopexit.split-lp.loopexit.split-lp

.preheader35:                                     ; preds = %8
  %9 = getelementptr inbounds i8, ptr %0, i64 768
  %10 = getelementptr inbounds i8, ptr %0, i64 600
  %11 = getelementptr inbounds i8, ptr %0, i64 936
  %12 = getelementptr inbounds i8, ptr %2, i64 24
  %13 = getelementptr inbounds i8, ptr %2, i64 48
  %14 = getelementptr inbounds i8, ptr %2, i64 72
  %15 = getelementptr inbounds i8, ptr %2, i64 96
  %16 = getelementptr inbounds i8, ptr %2, i64 120
  %17 = getelementptr inbounds i8, ptr %2, i64 144
  %18 = getelementptr inbounds i8, ptr %2, i64 168
  %19 = getelementptr inbounds i8, ptr %2, i64 192
  %20 = getelementptr inbounds i8, ptr %2, i64 216
  %21 = getelementptr inbounds i8, ptr %2, i64 240
  %22 = getelementptr inbounds i8, ptr %2, i64 264
  %23 = getelementptr inbounds i8, ptr %2, i64 288
  %24 = getelementptr inbounds i8, ptr %2, i64 312
  %25 = getelementptr inbounds i8, ptr %2, i64 336
  %26 = getelementptr inbounds i8, ptr %2, i64 360
  br label %27

27:                                               ; preds = %.backedge, %.preheader35
  %28 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7sc_core5sc_inIN5sc_dt5sc_lvILi1EEEE4readEv(ptr noundef nonnull align 8 dereferenceable(168) %9)
          to label %29 unwind label %.loopexit

29:                                               ; preds = %27
  %30 = invoke noundef zeroext i1 @_ZNK5sc_dt8sc_proxyINS_10sc_lv_baseEEeqEPKc(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull @.str)
          to label %31 unwind label %.loopexit

31:                                               ; preds = %29
  br i1 %30, label %32, label %38

32:                                               ; preds = %31
  invoke void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
          to label %.backedge unwind label %.loopexit

.backedge:                                        ; preds = %32, %94
  br label %27, !llvm.loop !5

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

35:                                               ; preds = %7
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt6sc_bitD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  br label %37

37:                                               ; preds = %35, %33
  %.pn = phi { ptr, i32 } [ %36, %35 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  br label %.loopexit.split-lp

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

.loopexit.split-lp.loopexit:                      ; preds = %94, %91, %88, %85, %39, %38
  %lpad.loopexit36 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

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

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

39:                                               ; preds = %38
  %40 = invoke noundef nonnull align 1 dereferenceable(16) ptr @_ZNK7sc_core5sc_inI11arr_struct1E4readEv(ptr noundef nonnull align 8 dereferenceable(168) %10)
          to label %.preheader.preheader unwind label %.loopexit.split-lp.loopexit

.preheader.preheader:                             ; preds = %39
  %.sroa.0.sroa.0.0.copyload = load i8, ptr %40, align 1
  %.sroa.0.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 1
  %.sroa.0.sroa.4.0.copyload = load i8, ptr %.sroa.0.sroa.4.0..sroa_idx, align 1
  %.sroa.0.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 2
  %.sroa.0.sroa.5.0.copyload = load i8, ptr %.sroa.0.sroa.5.0..sroa_idx, align 1
  %.sroa.0.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 3
  %.sroa.0.sroa.6.0.copyload = load i8, ptr %.sroa.0.sroa.6.0..sroa_idx, align 1
  %.sroa.0.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 4
  %.sroa.0.sroa.7.0.copyload = load i8, ptr %.sroa.0.sroa.7.0..sroa_idx, align 1
  %.sroa.0.sroa.8.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 5
  %.sroa.0.sroa.8.0.copyload = load i8, ptr %.sroa.0.sroa.8.0..sroa_idx, align 1
  %.sroa.0.sroa.9.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 6
  %.sroa.0.sroa.9.0.copyload = load i8, ptr %.sroa.0.sroa.9.0..sroa_idx, align 1
  %.sroa.0.sroa.10.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 7
  %.sroa.0.sroa.10.0.copyload = load i8, ptr %.sroa.0.sroa.10.0..sroa_idx, align 1
  %.sroa.0.sroa.11.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 8
  %.sroa.0.sroa.11.0.copyload = load i8, ptr %.sroa.0.sroa.11.0..sroa_idx, align 1
  %.sroa.0.sroa.12.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 9
  %.sroa.0.sroa.12.0.copyload = load i8, ptr %.sroa.0.sroa.12.0..sroa_idx, align 1
  %.sroa.0.sroa.13.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 10
  %.sroa.0.sroa.13.0.copyload = load i8, ptr %.sroa.0.sroa.13.0..sroa_idx, align 1
  %.sroa.0.sroa.14.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 11
  %.sroa.0.sroa.14.0.copyload = load i8, ptr %.sroa.0.sroa.14.0..sroa_idx, align 1
  %.sroa.0.sroa.15.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 12
  %.sroa.0.sroa.15.0.copyload = load i8, ptr %.sroa.0.sroa.15.0..sroa_idx, align 1
  %.sroa.0.sroa.16.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 13
  %.sroa.0.sroa.16.0.copyload = load i8, ptr %.sroa.0.sroa.16.0..sroa_idx, align 1
  %.sroa.0.sroa.17.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 14
  %.sroa.0.sroa.17.0.copyload = load i8, ptr %.sroa.0.sroa.17.0..sroa_idx, align 1
  %.sroa.0.sroa.18.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 15
  %.sroa.0.sroa.18.0.copyload = load i8, ptr %.sroa.0.sroa.18.0..sroa_idx, align 1, !tbaa !7
  %41 = sext i8 %.sroa.0.sroa.0.0.copyload to i32
  %42 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi8EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef %41)
          to label %43 unwind label %86

43:                                               ; preds = %.preheader.preheader
  %44 = sext i8 %.sroa.0.sroa.7.0.copyload to i32
  %45 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi8EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %12, i32 noundef %44)
          to label %46 unwind label %86

46:                                               ; preds = %43
  %47 = sext i8 %.sroa.0.sroa.11.0.copyload to i32
  %48 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi8EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %13, i32 noundef %47)
          to label %49 unwind label %86

49:                                               ; preds = %46
  %50 = sext i8 %.sroa.0.sroa.15.0.copyload to i32
  %51 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi8EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %14, i32 noundef %50)
          to label %.preheader.1 unwind label %86

.preheader.1:                                     ; preds = %49
  %52 = sext i8 %.sroa.0.sroa.4.0.copyload to i32
  %53 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi8EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %15, i32 noundef %52)
          to label %54 unwind label %86

54:                                               ; preds = %.preheader.1
  %55 = sext i8 %.sroa.0.sroa.8.0.copyload to i32
  %56 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi8EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %16, i32 noundef %55)
          to label %57 unwind label %86

57:                                               ; preds = %54
  %58 = sext i8 %.sroa.0.sroa.12.0.copyload to i32
  %59 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi8EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %17, i32 noundef %58)
          to label %60 unwind label %86

60:                                               ; preds = %57
  %61 = sext i8 %.sroa.0.sroa.16.0.copyload to i32
  %62 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi8EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %18, i32 noundef %61)
          to label %.preheader.2 unwind label %86

.preheader.2:                                     ; preds = %60
  %63 = sext i8 %.sroa.0.sroa.5.0.copyload to i32
  %64 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi8EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %19, i32 noundef %63)
          to label %65 unwind label %86

65:                                               ; preds = %.preheader.2
  %66 = sext i8 %.sroa.0.sroa.9.0.copyload to i32
  %67 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi8EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %20, i32 noundef %66)
          to label %68 unwind label %86

68:                                               ; preds = %65
  %69 = sext i8 %.sroa.0.sroa.13.0.copyload to i32
  %70 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi8EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %21, i32 noundef %69)
          to label %71 unwind label %86

71:                                               ; preds = %68
  %72 = sext i8 %.sroa.0.sroa.17.0.copyload to i32
  %73 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi8EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %22, i32 noundef %72)
          to label %.preheader.3 unwind label %86

.preheader.3:                                     ; preds = %71
  %74 = sext i8 %.sroa.0.sroa.6.0.copyload to i32
  %75 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi8EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %23, i32 noundef %74)
          to label %76 unwind label %86

76:                                               ; preds = %.preheader.3
  %77 = sext i8 %.sroa.0.sroa.10.0.copyload to i32
  %78 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi8EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %24, i32 noundef %77)
          to label %79 unwind label %86

79:                                               ; preds = %76
  %80 = sext i8 %.sroa.0.sroa.14.0.copyload to i32
  %81 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi8EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %25, i32 noundef %80)
          to label %82 unwind label %86

82:                                               ; preds = %79
  %83 = sext i8 %.sroa.0.sroa.18.0.copyload to i32
  %84 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN5sc_dt7sc_uintILi8EEaSEi(ptr noundef nonnull align 8 dereferenceable(24) %26, i32 noundef %83)
          to label %85 unwind label %86

85:                                               ; preds = %82
  invoke void @_ZN7sc_core8sc_inoutI11arr_struct2E5writeERKS1_(ptr noundef nonnull align 8 dereferenceable(176) %11, ptr noundef nonnull align 8 dereferenceable(384) %2)
          to label %88 unwind label %.loopexit.split-lp.loopexit

86:                                               ; preds = %82, %79, %76, %.preheader.3, %71, %68, %65, %.preheader.2, %60, %57, %54, %.preheader.1, %49, %46, %43, %.preheader.preheader
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

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

89:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  invoke void @_ZN5sc_dt6sc_bitC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %4, i32 noundef 1)
          to label %90 unwind label %95

90:                                               ; preds = %89
  invoke void @_ZN7sc_core8sc_inoutIN5sc_dt6sc_bitEE5writeERKS2_(ptr noundef nonnull align 8 dereferenceable(176) %6, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %91 unwind label %97

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

92:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #6
  invoke void @_ZN5sc_dt6sc_bitC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %5, i32 noundef 0)
          to label %93 unwind label %100

93:                                               ; preds = %92
  invoke void @_ZN7sc_core8sc_inoutIN5sc_dt6sc_bitEE5writeERKS2_(ptr noundef nonnull align 8 dereferenceable(176) %6, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %94 unwind label %102

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

95:                                               ; preds = %89
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %99

97:                                               ; preds = %90
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt6sc_bitD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  br label %99

99:                                               ; preds = %97, %95
  %.pn27 = phi { ptr, i32 } [ %98, %97 ], [ %96, %95 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  br label %.loopexit.split-lp

100:                                              ; preds = %92
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %104

102:                                              ; preds = %93
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5sc_dt6sc_bitD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  br label %104

104:                                              ; preds = %102, %100
  %.pn29 = phi { ptr, i32 } [ %103, %102 ], [ %101, %100 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  br label %.loopexit.split-lp

.loopexit.split-lp:                               ; preds = %.loopexit, %.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %104, %99, %86, %37
  %.pn31 = phi { ptr, i32 } [ %87, %86 ], [ %.pn29, %104 ], [ %.pn27, %99 ], [ %.pn, %37 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit36, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp37, %.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZN11arr_struct2D2Ev(ptr noundef nonnull align 8 dereferenceable(384) %2) #6
  call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn31
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7sc_core5sc_inIN5sc_dt5sc_lvILi1EEEE4readEv(ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7sc_core8sc_inoutI11arr_struct2E5writeERKS1_(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #3 align 2

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

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

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

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


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