; LLVM IR from ShahjalalShohag/code-library :: Math/BerleKamp Massey.ll (Z15BerlekampMasseySt6vectorI6modintILi1000000007EESaIS1_EE)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<modint<1000000007>, std::allocator<modint<1000000007>>>::_Vector_impl" }
%"struct.std::_Vector_base<modint<1000000007>, std::allocator<modint<1000000007>>>::_Vector_impl" = type { %"struct.std::_Vector_base<modint<1000000007>, std::allocator<modint<1000000007>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<modint<1000000007>, std::allocator<modint<1000000007>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%struct.modint = type { i32 }
%"class.__gnu_cxx::__normal_iterator.0" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z15BerlekampMasseySt6vectorI6modintILi1000000007EESaIS1_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i1, align 1
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::vector", align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca %"class.std::vector", align 8
  %15 = alloca %struct.modint, align 4
  %16 = alloca %struct.modint, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %struct.modint, align 4
  %20 = alloca i32, align 4
  %21 = alloca %struct.modint, align 4
  %22 = alloca %struct.modint, align 4
  %23 = alloca %struct.modint, align 4
  %24 = alloca %struct.modint, align 4
  %25 = alloca %struct.modint, align 4
  %26 = alloca i32, align 4
  %27 = alloca %struct.modint, align 4
  %28 = alloca %struct.modint, align 4
  %29 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %30 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %32 = alloca ptr, align 8
  %33 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %34 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %35 = alloca ptr, align 8
  %36 = alloca %struct.modint, align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %37 = call noundef i64 @_ZNKSt6vectorI6modintILi1000000007EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %38 = trunc i64 %37 to i32
  store i32 %38, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !9
  store i1 false, ptr %8, align 1
  %39 = load i32, ptr %5, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #6
  call void @_ZNSaI6modintILi1000000007EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  invoke void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %40, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %41 unwind label %54

41:                                               ; preds = %2
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #6
  %42 = load i32, ptr %5, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #6
  call void @_ZNSaI6modintILi1000000007EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  invoke void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %43, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %44 unwind label %58

44:                                               ; preds = %41
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  invoke void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %15, i32 noundef 1)
          to label %45 unwind label %62

45:                                               ; preds = %44
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 0) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 4 %15, i64 4, i1 false), !tbaa.struct !11
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %47, ptr align 4 %46, i64 4, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  invoke void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %16, i32 noundef 1)
          to label %48 unwind label %66

48:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %49

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

53:                                               ; preds = %49
  store i32 2, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %185

54:                                               ; preds = %2
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %10, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %11, align 4
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  br label %231

58:                                               ; preds = %41
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %10, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %11, align 4
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  br label %228

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

66:                                               ; preds = %185, %45
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %10, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %11, align 4
  br label %226

70:                                               ; preds = %49
  %71 = load i32, ptr %7, align 4, !tbaa !9
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %73 = load i32, ptr %17, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %74) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %75, i64 4, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 1, ptr %20, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %99, %70
  %77 = load i32, ptr %20, align 4, !tbaa !9
  %78 = load i32, ptr %6, align 4, !tbaa !9
  %79 = icmp sle i32 %77, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %76
  store i32 5, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %106

81:                                               ; preds = %76
  %82 = load i32, ptr %20, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %83) #6
  %85 = load i32, ptr %17, align 4, !tbaa !9
  %86 = load i32, ptr %20, align 4, !tbaa !9
  %87 = sub nsw i32 %85, %86
  %88 = sext i32 %87 to i64
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %88) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %89, i64 4, i1 false), !tbaa.struct !11
  %90 = getelementptr inbounds %struct.modint, ptr %22, i32 0, i32 0
  %91 = load i32, ptr %90, align 4
  %92 = invoke i32 @_ZNK6modintILi1000000007EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %84, i32 %91)
          to label %93 unwind label %102

93:                                               ; preds = %81
  %94 = getelementptr inbounds %struct.modint, ptr %21, i32 0, i32 0
  store i32 %92, ptr %94, align 4
  %95 = getelementptr inbounds %struct.modint, ptr %21, i32 0, i32 0
  %96 = load i32, ptr %95, align 4
  %97 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %19, i32 %96)
          to label %98 unwind label %102

98:                                               ; preds = %93
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %20, align 4, !tbaa !9
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %20, align 4, !tbaa !9
  br label %76, !llvm.loop !12

102:                                              ; preds = %93, %81
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %10, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %184

106:                                              ; preds = %80
  invoke void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %23, i32 noundef 0)
          to label %107 unwind label %113

107:                                              ; preds = %106
  %108 = getelementptr inbounds %struct.modint, ptr %23, i32 0, i32 0
  %109 = load i32, ptr %108, align 4
  %110 = invoke noundef zeroext i1 @_ZNK6modintILi1000000007EEeqES0_(ptr noundef nonnull align 4 dereferenceable(4) %19, i32 %109)
          to label %111 unwind label %113

111:                                              ; preds = %107
  br i1 %110, label %112, label %117

112:                                              ; preds = %111
  store i32 4, ptr %18, align 4
  br label %177

113:                                              ; preds = %117, %107, %106
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %10, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %11, align 4
  br label %184

117:                                              ; preds = %111
  %118 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %119 unwind label %113

119:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %120 = invoke i32 @_ZNK6modintILi1000000007EE3invEv(ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %121 unwind label %134

121:                                              ; preds = %119
  %122 = getelementptr inbounds %struct.modint, ptr %25, i32 0, i32 0
  store i32 %120, ptr %122, align 4
  %123 = getelementptr inbounds %struct.modint, ptr %25, i32 0, i32 0
  %124 = load i32, ptr %123, align 4
  %125 = invoke i32 @_ZNK6modintILi1000000007EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %19, i32 %124)
          to label %126 unwind label %134

126:                                              ; preds = %121
  %127 = getelementptr inbounds %struct.modint, ptr %24, i32 0, i32 0
  store i32 %125, ptr %127, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %128 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %128, ptr %26, align 4, !tbaa !9
  br label %129

129:                                              ; preds = %156, %126
  %130 = load i32, ptr %26, align 4, !tbaa !9
  %131 = load i32, ptr %5, align 4, !tbaa !9
  %132 = icmp slt i32 %130, %131
  br i1 %132, label %138, label %133

133:                                              ; preds = %129
  store i32 8, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %163

134:                                              ; preds = %169, %121, %119
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %10, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %11, align 4
  br label %183

138:                                              ; preds = %129
  %139 = load i32, ptr %26, align 4, !tbaa !9
  %140 = load i32, ptr %7, align 4, !tbaa !9
  %141 = sub nsw i32 %139, %140
  %142 = sext i32 %141 to i64
  %143 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %142) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %143, i64 4, i1 false), !tbaa.struct !11
  %144 = getelementptr inbounds %struct.modint, ptr %28, i32 0, i32 0
  %145 = load i32, ptr %144, align 4
  %146 = invoke i32 @_ZNK6modintILi1000000007EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %24, i32 %145)
          to label %147 unwind label %159

147:                                              ; preds = %138
  %148 = getelementptr inbounds %struct.modint, ptr %27, i32 0, i32 0
  store i32 %146, ptr %148, align 4
  %149 = load i32, ptr %26, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %150) #6
  %152 = getelementptr inbounds %struct.modint, ptr %27, i32 0, i32 0
  %153 = load i32, ptr %152, align 4
  %154 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEmIES0_(ptr noundef nonnull align 4 dereferenceable(4) %151, i32 %153)
          to label %155 unwind label %159

155:                                              ; preds = %147
  br label %156

156:                                              ; preds = %155
  %157 = load i32, ptr %26, align 4, !tbaa !9
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %26, align 4, !tbaa !9
  br label %129, !llvm.loop !14

159:                                              ; preds = %147, %138
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %10, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %183

163:                                              ; preds = %133
  %164 = load i32, ptr %6, align 4, !tbaa !9
  %165 = mul nsw i32 2, %164
  %166 = load i32, ptr %17, align 4, !tbaa !9
  %167 = icmp sgt i32 %165, %166
  br i1 %167, label %168, label %169

168:                                              ; preds = %163
  store i32 4, ptr %18, align 4
  br label %176

169:                                              ; preds = %163
  %170 = load i32, ptr %17, align 4, !tbaa !9
  %171 = add nsw i32 %170, 1
  %172 = load i32, ptr %6, align 4, !tbaa !9
  %173 = sub nsw i32 %171, %172
  store i32 %173, ptr %6, align 4, !tbaa !9
  %174 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %175 unwind label %134

175:                                              ; preds = %169
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %19, i64 4, i1 false), !tbaa.struct !11
  store i32 0, ptr %7, align 4, !tbaa !9
  store i32 0, ptr %18, align 4
  br label %176

176:                                              ; preds = %175, %168
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %177

177:                                              ; preds = %176, %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  %178 = load i32, ptr %18, align 4
  switch i32 %178, label %237 [
    i32 0, label %179
    i32 4, label %180
  ]

179:                                              ; preds = %177
  br label %180

180:                                              ; preds = %179, %177
  %181 = load i32, ptr %17, align 4, !tbaa !9
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %17, align 4, !tbaa !9
  br label %49, !llvm.loop !15

183:                                              ; preds = %159, %134
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %184

184:                                              ; preds = %183, %113, %102
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %226

185:                                              ; preds = %53
  %186 = load i32, ptr %6, align 4, !tbaa !9
  %187 = add nsw i32 %186, 1
  %188 = sext i32 %187 to i64
  invoke void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %188)
          to label %189 unwind label %66

189:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %190 = call ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %191 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %30, i32 0, i32 0
  store ptr %190, ptr %191, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPK6modintILi1000000007EESt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %30) #6
  %192 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", ptr %29, i32 0, i32 0
  %193 = load ptr, ptr %192, align 8
  %194 = invoke ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr %193)
          to label %195 unwind label %206

195:                                              ; preds = %189
  %196 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %31, i32 0, i32 0
  store ptr %194, ptr %196, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  store ptr %0, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  %197 = load ptr, ptr %32, align 8, !tbaa !5
  %198 = call ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %197) #6
  %199 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %33, i32 0, i32 0
  store ptr %198, ptr %199, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  %200 = load ptr, ptr %32, align 8, !tbaa !5
  %201 = call ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %200) #6
  %202 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %34, i32 0, i32 0
  store ptr %201, ptr %202, align 8
  br label %203

203:                                              ; preds = %218, %195
  %204 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP6modintILi1000000007EESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %34) #6
  br i1 %204, label %210, label %205

205:                                              ; preds = %203
  store i32 11, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  br label %224

206:                                              ; preds = %189
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %10, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %226

210:                                              ; preds = %203
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  %211 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP6modintILi1000000007EESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #6
  store ptr %211, ptr %35, align 8, !tbaa !5
  invoke void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %36, i32 noundef -1)
          to label %212 unwind label %220

212:                                              ; preds = %210
  %213 = load ptr, ptr %35, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.modint, ptr %36, i32 0, i32 0
  %215 = load i32, ptr %214, align 4
  %216 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %213, i32 %215)
          to label %217 unwind label %220

217:                                              ; preds = %212
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  br label %218

218:                                              ; preds = %217
  %219 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP6modintILi1000000007EESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #6
  br label %203

220:                                              ; preds = %212, %210
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %10, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  br label %226

224:                                              ; preds = %205
  store i1 true, ptr %8, align 1
  store i32 1, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  %225 = load i1, ptr %8, align 1
  br i1 %225, label %230, label %229

226:                                              ; preds = %220, %206, %184, %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %227

227:                                              ; preds = %226, %62
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  br label %228

228:                                              ; preds = %227, %58
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %231

229:                                              ; preds = %224
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %230

230:                                              ; preds = %229, %224
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret void

231:                                              ; preds = %228, %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %232

232:                                              ; preds = %231
  %233 = load ptr, ptr %10, align 8
  %234 = load i32, ptr %11, align 4
  %235 = insertvalue { ptr, i32 } poison, ptr %233, 0
  %236 = insertvalue { ptr, i32 } %235, i32 %234, 1
  resume { ptr, i32 } %236

237:                                              ; preds = %177
  unreachable
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 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) #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6modintILi1000000007EEeqES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZNK6modintILi1000000007EE3invEv(ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEmIES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) #5 align 2

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) #5 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 4, !9}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<modint<1000000007>, std::allocator<modint<1000000007>>>::_Vector_impl" }
%"struct.std::_Vector_base<modint<1000000007>, std::allocator<modint<1000000007>>>::_Vector_impl" = type { %"struct.std::_Vector_base<modint<1000000007>, std::allocator<modint<1000000007>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<modint<1000000007>, std::allocator<modint<1000000007>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%struct.modint = type { i32 }
%"class.__gnu_cxx::__normal_iterator.0" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z15BerlekampMasseySt6vectorI6modintILi1000000007EESaIS1_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %struct.modint, align 4
  %8 = alloca %struct.modint, align 4
  %9 = alloca %struct.modint, align 4
  %10 = alloca %struct.modint, align 4
  %11 = alloca %struct.modint, align 4
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %struct.modint, align 4
  %17 = tail call noundef i64 @_ZNKSt6vectorI6modintILi1000000007EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %18 = trunc i64 %17 to i32
  %sext = shl i64 %17, 32
  %19 = ashr exact i64 %sext, 32
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZNSaI6modintILi1000000007EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  invoke void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %19, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %20 unwind label %29

20:                                               ; preds = %2
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaI6modintILi1000000007EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %19, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %21 unwind label %31

21:                                               ; preds = %20
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  call void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %7, i32 noundef 1)
  %22 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 0) #5
  %23 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %23, ptr %22, align 4, !tbaa !5
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #5
  %25 = load i32, ptr %22, align 4, !tbaa !5
  store i32 %25, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  call void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %8, i32 noundef 1)
  %26 = icmp sgt i32 %18, 0
  br i1 %26, label %.lr.ph71.preheader, label %._crit_edge72

.lr.ph71.preheader:                               ; preds = %21
  %wide.trip.count84 = and i64 %17, 2147483647
  br label %.lr.ph71

._crit_edge72.loopexit:                           ; preds = %81
  %27 = add nsw i32 %.2, 1
  %28 = sext i32 %27 to i64
  br label %._crit_edge72

._crit_edge72:                                    ; preds = %._crit_edge72.loopexit, %21
  %.0.lcssa = phi i64 [ 1, %21 ], [ %28, %._crit_edge72.loopexit ]
  invoke void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.0.lcssa)
          to label %84 unwind label %33

29:                                               ; preds = %2
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  br label %101

31:                                               ; preds = %20
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  br label %100

33:                                               ; preds = %._crit_edge72
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %99

.lr.ph71:                                         ; preds = %.lr.ph71.preheader, %81
  %indvars.iv81 = phi i64 [ 0, %.lr.ph71.preheader ], [ %indvars.iv.next82, %81 ]
  %.069 = phi i32 [ 0, %.lr.ph71.preheader ], [ %.2, %81 ]
  %.03568 = phi i32 [ 0, %.lr.ph71.preheader ], [ %.237, %81 ]
  %35 = add i32 %.03568, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv81) #5
  %37 = load i32, ptr %36, align 4, !tbaa !5
  store i32 %37, ptr %9, align 4, !tbaa !5
  %.not60 = icmp slt i32 %.069, 1
  br i1 %.not60, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.lr.ph71
  %38 = add nuw i32 %.069, 1
  %wide.trip.count = zext i32 %38 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %45, %.lr.ph71
  call void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %10, i32 noundef 0)
  %39 = load i32, ptr %10, align 4
  %40 = call noundef zeroext i1 @_ZNK6modintILi1000000007EEeqES0_(ptr noundef nonnull align 4 dereferenceable(4) %9, i32 %39)
  br i1 %40, label %81, label %51

.lr.ph:                                           ; preds = %.lr.ph.preheader, %45
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %45 ]
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #5
  %42 = sub nsw i64 %indvars.iv81, %indvars.iv
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %42) #5
  %.sroa.09.0.copyload = load i32, ptr %43, align 4, !tbaa !5
  %44 = invoke i32 @_ZNK6modintILi1000000007EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %41, i32 %.sroa.09.0.copyload)
          to label %45 unwind label %47

45:                                               ; preds = %.lr.ph
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %9, i32 %44)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

47:                                               ; preds = %.lr.ph
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %83

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

51:                                               ; preds = %._crit_edge
  %52 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %0)
          to label %53 unwind label %49

53:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  %54 = invoke i32 @_ZNK6modintILi1000000007EE3invEv(ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %55 unwind label %63

55:                                               ; preds = %53
  %56 = invoke i32 @_ZNK6modintILi1000000007EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %9, i32 %54)
          to label %57 unwind label %63

57:                                               ; preds = %55
  store i32 %56, ptr %11, align 4
  %58 = icmp slt i32 %35, %18
  br i1 %58, label %.lr.ph64.preheader, label %._crit_edge65

.lr.ph64.preheader:                               ; preds = %57
  %59 = sext i32 %35 to i64
  br label %.lr.ph64

._crit_edge65:                                    ; preds = %68, %57
  %60 = shl nsw i32 %.069, 1
  %61 = sext i32 %60 to i64
  %62 = icmp slt i64 %indvars.iv81, %61
  br i1 %62, label %80, label %73

63:                                               ; preds = %73, %55, %53
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %82

.lr.ph64:                                         ; preds = %.lr.ph64.preheader, %68
  %indvars.iv77 = phi i64 [ %59, %.lr.ph64.preheader ], [ %indvars.iv.next78, %68 ]
  %65 = sub nsw i64 %indvars.iv77, %59
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %65) #5
  %.sroa.03.0.copyload = load i32, ptr %66, align 4, !tbaa !5
  %67 = invoke i32 @_ZNK6modintILi1000000007EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %11, i32 %.sroa.03.0.copyload)
          to label %68 unwind label %71

68:                                               ; preds = %.lr.ph64
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv77) #5
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEmIES0_(ptr noundef nonnull align 4 dereferenceable(4) %69, i32 %67)
  %indvars.iv.next78 = add nsw i64 %indvars.iv77, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next78 to i32
  %exitcond80.not = icmp eq i32 %lftr.wideiv, %18
  br i1 %exitcond80.not, label %._crit_edge65, label %.lr.ph64, !llvm.loop !11

71:                                               ; preds = %.lr.ph64
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %82

73:                                               ; preds = %._crit_edge65
  %74 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %75 unwind label %63

75:                                               ; preds = %73
  %76 = trunc i64 %indvars.iv81 to i32
  %77 = add i32 %76, 1
  %78 = sub i32 %77, %.069
  %79 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %79, ptr %8, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %._crit_edge65, %75
  %.136 = phi i32 [ 0, %75 ], [ %35, %._crit_edge65 ]
  %.1 = phi i32 [ %78, %75 ], [ %.069, %._crit_edge65 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  br label %81

81:                                               ; preds = %._crit_edge, %80
  %.237 = phi i32 [ %.136, %80 ], [ %35, %._crit_edge ]
  %.2 = phi i32 [ %.1, %80 ], [ %.069, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %exitcond85.not = icmp eq i64 %indvars.iv.next82, %wide.trip.count84
  br i1 %exitcond85.not, label %._crit_edge72.loopexit, label %.lr.ph71, !llvm.loop !12

82:                                               ; preds = %71, %63
  %.pn = phi { ptr, i32 } [ %72, %71 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  br label %83

83:                                               ; preds = %82, %49, %47
  %.pn51 = phi { ptr, i32 } [ %48, %47 ], [ %.pn, %82 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  br label %99

84:                                               ; preds = %._crit_edge72
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #5
  %85 = call ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  store ptr %85, ptr %13, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPK6modintILi1000000007EESt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  %86 = load ptr, ptr %12, align 8
  %87 = invoke ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr %86)
          to label %88 unwind label %92

88:                                               ; preds = %84
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  %89 = call ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  store ptr %89, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #5
  %90 = call ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  store ptr %90, ptr %15, align 8
  %91 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP6modintILi1000000007EESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  br i1 %91, label %.lr.ph74, label %._crit_edge75

._crit_edge75:                                    ; preds = %.lr.ph74, %88
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  ret void

92:                                               ; preds = %84
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  br label %99

.lr.ph74:                                         ; preds = %88, %.lr.ph74
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP6modintILi1000000007EESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  call void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %16, i32 noundef -1)
  %95 = load i32, ptr %16, align 4
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %94, i32 %95)
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIP6modintILi1000000007EESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  %98 = call noundef zeroext i1 @_ZN9__gnu_cxxneIP6modintILi1000000007EESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  br i1 %98, label %.lr.ph74, label %._crit_edge75

99:                                               ; preds = %92, %83, %33
  %.pn51.pn = phi { ptr, i32 } [ %.pn51, %83 ], [ %93, %92 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  br label %100

100:                                              ; preds = %99, %31
  %.pn51.pn.pn = phi { ptr, i32 } [ %.pn51.pn, %99 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %101

101:                                              ; preds = %100, %29
  %.pn51.pn.pn.pn = phi { ptr, i32 } [ %.pn51.pn.pn, %100 ], [ %30, %29 ]
  resume { ptr, i32 } %.pn51.pn.pn.pn
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare dso_local void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6modintILi1000000007EEeqES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZNK6modintILi1000000007EE3invEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass