; LLVM IR from ShahjalalShohag/code-library :: Math (Subset Sum Problem)

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

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

@_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 nounwind uwtable
declare dso_local void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::vector.0", align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::allocator.2", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.poly, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %struct.modint, align 4
  %16 = alloca %struct.modint, align 4
  %17 = alloca %struct.modint, align 4
  %18 = alloca %struct.modint, align 4
  %19 = alloca %struct.modint, align 4
  %20 = alloca %struct.modint, align 4
  %21 = alloca %struct.poly, align 8
  %22 = alloca i32, align 4
  %23 = alloca %struct.modint, align 4
  store i32 0, ptr %1, align 4
  %24 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %25 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %26 = getelementptr i8, ptr %25, i64 -24
  %27 = load i64, ptr %26, align 8
  %28 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %27
  %29 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %28, 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
  %30 = 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)
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #7
  %32 = load i32, ptr %3, align 4, !tbaa !8
  %33 = add nsw i32 %32, 1
  %34 = sext i32 %33 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %34, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %35 unwind label %41

35:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !8
  br label %36

36:                                               ; preds = %62, %35
  %37 = load i32, ptr %9, align 4, !tbaa !8
  %38 = load i32, ptr %2, align 4, !tbaa !8
  %39 = icmp slt i32 %37, %38
  br i1 %39, label %45, label %40

40:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %65

41:                                               ; preds = %0
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %7, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %196

45:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %46 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %47 unwind label %57

47:                                               ; preds = %45
  %48 = load i32, ptr %10, align 4, !tbaa !8
  %49 = load i32, ptr %3, align 4, !tbaa !8
  %50 = icmp sle i32 %48, %49
  br i1 %50, label %51, label %61

51:                                               ; preds = %47
  %52 = load i32, ptr %10, align 4, !tbaa !8
  %53 = sext i32 %52 to i64
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %53) #7
  %55 = load i32, ptr %54, align 4, !tbaa !8
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %54, align 4, !tbaa !8
  br label %61

57:                                               ; preds = %45
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %7, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %195

61:                                               ; preds = %51, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %62

62:                                               ; preds = %61
  %63 = load i32, ptr %9, align 4, !tbaa !8
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %9, align 4, !tbaa !8
  br label %36, !llvm.loop !11

65:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #7
  %66 = load i32, ptr %3, align 4, !tbaa !8
  %67 = add nsw i32 %66, 1
  invoke void @_ZN4polyC2IJiiEEEDpT_(ptr noundef nonnull align 8 dereferenceable(24) %11, i32 noundef %67, i32 noundef 0)
          to label %68 unwind label %74

68:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 1, ptr %12, align 4, !tbaa !8
  br label %69

69:                                               ; preds = %150, %68
  %70 = load i32, ptr %12, align 4, !tbaa !8
  %71 = load i32, ptr %3, align 4, !tbaa !8
  %72 = icmp sle i32 %70, %71
  br i1 %72, label %78, label %73

73:                                               ; preds = %69
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %153

74:                                               ; preds = %65
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %7, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %8, align 4
  br label %194

78:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 1, ptr %14, align 4, !tbaa !8
  br label %79

79:                                               ; preds = %145, %78
  %80 = load i32, ptr %12, align 4, !tbaa !8
  %81 = load i32, ptr %14, align 4, !tbaa !8
  %82 = mul nsw i32 %80, %81
  %83 = load i32, ptr %3, align 4, !tbaa !8
  %84 = icmp sle i32 %82, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %79
  store i32 8, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %149

86:                                               ; preds = %79
  %87 = load i32, ptr %14, align 4, !tbaa !8
  %88 = and i32 %87, 1
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %117

90:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %91 = load i32, ptr %12, align 4, !tbaa !8
  %92 = sext i32 %91 to i64
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %92) #7
  %94 = load i32, ptr %93, align 4, !tbaa !8
  invoke void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %16, i32 noundef %94)
          to label %95 unwind label %113

95:                                               ; preds = %90
  %96 = load i32, ptr %14, align 4, !tbaa !8
  invoke void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %17, i32 noundef %96)
          to label %97 unwind label %113

97:                                               ; preds = %95
  %98 = getelementptr inbounds %struct.modint, ptr %17, i32 0, i32 0
  %99 = load i32, ptr %98, align 4
  %100 = invoke i32 @_ZNK6modintILi998244353EEdvES0_(ptr noundef nonnull align 4 dereferenceable(4) %16, i32 %99)
          to label %101 unwind label %113

101:                                              ; preds = %97
  %102 = getelementptr inbounds %struct.modint, ptr %15, i32 0, i32 0
  store i32 %100, ptr %102, align 4
  %103 = getelementptr inbounds %struct.poly, ptr %11, i32 0, i32 0
  %104 = load i32, ptr %12, align 4, !tbaa !8
  %105 = load i32, ptr %14, align 4, !tbaa !8
  %106 = mul nsw i32 %104, %105
  %107 = sext i32 %106 to i64
  %108 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %103, i64 noundef %107) #7
  %109 = getelementptr inbounds %struct.modint, ptr %15, i32 0, i32 0
  %110 = load i32, ptr %109, align 4
  %111 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %108, i32 %110)
          to label %112 unwind label %113

112:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %144

113:                                              ; preds = %101, %97, %95, %90
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %7, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %148

117:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %118 = load i32, ptr %12, align 4, !tbaa !8
  %119 = sext i32 %118 to i64
  %120 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %119) #7
  %121 = load i32, ptr %120, align 4, !tbaa !8
  invoke void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %19, i32 noundef %121)
          to label %122 unwind label %140

122:                                              ; preds = %117
  %123 = load i32, ptr %14, align 4, !tbaa !8
  invoke void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %20, i32 noundef %123)
          to label %124 unwind label %140

124:                                              ; preds = %122
  %125 = getelementptr inbounds %struct.modint, ptr %20, i32 0, i32 0
  %126 = load i32, ptr %125, align 4
  %127 = invoke i32 @_ZNK6modintILi998244353EEdvES0_(ptr noundef nonnull align 4 dereferenceable(4) %19, i32 %126)
          to label %128 unwind label %140

128:                                              ; preds = %124
  %129 = getelementptr inbounds %struct.modint, ptr %18, i32 0, i32 0
  store i32 %127, ptr %129, align 4
  %130 = getelementptr inbounds %struct.poly, ptr %11, i32 0, i32 0
  %131 = load i32, ptr %12, align 4, !tbaa !8
  %132 = load i32, ptr %14, align 4, !tbaa !8
  %133 = mul nsw i32 %131, %132
  %134 = sext i32 %133 to i64
  %135 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %130, i64 noundef %134) #7
  %136 = getelementptr inbounds %struct.modint, ptr %18, i32 0, i32 0
  %137 = load i32, ptr %136, align 4
  %138 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEmIES0_(ptr noundef nonnull align 4 dereferenceable(4) %135, i32 %137)
          to label %139 unwind label %140

139:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %144

140:                                              ; preds = %128, %124, %122, %117
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %7, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %148

144:                                              ; preds = %139, %112
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %14, align 4, !tbaa !8
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %14, align 4, !tbaa !8
  br label %79, !llvm.loop !13

148:                                              ; preds = %140, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %193

149:                                              ; preds = %85
  br label %150

150:                                              ; preds = %149
  %151 = load i32, ptr %12, align 4, !tbaa !8
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %12, align 4, !tbaa !8
  br label %69, !llvm.loop !14

153:                                              ; preds = %73
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #7
  %154 = load i32, ptr %3, align 4, !tbaa !8
  %155 = add nsw i32 %154, 1
  invoke void @_ZNK4poly3expEi(ptr dead_on_unwind writable sret(%struct.poly) align 8 %21, ptr noundef nonnull align 8 dereferenceable(24) %11, i32 noundef %155)
          to label %156 unwind label %163

156:                                              ; preds = %153
  %157 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN4polyaSEOS_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 1, ptr %22, align 4, !tbaa !8
  br label %158

158:                                              ; preds = %178, %156
  %159 = load i32, ptr %22, align 4, !tbaa !8
  %160 = load i32, ptr %3, align 4, !tbaa !8
  %161 = icmp sle i32 %159, %160
  br i1 %161, label %167, label %162

162:                                              ; preds = %158
  store i32 11, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %185

163:                                              ; preds = %153
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %7, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #7
  br label %193

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

170:                                              ; preds = %167
  %171 = getelementptr inbounds %struct.modint, ptr %23, i32 0, i32 0
  store i32 %169, ptr %171, align 4
  %172 = getelementptr inbounds %struct.modint, ptr %23, i32 0, i32 0
  %173 = load i32, ptr %172, align 4
  %174 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsILi998244353EERSoS0_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 %22, align 4, !tbaa !8
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %22, align 4, !tbaa !8
  br label %158, !llvm.loop !15

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

185:                                              ; preds = %162
  %186 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
          to label %187 unwind label %189

187:                                              ; preds = %185
  store i32 0, ptr %1, align 4
  store i32 1, ptr %13, align 4
  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 @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, 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
  %188 = load i32, ptr %1, align 4
  ret i32 %188

189:                                              ; preds = %185
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %7, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %8, align 4
  br label %193

193:                                              ; preds = %189, %181, %163, %148
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  br label %194

194:                                              ; preds = %193, %74
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  br label %195

195:                                              ; preds = %194, %57
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  br label %196

196:                                              ; preds = %195, %41
  call void @llvm.lifetime.end.p0(i64 24, 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 %197

197:                                              ; preds = %196
  %198 = load ptr, ptr %7, align 8
  %199 = load i32, ptr %8, align 4
  %200 = insertvalue { ptr, i32 } poison, ptr %198, 0
  %201 = insertvalue { ptr, i32 } %200, i32 %199, 1
  resume { ptr, i32 } %201
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #1 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)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(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 #4 align 2

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #6 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) #5

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { "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 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 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 = { 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 #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 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !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"

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

@_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 nounwind uwtable
declare dso_local void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::vector.0", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::allocator.2", align 1
  %6 = alloca i32, align 4
  %7 = alloca %struct.poly, align 8
  %8 = alloca %struct.modint, align 4
  %9 = alloca %struct.modint, align 4
  %10 = alloca %struct.modint, align 4
  %11 = alloca %struct.modint, align 4
  %12 = alloca %struct.poly, align 8
  %13 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %14 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %15 = getelementptr i8, ptr %14, i64 -24
  %16 = load i64, ptr %15, align 8
  %17 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %16
  %18 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %17, 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
  %19 = 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)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  %21 = load i32, ptr %2, align 4, !tbaa !8
  %22 = add nsw i32 %21, 1
  %23 = sext i32 %22 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 0, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %23, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %24 unwind label %30

24:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  %25 = load i32, ptr %1, align 4, !tbaa !8
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %43, %24
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  %27 = load i32, ptr %2, align 4, !tbaa !8
  %28 = add nsw i32 %27, 1
  invoke void @_ZN4polyC2IJiiEEEDpT_(ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef %28, i32 noundef 0)
          to label %.preheader44 unwind label %50

.preheader44:                                     ; preds = %._crit_edge
  %29 = load i32, ptr %2, align 4, !tbaa !8
  %.not52 = icmp slt i32 %29, 1
  br i1 %.not52, label %._crit_edge54, label %.preheader

30:                                               ; preds = %0
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  br label %102

.lr.ph:                                           ; preds = %24, %43
  %.03147 = phi i32 [ %44, %43 ], [ 0, %24 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %32 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %33 unwind label %41

33:                                               ; preds = %.lr.ph
  %34 = load i32, ptr %6, align 4, !tbaa !8
  %35 = load i32, ptr %2, align 4, !tbaa !8
  %.not43 = icmp sgt i32 %34, %35
  br i1 %.not43, label %43, label %36

36:                                               ; preds = %33
  %37 = sext i32 %34 to i64
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %37) #7
  %39 = load i32, ptr %38, align 4, !tbaa !8
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %38, align 4, !tbaa !8
  br label %43

41:                                               ; preds = %.lr.ph
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  br label %101

43:                                               ; preds = %36, %33
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  %44 = add nuw nsw i32 %.03147, 1
  %45 = load i32, ptr %1, align 4, !tbaa !8
  %46 = icmp slt i32 %44, %45
  br i1 %46, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.preheader:                                       ; preds = %.preheader44, %._crit_edge51
  %47 = phi i32 [ %52, %._crit_edge51 ], [ %29, %.preheader44 ]
  %indvars.iv62 = phi i64 [ %indvars.iv.next63, %._crit_edge51 ], [ 1, %.preheader44 ]
  %48 = sext i32 %47 to i64
  %.not3548 = icmp sgt i64 %indvars.iv62, %48
  br i1 %.not3548, label %._crit_edge51, label %.lr.ph50

._crit_edge54:                                    ; preds = %._crit_edge51, %.preheader44
  %.lcssa = phi i32 [ %29, %.preheader44 ], [ %52, %._crit_edge51 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #7
  %49 = add nsw i32 %.lcssa, 1
  invoke void @_ZNK4poly3expEi(ptr dead_on_unwind nonnull writable sret(%struct.poly) align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef %49)
          to label %80 unwind label %84

50:                                               ; preds = %._crit_edge
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %100

._crit_edge51.loopexit:                           ; preds = %76
  %.pre = sext i32 %78 to i64
  br label %._crit_edge51

._crit_edge51:                                    ; preds = %._crit_edge51.loopexit, %.preheader
  %.pre-phi = phi i64 [ %.pre, %._crit_edge51.loopexit ], [ %48, %.preheader ]
  %52 = phi i32 [ %78, %._crit_edge51.loopexit ], [ %47, %.preheader ]
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %.not.not = icmp slt i64 %indvars.iv62, %.pre-phi
  br i1 %.not.not, label %.preheader, label %._crit_edge54, !llvm.loop !13

.lr.ph50:                                         ; preds = %.preheader, %76
  %indvars.iv = phi i64 [ %indvars.iv.next, %76 ], [ 1, %.preheader ]
  %53 = mul nuw nsw i64 %indvars.iv, %indvars.iv62
  %54 = trunc nuw nsw i64 %indvars.iv to i32
  %55 = and i32 %54, 1
  %.not36 = icmp eq i32 %55, 0
  br i1 %.not36, label %66, label %56

56:                                               ; preds = %.lr.ph50
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv62) #7
  %58 = load i32, ptr %57, align 4, !tbaa !8
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %8, i32 noundef %58)
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %9, i32 noundef %54)
  %59 = load i32, ptr %9, align 4
  %60 = invoke i32 @_ZNK6modintILi998244353EEdvES0_(ptr noundef nonnull align 4 dereferenceable(4) %8, i32 %59)
          to label %61 unwind label %64

61:                                               ; preds = %56
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %53) #7
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %62, i32 %60)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  br label %76

64:                                               ; preds = %56
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  br label %99

66:                                               ; preds = %.lr.ph50
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv62) #7
  %68 = load i32, ptr %67, align 4, !tbaa !8
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %10, i32 noundef %68)
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %11, i32 noundef %54)
  %69 = load i32, ptr %11, align 4
  %70 = invoke i32 @_ZNK6modintILi998244353EEdvES0_(ptr noundef nonnull align 4 dereferenceable(4) %10, i32 %69)
          to label %71 unwind label %74

71:                                               ; preds = %66
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %53) #7
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEmIES0_(ptr noundef nonnull align 4 dereferenceable(4) %72, i32 %70)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  br label %76

74:                                               ; preds = %66
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  br label %99

76:                                               ; preds = %61, %71
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %77 = mul nuw nsw i64 %indvars.iv.next, %indvars.iv62
  %78 = load i32, ptr %2, align 4, !tbaa !8
  %79 = trunc nuw i64 %77 to i32
  %.not35 = icmp slt i32 %78, %79
  br i1 %.not35, label %._crit_edge51.loopexit, label %.lr.ph50, !llvm.loop !14

80:                                               ; preds = %._crit_edge54
  %81 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN4polyaSEOS_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #7
  %82 = load i32, ptr %2, align 4, !tbaa !8
  %.not3455 = icmp slt i32 %82, 1
  br i1 %.not3455, label %._crit_edge59, label %.lr.ph58

._crit_edge59:                                    ; preds = %91, %80
  %83 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
          to label %96 unwind label %97

84:                                               ; preds = %._crit_edge54
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #7
  br label %99

.lr.ph58:                                         ; preds = %80, %91
  %.056 = phi i32 [ %92, %91 ], [ 1, %80 ]
  %86 = invoke i32 @_ZNK4polyixEi(ptr noundef nonnull align 8 dereferenceable(24) %7, i32 noundef %.056)
          to label %87 unwind label %94

87:                                               ; preds = %.lr.ph58
  %88 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsILi998244353EERSoS0_6modintIXT_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %86)
          to label %89 unwind label %94

89:                                               ; preds = %87
  %90 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %88, i8 noundef signext 32)
          to label %91 unwind label %94

91:                                               ; preds = %89
  %92 = add nuw nsw i32 %.056, 1
  %93 = load i32, ptr %2, align 4, !tbaa !8
  %.not34.not = icmp slt i32 %.056, %93
  br i1 %.not34.not, label %.lr.ph58, label %._crit_edge59, !llvm.loop !15

94:                                               ; preds = %89, %87, %.lr.ph58
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %99

96:                                               ; preds = %._crit_edge59
  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 @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, 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

97:                                               ; preds = %._crit_edge59
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %99

99:                                               ; preds = %64, %74, %97, %94, %84
  %.pn.pn = phi { ptr, i32 } [ %95, %94 ], [ %98, %97 ], [ %85, %84 ], [ %65, %64 ], [ %75, %74 ]
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  br label %100

100:                                              ; preds = %99, %50
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %99 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  br label %101

101:                                              ; preds = %100, %41
  %.pn40 = phi { ptr, i32 } [ %42, %41 ], [ %.pn.pn.pn, %100 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  br label %102

102:                                              ; preds = %101, %30
  %.pn40.pn = phi { ptr, i32 } [ %.pn40, %101 ], [ %31, %30 ]
  call void @llvm.lifetime.end.p0(i64 24, 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 } %.pn40.pn
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #1 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 #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(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 #4 align 2

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #6 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 #5

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { "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 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 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 = { 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 #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 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


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