; LLVM IR from ShahjalalShohag/code-library :: Dynamic Programming Optimizations/x2 +1 trick.ll (Z2yoii)

; 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.modint = type { i32 }
%"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 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<modint<1000000007>>, std::allocator<std::vector<modint<1000000007>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<modint<1000000007>>, std::allocator<std::vector<modint<1000000007>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<modint<1000000007>>, std::allocator<std::vector<modint<1000000007>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<modint<1000000007>>, std::allocator<std::vector<modint<1000000007>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }

@inv = external dso_local global [303 x %struct.modint], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z2yoii(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, i32 noundef %1, i32 noundef %2) #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i1, align 1
  %8 = alloca %struct.modint, align 4
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %struct.modint, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::vector", align 8
  %15 = alloca i32, align 4
  %16 = alloca %struct.modint, align 4
  %17 = alloca %struct.modint, align 4
  %18 = alloca %"class.std::vector", align 8
  %19 = alloca %"class.std::vector", align 8
  %20 = alloca %struct.modint, align 4
  %21 = alloca %"class.std::allocator", align 1
  %22 = alloca %"class.std::vector.0", align 8
  %23 = alloca %"class.std::vector", align 8
  %24 = alloca %struct.modint, align 4
  %25 = alloca %"class.std::allocator", align 1
  %26 = alloca %"class.std::allocator.2", align 1
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca %struct.modint, align 4
  %30 = alloca i32, align 4
  %31 = alloca %struct.modint, align 4
  %32 = alloca %struct.modint, align 4
  %33 = alloca %"class.std::vector", align 8
  %34 = alloca %"class.std::allocator", align 1
  %35 = alloca %struct.modint, align 4
  %36 = alloca i32, align 4
  %37 = alloca %struct.modint, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca %struct.modint, align 4
  %41 = alloca %struct.modint, align 4
  %42 = alloca %struct.modint, align 4
  %43 = alloca %struct.modint, align 4
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  %46 = alloca %struct.modint, align 4
  %47 = alloca %struct.modint, align 4
  store ptr %0, ptr %4, align 8
  store i32 %1, ptr %5, align 4, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !5
  store i1 false, ptr %7, align 1
  %48 = load i32, ptr %6, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  %50 = sext i32 %49 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %8, i32 noundef 0)
  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_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %50, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %51 unwind label %57

51:                                               ; preds = %3
  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.end.p0(i64 4, ptr %8) #6
  %52 = load i32, ptr %5, align 4, !tbaa !5
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %65

54:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  invoke void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %12, i32 noundef 1)
          to label %55 unwind label %61

55:                                               ; preds = %54
  %56 = 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 %56, ptr align 4 %12, i64 4, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  store i1 true, ptr %7, align 1
  store i32 1, ptr %13, align 4
  br label %384

57:                                               ; preds = %3
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %10, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %389

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

65:                                               ; preds = %51
  %66 = load i32, ptr %5, align 4, !tbaa !5
  %67 = and i32 %66, 1
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %121

69:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = sub nsw i32 %70, 1
  %72 = load i32, ptr %6, align 4, !tbaa !5
  invoke void @_Z2yoii(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %14, i32 noundef %71, i32 noundef %72)
          to label %73 unwind label %79

73:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %116, %73
  %75 = load i32, ptr %15, align 4, !tbaa !5
  %76 = load i32, ptr %6, align 4, !tbaa !5
  %77 = icmp sle i32 %75, %76
  br i1 %77, label %83, label %78

78:                                               ; preds = %74
  store i32 2, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %119

79:                                               ; preds = %69
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %10, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %11, align 4
  br label %120

83:                                               ; preds = %74
  %84 = load i32, ptr %15, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %85) #6
  %87 = load i32, ptr %15, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %88) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %89, ptr align 4 %86, i64 4, i1 false), !tbaa.struct !9
  %90 = load i32, ptr %15, align 4, !tbaa !5
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %92, label %115

92:                                               ; preds = %83
  %93 = load i32, ptr %15, align 4, !tbaa !5
  %94 = sub nsw i32 %93, 1
  %95 = sext i32 %94 to i64
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %95) #6
  %97 = load i32, ptr %5, align 4, !tbaa !5
  invoke void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %17, i32 noundef %97)
          to label %98 unwind label %111

98:                                               ; preds = %92
  %99 = getelementptr inbounds %struct.modint, ptr %17, i32 0, i32 0
  %100 = load i32, ptr %99, align 4
  %101 = invoke i32 @_ZNK6modintILi1000000007EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %96, i32 %100)
          to label %102 unwind label %111

102:                                              ; preds = %98
  %103 = getelementptr inbounds %struct.modint, ptr %16, i32 0, i32 0
  store i32 %101, ptr %103, align 4
  %104 = load i32, ptr %15, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %105) #6
  %107 = getelementptr inbounds %struct.modint, ptr %16, i32 0, i32 0
  %108 = load i32, ptr %107, align 4
  %109 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %106, i32 %108)
          to label %110 unwind label %111

110:                                              ; preds = %102
  br label %115

111:                                              ; preds = %102, %98, %92
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %10, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  br label %120

115:                                              ; preds = %110, %83
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %15, align 4, !tbaa !5
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %15, align 4, !tbaa !5
  br label %74, !llvm.loop !10

119:                                              ; preds = %78
  store i1 true, ptr %7, align 1
  store i32 1, ptr %13, align 4
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  br label %384

120:                                              ; preds = %111, %79
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  br label %388

121:                                              ; preds = %65
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #6
  %122 = load i32, ptr %5, align 4, !tbaa !5
  %123 = sdiv i32 %122, 2
  %124 = load i32, ptr %6, align 4, !tbaa !5
  invoke void @_Z2yoii(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %18, i32 noundef %123, i32 noundef %124)
          to label %125 unwind label %147

125:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #6
  %126 = load i32, ptr %6, align 4, !tbaa !5
  %127 = add nsw i32 %126, 1
  %128 = sext i32 %127 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  invoke void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %20, i32 noundef 0)
          to label %129 unwind label %151

129:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  call void @_ZNSaI6modintILi1000000007EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  invoke void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %128, ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %130 unwind label %155

130:                                              ; preds = %129
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #6
  %131 = load i32, ptr %6, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  %133 = sext i32 %132 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #6
  %134 = load i32, ptr %6, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  %136 = sext i32 %135 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  invoke void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %24, i32 noundef 0)
          to label %137 unwind label %160

137:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #6
  call void @_ZNSaI6modintILi1000000007EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #6
  invoke void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %136, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %138 unwind label %164

138:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #6
  call void @_ZNSaISt6vectorI6modintILi1000000007EESaIS1_EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #6
  invoke void @_ZNSt6vectorIS_I6modintILi1000000007EESaIS1_EESaIS3_EEC2EmRKS3_RKS4_(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %133, ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %139 unwind label %168

139:                                              ; preds = %138
  call void @_ZNSt15__new_allocatorISt6vectorI6modintILi1000000007EESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %140 = load i32, ptr %5, align 4, !tbaa !5
  %141 = sdiv i32 %140, 2
  store i32 %141, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %142

142:                                              ; preds = %233, %139
  %143 = load i32, ptr %28, align 4, !tbaa !5
  %144 = load i32, ptr %6, align 4, !tbaa !5
  %145 = icmp sle i32 %143, %144
  br i1 %145, label %174, label %146

146:                                              ; preds = %142
  store i32 5, ptr %13, align 4
  br label %237

147:                                              ; preds = %121
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %10, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %11, align 4
  br label %383

151:                                              ; preds = %125
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %10, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %11, align 4
  br label %159

155:                                              ; preds = %129
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %10, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %11, align 4
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  br label %159

159:                                              ; preds = %155, %151
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %382

160:                                              ; preds = %130
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %10, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %11, align 4
  br label %173

164:                                              ; preds = %137
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %10, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %11, align 4
  br label %172

168:                                              ; preds = %138
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %10, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %11, align 4
  call void @_ZNSt15__new_allocatorISt6vectorI6modintILi1000000007EESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  br label %172

172:                                              ; preds = %168, %164
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #6
  br label %173

173:                                              ; preds = %172, %160
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #6
  br label %381

174:                                              ; preds = %142
  %175 = load i32, ptr %27, align 4, !tbaa !5
  %176 = load i32, ptr %28, align 4, !tbaa !5
  %177 = sub nsw i32 %175, %176
  %178 = icmp slt i32 %177, 0
  br i1 %178, label %179, label %180

179:                                              ; preds = %174
  store i32 5, ptr %13, align 4
  br label %237

180:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  invoke void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %29, i32 noundef 1)
          to label %181 unwind label %187

181:                                              ; preds = %180
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %182

182:                                              ; preds = %224, %181
  %183 = load i32, ptr %30, align 4, !tbaa !5
  %184 = load i32, ptr %6, align 4, !tbaa !5
  %185 = icmp sle i32 %183, %184
  br i1 %185, label %191, label %186

186:                                              ; preds = %182
  store i32 8, ptr %13, align 4
  br label %231

187:                                              ; preds = %180
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %10, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %11, align 4
  br label %236

191:                                              ; preds = %182
  %192 = load i32, ptr %28, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I6modintILi1000000007EESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %193) #6
  %195 = load i32, ptr %30, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %194, i64 noundef %196) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %197, ptr align 4 %29, i64 4, i1 false), !tbaa.struct !9
  %198 = load i32, ptr %27, align 4, !tbaa !5
  %199 = load i32, ptr %28, align 4, !tbaa !5
  %200 = sub nsw i32 %198, %199
  %201 = load i32, ptr %30, align 4, !tbaa !5
  %202 = sub nsw i32 %200, %201
  %203 = icmp slt i32 %202, 0
  br i1 %203, label %204, label %205

204:                                              ; preds = %191
  store i32 8, ptr %13, align 4
  br label %231

205:                                              ; preds = %191
  %206 = load i32, ptr %27, align 4, !tbaa !5
  %207 = load i32, ptr %28, align 4, !tbaa !5
  %208 = sub nsw i32 %206, %207
  %209 = load i32, ptr %30, align 4, !tbaa !5
  %210 = sub nsw i32 %208, %209
  invoke void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %31, i32 noundef %210)
          to label %211 unwind label %227

211:                                              ; preds = %205
  %212 = getelementptr inbounds %struct.modint, ptr %31, i32 0, i32 0
  %213 = load i32, ptr %212, align 4
  %214 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %29, i32 %213)
          to label %215 unwind label %227

215:                                              ; preds = %211
  %216 = load i32, ptr %30, align 4, !tbaa !5
  %217 = add nsw i32 %216, 1
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [303 x %struct.modint], ptr @inv, i64 0, i64 %218
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %219, i64 4, i1 false), !tbaa.struct !9
  %220 = getelementptr inbounds %struct.modint, ptr %32, i32 0, i32 0
  %221 = load i32, ptr %220, align 4
  %222 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %29, i32 %221)
          to label %223 unwind label %227

223:                                              ; preds = %215
  br label %224

224:                                              ; preds = %223
  %225 = load i32, ptr %30, align 4, !tbaa !5
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %30, align 4, !tbaa !5
  br label %182, !llvm.loop !12

227:                                              ; preds = %215, %211, %205
  %228 = landingpad { ptr, i32 }
          cleanup
  %229 = extractvalue { ptr, i32 } %228, 0
  store ptr %229, ptr %10, align 8
  %230 = extractvalue { ptr, i32 } %228, 1
  store i32 %230, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %236

231:                                              ; preds = %204, %186
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %232

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

233:                                              ; preds = %232
  %234 = load i32, ptr %28, align 4, !tbaa !5
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %28, align 4, !tbaa !5
  br label %142, !llvm.loop !13

236:                                              ; preds = %227, %187
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  br label %380

237:                                              ; preds = %179, %146
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  br label %238

238:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 24, ptr %33) #6
  %239 = load i32, ptr %6, align 4, !tbaa !5
  %240 = add nsw i32 %239, 1
  %241 = sext i32 %240 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #6
  call void @_ZNSaI6modintILi1000000007EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #6
  invoke void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %33, i64 noundef %241, ptr noundef nonnull align 1 dereferenceable(1) %34)
          to label %242 unwind label %249

242:                                              ; preds = %238
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #6
  invoke void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %35, i32 noundef 1)
          to label %243 unwind label %253

243:                                              ; preds = %242
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #6
  store i32 0, ptr %36, align 4, !tbaa !5
  br label %244

244:                                              ; preds = %267, %243
  %245 = load i32, ptr %36, align 4, !tbaa !5
  %246 = load i32, ptr %6, align 4, !tbaa !5
  %247 = icmp sle i32 %245, %246
  br i1 %247, label %257, label %248

248:                                              ; preds = %244
  store i32 11, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #6
  br label %274

249:                                              ; preds = %238
  %250 = landingpad { ptr, i32 }
          cleanup
  %251 = extractvalue { ptr, i32 } %250, 0
  store ptr %251, ptr %10, align 8
  %252 = extractvalue { ptr, i32 } %250, 1
  store i32 %252, ptr %11, align 4
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #6
  br label %379

253:                                              ; preds = %242
  %254 = landingpad { ptr, i32 }
          cleanup
  %255 = extractvalue { ptr, i32 } %254, 0
  store ptr %255, ptr %10, align 8
  %256 = extractvalue { ptr, i32 } %254, 1
  store i32 %256, ptr %11, align 4
  br label %378

257:                                              ; preds = %244
  %258 = load i32, ptr %36, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %33, i64 noundef %259) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %260, ptr align 4 %35, i64 4, i1 false), !tbaa.struct !9
  %261 = load i32, ptr %27, align 4, !tbaa !5
  invoke void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %37, i32 noundef %261)
          to label %262 unwind label %270

262:                                              ; preds = %257
  %263 = getelementptr inbounds %struct.modint, ptr %37, i32 0, i32 0
  %264 = load i32, ptr %263, align 4
  %265 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %35, i32 %264)
          to label %266 unwind label %270

266:                                              ; preds = %262
  br label %267

267:                                              ; preds = %266
  %268 = load i32, ptr %36, align 4, !tbaa !5
  %269 = add nsw i32 %268, 1
  store i32 %269, ptr %36, align 4, !tbaa !5
  br label %244, !llvm.loop !14

270:                                              ; preds = %262, %257
  %271 = landingpad { ptr, i32 }
          cleanup
  %272 = extractvalue { ptr, i32 } %271, 0
  store ptr %272, ptr %10, align 8
  %273 = extractvalue { ptr, i32 } %271, 1
  store i32 %273, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #6
  br label %378

274:                                              ; preds = %248
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #6
  store i32 0, ptr %38, align 4, !tbaa !5
  br label %275

275:                                              ; preds = %328, %274
  %276 = load i32, ptr %38, align 4, !tbaa !5
  %277 = load i32, ptr %6, align 4, !tbaa !5
  %278 = icmp sle i32 %276, %277
  br i1 %278, label %280, label %279

279:                                              ; preds = %275
  store i32 14, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #6
  br label %331

280:                                              ; preds = %275
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #6
  store i32 0, ptr %39, align 4, !tbaa !5
  br label %281

281:                                              ; preds = %320, %280
  %282 = load i32, ptr %39, align 4, !tbaa !5
  %283 = load i32, ptr %38, align 4, !tbaa !5
  %284 = icmp sle i32 %282, %283
  br i1 %284, label %286, label %285

285:                                              ; preds = %281
  store i32 17, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #6
  br label %327

286:                                              ; preds = %281
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #6
  %287 = load i32, ptr %38, align 4, !tbaa !5
  %288 = load i32, ptr %39, align 4, !tbaa !5
  %289 = sub nsw i32 %287, %288
  %290 = sext i32 %289 to i64
  %291 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %33, i64 noundef %290) #6
  %292 = load i32, ptr %39, align 4, !tbaa !5
  %293 = sext i32 %292 to i64
  %294 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %293) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %42, ptr align 4 %294, i64 4, i1 false), !tbaa.struct !9
  %295 = getelementptr inbounds %struct.modint, ptr %42, i32 0, i32 0
  %296 = load i32, ptr %295, align 4
  %297 = invoke i32 @_ZNK6modintILi1000000007EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %291, i32 %296)
          to label %298 unwind label %323

298:                                              ; preds = %286
  %299 = getelementptr inbounds %struct.modint, ptr %41, i32 0, i32 0
  store i32 %297, ptr %299, align 4
  %300 = load i32, ptr %39, align 4, !tbaa !5
  %301 = sext i32 %300 to i64
  %302 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I6modintILi1000000007EESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %301) #6
  %303 = load i32, ptr %38, align 4, !tbaa !5
  %304 = load i32, ptr %39, align 4, !tbaa !5
  %305 = sub nsw i32 %303, %304
  %306 = sext i32 %305 to i64
  %307 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %302, i64 noundef %306) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %43, ptr align 4 %307, i64 4, i1 false), !tbaa.struct !9
  %308 = getelementptr inbounds %struct.modint, ptr %43, i32 0, i32 0
  %309 = load i32, ptr %308, align 4
  %310 = invoke i32 @_ZNK6modintILi1000000007EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %41, i32 %309)
          to label %311 unwind label %323

311:                                              ; preds = %298
  %312 = getelementptr inbounds %struct.modint, ptr %40, i32 0, i32 0
  store i32 %310, ptr %312, align 4
  %313 = load i32, ptr %38, align 4, !tbaa !5
  %314 = sext i32 %313 to i64
  %315 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %314) #6
  %316 = getelementptr inbounds %struct.modint, ptr %40, i32 0, i32 0
  %317 = load i32, ptr %316, align 4
  %318 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %315, i32 %317)
          to label %319 unwind label %323

319:                                              ; preds = %311
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #6
  br label %320

320:                                              ; preds = %319
  %321 = load i32, ptr %39, align 4, !tbaa !5
  %322 = add nsw i32 %321, 1
  store i32 %322, ptr %39, align 4, !tbaa !5
  br label %281, !llvm.loop !15

323:                                              ; preds = %311, %298, %286
  %324 = landingpad { ptr, i32 }
          cleanup
  %325 = extractvalue { ptr, i32 } %324, 0
  store ptr %325, ptr %10, align 8
  %326 = extractvalue { ptr, i32 } %324, 1
  store i32 %326, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #6
  br label %378

327:                                              ; preds = %285
  br label %328

328:                                              ; preds = %327
  %329 = load i32, ptr %38, align 4, !tbaa !5
  %330 = add nsw i32 %329, 1
  store i32 %330, ptr %38, align 4, !tbaa !5
  br label %275, !llvm.loop !16

331:                                              ; preds = %279
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #6
  store i32 0, ptr %44, align 4, !tbaa !5
  br label %332

332:                                              ; preds = %374, %331
  %333 = load i32, ptr %44, align 4, !tbaa !5
  %334 = load i32, ptr %6, align 4, !tbaa !5
  %335 = icmp sle i32 %333, %334
  br i1 %335, label %337, label %336

336:                                              ; preds = %332
  store i32 20, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #6
  br label %377

337:                                              ; preds = %332
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #6
  store i32 0, ptr %45, align 4, !tbaa !5
  br label %338

338:                                              ; preds = %366, %337
  %339 = load i32, ptr %44, align 4, !tbaa !5
  %340 = load i32, ptr %45, align 4, !tbaa !5
  %341 = add nsw i32 %339, %340
  %342 = load i32, ptr %6, align 4, !tbaa !5
  %343 = icmp sle i32 %341, %342
  br i1 %343, label %345, label %344

344:                                              ; preds = %338
  store i32 23, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #6
  br label %373

345:                                              ; preds = %338
  %346 = load i32, ptr %44, align 4, !tbaa !5
  %347 = sext i32 %346 to i64
  %348 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %347) #6
  %349 = load i32, ptr %45, align 4, !tbaa !5
  %350 = sext i32 %349 to i64
  %351 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %350) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %47, ptr align 4 %351, i64 4, i1 false), !tbaa.struct !9
  %352 = getelementptr inbounds %struct.modint, ptr %47, i32 0, i32 0
  %353 = load i32, ptr %352, align 4
  %354 = invoke i32 @_ZNK6modintILi1000000007EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %348, i32 %353)
          to label %355 unwind label %369

355:                                              ; preds = %345
  %356 = getelementptr inbounds %struct.modint, ptr %46, i32 0, i32 0
  store i32 %354, ptr %356, align 4
  %357 = load i32, ptr %44, align 4, !tbaa !5
  %358 = load i32, ptr %45, align 4, !tbaa !5
  %359 = add nsw i32 %357, %358
  %360 = sext i32 %359 to i64
  %361 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %360) #6
  %362 = getelementptr inbounds %struct.modint, ptr %46, i32 0, i32 0
  %363 = load i32, ptr %362, align 4
  %364 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %361, i32 %363)
          to label %365 unwind label %369

365:                                              ; preds = %355
  br label %366

366:                                              ; preds = %365
  %367 = load i32, ptr %45, align 4, !tbaa !5
  %368 = add nsw i32 %367, 1
  store i32 %368, ptr %45, align 4, !tbaa !5
  br label %338, !llvm.loop !17

369:                                              ; preds = %355, %345
  %370 = landingpad { ptr, i32 }
          cleanup
  %371 = extractvalue { ptr, i32 } %370, 0
  store ptr %371, ptr %10, align 8
  %372 = extractvalue { ptr, i32 } %370, 1
  store i32 %372, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #6
  br label %378

373:                                              ; preds = %344
  br label %374

374:                                              ; preds = %373
  %375 = load i32, ptr %44, align 4, !tbaa !5
  %376 = add nsw i32 %375, 1
  store i32 %376, ptr %44, align 4, !tbaa !5
  br label %332, !llvm.loop !18

377:                                              ; preds = %336
  store i1 true, ptr %7, align 1
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @_ZNSt6vectorIS_I6modintILi1000000007EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  br label %384

378:                                              ; preds = %369, %323, %270, %253
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #6
  br label %379

379:                                              ; preds = %378, %249
  call void @llvm.lifetime.end.p0(i64 24, ptr %33) #6
  br label %380

380:                                              ; preds = %379, %236
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @_ZNSt6vectorIS_I6modintILi1000000007EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  br label %381

381:                                              ; preds = %380, %173
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #6
  br label %382

382:                                              ; preds = %381, %159
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  br label %383

383:                                              ; preds = %382, %147
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  br label %388

384:                                              ; preds = %377, %119, %55
  %385 = load i1, ptr %7, align 1
  br i1 %385, label %387, label %386

386:                                              ; preds = %384
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %387

387:                                              ; preds = %386, %384
  ret void

388:                                              ; preds = %383, %120, %61
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %389

389:                                              ; preds = %388, %57
  %390 = load ptr, ptr %10, align 8
  %391 = load i32, ptr %11, align 4
  %392 = insertvalue { ptr, i32 } poison, ptr %390, 0
  %393 = insertvalue { ptr, i32 } %392, i32 %391, 1
  resume { ptr, i32 } %393
}

; 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 void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) 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_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 4 dereferenceable(4), 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 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: 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 @_ZNSaISt6vectorI6modintILi1000000007EESaIS1_EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIS_I6modintILi1000000007EESaIS1_EESaIS3_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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt6vectorI6modintILi1000000007EESaIS2_EEED2Ev(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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 0, i64 4, !5}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}
!18 = distinct !{!18, !11}


; 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.modint = type { i32 }
%"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 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<modint<1000000007>>, std::allocator<std::vector<modint<1000000007>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<modint<1000000007>>, std::allocator<std::vector<modint<1000000007>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<modint<1000000007>>, std::allocator<std::vector<modint<1000000007>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<modint<1000000007>>, std::allocator<std::vector<modint<1000000007>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }

@inv = external dso_local local_unnamed_addr global [303 x %struct.modint], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z2yoii(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca %struct.modint, align 4
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %struct.modint, align 4
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %struct.modint, align 4
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca %struct.modint, align 4
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %"class.std::vector.0", align 8
  %14 = alloca %"class.std::vector", align 8
  %15 = alloca %struct.modint, align 4
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca %"class.std::allocator.2", align 1
  %18 = alloca %struct.modint, align 4
  %19 = alloca %struct.modint, align 4
  %20 = alloca %"class.std::vector", align 8
  %21 = alloca %"class.std::allocator", align 1
  %22 = alloca %struct.modint, align 4
  %23 = alloca %struct.modint, align 4
  %24 = alloca %struct.modint, align 4
  %25 = add i32 %2, 1
  %26 = sext i32 %25 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  call void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %4, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #6
  call void @_ZNSaI6modintILi1000000007EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  invoke void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %26, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %27 unwind label %32

27:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  %28 = icmp eq i32 %1, 0
  br i1 %28, label %29, label %34

29:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  call void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %6, i32 noundef 1)
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #6
  %31 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %31, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  br label %126

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

34:                                               ; preds = %27
  %35 = and i32 %1, 1
  %.not = icmp eq i32 %35, 0
  br i1 %.not, label %56, label %36

36:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  %37 = add nsw i32 %1, -1
  invoke void @_Z2yoii(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %7, i32 noundef %37, i32 noundef %2)
          to label %.preheader121 unwind label %42

.preheader121:                                    ; preds = %36
  %.not112122 = icmp slt i32 %2, 0
  br i1 %.not112122, label %._crit_edge, label %38

38:                                               ; preds = %.preheader121
  %wide.trip.count = zext i32 %25 to i64
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 0) #6
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #6
  %41 = load i32, ptr %39, align 4, !tbaa !5
  store i32 %41, ptr %40, align 4, !tbaa !5
  %exitcond.peel.not = icmp eq i32 %2, 0
  br i1 %exitcond.peel.not, label %._crit_edge, label %.lr.ph.peel.next

._crit_edge:                                      ; preds = %52, %38, %.preheader121
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %126

42:                                               ; preds = %36
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %55

.lr.ph.peel.next:                                 ; preds = %38, %52
  %indvars.iv = phi i64 [ %indvars.iv.next, %52 ], [ 1, %38 ]
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv) #6
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #6
  %46 = load i32, ptr %44, align 4, !tbaa !5
  store i32 %46, ptr %45, align 4, !tbaa !5
  %47 = add nsw i64 %indvars.iv, -1
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %47) #6
  call void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %8, i32 noundef %1)
  %49 = load i32, ptr %8, align 4
  %50 = invoke i32 @_ZNK6modintILi1000000007EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %48, i32 %49)
          to label %52 unwind label %51

51:                                               ; preds = %.lr.ph.peel.next
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  br label %55

52:                                               ; preds = %.lr.ph.peel.next
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #6
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %53, i32 %50)
  %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.peel.next, !llvm.loop !9

55:                                               ; preds = %51, %42
  %.pn114 = phi { ptr, i32 } [ %lpad.loopexit, %51 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %127

56:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  %57 = ashr exact i32 %1, 1
  invoke void @_Z2yoii(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %9, i32 noundef %57, i32 noundef %2)
          to label %58 unwind label %65

58:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  call void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %11, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #6
  call void @_ZNSaI6modintILi1000000007EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %26, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %59 unwind label %67

59:                                               ; preds = %58
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  call void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %15, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #6
  call void @_ZNSaI6modintILi1000000007EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  invoke void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %26, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %60 unwind label %69

60:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #6
  call void @_ZNSaISt6vectorI6modintILi1000000007EESaIS1_EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  invoke void @_ZNSt6vectorIS_I6modintILi1000000007EESaIS1_EESaIS3_EEC2EmRKS3_RKS4_(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %26, ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %61 unwind label %71

61:                                               ; preds = %60
  call void @_ZNSt15__new_allocatorISt6vectorI6modintILi1000000007EESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #6
  %.not99130 = icmp slt i32 %2, 0
  br i1 %.not99130, label %._crit_edge134, label %.lr.ph133.split.preheader

.lr.ph133.split.preheader:                        ; preds = %61
  %62 = add nsw i32 %57, 1
  %63 = zext i32 %62 to i64
  %smin = call i32 @llvm.smin.i32(i32 %57, i32 -1)
  %64 = sub nsw i32 %57, %smin
  %wide.trip.count165 = zext i32 %64 to i64
  %wide.trip.count167 = zext i32 %25 to i64
  br label %.lr.ph133.split

65:                                               ; preds = %56
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %125

67:                                               ; preds = %58
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  br label %124

69:                                               ; preds = %59
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %73

71:                                               ; preds = %60
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorI6modintILi1000000007EESaIS2_EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  br label %73

73:                                               ; preds = %71, %69
  %.pn = phi { ptr, i32 } [ %72, %71 ], [ %70, %69 ]
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #6
  br label %123

.lr.ph133.split:                                  ; preds = %.lr.ph133.split.preheader, %._crit_edge128
  %indvars.iv160 = phi i64 [ 0, %.lr.ph133.split.preheader ], [ %indvars.iv.next161, %._crit_edge128 ]
  %indvars.iv158 = phi i64 [ %63, %.lr.ph133.split.preheader ], [ %indvars.iv.next159, %._crit_edge128 ]
  %exitcond166 = icmp eq i64 %indvars.iv160, %wide.trip.count165
  br i1 %exitcond166, label %._crit_edge134, label %.lr.ph127

.lr.ph127:                                        ; preds = %.lr.ph133.split
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #6
  call void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %18, i32 noundef 1)
  br label %74

74:                                               ; preds = %.lr.ph127, %78
  %indvars.iv149 = phi i64 [ 0, %.lr.ph127 ], [ %indvars.iv.next150, %78 ]
  %75 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I6modintILi1000000007EESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %indvars.iv160) #6
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %indvars.iv149) #6
  %77 = load i32, ptr %18, align 4, !tbaa !5
  store i32 %77, ptr %76, align 4, !tbaa !5
  %exitcond155 = icmp eq i64 %indvars.iv149, %indvars.iv158
  br i1 %exitcond155, label %._crit_edge128, label %78

78:                                               ; preds = %74
  %79 = add nuw i64 %indvars.iv160, %indvars.iv149
  %80 = trunc i64 %79 to i32
  %81 = sub i32 %57, %80
  call void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %19, i32 noundef %81)
  %82 = load i32, ptr %19, align 4
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %18, i32 %82)
  %indvars.iv.next150 = add nuw nsw i64 %indvars.iv149, 1
  %84 = getelementptr inbounds [303 x %struct.modint], ptr @inv, i64 0, i64 %indvars.iv.next150
  %.sroa.028.0.copyload = load i32, ptr %84, align 4, !tbaa !5
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %18, i32 %.sroa.028.0.copyload)
  %exitcond157.not = icmp eq i64 %indvars.iv.next150, %wide.trip.count167
  br i1 %exitcond157.not, label %._crit_edge128, label %74, !llvm.loop !12

._crit_edge128:                                   ; preds = %78, %74
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #6
  %indvars.iv.next161 = add nuw nsw i64 %indvars.iv160, 1
  %indvars.iv.next159 = add nsw i64 %indvars.iv158, -1
  %exitcond168.not = icmp eq i64 %indvars.iv.next161, %wide.trip.count167
  br i1 %exitcond168.not, label %._crit_edge134, label %.lr.ph133.split, !llvm.loop !13

._crit_edge134:                                   ; preds = %._crit_edge128, %.lr.ph133.split, %61
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %21) #6
  call void @_ZNSaI6modintILi1000000007EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  invoke void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %26, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %86 unwind label %87

86:                                               ; preds = %._crit_edge134
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #6
  call void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %22, i32 noundef 1)
  br i1 %.not99130, label %._crit_edge146, label %.lr.ph139.preheader

.lr.ph139.preheader:                              ; preds = %86
  %wide.trip.count172 = zext i32 %25 to i64
  br label %.lr.ph139

.preheader120:                                    ; preds = %.lr.ph139
  br i1 %.not99130, label %._crit_edge146, label %.preheader119.preheader

.preheader119.preheader:                          ; preds = %.preheader120
  %wide.trip.count188 = zext i32 %25 to i64
  br label %.preheader119

87:                                               ; preds = %._crit_edge134
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorI6modintILi1000000007EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #6
  br label %122

.lr.ph139:                                        ; preds = %.lr.ph139.preheader, %.lr.ph139
  %indvars.iv169 = phi i64 [ 0, %.lr.ph139.preheader ], [ %indvars.iv.next170, %.lr.ph139 ]
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %indvars.iv169) #6
  %90 = load i32, ptr %22, align 4, !tbaa !5
  store i32 %90, ptr %89, align 4, !tbaa !5
  call void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %23, i32 noundef %57)
  %91 = load i32, ptr %23, align 4
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %22, i32 %91)
  %indvars.iv.next170 = add nuw nsw i64 %indvars.iv169, 1
  %exitcond173.not = icmp eq i64 %indvars.iv.next170, %wide.trip.count172
  br i1 %exitcond173.not, label %.preheader120, label %.lr.ph139, !llvm.loop !14

.preheader119:                                    ; preds = %.preheader119.preheader, %93
  %indvars.iv183 = phi i64 [ 0, %.preheader119.preheader ], [ %indvars.iv.next184, %93 ]
  %indvars.iv181 = phi i64 [ 1, %.preheader119.preheader ], [ %indvars.iv.next182, %93 ]
  br label %94

.preheader118:                                    ; preds = %93
  br i1 %.not99130, label %._crit_edge146, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader118
  %wide.trip.count196 = zext i32 %25 to i64
  br label %.preheader

93:                                               ; preds = %103
  %indvars.iv.next184 = add nuw nsw i64 %indvars.iv183, 1
  %indvars.iv.next182 = add nuw nsw i64 %indvars.iv181, 1
  %exitcond189.not = icmp eq i64 %indvars.iv.next184, %wide.trip.count188
  br i1 %exitcond189.not, label %.preheader118, label %.preheader119, !llvm.loop !15

94:                                               ; preds = %.preheader119, %103
  %indvars.iv174 = phi i64 [ 0, %.preheader119 ], [ %indvars.iv.next175, %103 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #6
  %95 = sub nsw i64 %indvars.iv183, %indvars.iv174
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %95) #6
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv174) #6
  %.sroa.011.0.copyload = load i32, ptr %97, align 4, !tbaa !5
  %98 = invoke i32 @_ZNK6modintILi1000000007EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %96, i32 %.sroa.011.0.copyload)
          to label %99 unwind label %106

99:                                               ; preds = %94
  store i32 %98, ptr %24, align 4
  %100 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I6modintILi1000000007EESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %indvars.iv174) #6
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef %95) #6
  %.sroa.010.0.copyload = load i32, ptr %101, align 4, !tbaa !5
  %102 = invoke i32 @_ZNK6modintILi1000000007EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %24, i32 %.sroa.010.0.copyload)
          to label %103 unwind label %106

103:                                              ; preds = %99
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv183) #6
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %104, i32 %102)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #6
  %indvars.iv.next175 = add nuw nsw i64 %indvars.iv174, 1
  %exitcond180.not = icmp eq i64 %indvars.iv.next175, %indvars.iv181
  br i1 %exitcond180.not, label %93, label %94, !llvm.loop !16

106:                                              ; preds = %99, %94
  %107 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #6
  br label %121

.preheader:                                       ; preds = %.preheader.preheader, %108
  %indvars.iv193 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next194, %108 ]
  br label %109

._crit_edge146:                                   ; preds = %108, %86, %.preheader120, %.preheader118
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #6
  call void @_ZNSt6vectorIS_I6modintILi1000000007EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  br label %126

108:                                              ; preds = %113
  %indvars.iv.next194 = add nuw nsw i64 %indvars.iv193, 1
  %exitcond197.not = icmp eq i64 %indvars.iv.next194, %wide.trip.count196
  br i1 %exitcond197.not, label %._crit_edge146, label %.preheader, !llvm.loop !17

109:                                              ; preds = %.preheader, %113
  %indvars.iv190 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next191, %113 ]
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv193) #6
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv190) #6
  %.sroa.0.0.copyload = load i32, ptr %111, align 4, !tbaa !5
  %112 = invoke i32 @_ZNK6modintILi1000000007EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %110, i32 %.sroa.0.0.copyload)
          to label %113 unwind label %119

113:                                              ; preds = %109
  %114 = add nuw nsw i64 %indvars.iv190, %indvars.iv193
  %115 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %114) #6
  %116 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %115, i32 %112)
  %indvars.iv.next191 = add nuw nsw i64 %indvars.iv190, 1
  %117 = add nuw nsw i64 %indvars.iv.next191, %indvars.iv193
  %118 = trunc nuw i64 %117 to i32
  %.not104 = icmp sgt i32 %118, %2
  br i1 %.not104, label %108, label %109, !llvm.loop !18

119:                                              ; preds = %109
  %120 = landingpad { ptr, i32 }
          cleanup
  br label %121

121:                                              ; preds = %119, %106
  %.pn106 = phi { ptr, i32 } [ %107, %106 ], [ %120, %119 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  br label %122

122:                                              ; preds = %121, %87
  %.pn106.pn = phi { ptr, i32 } [ %.pn106, %121 ], [ %88, %87 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #6
  call void @_ZNSt6vectorIS_I6modintILi1000000007EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  br label %123

123:                                              ; preds = %122, %73
  %.pn106.pn.pn = phi { ptr, i32 } [ %.pn106.pn, %122 ], [ %.pn, %73 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  br label %124

124:                                              ; preds = %123, %67
  %.pn106.pn.pn.pn = phi { ptr, i32 } [ %.pn106.pn.pn, %123 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  br label %125

125:                                              ; preds = %124, %65
  %.pn106.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn106.pn.pn.pn, %124 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  br label %127

126:                                              ; preds = %29, %._crit_edge, %._crit_edge146
  ret void

127:                                              ; preds = %125, %55
  %.pn114.pn = phi { ptr, i32 } [ %.pn114, %55 ], [ %.pn106.pn.pn.pn.pn, %125 ]
  call void @_ZNSt6vectorI6modintILi1000000007EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %128

128:                                              ; preds = %127, %32
  %.pn114.pn.pn = phi { ptr, i32 } [ %.pn114.pn, %127 ], [ %33, %32 ]
  resume { ptr, i32 } %.pn114.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 void @_ZN6modintILi1000000007EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) 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_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 4 dereferenceable(4), 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 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: 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 @_ZNSaISt6vectorI6modintILi1000000007EESaIS1_EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIS_I6modintILi1000000007EESaIS1_EESaIS3_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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #5

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.peeled.count", i32 1}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopFullUnrollPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass