; LLVM IR from ravireddy07/cpp-book :: src/Code-Forces/#696_cleaning.ll (Z5harryv)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%"class.std::allocator" = type { i8 }

@n = external dso_local global i32, align 4
@a = external dso_local global [200005 x i32], align 16
@pre = external dso_local global [200005 x i32], align 16
@suf = external dso_local global [200005 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5harryv() #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 %"class.std::vector", align 8
  %7 = alloca %"class.std::initializer_list", align 8
  %8 = alloca [4 x i32], align 4
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  store i32 1, ptr %1, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %24, %0
  %15 = load i32, ptr %1, align 4, !tbaa !5
  %16 = load i32, ptr @n, align 4, !tbaa !5
  %17 = icmp sle i32 %15, %16
  br i1 %17, label %19, label %18

18:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  br label %27

19:                                               ; preds = %14
  %20 = load i32, ptr %1, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [200005 x i32], ptr @a, i64 0, i64 %21
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %22)
  br label %24

24:                                               ; preds = %19
  %25 = load i32, ptr %1, align 4, !tbaa !5
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %1, align 4, !tbaa !5
  br label %14, !llvm.loop !9

27:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %28

28:                                               ; preds = %69, %27
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = load i32, ptr @n, align 4, !tbaa !5
  %31 = icmp sle i32 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %72

33:                                               ; preds = %28
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = sub nsw i32 %34, 1
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [200005 x i32], ptr @pre, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = icmp eq i32 %38, -1
  br i1 %39, label %40, label %44

40:                                               ; preds = %33
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [200005 x i32], ptr @pre, i64 0, i64 %42
  store i32 -1, ptr %43, align 4, !tbaa !5
  br label %68

44:                                               ; preds = %33
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [200005 x i32], ptr @a, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = load i32, ptr %2, align 4, !tbaa !5
  %50 = sub nsw i32 %49, 1
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [200005 x i32], ptr @pre, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = sub nsw i32 %48, %53
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [200005 x i32], ptr @pre, i64 0, i64 %56
  store i32 %54, ptr %57, align 4, !tbaa !5
  %58 = load i32, ptr %2, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [200005 x i32], ptr @pre, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = icmp slt i32 %61, 0
  br i1 %62, label %63, label %67

63:                                               ; preds = %44
  %64 = load i32, ptr %2, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [200005 x i32], ptr @pre, i64 0, i64 %65
  store i32 -1, ptr %66, align 4, !tbaa !5
  br label %67

67:                                               ; preds = %63, %44
  br label %68

68:                                               ; preds = %67, %40
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %2, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %2, align 4, !tbaa !5
  br label %28, !llvm.loop !11

72:                                               ; preds = %32
  %73 = load i32, ptr @n, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [200005 x i32], ptr @pre, i64 0, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %78, label %80

78:                                               ; preds = %72
  %79 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  br label %248

80:                                               ; preds = %72
  %81 = load i32, ptr @n, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [200005 x i32], ptr @suf, i64 0, i64 %83
  store i32 0, ptr %84, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %85 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %85, ptr %3, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %126, %80
  %87 = load i32, ptr %3, align 4, !tbaa !5
  %88 = icmp sge i32 %87, 1
  br i1 %88, label %90, label %89

89:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %129

90:                                               ; preds = %86
  %91 = load i32, ptr %3, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [200005 x i32], ptr @suf, i64 0, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = icmp eq i32 %95, -1
  br i1 %96, label %97, label %101

97:                                               ; preds = %90
  %98 = load i32, ptr %3, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [200005 x i32], ptr @suf, i64 0, i64 %99
  store i32 -1, ptr %100, align 4, !tbaa !5
  br label %125

101:                                              ; preds = %90
  %102 = load i32, ptr %3, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [200005 x i32], ptr @a, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = load i32, ptr %3, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [200005 x i32], ptr @suf, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = sub nsw i32 %105, %110
  %112 = load i32, ptr %3, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [200005 x i32], ptr @suf, i64 0, i64 %113
  store i32 %111, ptr %114, align 4, !tbaa !5
  %115 = load i32, ptr %3, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [200005 x i32], ptr @suf, i64 0, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = icmp slt i32 %118, 0
  br i1 %119, label %120, label %124

120:                                              ; preds = %101
  %121 = load i32, ptr %3, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [200005 x i32], ptr @suf, i64 0, i64 %122
  store i32 -1, ptr %123, align 4, !tbaa !5
  br label %124

124:                                              ; preds = %120, %101
  br label %125

125:                                              ; preds = %124, %97
  br label %126

126:                                              ; preds = %125
  %127 = load i32, ptr %3, align 4, !tbaa !5
  %128 = add nsw i32 %127, -1
  store i32 %128, ptr %3, align 4, !tbaa !5
  br label %86, !llvm.loop !12

129:                                              ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %240, %129
  %131 = load i32, ptr %4, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  %133 = load i32, ptr @n, align 4, !tbaa !5
  %134 = icmp sle i32 %132, %133
  br i1 %134, label %136, label %135

135:                                              ; preds = %130
  store i32 11, ptr %5, align 4
  br label %244

136:                                              ; preds = %130
  %137 = load i32, ptr %4, align 4, !tbaa !5
  %138 = sub nsw i32 %137, 1
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [200005 x i32], ptr @pre, i64 0, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !5
  %142 = icmp eq i32 %141, -1
  br i1 %142, label %150, label %143

143:                                              ; preds = %136
  %144 = load i32, ptr %4, align 4, !tbaa !5
  %145 = add nsw i32 %144, 2
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [200005 x i32], ptr @suf, i64 0, i64 %146
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = icmp eq i32 %148, -1
  br i1 %149, label %150, label %151

150:                                              ; preds = %143, %136
  br label %240

151:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #4
  %152 = load i32, ptr %4, align 4, !tbaa !5
  %153 = sub nsw i32 %152, 1
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [200005 x i32], ptr @pre, i64 0, i64 %154
  %156 = load i32, ptr %155, align 4, !tbaa !5
  store i32 %156, ptr %8, align 4, !tbaa !5
  %157 = getelementptr inbounds i32, ptr %8, i64 1
  %158 = load i32, ptr %4, align 4, !tbaa !5
  %159 = add nsw i32 %158, 1
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [200005 x i32], ptr @a, i64 0, i64 %160
  %162 = load i32, ptr %161, align 4, !tbaa !5
  store i32 %162, ptr %157, align 4, !tbaa !5
  %163 = getelementptr inbounds i32, ptr %8, i64 2
  %164 = load i32, ptr %4, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [200005 x i32], ptr @a, i64 0, i64 %165
  %167 = load i32, ptr %166, align 4, !tbaa !5
  store i32 %167, ptr %163, align 4, !tbaa !5
  %168 = getelementptr inbounds i32, ptr %8, i64 3
  %169 = load i32, ptr %4, align 4, !tbaa !5
  %170 = add nsw i32 %169, 2
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [200005 x i32], ptr @suf, i64 0, i64 %171
  %173 = load i32, ptr %172, align 4, !tbaa !5
  store i32 %173, ptr %168, align 4, !tbaa !5
  %174 = getelementptr inbounds %"class.std::initializer_list", ptr %7, i32 0, i32 0
  store ptr %8, ptr %174, align 8, !tbaa !13
  %175 = getelementptr inbounds %"class.std::initializer_list", ptr %7, i32 0, i32 1
  store i64 4, ptr %175, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #4
  %176 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 0
  %177 = load ptr, ptr %176, align 8
  %178 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 1
  %179 = load i64, ptr %178, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr %177, i64 %179, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %180 unwind label %185

180:                                              ; preds = %151
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %181

181:                                              ; preds = %222, %180
  %182 = load i32, ptr %12, align 4, !tbaa !5
  %183 = icmp slt i32 %182, 4
  br i1 %183, label %189, label %184

184:                                              ; preds = %181
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %225

185:                                              ; preds = %151
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %10, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %11, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #4
  br label %243

189:                                              ; preds = %181
  %190 = load i32, ptr %12, align 4, !tbaa !5
  %191 = sub nsw i32 %190, 1
  %192 = sext i32 %191 to i64
  %193 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %192) #4
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = icmp eq i32 %194, -1
  br i1 %195, label %196, label %200

196:                                              ; preds = %189
  %197 = load i32, ptr %12, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %198) #4
  store i32 -1, ptr %199, align 4, !tbaa !5
  br label %221

200:                                              ; preds = %189
  %201 = load i32, ptr %12, align 4, !tbaa !5
  %202 = sub nsw i32 %201, 1
  %203 = sext i32 %202 to i64
  %204 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %203) #4
  %205 = load i32, ptr %204, align 4, !tbaa !5
  %206 = load i32, ptr %12, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %207) #4
  %209 = load i32, ptr %208, align 4, !tbaa !5
  %210 = sub nsw i32 %209, %205
  store i32 %210, ptr %208, align 4, !tbaa !5
  %211 = load i32, ptr %12, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %212) #4
  %214 = load i32, ptr %213, align 4, !tbaa !5
  %215 = icmp slt i32 %214, 0
  br i1 %215, label %216, label %220

216:                                              ; preds = %200
  %217 = load i32, ptr %12, align 4, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %218) #4
  store i32 -1, ptr %219, align 4, !tbaa !5
  br label %220

220:                                              ; preds = %216, %200
  br label %221

221:                                              ; preds = %220, %196
  br label %222

222:                                              ; preds = %221
  %223 = load i32, ptr %12, align 4, !tbaa !5
  %224 = add nsw i32 %223, 1
  store i32 %224, ptr %12, align 4, !tbaa !5
  br label %181, !llvm.loop !18

225:                                              ; preds = %184
  %226 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 3) #4
  %227 = load i32, ptr %226, align 4, !tbaa !5
  %228 = icmp eq i32 %227, 0
  br i1 %228, label %229, label %236

229:                                              ; preds = %225
  %230 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1)
          to label %231 unwind label %232

231:                                              ; preds = %229
  store i32 1, ptr %5, align 4
  br label %237

232:                                              ; preds = %229
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %10, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %11, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  br label %243

236:                                              ; preds = %225
  store i32 0, ptr %5, align 4
  br label %237

237:                                              ; preds = %236, %231
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #4
  %238 = load i32, ptr %5, align 4
  switch i32 %238, label %244 [
    i32 0, label %239
  ]

239:                                              ; preds = %237
  br label %240

240:                                              ; preds = %239, %150
  %241 = load i32, ptr %4, align 4, !tbaa !5
  %242 = add nsw i32 %241, 1
  store i32 %242, ptr %4, align 4, !tbaa !5
  br label %130, !llvm.loop !19

243:                                              ; preds = %232, %185
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %249

244:                                              ; preds = %237, %135
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  %245 = load i32, ptr %5, align 4
  switch i32 %245, label %254 [
    i32 11, label %246
    i32 1, label %248
  ]

246:                                              ; preds = %244
  %247 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %248

248:                                              ; preds = %246, %244, %78
  ret void

249:                                              ; preds = %243
  %250 = load ptr, ptr %10, align 8
  %251 = load i32, ptr %11, align 4
  %252 = insertvalue { ptr, i32 } poison, ptr %250, 0
  %253 = insertvalue { ptr, i32 } %252, i32 %251, 1
  resume { ptr, i32 } %253

254:                                              ; preds = %244
  unreachable
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

attributes #0 = { 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 #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 = { 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 = !{!14, !15, i64 0}
!14 = !{!"_ZTSSt16initializer_listIiE", !15, i64 0, !16, i64 8}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!14, !16, i64 8}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !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.std::allocator" = type { i8 }

@n = external dso_local global i32, align 4
@a = external dso_local global [200005 x i32], align 16
@pre = external dso_local local_unnamed_addr global [200005 x i32], align 16
@suf = external dso_local local_unnamed_addr global [200005 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5harryv() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector", align 8
  %2 = alloca [4 x i32], align 4
  %3 = alloca %"class.std::allocator", align 1
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %.not57 = icmp slt i32 %5, 1
  br i1 %.not57, label %._crit_edge, label %.lr.ph

.preheader56:                                     ; preds = %.lr.ph
  %.not4959 = icmp slt i32 %10, 1
  br i1 %.not4959, label %._crit_edge, label %.lr.ph61.preheader

.lr.ph61.preheader:                               ; preds = %.preheader56
  %.pre = load i32, ptr @pre, align 16, !tbaa !5
  %6 = zext nneg i32 %10 to i64
  %xtraiter = and i64 %6, 1
  %7 = icmp eq i32 %10, 1
  br i1 %7, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph61.preheader.new

.lr.ph61.preheader.new:                           ; preds = %.lr.ph61.preheader
  %unroll_iter = and i64 %6, 2147483646
  br label %.lr.ph61

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %8 = getelementptr inbounds [200005 x i32], ptr @a, i64 0, i64 %indvars.iv
  %9 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %8)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %.not.not = icmp slt i64 %indvars.iv, %11
  br i1 %.not.not, label %.lr.ph, label %.preheader56, !llvm.loop !9

._crit_edge.loopexit.unr-lcssa:                   ; preds = %35, %.lr.ph61.preheader
  %.unr = phi i32 [ %.pre, %.lr.ph61.preheader ], [ %spec.store.select.sink.1, %35 ]
  %indvars.iv72.unr = phi i64 [ 1, %.lr.ph61.preheader ], [ %indvars.iv.next73.1, %35 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph61.epil

.lr.ph61.epil:                                    ; preds = %._crit_edge.loopexit.unr-lcssa
  %12 = icmp eq i32 %.unr, -1
  br i1 %12, label %._crit_edge.loopexit.epilog-lcssa, label %13

13:                                               ; preds = %.lr.ph61.epil
  %14 = getelementptr inbounds [200005 x i32], ptr @a, i64 0, i64 %indvars.iv72.unr
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = sub nsw i32 %15, %.unr
  %spec.store.select.epil = tail call i32 @llvm.smax.i32(i32 %16, i32 -1)
  br label %._crit_edge.loopexit.epilog-lcssa

._crit_edge.loopexit.epilog-lcssa:                ; preds = %13, %.lr.ph61.epil
  %spec.store.select.sink.epil = phi i32 [ %spec.store.select.epil, %13 ], [ -1, %.lr.ph61.epil ]
  %17 = getelementptr inbounds [200005 x i32], ptr @pre, i64 0, i64 %indvars.iv72.unr
  store i32 %spec.store.select.sink.epil, ptr %17, align 4
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %0, %.preheader56
  %18 = phi i32 [ %10, %.preheader56 ], [ %5, %0 ], [ %10, %._crit_edge.loopexit.unr-lcssa ], [ %10, %._crit_edge.loopexit.epilog-lcssa ]
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [200005 x i32], ptr @pre, i64 0, i64 %19
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %37, label %39

.lr.ph61:                                         ; preds = %35, %.lr.ph61.preheader.new
  %23 = phi i32 [ %.pre, %.lr.ph61.preheader.new ], [ %spec.store.select.sink.1, %35 ]
  %indvars.iv72 = phi i64 [ 1, %.lr.ph61.preheader.new ], [ %indvars.iv.next73.1, %35 ]
  %niter = phi i64 [ 0, %.lr.ph61.preheader.new ], [ %niter.next.1, %35 ]
  %24 = icmp eq i32 %23, -1
  br i1 %24, label %.lr.ph61.1, label %25

25:                                               ; preds = %.lr.ph61
  %26 = getelementptr inbounds [200005 x i32], ptr @a, i64 0, i64 %indvars.iv72
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = sub nsw i32 %27, %23
  %spec.store.select = tail call i32 @llvm.smax.i32(i32 %28, i32 -1)
  br label %.lr.ph61.1

.lr.ph61.1:                                       ; preds = %.lr.ph61, %25
  %spec.store.select.sink = phi i32 [ %spec.store.select, %25 ], [ -1, %.lr.ph61 ]
  %29 = getelementptr inbounds [200005 x i32], ptr @pre, i64 0, i64 %indvars.iv72
  store i32 %spec.store.select.sink, ptr %29, align 4
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %30 = icmp eq i32 %spec.store.select.sink, -1
  br i1 %30, label %35, label %31

31:                                               ; preds = %.lr.ph61.1
  %32 = getelementptr inbounds [200005 x i32], ptr @a, i64 0, i64 %indvars.iv.next73
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = sub nsw i32 %33, %spec.store.select.sink
  %spec.store.select.1 = tail call i32 @llvm.smax.i32(i32 %34, i32 -1)
  br label %35

35:                                               ; preds = %31, %.lr.ph61.1
  %spec.store.select.sink.1 = phi i32 [ %spec.store.select.1, %31 ], [ -1, %.lr.ph61.1 ]
  %36 = getelementptr inbounds [200005 x i32], ptr @pre, i64 0, i64 %indvars.iv.next73
  store i32 %spec.store.select.sink.1, ptr %36, align 4
  %indvars.iv.next73.1 = add nuw nsw i64 %indvars.iv72, 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_edge.loopexit.unr-lcssa, label %.lr.ph61, !llvm.loop !11

37:                                               ; preds = %._crit_edge
  %38 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %137

39:                                               ; preds = %._crit_edge
  %40 = add nsw i32 %18, 1
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [200005 x i32], ptr @suf, i64 0, i64 %41
  store i32 0, ptr %42, align 4, !tbaa !5
  %43 = icmp sgt i32 %18, 0
  br i1 %43, label %.lr.ph64.preheader, label %._crit_edge69

.lr.ph64.preheader:                               ; preds = %39
  %44 = zext nneg i32 %18 to i64
  %45 = shl nuw nsw i64 %44, 2
  %46 = getelementptr i8, ptr @suf, i64 %45
  %scevgep = getelementptr i8, ptr %46, i64 4
  %load_initial = load i32, ptr %scevgep, align 4
  %xtraiter94 = and i64 %44, 1
  %lcmp.mod95.not = icmp eq i64 %xtraiter94, 0
  br i1 %lcmp.mod95.not, label %.lr.ph64.prol.loopexit, label %.lr.ph64.prol

.lr.ph64.prol:                                    ; preds = %.lr.ph64.preheader
  %47 = icmp eq i32 %load_initial, -1
  br i1 %47, label %.lr.ph64.prol.loopexit.unr-lcssa, label %48

48:                                               ; preds = %.lr.ph64.prol
  %49 = getelementptr inbounds [200005 x i32], ptr @a, i64 0, i64 %44
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = sub nsw i32 %50, %load_initial
  %spec.store.select52.prol = tail call i32 @llvm.smax.i32(i32 %51, i32 -1)
  br label %.lr.ph64.prol.loopexit.unr-lcssa

.lr.ph64.prol.loopexit.unr-lcssa:                 ; preds = %48, %.lr.ph64.prol
  %spec.store.select52.sink.prol = phi i32 [ %spec.store.select52.prol, %48 ], [ -1, %.lr.ph64.prol ]
  %52 = getelementptr inbounds [200005 x i32], ptr @suf, i64 0, i64 %44
  store i32 %spec.store.select52.sink.prol, ptr %52, align 4
  %indvars.iv.next76.prol = add nsw i64 %44, -1
  br label %.lr.ph64.prol.loopexit

.lr.ph64.prol.loopexit:                           ; preds = %.lr.ph64.prol.loopexit.unr-lcssa, %.lr.ph64.preheader
  %store_forwarded.unr = phi i32 [ %load_initial, %.lr.ph64.preheader ], [ %spec.store.select52.sink.prol, %.lr.ph64.prol.loopexit.unr-lcssa ]
  %indvars.iv75.unr = phi i64 [ %44, %.lr.ph64.preheader ], [ %indvars.iv.next76.prol, %.lr.ph64.prol.loopexit.unr-lcssa ]
  %cond = icmp eq i32 %18, 1
  br i1 %cond, label %._crit_edge69, label %.lr.ph64

.preheader:                                       ; preds = %66
  %.not50.not66.not = icmp eq i32 %18, 1
  br i1 %.not50.not66.not, label %._crit_edge69, label %.lr.ph68

.lr.ph68:                                         ; preds = %.preheader
  %53 = getelementptr inbounds i8, ptr %2, i64 4
  %54 = getelementptr inbounds i8, ptr %2, i64 12
  br label %69

.lr.ph64:                                         ; preds = %.lr.ph64.prol.loopexit, %66
  %store_forwarded = phi i32 [ %spec.store.select52.sink.1, %66 ], [ %store_forwarded.unr, %.lr.ph64.prol.loopexit ]
  %indvars.iv75 = phi i64 [ %indvars.iv.next76.1, %66 ], [ %indvars.iv75.unr, %.lr.ph64.prol.loopexit ]
  %55 = icmp eq i32 %store_forwarded, -1
  br i1 %55, label %.lr.ph64.1, label %56

56:                                               ; preds = %.lr.ph64
  %57 = getelementptr inbounds [200005 x i32], ptr @a, i64 0, i64 %indvars.iv75
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = sub nsw i32 %58, %store_forwarded
  %spec.store.select52 = tail call i32 @llvm.smax.i32(i32 %59, i32 -1)
  br label %.lr.ph64.1

.lr.ph64.1:                                       ; preds = %.lr.ph64, %56
  %spec.store.select52.sink = phi i32 [ %spec.store.select52, %56 ], [ -1, %.lr.ph64 ]
  %60 = getelementptr inbounds [200005 x i32], ptr @suf, i64 0, i64 %indvars.iv75
  store i32 %spec.store.select52.sink, ptr %60, align 4
  %indvars.iv.next76 = add nsw i64 %indvars.iv75, -1
  %61 = icmp eq i32 %spec.store.select52.sink, -1
  br i1 %61, label %66, label %62

62:                                               ; preds = %.lr.ph64.1
  %63 = getelementptr inbounds [200005 x i32], ptr @a, i64 0, i64 %indvars.iv.next76
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = sub nsw i32 %64, %spec.store.select52.sink
  %spec.store.select52.1 = tail call i32 @llvm.smax.i32(i32 %65, i32 -1)
  br label %66

66:                                               ; preds = %62, %.lr.ph64.1
  %spec.store.select52.sink.1 = phi i32 [ %spec.store.select52.1, %62 ], [ -1, %.lr.ph64.1 ]
  %67 = getelementptr inbounds [200005 x i32], ptr @suf, i64 0, i64 %indvars.iv.next76
  store i32 %spec.store.select52.sink.1, ptr %67, align 4
  %indvars.iv.next76.1 = add nsw i64 %indvars.iv75, -2
  %68 = icmp sgt i64 %indvars.iv75, 2
  br i1 %68, label %.lr.ph64, label %.preheader, !llvm.loop !12

69:                                               ; preds = %.lr.ph68, %131
  %70 = phi i32 [ %18, %.lr.ph68 ], [ %132, %131 ]
  %indvars.iv84 = phi i64 [ 1, %.lr.ph68 ], [ %indvars.iv.next85, %131 ]
  %indvars.iv82 = phi i64 [ 2, %.lr.ph68 ], [ %indvars.iv.next83, %131 ]
  %71 = add nsw i64 %indvars.iv84, -1
  %72 = getelementptr inbounds [200005 x i32], ptr @pre, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = icmp eq i32 %73, -1
  br i1 %74, label %131, label %75

75:                                               ; preds = %69
  %76 = add nuw nsw i64 %indvars.iv84, 2
  %77 = getelementptr inbounds [200005 x i32], ptr @suf, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = icmp eq i32 %78, -1
  br i1 %79, label %131, label %80

80:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #5
  store i32 %73, ptr %2, align 4, !tbaa !5
  %81 = getelementptr inbounds [200005 x i32], ptr @a, i64 0, i64 %indvars.iv84
  %82 = load <2 x i32>, ptr %81, align 4, !tbaa !5
  %83 = shufflevector <2 x i32> %82, <2 x i32> poison, <2 x i32> <i32 1, i32 0>
  store <2 x i32> %83, ptr %53, align 4, !tbaa !5
  store i32 %78, ptr %54, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr nonnull %2, i64 4, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %84 unwind label %88

84:                                               ; preds = %80
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #5
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #5
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = icmp eq i32 %86, -1
  br i1 %87, label %.sink.split, label %90

88:                                               ; preds = %80
  %89 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #5
  resume { ptr, i32 } %89

90:                                               ; preds = %84
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #5
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #5
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = sub nsw i32 %94, %92
  store i32 %95, ptr %93, align 4, !tbaa !5
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #5
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = icmp slt i32 %97, 0
  br i1 %98, label %.sink.split, label %100

.sink.split:                                      ; preds = %90, %84
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #5
  store i32 -1, ptr %99, align 4, !tbaa !5
  br label %100

100:                                              ; preds = %.sink.split, %90
  %101 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #5
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = icmp eq i32 %102, -1
  br i1 %103, label %.sink.split92, label %104

104:                                              ; preds = %100
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #5
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #5
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = sub nsw i32 %108, %106
  store i32 %109, ptr %107, align 4, !tbaa !5
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #5
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = icmp slt i32 %111, 0
  br i1 %112, label %.sink.split92, label %114

.sink.split92:                                    ; preds = %100, %104
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #5
  store i32 -1, ptr %113, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %.sink.split92, %104
  %115 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #5
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = icmp eq i32 %116, -1
  br i1 %117, label %.sink.split93, label %118

118:                                              ; preds = %114
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 2) #5
  %120 = load i32, ptr %119, align 4, !tbaa !5
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3) #5
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = sub nsw i32 %122, %120
  store i32 %123, ptr %121, align 4, !tbaa !5
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3) #5
  %125 = load i32, ptr %124, align 4, !tbaa !5
  %126 = icmp slt i32 %125, 0
  br i1 %126, label %.sink.split93, label %128

.sink.split93:                                    ; preds = %114, %118
  %127 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3) #5
  store i32 -1, ptr %127, align 4, !tbaa !5
  br label %128

128:                                              ; preds = %.sink.split93, %118
  %129 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 3) #5
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %.not51 = icmp eq i32 %130, 0
  br i1 %.not51, label %134, label %.critedge

.critedge:                                        ; preds = %128
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #5
  %.pre89 = load i32, ptr @n, align 4, !tbaa !5
  br label %131

131:                                              ; preds = %.critedge, %69, %75
  %132 = phi i32 [ %.pre89, %.critedge ], [ %70, %69 ], [ %70, %75 ]
  %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1
  %133 = sext i32 %132 to i64
  %.not50.not = icmp slt i64 %indvars.iv82, %133
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  br i1 %.not50.not, label %69, label %._crit_edge69, !llvm.loop !13

134:                                              ; preds = %128
  %135 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #5
  br label %137

._crit_edge69:                                    ; preds = %.lr.ph64.prol.loopexit, %131, %39, %.preheader
  %136 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %137

137:                                              ; preds = %134, %._crit_edge69, %37
  ret void
}

; 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: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass