; LLVM IR from AdarshGaur/Competitive-Programming :: Atcoder/NOMURA Programming Contest 2022（AtCoder Beginner Contest 253)/E - Distance _64633242 (Z5solvev)

; 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.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.5" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@_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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"class.std::vector.3", align 8
  %9 = alloca %"class.std::allocator.5", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %28 = load i64, ptr %1, align 8, !tbaa !5
  %29 = load i64, ptr %2, align 8, !tbaa !5
  %30 = add nsw i64 %29, 1
  %31 = call ptr @llvm.stacksave.p0()
  store ptr %31, ptr %4, align 8
  %32 = mul nuw i64 %28, %30
  %33 = alloca i64, i64 %32, align 16
  store i64 %28, ptr %5, align 8
  store i64 %30, ptr %6, align 8
  %34 = mul nuw i64 %28, %30
  %35 = mul nuw i64 8, %34
  call void @llvm.memset.p0.i64(ptr align 16 %33, i8 0, i64 %35, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 1, ptr %7, align 8, !tbaa !5
  br label %36

36:                                               ; preds = %46, %0
  %37 = load i64, ptr %7, align 8, !tbaa !5
  %38 = load i64, ptr %2, align 8, !tbaa !5
  %39 = icmp sle i64 %37, %38
  br i1 %39, label %41, label %40

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

41:                                               ; preds = %36
  %42 = mul nsw i64 0, %30
  %43 = getelementptr inbounds i64, ptr %33, i64 %42
  %44 = load i64, ptr %7, align 8, !tbaa !5
  %45 = getelementptr inbounds i64, ptr %43, i64 %44
  store i64 1, ptr %45, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %41
  %47 = load i64, ptr %7, align 8, !tbaa !5
  %48 = add nsw i64 %47, 1
  store i64 %48, ptr %7, align 8, !tbaa !5
  br label %36, !llvm.loop !9

49:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #7
  %50 = load i64, ptr %2, align 8, !tbaa !5
  %51 = add nsw i64 %50, 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #7
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %51, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %52 unwind label %67

52:                                               ; preds = %49
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #7
  %53 = call ptr @_ZNSt6vectorIlSaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %54 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %53, ptr %54, align 8
  %55 = call ptr @_ZNSt6vectorIlSaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %56 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %55, ptr %56, align 8
  %57 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8
  %59 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8
  invoke void @_ZSt4iotaIN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEEiEvT_S7_T0_(ptr %58, ptr %60, i32 noundef 0)
          to label %61 unwind label %71

61:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store i64 1, ptr %14, align 8, !tbaa !5
  br label %62

62:                                               ; preds = %155, %61
  %63 = load i64, ptr %14, align 8, !tbaa !5
  %64 = load i64, ptr %1, align 8, !tbaa !5
  %65 = icmp slt i64 %63, %64
  br i1 %65, label %75, label %66

66:                                               ; preds = %62
  store i32 5, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %158

67:                                               ; preds = %49
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %10, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #7
  br label %191

71:                                               ; preds = %52
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %10, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %11, align 4
  br label %190

75:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store i64 1, ptr %16, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %128, %75
  %77 = load i64, ptr %16, align 8, !tbaa !5
  %78 = load i64, ptr %2, align 8, !tbaa !5
  %79 = icmp sle i64 %77, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %76
  store i32 8, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %131

81:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  store i64 0, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %82 = load i64, ptr %16, align 8, !tbaa !5
  %83 = load i64, ptr %3, align 8, !tbaa !5
  %84 = sub nsw i64 %82, %83
  store i64 %84, ptr %19, align 8, !tbaa !5
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %86 unwind label %107

86:                                               ; preds = %81
  %87 = load i64, ptr %85, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  store i64 %87, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %88 = load i64, ptr %17, align 8, !tbaa !5
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %88) #7
  %90 = load i64, ptr %89, align 8, !tbaa !5
  store i64 %90, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  store i64 0, ptr %21, align 8, !tbaa !5
  %91 = load i64, ptr %16, align 8, !tbaa !5
  %92 = load i64, ptr %3, align 8, !tbaa !5
  %93 = add nsw i64 %91, %92
  %94 = load i64, ptr %2, align 8, !tbaa !5
  %95 = icmp sle i64 %93, %94
  br i1 %95, label %96, label %111

96:                                               ; preds = %86
  %97 = load i64, ptr %2, align 8, !tbaa !5
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %97) #7
  %99 = load i64, ptr %98, align 8, !tbaa !5
  %100 = load i64, ptr %16, align 8, !tbaa !5
  %101 = load i64, ptr %3, align 8, !tbaa !5
  %102 = add nsw i64 %100, %101
  %103 = sub nsw i64 %102, 1
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %103) #7
  %105 = load i64, ptr %104, align 8, !tbaa !5
  %106 = sub nsw i64 %99, %105
  store i64 %106, ptr %21, align 8, !tbaa !5
  br label %111

107:                                              ; preds = %81
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %10, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %190

111:                                              ; preds = %96, %86
  %112 = load i64, ptr %3, align 8, !tbaa !5
  %113 = icmp eq i64 %112, 0
  br i1 %113, label %114, label %118

114:                                              ; preds = %111
  %115 = load i64, ptr %2, align 8, !tbaa !5
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %115) #7
  %117 = load i64, ptr %116, align 8, !tbaa !5
  store i64 %117, ptr %21, align 8, !tbaa !5
  store i64 0, ptr %20, align 8, !tbaa !5
  br label %118

118:                                              ; preds = %114, %111
  %119 = load i64, ptr %20, align 8, !tbaa !5
  %120 = load i64, ptr %21, align 8, !tbaa !5
  %121 = add nsw i64 %119, %120
  %122 = srem i64 %121, 998244353
  %123 = load i64, ptr %14, align 8, !tbaa !5
  %124 = mul nsw i64 %123, %30
  %125 = getelementptr inbounds i64, ptr %33, i64 %124
  %126 = load i64, ptr %16, align 8, !tbaa !5
  %127 = getelementptr inbounds i64, ptr %125, i64 %126
  store i64 %122, ptr %127, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %128

128:                                              ; preds = %118
  %129 = load i64, ptr %16, align 8, !tbaa !5
  %130 = add nsw i64 %129, 1
  store i64 %130, ptr %16, align 8, !tbaa !5
  br label %76, !llvm.loop !11

131:                                              ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  store i64 1, ptr %22, align 8, !tbaa !5
  br label %132

132:                                              ; preds = %151, %131
  %133 = load i64, ptr %22, align 8, !tbaa !5
  %134 = load i64, ptr %2, align 8, !tbaa !5
  %135 = icmp sle i64 %133, %134
  br i1 %135, label %137, label %136

136:                                              ; preds = %132
  store i32 11, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %154

137:                                              ; preds = %132
  %138 = load i64, ptr %22, align 8, !tbaa !5
  %139 = sub nsw i64 %138, 1
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %139) #7
  %141 = load i64, ptr %140, align 8, !tbaa !5
  %142 = load i64, ptr %14, align 8, !tbaa !5
  %143 = mul nsw i64 %142, %30
  %144 = getelementptr inbounds i64, ptr %33, i64 %143
  %145 = load i64, ptr %22, align 8, !tbaa !5
  %146 = getelementptr inbounds i64, ptr %144, i64 %145
  %147 = load i64, ptr %146, align 8, !tbaa !5
  %148 = add nsw i64 %141, %147
  %149 = load i64, ptr %22, align 8, !tbaa !5
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %149) #7
  store i64 %148, ptr %150, align 8, !tbaa !5
  br label %151

151:                                              ; preds = %137
  %152 = load i64, ptr %22, align 8, !tbaa !5
  %153 = add nsw i64 %152, 1
  store i64 %153, ptr %22, align 8, !tbaa !5
  br label %132, !llvm.loop !12

154:                                              ; preds = %136
  br label %155

155:                                              ; preds = %154
  %156 = load i64, ptr %14, align 8, !tbaa !5
  %157 = add nsw i64 %156, 1
  store i64 %157, ptr %14, align 8, !tbaa !5
  br label %62, !llvm.loop !13

158:                                              ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  store i64 0, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  store i64 1, ptr %24, align 8, !tbaa !5
  br label %159

159:                                              ; preds = %176, %158
  %160 = load i64, ptr %24, align 8, !tbaa !5
  %161 = load i64, ptr %2, align 8, !tbaa !5
  %162 = icmp sle i64 %160, %161
  br i1 %162, label %164, label %163

163:                                              ; preds = %159
  store i32 14, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %179

164:                                              ; preds = %159
  %165 = load i64, ptr %1, align 8, !tbaa !5
  %166 = sub nsw i64 %165, 1
  %167 = mul nsw i64 %166, %30
  %168 = getelementptr inbounds i64, ptr %33, i64 %167
  %169 = load i64, ptr %24, align 8, !tbaa !5
  %170 = getelementptr inbounds i64, ptr %168, i64 %169
  %171 = load i64, ptr %170, align 8, !tbaa !5
  %172 = load i64, ptr %23, align 8, !tbaa !5
  %173 = add nsw i64 %172, %171
  store i64 %173, ptr %23, align 8, !tbaa !5
  %174 = load i64, ptr %23, align 8, !tbaa !5
  %175 = srem i64 %174, 998244353
  store i64 %175, ptr %23, align 8, !tbaa !5
  br label %176

176:                                              ; preds = %164
  %177 = load i64, ptr %24, align 8, !tbaa !5
  %178 = add nsw i64 %177, 1
  store i64 %178, ptr %24, align 8, !tbaa !5
  br label %159, !llvm.loop !14

179:                                              ; preds = %163
  %180 = load i64, ptr %23, align 8, !tbaa !5
  %181 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %180)
          to label %182 unwind label %186

182:                                              ; preds = %179
  %183 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %181, ptr noundef @.str)
          to label %184 unwind label %186

184:                                              ; preds = %182
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  %185 = load ptr, ptr %4, align 8
  call void @llvm.stackrestore.p0(ptr %185)
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #7
  ret void

186:                                              ; preds = %182, %179
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %10, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %190

190:                                              ; preds = %186, %107, %71
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  br label %191

191:                                              ; preds = %190, %67
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #7
  br label %192

192:                                              ; preds = %191
  %193 = load ptr, ptr %10, align 8
  %194 = load i32, ptr %11, align 4
  %195 = insertvalue { ptr, i32 } poison, ptr %193, 0
  %196 = insertvalue { ptr, i32 } %195, i32 %194, 1
  resume { ptr, i32 } %196
}

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt4iotaIN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEEiEvT_S7_T0_(ptr, ptr, i32 noundef) #5

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #2 align 2

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

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

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


; 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.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.5" = type { i8 }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@_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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::vector.3", align 8
  %5 = alloca %"class.std::allocator.5", align 1
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %11 = load i64, ptr %1, align 8, !tbaa !5
  %12 = load i64, ptr %2, align 8, !tbaa !5
  %13 = add nsw i64 %12, 1
  %14 = call ptr @llvm.stacksave.p0()
  %15 = mul nuw i64 %13, %11
  %16 = alloca i64, i64 %15, align 16
  %17 = shl nuw i64 %15, 3
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %16, i8 0, i64 %17, i1 false)
  %18 = load i64, ptr %2, align 8, !tbaa !5
  %.not48 = icmp slt i64 %18, 1
  br i1 %.not48, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %min.iters.check = icmp ult i64 %18, 4
  br i1 %min.iters.check, label %.lr.ph.preheader88, label %vector.ph

.lr.ph.preheader88:                               ; preds = %middle.block, %.lr.ph.preheader
  %.03449.ph = phi i64 [ 1, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %18, 9223372036854775804
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %19 = getelementptr inbounds i64, ptr %16, i64 %offset.idx
  %20 = getelementptr inbounds i8, ptr %19, i64 16
  store <2 x i64> <i64 1, i64 1>, ptr %19, align 8, !tbaa !5
  store <2 x i64> <i64 1, i64 1>, ptr %20, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %21 = icmp eq i64 %index.next, %n.vec
  br i1 %21, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %18, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader88

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %0
  %.pre-phi = add i64 %18, 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.pre-phi, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %24 unwind label %37

.lr.ph:                                           ; preds = %.lr.ph.preheader88, %.lr.ph
  %.03449 = phi i64 [ %23, %.lr.ph ], [ %.03449.ph, %.lr.ph.preheader88 ]
  %22 = getelementptr inbounds i64, ptr %16, i64 %.03449
  store i64 1, ptr %22, align 8, !tbaa !5
  %23 = add nuw i64 %.03449, 1
  %exitcond.not = icmp eq i64 %.03449, %18
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !13

24:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  %25 = call ptr @_ZNSt6vectorIlSaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %26 = call ptr @_ZNSt6vectorIlSaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @_ZSt4iotaIN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEEiEvT_S7_T0_(ptr %25, ptr %26, i32 noundef 0)
  %27 = load i64, ptr %1, align 8, !tbaa !5
  %28 = icmp sgt i64 %27, 1
  %.pre70 = load i64, ptr %2, align 8, !tbaa !5
  br i1 %28, label %.preheader46, label %.preheader

.preheader46:                                     ; preds = %24, %._crit_edge56
  %29 = phi i64 [ %72, %._crit_edge56 ], [ %.pre70, %24 ]
  %.03657 = phi i64 [ %73, %._crit_edge56 ], [ 1, %24 ]
  %.not4250 = icmp slt i64 %29, 1
  br i1 %.not4250, label %._crit_edge56, label %.lr.ph52

.lr.ph52:                                         ; preds = %.preheader46
  %30 = mul nsw i64 %.03657, %13
  %31 = getelementptr inbounds i64, ptr %16, i64 %30
  br label %41

.preheader:                                       ; preds = %._crit_edge56, %24
  %32 = phi i64 [ %.pre70, %24 ], [ %72, %._crit_edge56 ]
  %.lcssa = phi i64 [ %27, %24 ], [ %74, %._crit_edge56 ]
  %.not4059 = icmp slt i64 %32, 1
  br i1 %.not4059, label %._crit_edge63, label %.lr.ph62

.lr.ph62:                                         ; preds = %.preheader
  %33 = add nsw i64 %.lcssa, -1
  %34 = mul nsw i64 %33, %13
  %35 = getelementptr inbounds i64, ptr %16, i64 %34
  %xtraiter = and i64 %32, 1
  %36 = icmp eq i64 %32, 1
  br i1 %36, label %._crit_edge63.loopexit.unr-lcssa, label %.lr.ph62.new

.lr.ph62.new:                                     ; preds = %.lr.ph62
  %unroll_iter = and i64 %32, 9223372036854775806
  %invariant.gep = getelementptr i8, ptr %35, i64 8
  br label %91

37:                                               ; preds = %._crit_edge
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  br label %105

.preheader45:                                     ; preds = %66
  %.not4353 = icmp slt i64 %67, 1
  br i1 %.not4353, label %._crit_edge56, label %.lr.ph55

.lr.ph55:                                         ; preds = %.preheader45
  %39 = mul nsw i64 %.03657, %13
  %40 = getelementptr inbounds i64, ptr %16, i64 %39
  br label %76

41:                                               ; preds = %.lr.ph52, %66
  %.03551 = phi i64 [ 1, %.lr.ph52 ], [ %71, %66 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  store i64 0, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %42 = load i64, ptr %3, align 8, !tbaa !5
  %43 = sub nsw i64 %.03551, %42
  store i64 %43, ptr %7, align 8, !tbaa !5
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %45 = load i64, ptr %44, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %45) #7
  %47 = load i64, ptr %46, align 8, !tbaa !5
  %48 = load i64, ptr %3, align 8, !tbaa !5
  %49 = add nsw i64 %48, %.03551
  %50 = load i64, ptr %2, align 8, !tbaa !5
  %.not44 = icmp sgt i64 %49, %50
  br i1 %.not44, label %60, label %51

51:                                               ; preds = %41
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %50) #7
  %53 = load i64, ptr %52, align 8, !tbaa !5
  %54 = load i64, ptr %3, align 8, !tbaa !5
  %55 = add nsw i64 %.03551, -1
  %56 = add i64 %55, %54
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %56) #7
  %58 = load i64, ptr %57, align 8, !tbaa !5
  %59 = sub nsw i64 %53, %58
  %.pr = load i64, ptr %3, align 8, !tbaa !5
  %.pre69.pre = load i64, ptr %2, align 8, !tbaa !5
  br label %60

60:                                               ; preds = %51, %41
  %.pre69 = phi i64 [ %.pre69.pre, %51 ], [ %50, %41 ]
  %61 = phi i64 [ %.pr, %51 ], [ %48, %41 ]
  %.032 = phi i64 [ %59, %51 ], [ 0, %41 ]
  %62 = icmp eq i64 %61, 0
  br i1 %62, label %63, label %66

63:                                               ; preds = %60
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.pre69) #7
  %65 = load i64, ptr %64, align 8, !tbaa !5
  %.pre68 = load i64, ptr %2, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %63, %60
  %67 = phi i64 [ %.pre68, %63 ], [ %.pre69, %60 ]
  %.033 = phi i64 [ 0, %63 ], [ %47, %60 ]
  %.1 = phi i64 [ %65, %63 ], [ %.032, %60 ]
  %68 = add nsw i64 %.1, %.033
  %69 = srem i64 %68, 998244353
  %70 = getelementptr inbounds i64, ptr %31, i64 %.03551
  store i64 %69, ptr %70, align 8, !tbaa !5
  %71 = add nuw nsw i64 %.03551, 1
  %.not42.not = icmp slt i64 %.03551, %67
  br i1 %.not42.not, label %41, label %.preheader45, !llvm.loop !14

._crit_edge56:                                    ; preds = %76, %.preheader46, %.preheader45
  %72 = phi i64 [ %67, %.preheader45 ], [ %29, %.preheader46 ], [ %85, %76 ]
  %73 = add nuw nsw i64 %.03657, 1
  %74 = load i64, ptr %1, align 8, !tbaa !5
  %75 = icmp slt i64 %73, %74
  br i1 %75, label %.preheader46, label %.preheader, !llvm.loop !15

76:                                               ; preds = %.lr.ph55, %76
  %.03154 = phi i64 [ 1, %.lr.ph55 ], [ %84, %76 ]
  %77 = add nsw i64 %.03154, -1
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %77) #7
  %79 = load i64, ptr %78, align 8, !tbaa !5
  %80 = getelementptr inbounds i64, ptr %40, i64 %.03154
  %81 = load i64, ptr %80, align 8, !tbaa !5
  %82 = add nsw i64 %81, %79
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.03154) #7
  store i64 %82, ptr %83, align 8, !tbaa !5
  %84 = add nuw nsw i64 %.03154, 1
  %85 = load i64, ptr %2, align 8, !tbaa !5
  %.not43.not = icmp slt i64 %.03154, %85
  br i1 %.not43.not, label %76, label %._crit_edge56, !llvm.loop !16

._crit_edge63.loopexit.unr-lcssa:                 ; preds = %91, %.lr.ph62
  %.lcssa83.ph = phi i64 [ poison, %.lr.ph62 ], [ %98, %91 ]
  %.061.unr = phi i64 [ 1, %.lr.ph62 ], [ %99, %91 ]
  %.03060.unr = phi i64 [ 0, %.lr.ph62 ], [ %98, %91 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge63, label %._crit_edge63.loopexit.epilog-lcssa

._crit_edge63.loopexit.epilog-lcssa:              ; preds = %._crit_edge63.loopexit.unr-lcssa
  %86 = getelementptr inbounds i64, ptr %35, i64 %.061.unr
  %87 = load i64, ptr %86, align 8, !tbaa !5
  %88 = add nsw i64 %87, %.03060.unr
  %89 = srem i64 %88, 998244353
  br label %._crit_edge63

._crit_edge63:                                    ; preds = %._crit_edge63.loopexit.epilog-lcssa, %._crit_edge63.loopexit.unr-lcssa, %.preheader
  %.030.lcssa = phi i64 [ 0, %.preheader ], [ %.lcssa83.ph, %._crit_edge63.loopexit.unr-lcssa ], [ %89, %._crit_edge63.loopexit.epilog-lcssa ]
  %90 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.030.lcssa)
          to label %100 unwind label %103

91:                                               ; preds = %91, %.lr.ph62.new
  %.061 = phi i64 [ 1, %.lr.ph62.new ], [ %99, %91 ]
  %.03060 = phi i64 [ 0, %.lr.ph62.new ], [ %98, %91 ]
  %niter = phi i64 [ 0, %.lr.ph62.new ], [ %niter.next.1, %91 ]
  %92 = getelementptr inbounds i64, ptr %35, i64 %.061
  %93 = load i64, ptr %92, align 8, !tbaa !5
  %94 = add nsw i64 %93, %.03060
  %95 = srem i64 %94, 998244353
  %gep = getelementptr i64, ptr %invariant.gep, i64 %.061
  %96 = load i64, ptr %gep, align 8, !tbaa !5
  %97 = add nsw i64 %96, %95
  %98 = srem i64 %97, 998244353
  %99 = add nuw i64 %.061, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge63.loopexit.unr-lcssa, label %91, !llvm.loop !17

100:                                              ; preds = %._crit_edge63
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull @.str)
          to label %102 unwind label %103

102:                                              ; preds = %100
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.stackrestore.p0(ptr %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret void

103:                                              ; preds = %100, %._crit_edge63
  %104 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  br label %105

105:                                              ; preds = %103, %37
  %.pn = phi { ptr, i32 } [ %104, %103 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn
}

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt4iotaIN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEEiEvT_S7_T0_(ptr, ptr, i32 noundef) local_unnamed_addr #5

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

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

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

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

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


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