; LLVM IR from ShahjalalShohag/code-library :: Math (Faulhaber Formula Fastest)

; 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.combi = type { i32, %"class.std::vector.6", %"class.std::vector.6", %"class.std::vector.6" }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%struct.poly = type { %"class.std::vector.6" }
%struct.modint = type { i32 }

@C = external dso_local global %struct.combi, align 8
@a = external dso_local global [300009 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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) #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4polymlERKS_(ptr dead_on_unwind noalias writable sret(%struct.poly) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1 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) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4poly7inverseEi(ptr dead_on_unwind noalias writable sret(%struct.poly) align 8, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9faulhaberii(ptr dead_on_unwind noalias writable sret(%struct.poly) align 8, i32 noundef, i32 noundef) #1

; 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) #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZN5combi4factEi(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef) #2 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca %struct.poly, align 8
  %7 = alloca %struct.poly, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %struct.poly, align 8
  %11 = alloca %struct.poly, align 8
  %12 = alloca %struct.poly, align 8
  %13 = alloca i32, align 4
  %14 = alloca %struct.modint, align 4
  %15 = alloca i32, align 4
  %16 = alloca %struct.modint, align 4
  %17 = alloca %struct.poly, align 8
  %18 = alloca i32, align 4
  %19 = alloca %struct.modint, align 4
  %20 = alloca i32, align 4
  %21 = alloca %struct.modint, align 4
  store i32 0, ptr %1, align 4
  %22 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %23 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %24 = getelementptr i8, ptr %23, i64 -24
  %25 = load i64, ptr %24, align 8
  %26 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %25
  %27 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %26, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !8
  br label %31

31:                                               ; preds = %41, %0
  %32 = load i32, ptr %5, align 4, !tbaa !8
  %33 = load i32, ptr %2, align 4, !tbaa !8
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %44

36:                                               ; preds = %31
  %37 = load i32, ptr %5, align 4, !tbaa !8
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [300009 x i32], ptr @a, i64 0, i64 %38
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %39)
  br label %41

41:                                               ; preds = %36
  %42 = load i32, ptr %5, align 4, !tbaa !8
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %5, align 4, !tbaa !8
  br label %31, !llvm.loop !11

44:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #7
  call void @_ZN4polyC2IJEEEDpT_(ptr noundef nonnull align 8 dereferenceable(24) %6)
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #7
  invoke void @_ZN4polyC2IJEEEDpT_(ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %45 unwind label %63

45:                                               ; preds = %44
  %46 = load i32, ptr %2, align 4, !tbaa !8
  %47 = sub nsw i32 %46, 1
  invoke void @_Z2yoiiR4polyS0_(i32 noundef 0, i32 noundef %47, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %48 unwind label %67

48:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #7
  %49 = load i32, ptr %3, align 4, !tbaa !8
  %50 = add nsw i32 %49, 1
  invoke void @_ZNK4poly7inverseEi(ptr dead_on_unwind writable sret(%struct.poly) align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef %50)
          to label %51 unwind label %71

51:                                               ; preds = %48
  invoke void @_ZNK4polymlERKS_(ptr dead_on_unwind writable sret(%struct.poly) align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %52 unwind label %75

52:                                               ; preds = %51
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #7
  %53 = load i64, ptr %4, align 8, !tbaa !13
  %54 = srem i64 %53, 1000000007
  %55 = trunc i64 %54 to i32
  %56 = load i32, ptr %3, align 4, !tbaa !8
  invoke void @_Z9faulhaberii(ptr dead_on_unwind writable sret(%struct.poly) align 8 %12, i32 noundef %55, i32 noundef %56)
          to label %57 unwind label %80

57:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !8
  br label %58

58:                                               ; preds = %97, %57
  %59 = load i32, ptr %13, align 4, !tbaa !8
  %60 = load i32, ptr %3, align 4, !tbaa !8
  %61 = icmp sle i32 %59, %60
  br i1 %61, label %84, label %62

62:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %104

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

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

71:                                               ; preds = %48
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %8, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %9, align 4
  br label %79

75:                                               ; preds = %51
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %8, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %9, align 4
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  br label %79

79:                                               ; preds = %75, %71
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  br label %191

80:                                               ; preds = %52
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %8, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %9, align 4
  br label %190

84:                                               ; preds = %58
  %85 = load i32, ptr %13, align 4, !tbaa !8
  %86 = invoke i32 @_ZN5combi4finvEi(ptr noundef nonnull align 8 dereferenceable(80) @C, i32 noundef %85)
          to label %87 unwind label %100

87:                                               ; preds = %84
  %88 = getelementptr inbounds %struct.modint, ptr %14, i32 0, i32 0
  store i32 %86, ptr %88, align 4
  %89 = getelementptr inbounds %struct.poly, ptr %12, i32 0, i32 0
  %90 = load i32, ptr %13, align 4, !tbaa !8
  %91 = sext i32 %90 to i64
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %91) #7
  %93 = getelementptr inbounds %struct.modint, ptr %14, i32 0, i32 0
  %94 = load i32, ptr %93, align 4
  %95 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %92, i32 %94)
          to label %96 unwind label %100

96:                                               ; preds = %87
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %13, align 4, !tbaa !8
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %13, align 4, !tbaa !8
  br label %58, !llvm.loop !15

100:                                              ; preds = %87, %84
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %8, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %189

104:                                              ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !8
  br label %105

105:                                              ; preds = %123, %104
  %106 = load i32, ptr %15, align 4, !tbaa !8
  %107 = load i32, ptr %3, align 4, !tbaa !8
  %108 = icmp sle i32 %106, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %130

110:                                              ; preds = %105
  %111 = load i32, ptr %15, align 4, !tbaa !8
  %112 = invoke i32 @_ZN5combi4finvEi(ptr noundef nonnull align 8 dereferenceable(80) @C, i32 noundef %111)
          to label %113 unwind label %126

113:                                              ; preds = %110
  %114 = getelementptr inbounds %struct.modint, ptr %16, i32 0, i32 0
  store i32 %112, ptr %114, align 4
  %115 = getelementptr inbounds %struct.poly, ptr %10, i32 0, i32 0
  %116 = load i32, ptr %15, align 4, !tbaa !8
  %117 = sext i32 %116 to i64
  %118 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %115, i64 noundef %117) #7
  %119 = getelementptr inbounds %struct.modint, ptr %16, i32 0, i32 0
  %120 = load i32, ptr %119, align 4
  %121 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %118, i32 %120)
          to label %122 unwind label %126

122:                                              ; preds = %113
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %15, align 4, !tbaa !8
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %15, align 4, !tbaa !8
  br label %105, !llvm.loop !16

126:                                              ; preds = %113, %110
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %8, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %189

130:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #7
  invoke void @_ZNK4polymlERKS_(ptr dead_on_unwind writable sret(%struct.poly) align 8 %17, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %131 unwind label %137

131:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !8
  br label %132

132:                                              ; preds = %154, %131
  %133 = load i32, ptr %18, align 4, !tbaa !8
  %134 = load i32, ptr %3, align 4, !tbaa !8
  %135 = icmp sle i32 %133, %134
  br i1 %135, label %141, label %136

136:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %161

137:                                              ; preds = %130
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %8, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %9, align 4
  br label %188

141:                                              ; preds = %132
  %142 = load i32, ptr %18, align 4, !tbaa !8
  %143 = invoke i32 @_ZN5combi4factEi(ptr noundef nonnull align 8 dereferenceable(80) @C, i32 noundef %142)
          to label %144 unwind label %157

144:                                              ; preds = %141
  %145 = getelementptr inbounds %struct.modint, ptr %19, i32 0, i32 0
  store i32 %143, ptr %145, align 4
  %146 = getelementptr inbounds %struct.poly, ptr %17, i32 0, i32 0
  %147 = load i32, ptr %18, align 4, !tbaa !8
  %148 = sext i32 %147 to i64
  %149 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %146, i64 noundef %148) #7
  %150 = getelementptr inbounds %struct.modint, ptr %19, i32 0, i32 0
  %151 = load i32, ptr %150, align 4
  %152 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %149, i32 %151)
          to label %153 unwind label %157

153:                                              ; preds = %144
  br label %154

154:                                              ; preds = %153
  %155 = load i32, ptr %18, align 4, !tbaa !8
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %18, align 4, !tbaa !8
  br label %132, !llvm.loop !17

157:                                              ; preds = %144, %141
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %8, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %187

161:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !8
  br label %162

162:                                              ; preds = %178, %161
  %163 = load i32, ptr %20, align 4, !tbaa !8
  %164 = load i32, ptr %3, align 4, !tbaa !8
  %165 = icmp sle i32 %163, %164
  br i1 %165, label %167, label %166

166:                                              ; preds = %162
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %185

167:                                              ; preds = %162
  %168 = load i32, ptr %20, align 4, !tbaa !8
  %169 = invoke i32 @_ZNK4polyixEi(ptr noundef nonnull align 8 dereferenceable(24) %17, i32 noundef %168)
          to label %170 unwind label %181

170:                                              ; preds = %167
  %171 = getelementptr inbounds %struct.modint, ptr %21, i32 0, i32 0
  store i32 %169, ptr %171, align 4
  %172 = getelementptr inbounds %struct.modint, ptr %21, i32 0, i32 0
  %173 = load i32, ptr %172, align 4
  %174 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsILi1000000007EERSoS0_6modintIXT_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %173)
          to label %175 unwind label %181

175:                                              ; preds = %170
  %176 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %174, i8 noundef signext 32)
          to label %177 unwind label %181

177:                                              ; preds = %175
  br label %178

178:                                              ; preds = %177
  %179 = load i32, ptr %20, align 4, !tbaa !8
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %20, align 4, !tbaa !8
  br label %162, !llvm.loop !18

181:                                              ; preds = %175, %170, %167
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %8, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %187

185:                                              ; preds = %166
  store i32 0, ptr %1, align 4
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #7
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %186 = load i32, ptr %1, align 4
  ret i32 %186

187:                                              ; preds = %181, %157
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  br label %188

188:                                              ; preds = %187, %137
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #7
  br label %189

189:                                              ; preds = %188, %126, %100
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  br label %190

190:                                              ; preds = %189, %80
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  br label %191

191:                                              ; preds = %190, %79
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  br label %192

192:                                              ; preds = %191, %67
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  br label %193

193:                                              ; preds = %192, %63
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %194

194:                                              ; preds = %193
  %195 = load ptr, ptr %8, align 8
  %196 = load i32, ptr %9, align 4
  %197 = insertvalue { ptr, i32 } poison, ptr %195, 0
  %198 = insertvalue { ptr, i32 } %197, i32 %196, 1
  resume { ptr, i32 } %198
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #5

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #3 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZN5combi4finvEi(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZlsILi1000000007EERSoS0_6modintIXT_EE(ptr noundef nonnull align 8 dereferenceable(8), i32) #1

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


; 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.combi = type { i32, %"class.std::vector.6", %"class.std::vector.6", %"class.std::vector.6" }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%struct.poly = type { %"class.std::vector.6" }

@C = external dso_local global %struct.combi, align 8
@a = external dso_local global [300009 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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) #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4polymlERKS_(ptr dead_on_unwind noalias writable sret(%struct.poly) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 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 #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4poly7inverseEi(ptr dead_on_unwind noalias writable sret(%struct.poly) align 8, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9faulhaberii(ptr dead_on_unwind noalias writable sret(%struct.poly) align 8, i32 noundef, i32 noundef) local_unnamed_addr #1

; 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 #2 align 2

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i64, align 8
  %4 = alloca %struct.poly, align 8
  %5 = alloca %struct.poly, align 8
  %6 = alloca %struct.poly, align 8
  %7 = alloca %struct.poly, align 8
  %8 = alloca %struct.poly, align 8
  %9 = alloca %struct.poly, align 8
  %10 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %11 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %13
  %15 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %19 = load i32, ptr %1, align 4, !tbaa !8
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  call void @_ZN4polyC2IJEEEDpT_(ptr noundef nonnull align 8 dereferenceable(24) %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  call void @_ZN4polyC2IJEEEDpT_(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %21 = load i32, ptr %1, align 4, !tbaa !8
  %22 = add nsw i32 %21, -1
  invoke void @_Z2yoiiR4polyS0_(i32 noundef 0, i32 noundef %22, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %28 unwind label %39

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %23 = getelementptr inbounds [300009 x i32], ptr @a, i64 0, i64 %indvars.iv
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %25 = load i32, ptr %1, align 4, !tbaa !8
  %26 = sext i32 %25 to i64
  %27 = icmp slt i64 %indvars.iv.next, %26
  br i1 %27, label %.lr.ph, label %._crit_edge, !llvm.loop !11

28:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  %29 = load i32, ptr %2, align 4, !tbaa !8
  %30 = add nsw i32 %29, 1
  invoke void @_ZNK4poly7inverseEi(ptr dead_on_unwind nonnull writable sret(%struct.poly) align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef %30)
          to label %31 unwind label %41

31:                                               ; preds = %28
  invoke void @_ZNK4polymlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.poly) align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %32 unwind label %43

32:                                               ; preds = %31
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  %33 = load i64, ptr %3, align 8, !tbaa !13
  %34 = srem i64 %33, 1000000007
  %35 = trunc nsw i64 %34 to i32
  %36 = load i32, ptr %2, align 4, !tbaa !8
  invoke void @_Z9faulhaberii(ptr dead_on_unwind nonnull writable sret(%struct.poly) align 8 %8, i32 noundef %35, i32 noundef %36)
          to label %.preheader44 unwind label %46

.preheader44:                                     ; preds = %32
  %37 = load i32, ptr %2, align 4, !tbaa !8
  %.not46 = icmp slt i32 %37, 0
  br i1 %.not46, label %._crit_edge52, label %.lr.ph48

.preheader43:                                     ; preds = %.lr.ph48
  %38 = icmp slt i32 %52, 0
  br i1 %38, label %._crit_edge52, label %.lr.ph51

39:                                               ; preds = %._crit_edge
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %83

41:                                               ; preds = %28
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %45

43:                                               ; preds = %31
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  br label %45

45:                                               ; preds = %43, %41
  %.pn = phi { ptr, i32 } [ %44, %43 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  br label %82

46:                                               ; preds = %32
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %81

.lr.ph48:                                         ; preds = %.preheader44, %.lr.ph48
  %indvars.iv61 = phi i64 [ %indvars.iv.next62, %.lr.ph48 ], [ 0, %.preheader44 ]
  %48 = trunc nuw nsw i64 %indvars.iv61 to i32
  %49 = call i32 @_ZN5combi4finvEi(ptr noundef nonnull align 8 dereferenceable(80) @C, i32 noundef %48)
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv61) #7
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %50, i32 %49)
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %52 = load i32, ptr %2, align 4, !tbaa !8
  %53 = sext i32 %52 to i64
  %.not.not = icmp slt i64 %indvars.iv61, %53
  br i1 %.not.not, label %.lr.ph48, label %.preheader43, !llvm.loop !15

._crit_edge52:                                    ; preds = %.lr.ph51, %.preheader44, %.preheader43
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #7
  invoke void @_ZNK4polymlERKS_(ptr dead_on_unwind nonnull writable sret(%struct.poly) align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %.preheader42 unwind label %62

.preheader42:                                     ; preds = %._crit_edge52
  %54 = load i32, ptr %2, align 4, !tbaa !8
  %.not3553 = icmp slt i32 %54, 0
  br i1 %.not3553, label %._crit_edge59, label %.lr.ph55

.lr.ph51:                                         ; preds = %.preheader43, %.lr.ph51
  %indvars.iv64 = phi i64 [ %indvars.iv.next65, %.lr.ph51 ], [ 0, %.preheader43 ]
  %55 = trunc nuw nsw i64 %indvars.iv64 to i32
  %56 = call i32 @_ZN5combi4finvEi(ptr noundef nonnull align 8 dereferenceable(80) @C, i32 noundef %55)
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv64) #7
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %57, i32 %56)
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %59 = load i32, ptr %2, align 4, !tbaa !8
  %60 = sext i32 %59 to i64
  %.not34.not = icmp slt i64 %indvars.iv64, %60
  br i1 %.not34.not, label %.lr.ph51, label %._crit_edge52, !llvm.loop !16

.preheader:                                       ; preds = %.lr.ph55
  %61 = icmp slt i32 %68, 0
  br i1 %61, label %._crit_edge59, label %.lr.ph58

62:                                               ; preds = %._crit_edge52
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %80

.lr.ph55:                                         ; preds = %.preheader42, %.lr.ph55
  %indvars.iv67 = phi i64 [ %indvars.iv.next68, %.lr.ph55 ], [ 0, %.preheader42 ]
  %64 = trunc nuw nsw i64 %indvars.iv67 to i32
  %65 = call i32 @_ZN5combi4factEi(ptr noundef nonnull align 8 dereferenceable(80) @C, i32 noundef %64)
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi1000000007EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv67) #7
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi1000000007EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %66, i32 %65)
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %68 = load i32, ptr %2, align 4, !tbaa !8
  %69 = sext i32 %68 to i64
  %.not35.not = icmp slt i64 %indvars.iv67, %69
  br i1 %.not35.not, label %.lr.ph55, label %.preheader, !llvm.loop !17

._crit_edge59:                                    ; preds = %75, %.preheader42, %.preheader
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

.lr.ph58:                                         ; preds = %.preheader, %75
  %.057 = phi i32 [ %76, %75 ], [ 0, %.preheader ]
  %70 = invoke i32 @_ZNK4polyixEi(ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef %.057)
          to label %71 unwind label %78

71:                                               ; preds = %.lr.ph58
  %72 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsILi1000000007EERSoS0_6modintIXT_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %70)
          to label %73 unwind label %78

73:                                               ; preds = %71
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %72, i8 noundef signext 32)
          to label %75 unwind label %78

75:                                               ; preds = %73
  %76 = add nuw nsw i32 %.057, 1
  %77 = load i32, ptr %2, align 4, !tbaa !8
  %.not36.not = icmp slt i32 %.057, %77
  br i1 %.not36.not, label %.lr.ph58, label %._crit_edge59, !llvm.loop !18

78:                                               ; preds = %73, %71, %.lr.ph58
  %79 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  br label %80

80:                                               ; preds = %78, %62
  %.pn37 = phi { ptr, i32 } [ %79, %78 ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  br label %81

81:                                               ; preds = %80, %46
  %.pn37.pn = phi { ptr, i32 } [ %.pn37, %80 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  br label %82

82:                                               ; preds = %81, %45
  %.pn37.pn.pn = phi { ptr, i32 } [ %.pn37.pn, %81 ], [ %.pn, %45 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  br label %83

83:                                               ; preds = %82, %39
  %.pn37.pn.pn.pn = phi { ptr, i32 } [ %.pn37.pn.pn, %82 ], [ %40, %39 ]
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn37.pn.pn.pn
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #5

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #6

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

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


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