; LLVM IR from ShahjalalShohag/code-library :: Dynamic Programming Optimizations (SOS convolutions)

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

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

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

; 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: 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 @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

39:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #4
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 21, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %40 unwind label %51

40:                                               ; preds = %39
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef 1048576, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %41 unwind label %56

41:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #4
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #4
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 21, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %42 unwind label %60

42:                                               ; preds = %41
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %43

43:                                               ; preds = %88, %42
  %44 = load i32, ptr %19, align 4, !tbaa !9
  %45 = icmp slt i32 %44, 1048576
  br i1 %45, label %65, label %46

46:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %91

47:                                               ; preds = %3
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %11, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %12, align 4
  br label %55

51:                                               ; preds = %39
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %11, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %12, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  br label %55

55:                                               ; preds = %51, %47
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  br label %386

56:                                               ; preds = %40
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %11, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %12, align 4
  br label %64

60:                                               ; preds = %41
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %11, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %12, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  br label %64

64:                                               ; preds = %60, %56
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  br label %385

65:                                               ; preds = %43
  %66 = load i32, ptr %19, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %67) #4
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = load i32, ptr %19, align 4, !tbaa !9
  %71 = call i32 @llvm.ctpop.i32(i32 %70)
  %72 = sext i32 %71 to i64
  %73 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %72) #4
  %74 = load i32, ptr %19, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %75) #4
  store i32 %69, ptr %76, align 4, !tbaa !9
  %77 = load i32, ptr %19, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %78) #4
  %80 = load i32, ptr %79, align 4, !tbaa !9
  %81 = load i32, ptr %19, align 4, !tbaa !9
  %82 = call i32 @llvm.ctpop.i32(i32 %81)
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %83) #4
  %85 = load i32, ptr %19, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %84, i64 noundef %86) #4
  store i32 %80, ptr %87, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %65
  %89 = load i32, ptr %19, align 4, !tbaa !9
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %19, align 4, !tbaa !9
  br label %43, !llvm.loop !11

91:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %92

92:                                               ; preds = %194, %91
  %93 = load i32, ptr %20, align 4, !tbaa !9
  %94 = icmp sle i32 %93, 20
  br i1 %94, label %96, label %95

95:                                               ; preds = %92
  store i32 5, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %197

96:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %97

97:                                               ; preds = %190, %96
  %98 = load i32, ptr %22, align 4, !tbaa !9
  %99 = icmp sle i32 %98, 20
  br i1 %99, label %101, label %100

100:                                              ; preds = %97
  store i32 8, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  br label %193

101:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %102

102:                                              ; preds = %186, %101
  %103 = load i32, ptr %23, align 4, !tbaa !9
  %104 = icmp slt i32 %103, 1048576
  br i1 %104, label %106, label %105

105:                                              ; preds = %102
  store i32 11, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  br label %189

106:                                              ; preds = %102
  %107 = load i32, ptr %23, align 4, !tbaa !9
  %108 = load i32, ptr %22, align 4, !tbaa !9
  %109 = ashr i32 %107, %108
  %110 = and i32 %109, 1
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %112, label %185

112:                                              ; preds = %106
  %113 = load i32, ptr %20, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %114) #4
  %116 = load i32, ptr %23, align 4, !tbaa !9
  %117 = load i32, ptr %22, align 4, !tbaa !9
  %118 = shl i32 1, %117
  %119 = xor i32 %116, %118
  %120 = sext i32 %119 to i64
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %115, i64 noundef %120) #4
  %122 = load i32, ptr %121, align 4, !tbaa !9
  %123 = load i32, ptr %20, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %124) #4
  %126 = load i32, ptr %23, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %125, i64 noundef %127) #4
  %129 = load i32, ptr %128, align 4, !tbaa !9
  %130 = add nsw i32 %129, %122
  store i32 %130, ptr %128, align 4, !tbaa !9
  %131 = load i32, ptr %20, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %132) #4
  %134 = load i32, ptr %23, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %133, i64 noundef %135) #4
  %137 = load i32, ptr %136, align 4, !tbaa !9
  %138 = icmp sge i32 %137, 998244353
  br i1 %138, label %139, label %148

139:                                              ; preds = %112
  %140 = load i32, ptr %20, align 4, !tbaa !9
  %141 = sext i32 %140 to i64
  %142 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %141) #4
  %143 = load i32, ptr %23, align 4, !tbaa !9
  %144 = sext i32 %143 to i64
  %145 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %142, i64 noundef %144) #4
  %146 = load i32, ptr %145, align 4, !tbaa !9
  %147 = sub nsw i32 %146, 998244353
  store i32 %147, ptr %145, align 4, !tbaa !9
  br label %148

148:                                              ; preds = %139, %112
  %149 = load i32, ptr %20, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %150) #4
  %152 = load i32, ptr %23, align 4, !tbaa !9
  %153 = load i32, ptr %22, align 4, !tbaa !9
  %154 = shl i32 1, %153
  %155 = xor i32 %152, %154
  %156 = sext i32 %155 to i64
  %157 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %151, i64 noundef %156) #4
  %158 = load i32, ptr %157, align 4, !tbaa !9
  %159 = load i32, ptr %20, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %160) #4
  %162 = load i32, ptr %23, align 4, !tbaa !9
  %163 = sext i32 %162 to i64
  %164 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %161, i64 noundef %163) #4
  %165 = load i32, ptr %164, align 4, !tbaa !9
  %166 = add nsw i32 %165, %158
  store i32 %166, ptr %164, align 4, !tbaa !9
  %167 = load i32, ptr %20, align 4, !tbaa !9
  %168 = sext i32 %167 to i64
  %169 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %168) #4
  %170 = load i32, ptr %23, align 4, !tbaa !9
  %171 = sext i32 %170 to i64
  %172 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %169, i64 noundef %171) #4
  %173 = load i32, ptr %172, align 4, !tbaa !9
  %174 = icmp sge i32 %173, 998244353
  br i1 %174, label %175, label %184

175:                                              ; preds = %148
  %176 = load i32, ptr %20, align 4, !tbaa !9
  %177 = sext i32 %176 to i64
  %178 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %177) #4
  %179 = load i32, ptr %23, align 4, !tbaa !9
  %180 = sext i32 %179 to i64
  %181 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %178, i64 noundef %180) #4
  %182 = load i32, ptr %181, align 4, !tbaa !9
  %183 = sub nsw i32 %182, 998244353
  store i32 %183, ptr %181, align 4, !tbaa !9
  br label %184

184:                                              ; preds = %175, %148
  br label %185

185:                                              ; preds = %184, %106
  br label %186

186:                                              ; preds = %185
  %187 = load i32, ptr %23, align 4, !tbaa !9
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %23, align 4, !tbaa !9
  br label %102, !llvm.loop !13

189:                                              ; preds = %105
  br label %190

190:                                              ; preds = %189
  %191 = load i32, ptr %22, align 4, !tbaa !9
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %22, align 4, !tbaa !9
  br label %97, !llvm.loop !14

193:                                              ; preds = %100
  br label %194

194:                                              ; preds = %193
  %195 = load i32, ptr %20, align 4, !tbaa !9
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %20, align 4, !tbaa !9
  br label %92, !llvm.loop !15

197:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  store i32 0, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef 1048576, ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %198 unwind label %204

198:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #4
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #4
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef 21, ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %199 unwind label %208

199:                                              ; preds = %198
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #4
  store i32 0, ptr %29, align 4, !tbaa !9
  br label %200

200:                                              ; preds = %282, %199
  %201 = load i32, ptr %29, align 4, !tbaa !9
  %202 = icmp slt i32 %201, 1048576
  br i1 %202, label %213, label %203

203:                                              ; preds = %200
  store i32 14, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  br label %285

204:                                              ; preds = %197
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %11, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %12, align 4
  br label %212

208:                                              ; preds = %198
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %11, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %12, align 4
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  br label %212

212:                                              ; preds = %208, %204
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #4
  br label %384

213:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #4
  store i32 0, ptr %30, align 4, !tbaa !9
  br label %214

214:                                              ; preds = %278, %213
  %215 = load i32, ptr %30, align 4, !tbaa !9
  %216 = icmp sle i32 %215, 20
  br i1 %216, label %218, label %217

217:                                              ; preds = %214
  store i32 17, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #4
  br label %281

218:                                              ; preds = %214
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #4
  store i32 0, ptr %31, align 4, !tbaa !9
  br label %219

219:                                              ; preds = %274, %218
  %220 = load i32, ptr %31, align 4, !tbaa !9
  %221 = load i32, ptr %30, align 4, !tbaa !9
  %222 = icmp sle i32 %220, %221
  br i1 %222, label %224, label %223

223:                                              ; preds = %219
  store i32 20, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #4
  br label %277

224:                                              ; preds = %219
  %225 = load i32, ptr %31, align 4, !tbaa !9
  %226 = sext i32 %225 to i64
  %227 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %226) #4
  %228 = load i32, ptr %29, align 4, !tbaa !9
  %229 = sext i32 %228 to i64
  %230 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %227, i64 noundef %229) #4
  %231 = load i32, ptr %230, align 4, !tbaa !9
  %232 = sext i32 %231 to i64
  %233 = mul nsw i64 1, %232
  %234 = load i32, ptr %30, align 4, !tbaa !9
  %235 = load i32, ptr %31, align 4, !tbaa !9
  %236 = sub nsw i32 %234, %235
  %237 = sext i32 %236 to i64
  %238 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %237) #4
  %239 = load i32, ptr %29, align 4, !tbaa !9
  %240 = sext i32 %239 to i64
  %241 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %238, i64 noundef %240) #4
  %242 = load i32, ptr %241, align 4, !tbaa !9
  %243 = sext i32 %242 to i64
  %244 = mul nsw i64 %233, %243
  %245 = srem i64 %244, 998244353
  %246 = load i32, ptr %30, align 4, !tbaa !9
  %247 = sext i32 %246 to i64
  %248 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %247) #4
  %249 = load i32, ptr %29, align 4, !tbaa !9
  %250 = sext i32 %249 to i64
  %251 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %248, i64 noundef %250) #4
  %252 = load i32, ptr %251, align 4, !tbaa !9
  %253 = sext i32 %252 to i64
  %254 = add nsw i64 %253, %245
  %255 = trunc i64 %254 to i32
  store i32 %255, ptr %251, align 4, !tbaa !9
  %256 = load i32, ptr %30, align 4, !tbaa !9
  %257 = sext i32 %256 to i64
  %258 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %257) #4
  %259 = load i32, ptr %29, align 4, !tbaa !9
  %260 = sext i32 %259 to i64
  %261 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %258, i64 noundef %260) #4
  %262 = load i32, ptr %261, align 4, !tbaa !9
  %263 = icmp sge i32 %262, 998244353
  br i1 %263, label %264, label %273

264:                                              ; preds = %224
  %265 = load i32, ptr %30, align 4, !tbaa !9
  %266 = sext i32 %265 to i64
  %267 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %266) #4
  %268 = load i32, ptr %29, align 4, !tbaa !9
  %269 = sext i32 %268 to i64
  %270 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %267, i64 noundef %269) #4
  %271 = load i32, ptr %270, align 4, !tbaa !9
  %272 = sub nsw i32 %271, 998244353
  store i32 %272, ptr %270, align 4, !tbaa !9
  br label %273

273:                                              ; preds = %264, %224
  br label %274

274:                                              ; preds = %273
  %275 = load i32, ptr %31, align 4, !tbaa !9
  %276 = add nsw i32 %275, 1
  store i32 %276, ptr %31, align 4, !tbaa !9
  br label %219, !llvm.loop !16

277:                                              ; preds = %223
  br label %278

278:                                              ; preds = %277
  %279 = load i32, ptr %30, align 4, !tbaa !9
  %280 = add nsw i32 %279, 1
  store i32 %280, ptr %30, align 4, !tbaa !9
  br label %214, !llvm.loop !17

281:                                              ; preds = %217
  br label %282

282:                                              ; preds = %281
  %283 = load i32, ptr %29, align 4, !tbaa !9
  %284 = add nsw i32 %283, 1
  store i32 %284, ptr %29, align 4, !tbaa !9
  br label %200, !llvm.loop !18

285:                                              ; preds = %203
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #4
  store i32 0, ptr %32, align 4, !tbaa !9
  br label %286

286:                                              ; preds = %352, %285
  %287 = load i32, ptr %32, align 4, !tbaa !9
  %288 = icmp sle i32 %287, 20
  br i1 %288, label %290, label %289

289:                                              ; preds = %286
  store i32 23, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #4
  br label %355

290:                                              ; preds = %286
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #4
  store i32 0, ptr %33, align 4, !tbaa !9
  br label %291

291:                                              ; preds = %348, %290
  %292 = load i32, ptr %33, align 4, !tbaa !9
  %293 = icmp sle i32 %292, 20
  br i1 %293, label %295, label %294

294:                                              ; preds = %291
  store i32 26, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #4
  br label %351

295:                                              ; preds = %291
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #4
  store i32 0, ptr %34, align 4, !tbaa !9
  br label %296

296:                                              ; preds = %344, %295
  %297 = load i32, ptr %34, align 4, !tbaa !9
  %298 = icmp slt i32 %297, 1048576
  br i1 %298, label %300, label %299

299:                                              ; preds = %296
  store i32 29, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #4
  br label %347

300:                                              ; preds = %296
  %301 = load i32, ptr %34, align 4, !tbaa !9
  %302 = load i32, ptr %33, align 4, !tbaa !9
  %303 = ashr i32 %301, %302
  %304 = and i32 %303, 1
  %305 = icmp ne i32 %304, 0
  br i1 %305, label %306, label %343

306:                                              ; preds = %300
  %307 = load i32, ptr %32, align 4, !tbaa !9
  %308 = sext i32 %307 to i64
  %309 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %308) #4
  %310 = load i32, ptr %34, align 4, !tbaa !9
  %311 = load i32, ptr %33, align 4, !tbaa !9
  %312 = shl i32 1, %311
  %313 = xor i32 %310, %312
  %314 = sext i32 %313 to i64
  %315 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %309, i64 noundef %314) #4
  %316 = load i32, ptr %315, align 4, !tbaa !9
  %317 = load i32, ptr %32, align 4, !tbaa !9
  %318 = sext i32 %317 to i64
  %319 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %318) #4
  %320 = load i32, ptr %34, align 4, !tbaa !9
  %321 = sext i32 %320 to i64
  %322 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %319, i64 noundef %321) #4
  %323 = load i32, ptr %322, align 4, !tbaa !9
  %324 = sub nsw i32 %323, %316
  store i32 %324, ptr %322, align 4, !tbaa !9
  %325 = load i32, ptr %32, align 4, !tbaa !9
  %326 = sext i32 %325 to i64
  %327 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %326) #4
  %328 = load i32, ptr %34, align 4, !tbaa !9
  %329 = sext i32 %328 to i64
  %330 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %327, i64 noundef %329) #4
  %331 = load i32, ptr %330, align 4, !tbaa !9
  %332 = icmp slt i32 %331, 0
  br i1 %332, label %333, label %342

333:                                              ; preds = %306
  %334 = load i32, ptr %32, align 4, !tbaa !9
  %335 = sext i32 %334 to i64
  %336 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %335) #4
  %337 = load i32, ptr %34, align 4, !tbaa !9
  %338 = sext i32 %337 to i64
  %339 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %336, i64 noundef %338) #4
  %340 = load i32, ptr %339, align 4, !tbaa !9
  %341 = add nsw i32 %340, 998244353
  store i32 %341, ptr %339, align 4, !tbaa !9
  br label %342

342:                                              ; preds = %333, %306
  br label %343

343:                                              ; preds = %342, %300
  br label %344

344:                                              ; preds = %343
  %345 = load i32, ptr %34, align 4, !tbaa !9
  %346 = add nsw i32 %345, 1
  store i32 %346, ptr %34, align 4, !tbaa !9
  br label %296, !llvm.loop !19

347:                                              ; preds = %299
  br label %348

348:                                              ; preds = %347
  %349 = load i32, ptr %33, align 4, !tbaa !9
  %350 = add nsw i32 %349, 1
  store i32 %350, ptr %33, align 4, !tbaa !9
  br label %291, !llvm.loop !20

351:                                              ; preds = %294
  br label %352

352:                                              ; preds = %351
  %353 = load i32, ptr %32, align 4, !tbaa !9
  %354 = add nsw i32 %353, 1
  store i32 %354, ptr %32, align 4, !tbaa !9
  br label %286, !llvm.loop !21

355:                                              ; preds = %289
  store i1 false, ptr %35, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #4
  store i32 0, ptr %36, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %37) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1048576, ptr noundef nonnull align 4 dereferenceable(4) %36, ptr noundef nonnull align 1 dereferenceable(1) %37)
          to label %356 unwind label %361

356:                                              ; preds = %355
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #4
  store i32 0, ptr %38, align 4, !tbaa !9
  br label %357

357:                                              ; preds = %377, %356
  %358 = load i32, ptr %38, align 4, !tbaa !9
  %359 = icmp slt i32 %358, 1048576
  br i1 %359, label %365, label %360

360:                                              ; preds = %357
  store i32 32, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #4
  br label %380

361:                                              ; preds = %355
  %362 = landingpad { ptr, i32 }
          cleanup
  %363 = extractvalue { ptr, i32 } %362, 0
  store ptr %363, ptr %11, align 8
  %364 = extractvalue { ptr, i32 } %362, 1
  store i32 %364, ptr %12, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #4
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #4
  br label %384

365:                                              ; preds = %357
  %366 = load i32, ptr %38, align 4, !tbaa !9
  %367 = call i32 @llvm.ctpop.i32(i32 %366)
  %368 = sext i32 %367 to i64
  %369 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %368) #4
  %370 = load i32, ptr %38, align 4, !tbaa !9
  %371 = sext i32 %370 to i64
  %372 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %369, i64 noundef %371) #4
  %373 = load i32, ptr %372, align 4, !tbaa !9
  %374 = load i32, ptr %38, align 4, !tbaa !9
  %375 = sext i32 %374 to i64
  %376 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %375) #4
  store i32 %373, ptr %376, align 4, !tbaa !9
  br label %377

377:                                              ; preds = %365
  %378 = load i32, ptr %38, align 4, !tbaa !9
  %379 = add nsw i32 %378, 1
  store i32 %379, ptr %38, align 4, !tbaa !9
  br label %357, !llvm.loop !22

380:                                              ; preds = %360
  store i1 true, ptr %35, align 1
  store i32 1, ptr %21, align 4
  %381 = load i1, ptr %35, align 1
  br i1 %381, label %383, label %382

382:                                              ; preds = %380
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  br label %383

383:                                              ; preds = %382, %380
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #4
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #4
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  ret void

384:                                              ; preds = %361, %212
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #4
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  br label %385

385:                                              ; preds = %384, %64
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #4
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  br label %386

386:                                              ; preds = %385, %55
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  br label %387

387:                                              ; preds = %386
  %388 = load ptr, ptr %11, align 8
  %389 = load i32, ptr %12, align 4
  %390 = insertvalue { ptr, i32 } poison, ptr %388, 0
  %391 = insertvalue { ptr, i32 } %390, i32 %389, 1
  resume { ptr, i32 } %391
}

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::allocator.2" = type { i8 }

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

; 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 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 @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3SOS22subset_sum_convolutionESt6vectorIiSaIiEES2_(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector.0", align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %"class.std::allocator.2", align 1
  %9 = alloca %"class.std::vector.0", align 8
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %"class.std::allocator.2", align 1
  %14 = alloca %"class.std::vector.0", align 8
  %15 = alloca %"class.std::vector", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::allocator", align 1
  %18 = alloca %"class.std::allocator.2", align 1
  %19 = alloca i32, align 4
  %20 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 1048576, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %21 unwind label %25

21:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #4
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 21, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %22 unwind label %27

22:                                               ; preds = %21
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef 1048576, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %23 unwind label %30

23:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #4
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef 21, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %24 unwind label %32

24:                                               ; preds = %23
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  br label %35

25:                                               ; preds = %3
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %29

27:                                               ; preds = %21
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  br label %29

29:                                               ; preds = %27, %25
  %.pn = phi { ptr, i32 } [ %28, %27 ], [ %26, %25 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  br label %170

30:                                               ; preds = %22
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %34

32:                                               ; preds = %23
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  br label %34

34:                                               ; preds = %32, %30
  %.pn94 = phi { ptr, i32 } [ %33, %32 ], [ %31, %30 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  br label %169

35:                                               ; preds = %24, %35
  %indvars.iv = phi i64 [ 0, %24 ], [ %indvars.iv.next, %35 ]
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #4
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = trunc nuw nsw i64 %indvars.iv to i32
  %39 = call range(i32 0, 21) i32 @llvm.ctpop.i32(i32 %38)
  %40 = zext nneg i32 %39 to i64
  %41 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %40) #4
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef %indvars.iv) #4
  store i32 %37, ptr %42, align 4, !tbaa !5
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv) #4
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %40) #4
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %indvars.iv) #4
  store i32 %44, ptr %46, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 1048576
  br i1 %exitcond.not, label %.preheader109, label %35, !llvm.loop !9

.preheader109:                                    ; preds = %35, %49
  %indvars.iv128 = phi i64 [ %indvars.iv.next129, %49 ], [ 0, %35 ]
  br label %.preheader108

47:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #4
  store i32 0, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef 1048576, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %92 unwind label %94

.preheader108:                                    ; preds = %.preheader109, %50
  %.083113 = phi i32 [ 0, %.preheader109 ], [ %51, %50 ]
  %48 = shl nuw i32 1, %.083113
  br label %52

49:                                               ; preds = %50
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %exitcond131.not = icmp eq i64 %indvars.iv.next129, 21
  br i1 %exitcond131.not, label %47, label %.preheader109, !llvm.loop !11

50:                                               ; preds = %91
  %51 = add nuw nsw i32 %.083113, 1
  %exitcond127.not = icmp eq i32 %51, 21
  br i1 %exitcond127.not, label %49, label %.preheader108, !llvm.loop !12

52:                                               ; preds = %.preheader108, %91
  %indvars.iv123 = phi i64 [ 0, %.preheader108 ], [ %indvars.iv.next124, %91 ]
  %53 = trunc nuw nsw i64 %indvars.iv123 to i32
  %54 = and i32 %48, %53
  %.not103 = icmp eq i32 %54, 0
  br i1 %.not103, label %91, label %55

55:                                               ; preds = %52
  %56 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv128) #4
  %57 = xor i32 %48, %53
  %58 = zext nneg i32 %57 to i64
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef %58) #4
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv128) #4
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %indvars.iv123) #4
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = add nsw i32 %63, %60
  store i32 %64, ptr %62, align 4, !tbaa !5
  %65 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv128) #4
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %indvars.iv123) #4
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = icmp sgt i32 %67, 998244352
  br i1 %68, label %69, label %74

69:                                               ; preds = %55
  %70 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv128) #4
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %indvars.iv123) #4
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = add nsw i32 %72, -998244353
  store i32 %73, ptr %71, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %69, %55
  %75 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv128) #4
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %58) #4
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv128) #4
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %78, i64 noundef %indvars.iv123) #4
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = add nsw i32 %80, %77
  store i32 %81, ptr %79, align 4, !tbaa !5
  %82 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv128) #4
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef %indvars.iv123) #4
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = icmp sgt i32 %84, 998244352
  br i1 %85, label %86, label %91

86:                                               ; preds = %74
  %87 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv128) #4
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %87, i64 noundef %indvars.iv123) #4
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = add nsw i32 %89, -998244353
  store i32 %90, ptr %88, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %52, %86, %74
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %exitcond126.not = icmp eq i64 %indvars.iv.next124, 1048576
  br i1 %exitcond126.not, label %50, label %52, !llvm.loop !13

92:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %18) #4
  call void @_ZNSaISt6vectorIiSaIiEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #4
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 21, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %93 unwind label %96

93:                                               ; preds = %92
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #4
  br label %.preheader107

.preheader107:                                    ; preds = %93, %99
  %indvars.iv146 = phi i64 [ 0, %93 ], [ %indvars.iv.next147, %99 ]
  br label %.preheader106

94:                                               ; preds = %47
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %98

96:                                               ; preds = %92
  %97 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  br label %98

98:                                               ; preds = %96, %94
  %.pn96 = phi { ptr, i32 } [ %97, %96 ], [ %95, %94 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #4
  br label %168

.preheader106:                                    ; preds = %.preheader107, %100
  %indvars.iv140 = phi i64 [ 0, %.preheader107 ], [ %indvars.iv.next141, %100 ]
  %indvars.iv138 = phi i64 [ 1, %.preheader107 ], [ %indvars.iv.next139, %100 ]
  br label %101

99:                                               ; preds = %100
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %exitcond149.not = icmp eq i64 %indvars.iv.next147, 1048576
  br i1 %exitcond149.not, label %.preheader104, label %.preheader107, !llvm.loop !14

100:                                              ; preds = %127
  %indvars.iv.next141 = add nuw nsw i64 %indvars.iv140, 1
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %exitcond145.not = icmp eq i64 %indvars.iv.next141, 21
  br i1 %exitcond145.not, label %99, label %.preheader106, !llvm.loop !15

101:                                              ; preds = %.preheader106, %127
  %indvars.iv132 = phi i64 [ 0, %.preheader106 ], [ %indvars.iv.next133, %127 ]
  %102 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv132) #4
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %102, i64 noundef %indvars.iv146) #4
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = sub nsw i64 %indvars.iv140, %indvars.iv132
  %107 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %106) #4
  %108 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %107, i64 noundef %indvars.iv146) #4
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = mul nsw i64 %110, %105
  %112 = srem i64 %111, 998244353
  %113 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %indvars.iv140) #4
  %114 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %113, i64 noundef %indvars.iv146) #4
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = trunc nsw i64 %112 to i32
  %117 = add i32 %115, %116
  store i32 %117, ptr %114, align 4, !tbaa !5
  %118 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %indvars.iv140) #4
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %118, i64 noundef %indvars.iv146) #4
  %120 = load i32, ptr %119, align 4, !tbaa !5
  %121 = icmp sgt i32 %120, 998244352
  br i1 %121, label %122, label %127

122:                                              ; preds = %101
  %123 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %indvars.iv140) #4
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %123, i64 noundef %indvars.iv146) #4
  %125 = load i32, ptr %124, align 4, !tbaa !5
  %126 = add nsw i32 %125, -998244353
  store i32 %126, ptr %124, align 4, !tbaa !5
  br label %127

127:                                              ; preds = %101, %122
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %exitcond137.not = icmp eq i64 %indvars.iv.next133, %indvars.iv138
  br i1 %exitcond137.not, label %100, label %101, !llvm.loop !16

.preheader104:                                    ; preds = %99, %130
  %indvars.iv155 = phi i64 [ %indvars.iv.next156, %130 ], [ 0, %99 ]
  br label %.preheader

128:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #4
  store i32 0, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %20) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1048576, ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %156 unwind label %157

.preheader:                                       ; preds = %.preheader104, %131
  %.077119 = phi i32 [ 0, %.preheader104 ], [ %132, %131 ]
  %129 = shl nuw i32 1, %.077119
  br label %133

130:                                              ; preds = %131
  %indvars.iv.next156 = add nuw nsw i64 %indvars.iv155, 1
  %exitcond158.not = icmp eq i64 %indvars.iv.next156, 21
  br i1 %exitcond158.not, label %128, label %.preheader104, !llvm.loop !17

131:                                              ; preds = %155
  %132 = add nuw nsw i32 %.077119, 1
  %exitcond154.not = icmp eq i32 %132, 21
  br i1 %exitcond154.not, label %130, label %.preheader, !llvm.loop !18

133:                                              ; preds = %.preheader, %155
  %indvars.iv150 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next151, %155 ]
  %134 = trunc nuw nsw i64 %indvars.iv150 to i32
  %135 = and i32 %129, %134
  %.not = icmp eq i32 %135, 0
  br i1 %.not, label %155, label %136

136:                                              ; preds = %133
  %137 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %indvars.iv155) #4
  %138 = xor i32 %129, %134
  %139 = zext nneg i32 %138 to i64
  %140 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %137, i64 noundef %139) #4
  %141 = load i32, ptr %140, align 4, !tbaa !5
  %142 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %indvars.iv155) #4
  %143 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %142, i64 noundef %indvars.iv150) #4
  %144 = load i32, ptr %143, align 4, !tbaa !5
  %145 = sub nsw i32 %144, %141
  store i32 %145, ptr %143, align 4, !tbaa !5
  %146 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %indvars.iv155) #4
  %147 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %146, i64 noundef %indvars.iv150) #4
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = icmp slt i32 %148, 0
  br i1 %149, label %150, label %155

150:                                              ; preds = %136
  %151 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %indvars.iv155) #4
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %151, i64 noundef %indvars.iv150) #4
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = add nsw i32 %153, 998244353
  store i32 %154, ptr %152, align 4, !tbaa !5
  br label %155

155:                                              ; preds = %133, %150, %136
  %indvars.iv.next151 = add nuw nsw i64 %indvars.iv150, 1
  %exitcond153.not = icmp eq i64 %indvars.iv.next151, 1048576
  br i1 %exitcond153.not, label %131, label %133, !llvm.loop !19

156:                                              ; preds = %128
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #4
  br label %159

157:                                              ; preds = %128
  %158 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #4
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  br label %168

159:                                              ; preds = %156, %159
  %indvars.iv159 = phi i64 [ 0, %156 ], [ %indvars.iv.next160, %159 ]
  %160 = trunc nuw nsw i64 %indvars.iv159 to i32
  %161 = call range(i32 0, 21) i32 @llvm.ctpop.i32(i32 %160)
  %162 = zext nneg i32 %161 to i64
  %163 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %162) #4
  %164 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %163, i64 noundef %indvars.iv159) #4
  %165 = load i32, ptr %164, align 4, !tbaa !5
  %166 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv159) #4
  store i32 %165, ptr %166, align 4, !tbaa !5
  %indvars.iv.next160 = add nuw nsw i64 %indvars.iv159, 1
  %exitcond162.not = icmp eq i64 %indvars.iv.next160, 1048576
  br i1 %exitcond162.not, label %167, label %159, !llvm.loop !20

167:                                              ; preds = %159
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #4
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  ret void

168:                                              ; preds = %157, %98
  %.pn98 = phi { ptr, i32 } [ %158, %157 ], [ %.pn96, %98 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #4
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  br label %169

169:                                              ; preds = %168, %34
  %.pn98.pn = phi { ptr, i32 } [ %.pn98, %168 ], [ %.pn94, %34 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  br label %170

170:                                              ; preds = %169, %29
  %.pn98.pn.pn = phi { ptr, i32 } [ %.pn98.pn, %169 ], [ %.pn, %29 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn98.pn.pn
}

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.ctpop.i32(i32) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt6vectorIiSaIiEEED2Ev(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 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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }

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

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


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