; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/179 Division 1/Problem B (B)

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

@n = external dso_local global i32, align 4
@x = external dso_local global [501 x i32], align 16
@w = external dso_local global [501 x [501 x i64]], align 16
@p = external dso_local global [501 x [501 x i64]], align 16
@sum = external dso_local global i64, align 8
@res = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

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

25:                                               ; preds = %61, %0
  %26 = load i32, ptr %2, align 4, !tbaa !8
  %27 = load i32, ptr @n, align 4, !tbaa !8
  %28 = icmp sle i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %64

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

31:                                               ; preds = %57, %30
  %32 = load i32, ptr %4, align 4, !tbaa !8
  %33 = load i32, ptr @n, align 4, !tbaa !8
  %34 = icmp sle i32 %32, %33
  br i1 %34, label %36, label %35

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

36:                                               ; preds = %31
  %37 = load i32, ptr %2, align 4, !tbaa !8
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [501 x [501 x i64]], ptr @w, i64 0, i64 %38
  %40 = load i32, ptr %4, align 4, !tbaa !8
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [501 x i64], ptr %39, i64 0, i64 %41
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %42)
  %44 = load i32, ptr %2, align 4, !tbaa !8
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [501 x [501 x i64]], ptr @w, i64 0, i64 %45
  %47 = load i32, ptr %4, align 4, !tbaa !8
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [501 x i64], ptr %46, i64 0, i64 %48
  %50 = load i64, ptr %49, align 8, !tbaa !11
  %51 = load i32, ptr %2, align 4, !tbaa !8
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [501 x [501 x i64]], ptr @p, i64 0, i64 %52
  %54 = load i32, ptr %4, align 4, !tbaa !8
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [501 x i64], ptr %53, i64 0, i64 %55
  store i64 %50, ptr %56, align 8, !tbaa !11
  br label %57

57:                                               ; preds = %36
  %58 = load i32, ptr %4, align 4, !tbaa !8
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %4, align 4, !tbaa !8
  br label %31, !llvm.loop !13

60:                                               ; preds = %35
  br label %61

61:                                               ; preds = %60
  %62 = load i32, ptr %2, align 4, !tbaa !8
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %2, align 4, !tbaa !8
  br label %25, !llvm.loop !15

64:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %65 = load i32, ptr @n, align 4, !tbaa !8
  store i32 %65, ptr %5, align 4, !tbaa !8
  br label %66

66:                                               ; preds = %75, %64
  %67 = load i32, ptr %5, align 4, !tbaa !8
  %68 = icmp sge i32 %67, 1
  br i1 %68, label %70, label %69

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

70:                                               ; preds = %66
  %71 = load i32, ptr %5, align 4, !tbaa !8
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %72
  %74 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %73)
  br label %75

75:                                               ; preds = %70
  %76 = load i32, ptr %5, align 4, !tbaa !8
  %77 = add nsw i32 %76, -1
  store i32 %77, ptr %5, align 4, !tbaa !8
  br label %66, !llvm.loop !16

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

79:                                               ; preds = %193, %78
  %80 = load i32, ptr %6, align 4, !tbaa !8
  %81 = load i32, ptr @n, align 4, !tbaa !8
  %82 = icmp sle i32 %80, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %196

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

85:                                               ; preds = %154, %84
  %86 = load i32, ptr %7, align 4, !tbaa !8
  %87 = load i32, ptr @n, align 4, !tbaa !8
  %88 = icmp sle i32 %86, %87
  br i1 %88, label %90, label %89

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

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

91:                                               ; preds = %150, %90
  %92 = load i32, ptr %8, align 4, !tbaa !8
  %93 = load i32, ptr @n, align 4, !tbaa !8
  %94 = icmp sle i32 %92, %93
  br i1 %94, label %96, label %95

95:                                               ; preds = %91
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %153

96:                                               ; preds = %91
  %97 = load i32, ptr %7, align 4, !tbaa !8
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !8
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [501 x [501 x i64]], ptr @p, i64 0, i64 %101
  %103 = load i32, ptr %8, align 4, !tbaa !8
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !8
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [501 x i64], ptr %102, i64 0, i64 %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %109 = load i32, ptr %7, align 4, !tbaa !8
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !8
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [501 x [501 x i64]], ptr @p, i64 0, i64 %113
  %115 = load i32, ptr %6, align 4, !tbaa !8
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !8
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [501 x i64], ptr %114, i64 0, i64 %119
  %121 = load i64, ptr %120, align 8, !tbaa !11
  %122 = load i32, ptr %6, align 4, !tbaa !8
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %123
  %125 = load i32, ptr %124, align 4, !tbaa !8
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [501 x [501 x i64]], ptr @p, i64 0, i64 %126
  %128 = load i32, ptr %8, align 4, !tbaa !8
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !8
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [501 x i64], ptr %127, i64 0, i64 %132
  %134 = load i64, ptr %133, align 8, !tbaa !11
  %135 = add nsw i64 %121, %134
  store i64 %135, ptr %9, align 8, !tbaa !11
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %108, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %137 = load i64, ptr %136, align 8, !tbaa !11
  %138 = load i32, ptr %7, align 4, !tbaa !8
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !8
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [501 x [501 x i64]], ptr @p, i64 0, i64 %142
  %144 = load i32, ptr %8, align 4, !tbaa !8
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !8
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [501 x i64], ptr %143, i64 0, i64 %148
  store i64 %137, ptr %149, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %150

150:                                              ; preds = %96
  %151 = load i32, ptr %8, align 4, !tbaa !8
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %8, align 4, !tbaa !8
  br label %91, !llvm.loop !17

153:                                              ; preds = %95
  br label %154

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

157:                                              ; preds = %89
  store i64 0, ptr @sum, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !8
  br label %158

158:                                              ; preds = %189, %157
  %159 = load i32, ptr %10, align 4, !tbaa !8
  %160 = load i32, ptr %6, align 4, !tbaa !8
  %161 = icmp sle i32 %159, %160
  br i1 %161, label %163, label %162

162:                                              ; preds = %158
  store i32 20, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %192

163:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 1, ptr %11, align 4, !tbaa !8
  br label %164

164:                                              ; preds = %185, %163
  %165 = load i32, ptr %11, align 4, !tbaa !8
  %166 = load i32, ptr %6, align 4, !tbaa !8
  %167 = icmp sle i32 %165, %166
  br i1 %167, label %169, label %168

168:                                              ; preds = %164
  store i32 23, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %188

169:                                              ; preds = %164
  %170 = load i32, ptr %10, align 4, !tbaa !8
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %171
  %173 = load i32, ptr %172, align 4, !tbaa !8
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [501 x [501 x i64]], ptr @p, i64 0, i64 %174
  %176 = load i32, ptr %11, align 4, !tbaa !8
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %177
  %179 = load i32, ptr %178, align 4, !tbaa !8
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [501 x i64], ptr %175, i64 0, i64 %180
  %182 = load i64, ptr %181, align 8, !tbaa !11
  %183 = load i64, ptr @sum, align 8, !tbaa !11
  %184 = add nsw i64 %183, %182
  store i64 %184, ptr @sum, align 8, !tbaa !11
  br label %185

185:                                              ; preds = %169
  %186 = load i32, ptr %11, align 4, !tbaa !8
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %11, align 4, !tbaa !8
  br label %164, !llvm.loop !19

188:                                              ; preds = %168
  br label %189

189:                                              ; preds = %188
  %190 = load i32, ptr %10, align 4, !tbaa !8
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %10, align 4, !tbaa !8
  br label %158, !llvm.loop !20

192:                                              ; preds = %162
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) @res, ptr noundef nonnull align 8 dereferenceable(8) @sum)
  br label %193

193:                                              ; preds = %192
  %194 = load i32, ptr %6, align 4, !tbaa !8
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %6, align 4, !tbaa !8
  br label %79, !llvm.loop !21

196:                                              ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %197 = load i32, ptr @n, align 4, !tbaa !8
  %198 = sub nsw i32 %197, 1
  store i32 %198, ptr %12, align 4, !tbaa !8
  br label %199

199:                                              ; preds = %210, %196
  %200 = load i32, ptr %12, align 4, !tbaa !8
  %201 = icmp sge i32 %200, 0
  br i1 %201, label %203, label %202

202:                                              ; preds = %199
  store i32 26, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %213

203:                                              ; preds = %199
  %204 = load i32, ptr %12, align 4, !tbaa !8
  %205 = sext i32 %204 to i64
  %206 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @res, i64 noundef %205) #7
  %207 = load i64, ptr %206, align 8, !tbaa !11
  %208 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %207)
  %209 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %208, ptr noundef @.str)
  br label %210

210:                                              ; preds = %203
  %211 = load i32, ptr %12, align 4, !tbaa !8
  %212 = add nsw i32 %211, -1
  store i32 %212, ptr %12, align 4, !tbaa !8
  br label %199, !llvm.loop !22

213:                                              ; preds = %202
  %214 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

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

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

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

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

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

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

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

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

; 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) #6

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

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


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

@n = external dso_local global i32, align 4
@x = external dso_local global [501 x i32], align 16
@w = external dso_local global [501 x [501 x i64]], align 16
@p = external dso_local global [501 x [501 x i64]], align 16
@sum = external dso_local global i64, align 8
@res = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %3 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %4 = getelementptr i8, ptr %3, i64 -24
  %5 = load i64, ptr %4, align 8
  %6 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %5
  %7 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %6, ptr noundef null)
  %8 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %10
  %12 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %11, ptr noundef null)
  %13 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %14 = load i32, ptr @n, align 4, !tbaa !8
  %.not63 = icmp slt i32 %14, 1
  br i1 %.not63, label %._crit_edge85, label %.preheader59

.preheader59:                                     ; preds = %0, %._crit_edge
  %15 = phi i32 [ %18, %._crit_edge ], [ %14, %0 ]
  %indvars.iv92 = phi i64 [ %indvars.iv.next93, %._crit_edge ], [ 1, %0 ]
  %.not5361 = icmp slt i32 %15, 1
  br i1 %.not5361, label %.preheader59.._crit_edge_crit_edge, label %.lr.ph

.preheader59.._crit_edge_crit_edge:               ; preds = %.preheader59
  %.pre126 = sext i32 %15 to i64
  br label %._crit_edge

.preheader58:                                     ; preds = %._crit_edge
  %16 = icmp sgt i32 %18, 0
  br i1 %16, label %.lr.ph66.preheader, label %._crit_edge85

.lr.ph66.preheader:                               ; preds = %.preheader58
  %17 = zext nneg i32 %18 to i64
  br label %.lr.ph66

._crit_edge:                                      ; preds = %.lr.ph, %.preheader59.._crit_edge_crit_edge
  %.pre-phi127 = phi i64 [ %.pre126, %.preheader59.._crit_edge_crit_edge ], [ %24, %.lr.ph ]
  %18 = phi i32 [ %15, %.preheader59.._crit_edge_crit_edge ], [ %23, %.lr.ph ]
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %.not.not = icmp slt i64 %indvars.iv92, %.pre-phi127
  br i1 %.not.not, label %.preheader59, label %.preheader58, !llvm.loop !11

.lr.ph:                                           ; preds = %.preheader59, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.preheader59 ]
  %19 = getelementptr inbounds [501 x [501 x i64]], ptr @w, i64 0, i64 %indvars.iv92, i64 %indvars.iv
  %20 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %19)
  %21 = load i64, ptr %19, align 8, !tbaa !14
  %22 = getelementptr inbounds [501 x [501 x i64]], ptr @p, i64 0, i64 %indvars.iv92, i64 %indvars.iv
  store i64 %21, ptr %22, align 8, !tbaa !14
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %23 = load i32, ptr @n, align 4, !tbaa !8
  %24 = sext i32 %23 to i64
  %.not53.not = icmp slt i64 %indvars.iv, %24
  br i1 %.not53.not, label %.lr.ph, label %._crit_edge, !llvm.loop !16

.preheader57:                                     ; preds = %.lr.ph66
  %.pre = load i32, ptr @n, align 4, !tbaa !8
  %.not4880 = icmp slt i32 %.pre, 1
  br i1 %.not4880, label %._crit_edge85, label %.preheader56

.lr.ph66:                                         ; preds = %.lr.ph66.preheader, %.lr.ph66
  %indvars.iv95 = phi i64 [ %17, %.lr.ph66.preheader ], [ %indvars.iv.next96, %.lr.ph66 ]
  %25 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %indvars.iv95
  %26 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %25)
  %indvars.iv.next96 = add nsw i64 %indvars.iv95, -1
  %27 = icmp ugt i64 %indvars.iv95, 1
  br i1 %27, label %.lr.ph66, label %.preheader57, !llvm.loop !17

.preheader56:                                     ; preds = %.preheader57, %63
  %indvar = phi i64 [ %indvar.next, %63 ], [ 0, %.preheader57 ]
  %28 = phi i32 [ %64, %63 ], [ %.pre, %.preheader57 ]
  %indvars.iv116 = phi i64 [ %indvars.iv.next117, %63 ], [ 1, %.preheader57 ]
  %indvars.iv114 = phi i64 [ %indvars.iv.next115, %63 ], [ 2, %.preheader57 ]
  %29 = add i64 %indvar, 1
  %.not4971 = icmp slt i32 %28, 1
  br i1 %.not4971, label %.preheader54.preheader, label %.preheader55.preheader

.preheader54.preheader:                           ; preds = %._crit_edge70, %.preheader56
  %xtraiter = and i64 %29, 3
  %30 = icmp ult i64 %indvar, 3
  %unroll_iter = and i64 %29, -4
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader54

.preheader55.preheader:                           ; preds = %.preheader56
  %31 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %indvars.iv116
  br label %.preheader55

.preheader:                                       ; preds = %63
  %32 = icmp sgt i32 %64, 0
  br i1 %32, label %.lr.ph84.preheader, label %._crit_edge85

.lr.ph84.preheader:                               ; preds = %.preheader
  %33 = zext nneg i32 %64 to i64
  br label %.lr.ph84

.preheader55:                                     ; preds = %.preheader55.preheader, %._crit_edge70
  %34 = phi i32 [ %28, %.preheader55.preheader ], [ %36, %._crit_edge70 ]
  %indvars.iv101 = phi i64 [ 1, %.preheader55.preheader ], [ %indvars.iv.next102, %._crit_edge70 ]
  %.not5267 = icmp slt i32 %34, 1
  br i1 %.not5267, label %.preheader55.._crit_edge70_crit_edge, label %.lr.ph69

.preheader55.._crit_edge70_crit_edge:             ; preds = %.preheader55
  %.pre125 = sext i32 %34 to i64
  br label %._crit_edge70

.lr.ph69:                                         ; preds = %.preheader55
  %35 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %indvars.iv101
  %.pre124 = load i32, ptr %35, align 4, !tbaa !8
  br label %37

._crit_edge70:                                    ; preds = %37, %.preheader55.._crit_edge70_crit_edge
  %.pre-phi = phi i64 [ %.pre125, %.preheader55.._crit_edge70_crit_edge ], [ %59, %37 ]
  %36 = phi i32 [ %34, %.preheader55.._crit_edge70_crit_edge ], [ %58, %37 ]
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %.not49.not = icmp slt i64 %indvars.iv101, %.pre-phi
  br i1 %.not49.not, label %.preheader55, label %.preheader54.preheader, !llvm.loop !18

37:                                               ; preds = %.lr.ph69, %37
  %38 = phi i32 [ %.pre124, %.lr.ph69 ], [ %53, %37 ]
  %indvars.iv98 = phi i64 [ 1, %.lr.ph69 ], [ %indvars.iv.next99, %37 ]
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %indvars.iv98
  %41 = load i32, ptr %40, align 4, !tbaa !8
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [501 x [501 x i64]], ptr @p, i64 0, i64 %39, i64 %42
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %44 = load i32, ptr %31, align 4, !tbaa !8
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [501 x [501 x i64]], ptr @p, i64 0, i64 %39, i64 %45
  %47 = load i64, ptr %46, align 8, !tbaa !14
  %48 = getelementptr inbounds [501 x [501 x i64]], ptr @p, i64 0, i64 %45, i64 %42
  %49 = load i64, ptr %48, align 8, !tbaa !14
  %50 = add nsw i64 %49, %47
  store i64 %50, ptr %1, align 8, !tbaa !14
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %52 = load i64, ptr %51, align 8, !tbaa !14
  %53 = load i32, ptr %35, align 4, !tbaa !8
  %54 = sext i32 %53 to i64
  %55 = load i32, ptr %40, align 4, !tbaa !8
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [501 x [501 x i64]], ptr @p, i64 0, i64 %54, i64 %56
  store i64 %52, ptr %57, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %58 = load i32, ptr @n, align 4, !tbaa !8
  %59 = sext i32 %58 to i64
  %.not52.not = icmp slt i64 %indvars.iv98, %59
  br i1 %.not52.not, label %37, label %._crit_edge70, !llvm.loop !19

.preheader54:                                     ; preds = %.preheader54.preheader, %.epilog-lcssa
  %indvars.iv109 = phi i64 [ %indvars.iv.next110, %.epilog-lcssa ], [ 1, %.preheader54.preheader ]
  %.lcssa747778 = phi i64 [ %.lcssa144, %.epilog-lcssa ], [ 0, %.preheader54.preheader ]
  %60 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %indvars.iv109
  %61 = load i32, ptr %60, align 4, !tbaa !8
  %62 = sext i32 %61 to i64
  br i1 %30, label %.unr-lcssa, label %.preheader54.new

63:                                               ; preds = %.epilog-lcssa
  store i64 %.lcssa144, ptr @sum, align 8, !tbaa !14
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) @res, ptr noundef nonnull align 8 dereferenceable(8) @sum)
  %indvars.iv.next117 = add nuw nsw i64 %indvars.iv116, 1
  %64 = load i32, ptr @n, align 4, !tbaa !8
  %65 = sext i32 %64 to i64
  %.not48.not = icmp slt i64 %indvars.iv116, %65
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %indvar.next = add i64 %indvar, 1
  br i1 %.not48.not, label %.preheader56, label %.preheader, !llvm.loop !20

.unr-lcssa:                                       ; preds = %.preheader54.new, %.preheader54
  %.lcssa144.ph = phi i64 [ poison, %.preheader54 ], [ %97, %.preheader54.new ]
  %indvars.iv104.unr = phi i64 [ 1, %.preheader54 ], [ %indvars.iv.next105.3, %.preheader54.new ]
  %.unr = phi i64 [ %.lcssa747778, %.preheader54 ], [ %97, %.preheader54.new ]
  br i1 %lcmp.mod.not, label %.epilog-lcssa, label %.epil.preheader

.epil.preheader:                                  ; preds = %.unr-lcssa, %.epil.preheader
  %indvars.iv104.epil = phi i64 [ %indvars.iv.next105.epil, %.epil.preheader ], [ %indvars.iv104.unr, %.unr-lcssa ]
  %66 = phi i64 [ %72, %.epil.preheader ], [ %.unr, %.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.unr-lcssa ]
  %67 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %indvars.iv104.epil
  %68 = load i32, ptr %67, align 4, !tbaa !8
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [501 x [501 x i64]], ptr @p, i64 0, i64 %62, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !14
  %72 = add nsw i64 %66, %71
  %indvars.iv.next105.epil = add nuw nsw i64 %indvars.iv104.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.epilog-lcssa, label %.epil.preheader, !llvm.loop !21

.epilog-lcssa:                                    ; preds = %.epil.preheader, %.unr-lcssa
  %.lcssa144 = phi i64 [ %.lcssa144.ph, %.unr-lcssa ], [ %72, %.epil.preheader ]
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %exitcond113.not = icmp eq i64 %indvars.iv.next110, %indvars.iv114
  br i1 %exitcond113.not, label %63, label %.preheader54, !llvm.loop !23

.preheader54.new:                                 ; preds = %.preheader54, %.preheader54.new
  %indvars.iv104 = phi i64 [ %indvars.iv.next105.3, %.preheader54.new ], [ 1, %.preheader54 ]
  %73 = phi i64 [ %97, %.preheader54.new ], [ %.lcssa747778, %.preheader54 ]
  %niter = phi i64 [ %niter.next.3, %.preheader54.new ], [ 0, %.preheader54 ]
  %74 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %indvars.iv104
  %75 = load i32, ptr %74, align 4, !tbaa !8
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [501 x [501 x i64]], ptr @p, i64 0, i64 %62, i64 %76
  %78 = load i64, ptr %77, align 8, !tbaa !14
  %79 = add nsw i64 %73, %78
  %indvars.iv.next105 = add nuw nsw i64 %indvars.iv104, 1
  %80 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %indvars.iv.next105
  %81 = load i32, ptr %80, align 4, !tbaa !8
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [501 x [501 x i64]], ptr @p, i64 0, i64 %62, i64 %82
  %84 = load i64, ptr %83, align 8, !tbaa !14
  %85 = add nsw i64 %79, %84
  %indvars.iv.next105.1 = add nuw nsw i64 %indvars.iv104, 2
  %86 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %indvars.iv.next105.1
  %87 = load i32, ptr %86, align 4, !tbaa !8
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [501 x [501 x i64]], ptr @p, i64 0, i64 %62, i64 %88
  %90 = load i64, ptr %89, align 8, !tbaa !14
  %91 = add nsw i64 %85, %90
  %indvars.iv.next105.2 = add nuw nsw i64 %indvars.iv104, 3
  %92 = getelementptr inbounds [501 x i32], ptr @x, i64 0, i64 %indvars.iv.next105.2
  %93 = load i32, ptr %92, align 4, !tbaa !8
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [501 x [501 x i64]], ptr @p, i64 0, i64 %62, i64 %94
  %96 = load i64, ptr %95, align 8, !tbaa !14
  %97 = add nsw i64 %91, %96
  %indvars.iv.next105.3 = add nuw nsw i64 %indvars.iv104, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.unr-lcssa, label %.preheader54.new, !llvm.loop !24

._crit_edge85:                                    ; preds = %.lr.ph84, %0, %.preheader58, %.preheader57, %.preheader
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

.lr.ph84:                                         ; preds = %.lr.ph84.preheader, %.lr.ph84
  %indvars.iv121 = phi i64 [ %33, %.lr.ph84.preheader ], [ %indvars.iv.next122, %.lr.ph84 ]
  %indvars.iv.next122 = add nsw i64 %indvars.iv121, -1
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @res, i64 noundef %indvars.iv.next122) #7
  %100 = load i64, ptr %99, align 8, !tbaa !14
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %100)
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef nonnull @.str)
  %103 = icmp ugt i64 %indvars.iv121, 1
  br i1 %103, label %.lr.ph84, label %._crit_edge85, !llvm.loop !25
}

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

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

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

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

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

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

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

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

; 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 #6

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass