; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/360 Division 2/Problem E (E)

; 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.__gnu_cxx::__normal_iterator" = type { ptr }

@dp = external dso_local global [2 x [510 x [510 x i32]]], align 16
@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@c = external dso_local global [510 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %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 i32, align 4
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store i32 0, ptr %1, align 4
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @k)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %27, %0
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = icmp sle i32 %18, %19
  br i1 %20, label %22, label %21

21:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %30

22:                                               ; preds = %17
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [510 x i32], ptr @c, i64 0, i64 %24
  %26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %25)
  br label %27

27:                                               ; preds = %22
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %2, align 4, !tbaa !5
  br label %17, !llvm.loop !9

30:                                               ; preds = %21
  store i32 1, ptr @dp, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %31

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

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

36:                                               ; preds = %31
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = xor i32 %37, 1
  store i32 %38, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %75, %36
  %40 = load i32, ptr %6, align 4, !tbaa !5
  %41 = load i32, ptr @k, align 4, !tbaa !5
  %42 = icmp sle i32 %40, %41
  br i1 %42, label %44, label %43

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

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %71, %44
  %46 = load i32, ptr %7, align 4, !tbaa !5
  %47 = load i32, ptr %6, align 4, !tbaa !5
  %48 = icmp sle i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %74

50:                                               ; preds = %45
  %51 = load i32, ptr %3, align 4, !tbaa !5
  %52 = sub nsw i32 1, %51
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %53
  %55 = load i32, ptr %6, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [510 x [510 x i32]], ptr %54, i64 0, i64 %56
  %58 = load i32, ptr %7, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [510 x i32], ptr %57, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = load i32, ptr %3, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %63
  %65 = load i32, ptr %6, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [510 x [510 x i32]], ptr %64, i64 0, i64 %66
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [510 x i32], ptr %67, i64 0, i64 %69
  store i32 %61, ptr %70, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %50
  %72 = load i32, ptr %7, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %7, align 4, !tbaa !5
  br label %45, !llvm.loop !11

74:                                               ; preds = %49
  br label %75

75:                                               ; preds = %74
  %76 = load i32, ptr %6, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %6, align 4, !tbaa !5
  br label %39, !llvm.loop !12

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

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

83:                                               ; preds = %79
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %154

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

85:                                               ; preds = %147, %84
  %86 = load i32, ptr %9, align 4, !tbaa !5
  %87 = load i32, ptr %8, align 4, !tbaa !5
  %88 = icmp sle i32 %86, %87
  br i1 %88, label %90, label %89

89:                                               ; preds = %85
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %150

90:                                               ; preds = %85
  %91 = load i32, ptr %3, align 4, !tbaa !5
  %92 = sub nsw i32 1, %91
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %93
  %95 = load i32, ptr %8, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [510 x [510 x i32]], ptr %94, i64 0, i64 %96
  %98 = load i32, ptr %9, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [510 x i32], ptr %97, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %103, label %146

103:                                              ; preds = %90
  %104 = load i32, ptr %8, align 4, !tbaa !5
  %105 = load i32, ptr %4, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [510 x i32], ptr @c, i64 0, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = add nsw i32 %104, %108
  %110 = load i32, ptr @k, align 4, !tbaa !5
  %111 = icmp sle i32 %109, %110
  br i1 %111, label %112, label %146

112:                                              ; preds = %103
  %113 = load i32, ptr %3, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %114
  %116 = load i32, ptr %8, align 4, !tbaa !5
  %117 = load i32, ptr %4, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [510 x i32], ptr @c, i64 0, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !5
  %121 = add nsw i32 %116, %120
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [510 x [510 x i32]], ptr %115, i64 0, i64 %122
  %124 = load i32, ptr %9, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [510 x i32], ptr %123, i64 0, i64 %125
  store i32 1, ptr %126, align 4, !tbaa !5
  %127 = load i32, ptr %3, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %128
  %130 = load i32, ptr %8, align 4, !tbaa !5
  %131 = load i32, ptr %4, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [510 x i32], ptr @c, i64 0, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = add nsw i32 %130, %134
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [510 x [510 x i32]], ptr %129, i64 0, i64 %136
  %138 = load i32, ptr %9, align 4, !tbaa !5
  %139 = load i32, ptr %4, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [510 x i32], ptr @c, i64 0, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = add nsw i32 %138, %142
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [510 x i32], ptr %137, i64 0, i64 %144
  store i32 1, ptr %145, align 4, !tbaa !5
  br label %146

146:                                              ; preds = %112, %103, %90
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %9, align 4, !tbaa !5
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %9, align 4, !tbaa !5
  br label %85, !llvm.loop !13

150:                                              ; preds = %89
  br label %151

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

154:                                              ; preds = %83
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %4, align 4, !tbaa !5
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %4, align 4, !tbaa !5
  br label %31, !llvm.loop !15

158:                                              ; preds = %35
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #6
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %159

159:                                              ; preds = %183, %158
  %160 = load i32, ptr %11, align 4, !tbaa !5
  %161 = load i32, ptr @k, align 4, !tbaa !5
  %162 = icmp sle i32 %160, %161
  br i1 %162, label %164, label %163

163:                                              ; preds = %159
  store i32 20, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %186

164:                                              ; preds = %159
  %165 = load i32, ptr %3, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %166
  %168 = load i32, ptr @k, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [510 x [510 x i32]], ptr %167, i64 0, i64 %169
  %171 = load i32, ptr %11, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [510 x i32], ptr %170, i64 0, i64 %172
  %174 = load i32, ptr %173, align 4, !tbaa !5
  %175 = icmp ne i32 %174, 0
  br i1 %175, label %176, label %182

176:                                              ; preds = %164
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %177 unwind label %178

177:                                              ; preds = %176
  br label %182

178:                                              ; preds = %176
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %12, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %217

182:                                              ; preds = %177, %164
  br label %183

183:                                              ; preds = %182
  %184 = load i32, ptr %11, align 4, !tbaa !5
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %11, align 4, !tbaa !5
  br label %159, !llvm.loop !16

186:                                              ; preds = %163
  %187 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  %188 = trunc i64 %187 to i32
  %189 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %188)
          to label %190 unwind label %198

190:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %191 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  %192 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %191, ptr %192, align 8
  br label %193

193:                                              ; preds = %207, %190
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %194 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  %195 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %194, ptr %195, align 8
  %196 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br i1 %196, label %202, label %197

197:                                              ; preds = %193
  store i32 23, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %213

198:                                              ; preds = %213, %186
  %199 = landingpad { ptr, i32 }
          cleanup
  %200 = extractvalue { ptr, i32 } %199, 0
  store ptr %200, ptr %12, align 8
  %201 = extractvalue { ptr, i32 } %199, 1
  store i32 %201, ptr %13, align 4
  br label %217

202:                                              ; preds = %193
  %203 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  %204 = load i32, ptr %203, align 4, !tbaa !5
  %205 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %204)
          to label %206 unwind label %209

206:                                              ; preds = %202
  br label %207

207:                                              ; preds = %206
  %208 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br label %193, !llvm.loop !17

209:                                              ; preds = %202
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %12, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %217

213:                                              ; preds = %197
  %214 = invoke i32 @puts(ptr noundef @.str.4)
          to label %215 unwind label %198

215:                                              ; preds = %213
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  %216 = load i32, ptr %1, align 4
  ret i32 %216

217:                                              ; preds = %209, %198, %178
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %218

218:                                              ; preds = %217
  %219 = load ptr, ptr %12, align 8
  %220 = load i32, ptr %13, align 4
  %221 = insertvalue { ptr, i32 } poison, ptr %219, 0
  %222 = insertvalue { ptr, i32 } %221, i32 %220, 1
  resume { ptr, i32 } %222
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #1

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

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

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

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

declare i32 @__gxx_personality_v0(...)

declare i32 @printf(ptr noundef, ...) #1

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

declare i32 @puts(ptr noundef) #1

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

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


; 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.__gnu_cxx::__normal_iterator" = type { ptr }

@dp = external dso_local local_unnamed_addr global [2 x [510 x [510 x i32]]], align 16
@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@c = external dso_local global [510 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector", align 8
  %2 = alloca i32, align 4
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @k)
  %6 = load i32, ptr @n, align 4, !tbaa !5
  %.not60 = icmp slt i32 %6, 1
  br i1 %.not60, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %0
  store i32 1, ptr @dp, align 16, !tbaa !5
  br label %._crit_edge75

._crit_edge:                                      ; preds = %.lr.ph
  store i32 1, ptr @dp, align 16, !tbaa !5
  %.not4870 = icmp slt i32 %18, 1
  br i1 %.not4870, label %._crit_edge75, label %.lr.ph74

.lr.ph74:                                         ; preds = %._crit_edge
  %7 = load i32, ptr @k, align 4, !tbaa !5
  %.not5163 = icmp slt i32 %7, 0
  br i1 %.not5163, label %.preheader58.us.us.preheader, label %.lr.ph74.split.preheader

.preheader58.us.us.preheader:                     ; preds = %.lr.ph74
  %min.iters.check144 = icmp ult i32 %18, 8
  br i1 %min.iters.check144, label %.preheader58.us.us.preheader154, label %vector.ph145

.preheader58.us.us.preheader154:                  ; preds = %middle.block142, %.preheader58.us.us.preheader
  %.04372.us.us.ph = phi i32 [ 1, %.preheader58.us.us.preheader ], [ %ind.end, %middle.block142 ]
  %.04471.us.us.ph = phi i32 [ 0, %.preheader58.us.us.preheader ], [ %11, %middle.block142 ]
  br label %.preheader58.us.us

vector.ph145:                                     ; preds = %.preheader58.us.us.preheader
  %n.vec147 = and i32 %18, 2147483640
  %ind.end = or disjoint i32 %n.vec147, 1
  br label %vector.body149

vector.body149:                                   ; preds = %vector.body149, %vector.ph145
  %index150 = phi i32 [ 0, %vector.ph145 ], [ %index.next152, %vector.body149 ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph145 ], [ %8, %vector.body149 ]
  %vec.phi151 = phi <4 x i32> [ zeroinitializer, %vector.ph145 ], [ %9, %vector.body149 ]
  %8 = xor <4 x i32> %vec.phi, <i32 1, i32 1, i32 1, i32 1>
  %9 = xor <4 x i32> %vec.phi151, <i32 1, i32 1, i32 1, i32 1>
  %index.next152 = add nuw i32 %index150, 8
  %10 = icmp eq i32 %index.next152, %n.vec147
  br i1 %10, label %middle.block142, label %vector.body149, !llvm.loop !9

middle.block142:                                  ; preds = %vector.body149
  %bin.rdx = xor <4 x i32> %vec.phi151, %vec.phi
  %11 = tail call i32 @llvm.vector.reduce.xor.v4i32(<4 x i32> %bin.rdx)
  %cmp.n153 = icmp eq i32 %18, %n.vec147
  br i1 %cmp.n153, label %._crit_edge75, label %.preheader58.us.us.preheader154

.lr.ph74.split.preheader:                         ; preds = %.lr.ph74
  %12 = add nuw i32 %7, 1
  %13 = add nuw i32 %18, 1
  %wide.trip.count = zext i32 %13 to i64
  %wide.trip.count103 = zext i32 %12 to i64
  br label %.preheader57.lr.ph

.preheader58.us.us:                               ; preds = %.preheader58.us.us.preheader154, %.preheader58.us.us
  %.04372.us.us = phi i32 [ %15, %.preheader58.us.us ], [ %.04372.us.us.ph, %.preheader58.us.us.preheader154 ]
  %.04471.us.us = phi i32 [ %14, %.preheader58.us.us ], [ %.04471.us.us.ph, %.preheader58.us.us.preheader154 ]
  %14 = xor i32 %.04471.us.us, 1
  %15 = add nuw i32 %.04372.us.us, 1
  %exitcond124.not = icmp eq i32 %.04372.us.us, %18
  br i1 %exitcond124.not, label %._crit_edge75, label %.preheader58.us.us, !llvm.loop !13

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %16 = getelementptr inbounds [510 x i32], ptr @c, i64 0, i64 %indvars.iv
  %17 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %16)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %18 = load i32, ptr @n, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %.not.not = icmp slt i64 %indvars.iv, %19
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !14

._crit_edge75:                                    ; preds = %._crit_edge69, %.preheader58.us.us, %middle.block142, %._crit_edge.thread, %._crit_edge
  %.044.lcssa = phi i32 [ 0, %._crit_edge ], [ 0, %._crit_edge.thread ], [ %11, %middle.block142 ], [ %14, %.preheader58.us.us ], [ %22, %._crit_edge69 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  %20 = load i32, ptr @k, align 4, !tbaa !5
  %.not4978 = icmp slt i32 %20, 0
  br i1 %.not4978, label %._crit_edge82, label %.lr.ph81

.lr.ph81:                                         ; preds = %._crit_edge75
  %21 = zext nneg i32 %.044.lcssa to i64
  br label %73

.preheader57.lr.ph:                               ; preds = %._crit_edge69, %.lr.ph74.split.preheader
  %indvars.iv120 = phi i64 [ 1, %.lr.ph74.split.preheader ], [ %indvars.iv.next121, %._crit_edge69 ]
  %.04471 = phi i32 [ 0, %.lr.ph74.split.preheader ], [ %22, %._crit_edge69 ]
  %22 = xor i32 %.04471, 1
  %23 = sub nuw nsw i32 1, %22
  %24 = zext nneg i32 %23 to i64
  %25 = zext nneg i32 %22 to i64
  %26 = mul nuw nsw i64 %25, 1040400
  %.neg = mul nuw nsw i64 %24, -1040400
  %27 = add nsw i64 %.neg, %26
  %diff.check = icmp ult i64 %27, 32
  br label %.preheader57

.preheader58:                                     ; preds = %.loopexit
  %28 = getelementptr inbounds [510 x i32], ptr @c, i64 0, i64 %indvars.iv120
  br label %.preheader

.preheader57:                                     ; preds = %.preheader57.lr.ph, %.loopexit
  %indvars.iv98 = phi i64 [ 0, %.preheader57.lr.ph ], [ %indvars.iv.next99, %.loopexit ]
  %indvars.iv96 = phi i64 [ 1, %.preheader57.lr.ph ], [ %indvars.iv.next97, %.loopexit ]
  %min.iters.check = icmp ult i64 %indvars.iv96, 8
  %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader57
  %indvars.iv91.ph = phi i64 [ 0, %.preheader57 ], [ %n.vec, %middle.block ]
  %29 = sub nsw i64 %indvars.iv98, %indvars.iv91.ph
  %xtraiter = and i64 %indvars.iv96, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv91.prol = phi i64 [ %indvars.iv.next92.prol, %scalar.ph.prol ], [ %indvars.iv91.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %30 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %24, i64 %indvars.iv98, i64 %indvars.iv91.prol
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %25, i64 %indvars.iv98, i64 %indvars.iv91.prol
  store i32 %31, ptr %32, align 4, !tbaa !5
  %indvars.iv.next92.prol = add nuw nsw i64 %indvars.iv91.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !15

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv91.unr = phi i64 [ %indvars.iv91.ph, %scalar.ph.preheader ], [ %indvars.iv.next92.prol, %scalar.ph.prol ]
  %33 = icmp ult i64 %29, 3
  br i1 %33, label %.loopexit, label %scalar.ph

vector.ph:                                        ; preds = %.preheader57
  %n.vec = and i64 %indvars.iv96, 9223372036854775800
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %34 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %24, i64 %indvars.iv98, i64 %index
  %35 = getelementptr inbounds i8, ptr %34, i64 16
  %wide.load = load <4 x i32>, ptr %34, align 8, !tbaa !5
  %wide.load141 = load <4 x i32>, ptr %35, align 8, !tbaa !5
  %36 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %25, i64 %indvars.iv98, i64 %index
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  store <4 x i32> %wide.load, ptr %36, align 8, !tbaa !5
  store <4 x i32> %wide.load141, ptr %37, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %38 = icmp eq i64 %index.next, %n.vec
  br i1 %38, label %middle.block, label %vector.body, !llvm.loop !17

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %indvars.iv96, %n.vec
  br i1 %cmp.n, label %.loopexit, label %scalar.ph.preheader

.loopexit:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %exitcond104.not = icmp eq i64 %indvars.iv.next99, %wide.trip.count103
  br i1 %exitcond104.not, label %.preheader58, label %.preheader57, !llvm.loop !18

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv91 = phi i64 [ %indvars.iv.next92.3, %scalar.ph ], [ %indvars.iv91.unr, %scalar.ph.prol.loopexit ]
  %39 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %24, i64 %indvars.iv98, i64 %indvars.iv91
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %25, i64 %indvars.iv98, i64 %indvars.iv91
  store i32 %40, ptr %41, align 4, !tbaa !5
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %42 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %24, i64 %indvars.iv98, i64 %indvars.iv.next92
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %25, i64 %indvars.iv98, i64 %indvars.iv.next92
  store i32 %43, ptr %44, align 4, !tbaa !5
  %indvars.iv.next92.1 = add nuw nsw i64 %indvars.iv91, 2
  %45 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %24, i64 %indvars.iv98, i64 %indvars.iv.next92.1
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %25, i64 %indvars.iv98, i64 %indvars.iv.next92.1
  store i32 %46, ptr %47, align 4, !tbaa !5
  %indvars.iv.next92.2 = add nuw nsw i64 %indvars.iv91, 3
  %48 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %24, i64 %indvars.iv98, i64 %indvars.iv.next92.2
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %25, i64 %indvars.iv98, i64 %indvars.iv.next92.2
  store i32 %49, ptr %50, align 4, !tbaa !5
  %indvars.iv.next92.3 = add nuw nsw i64 %indvars.iv91, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next92.3, %indvars.iv96
  br i1 %exitcond.not.3, label %.loopexit, label %scalar.ph, !llvm.loop !19

.preheader:                                       ; preds = %.preheader58, %52
  %indvars.iv113 = phi i64 [ 0, %.preheader58 ], [ %indvars.iv.next114, %52 ]
  %indvars.iv111 = phi i64 [ 1, %.preheader58 ], [ %indvars.iv.next112, %52 ]
  %51 = trunc nuw nsw i64 %indvars.iv113 to i32
  br label %53

._crit_edge69:                                    ; preds = %52
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1
  %exitcond123.not = icmp eq i64 %indvars.iv.next121, %wide.trip.count
  br i1 %exitcond123.not, label %._crit_edge75, label %.preheader57.lr.ph, !llvm.loop !20

52:                                               ; preds = %66
  %indvars.iv.next114 = add nuw nsw i64 %indvars.iv113, 1
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %exitcond119.not = icmp eq i64 %indvars.iv.next114, %wide.trip.count103
  br i1 %exitcond119.not, label %._crit_edge69, label %.preheader, !llvm.loop !21

53:                                               ; preds = %.preheader, %66
  %indvars.iv105 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next106, %66 ]
  %54 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %24, i64 %indvars.iv113, i64 %indvars.iv105
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %.not54 = icmp eq i32 %55, 0
  br i1 %.not54, label %66, label %56

56:                                               ; preds = %53
  %57 = load i32, ptr %28, align 4, !tbaa !5
  %58 = add nsw i32 %57, %51
  %.not55 = icmp sgt i32 %58, %7
  br i1 %.not55, label %66, label %59

59:                                               ; preds = %56
  %60 = sext i32 %58 to i64
  %61 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %25, i64 %60, i64 %indvars.iv105
  store i32 1, ptr %61, align 4, !tbaa !5
  %62 = trunc nuw nsw i64 %indvars.iv105 to i32
  %63 = add nsw i32 %57, %62
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %25, i64 %60, i64 %64
  store i32 1, ptr %65, align 4, !tbaa !5
  br label %66

66:                                               ; preds = %53, %56, %59
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %exitcond110.not = icmp eq i64 %indvars.iv.next106, %indvars.iv111
  br i1 %exitcond110.not, label %52, label %53, !llvm.loop !22

._crit_edge82:                                    ; preds = %82, %._crit_edge75
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  %67 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %68 = trunc i64 %67 to i32
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %68)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %70 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  store ptr %70, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %71 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  store ptr %71, ptr %4, align 8
  %72 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br i1 %72, label %.lr.ph84, label %._crit_edge85

73:                                               ; preds = %.lr.ph81, %82
  %74 = phi i32 [ %20, %.lr.ph81 ], [ %83, %82 ]
  %storemerge79 = phi i32 [ 0, %.lr.ph81 ], [ %85, %82 ]
  %75 = sext i32 %74 to i64
  %76 = sext i32 %storemerge79 to i64
  %77 = getelementptr inbounds [2 x [510 x [510 x i32]]], ptr @dp, i64 0, i64 %21, i64 %75, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %.not50 = icmp eq i32 %78, 0
  br i1 %.not50, label %82, label %79

79:                                               ; preds = %73
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %._crit_edge125 unwind label %80

._crit_edge125:                                   ; preds = %79
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  %.pre126 = load i32, ptr @k, align 4, !tbaa !5
  br label %82

80:                                               ; preds = %79
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #7
  resume { ptr, i32 } %81

82:                                               ; preds = %._crit_edge125, %73
  %83 = phi i32 [ %.pre126, %._crit_edge125 ], [ %74, %73 ]
  %84 = phi i32 [ %.pre, %._crit_edge125 ], [ %storemerge79, %73 ]
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %2, align 4, !tbaa !5
  %.not49.not = icmp slt i32 %84, %83
  br i1 %.not49.not, label %73, label %._crit_edge82, !llvm.loop !23

._crit_edge85:                                    ; preds = %.lr.ph84, %._crit_edge82
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %86 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #7
  ret i32 0

.lr.ph84:                                         ; preds = %._crit_edge82, %.lr.ph84
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %88)
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %91 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  store ptr %91, ptr %4, align 8
  %92 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br i1 %92, label %.lr.ph84, label %._crit_edge85, !llvm.loop !24
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) 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) #2

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #1

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.xor.v4i32(<4 x i32>) #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 = { nofree nounwind "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"int", !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, !16}
!16 = !{!"llvm.loop.unroll.disable"}
!17 = distinct !{!17, !10, !11, !12}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10, !11}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}


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