; LLVM IR from DionysiosB/CodeForces :: 1600-1699 (1610B-KalindromeArray)

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

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 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 i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  br label %17

17:                                               ; preds = %182, %0
  %18 = load i64, ptr %2, align 8, !tbaa !5
  %19 = add nsw i64 %18, -1
  store i64 %19, ptr %2, align 8, !tbaa !5
  %20 = icmp ne i64 %18, 0
  br i1 %20, label %21, label %189

21:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #5
  %23 = load i64, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %23, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %24 unwind label %30

24:                                               ; preds = %21
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 0, ptr %8, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %39, %24
  %26 = load i64, ptr %8, align 8, !tbaa !5
  %27 = load i64, ptr %3, align 8, !tbaa !5
  %28 = icmp slt i64 %26, %27
  br i1 %28, label %34, label %29

29:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %46

30:                                               ; preds = %21
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %6, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  br label %188

34:                                               ; preds = %25
  %35 = load i64, ptr %8, align 8, !tbaa !5
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %35) #5
  %37 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %36)
          to label %38 unwind label %42

38:                                               ; preds = %34
  br label %39

39:                                               ; preds = %38
  %40 = load i64, ptr %8, align 8, !tbaa !5
  %41 = add nsw i64 %40, 1
  store i64 %41, ptr %8, align 8, !tbaa !5
  br label %25, !llvm.loop !9

42:                                               ; preds = %34
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %6, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %187

46:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 -1, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 -1, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 0, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %47 = load i64, ptr %3, align 8, !tbaa !5
  %48 = sub nsw i64 %47, 1
  store i64 %48, ptr %12, align 8, !tbaa !5
  br label %49

49:                                               ; preds = %73, %46
  %50 = load i64, ptr %11, align 8, !tbaa !5
  %51 = load i64, ptr %12, align 8, !tbaa !5
  %52 = icmp slt i64 %50, %51
  br i1 %52, label %53, label %74

53:                                               ; preds = %49
  %54 = load i64, ptr %11, align 8, !tbaa !5
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %54) #5
  %56 = load i64, ptr %55, align 8, !tbaa !5
  %57 = load i64, ptr %12, align 8, !tbaa !5
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %57) #5
  %59 = load i64, ptr %58, align 8, !tbaa !5
  %60 = icmp eq i64 %56, %59
  br i1 %60, label %61, label %66

61:                                               ; preds = %53
  %62 = load i64, ptr %11, align 8, !tbaa !5
  %63 = add nsw i64 %62, 1
  store i64 %63, ptr %11, align 8, !tbaa !5
  %64 = load i64, ptr %12, align 8, !tbaa !5
  %65 = add nsw i64 %64, -1
  store i64 %65, ptr %12, align 8, !tbaa !5
  br label %73

66:                                               ; preds = %53
  %67 = load i64, ptr %11, align 8, !tbaa !5
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %67) #5
  %69 = load i64, ptr %68, align 8, !tbaa !5
  store i64 %69, ptr %9, align 8, !tbaa !5
  %70 = load i64, ptr %12, align 8, !tbaa !5
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %70) #5
  %72 = load i64, ptr %71, align 8, !tbaa !5
  store i64 %72, ptr %10, align 8, !tbaa !5
  br label %74

73:                                               ; preds = %61
  br label %49, !llvm.loop !11

74:                                               ; preds = %66, %49
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #5
  store i8 1, ptr %13, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  store i8 1, ptr %14, align 1, !tbaa !12
  store i64 0, ptr %11, align 8, !tbaa !5
  %75 = load i64, ptr %3, align 8, !tbaa !5
  %76 = sub nsw i64 %75, 1
  store i64 %76, ptr %12, align 8, !tbaa !5
  br label %77

77:                                               ; preds = %120, %74
  %78 = load i64, ptr %9, align 8, !tbaa !5
  %79 = icmp sgt i64 %78, 0
  br i1 %79, label %80, label %84

80:                                               ; preds = %77
  %81 = load i64, ptr %11, align 8, !tbaa !5
  %82 = load i64, ptr %12, align 8, !tbaa !5
  %83 = icmp slt i64 %81, %82
  br label %84

84:                                               ; preds = %80, %77
  %85 = phi i1 [ false, %77 ], [ %83, %80 ]
  br i1 %85, label %86, label %121

86:                                               ; preds = %84
  %87 = load i64, ptr %11, align 8, !tbaa !5
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %87) #5
  %89 = load i64, ptr %88, align 8, !tbaa !5
  %90 = load i64, ptr %12, align 8, !tbaa !5
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %90) #5
  %92 = load i64, ptr %91, align 8, !tbaa !5
  %93 = icmp eq i64 %89, %92
  br i1 %93, label %94, label %99

94:                                               ; preds = %86
  %95 = load i64, ptr %11, align 8, !tbaa !5
  %96 = add nsw i64 %95, 1
  store i64 %96, ptr %11, align 8, !tbaa !5
  %97 = load i64, ptr %12, align 8, !tbaa !5
  %98 = add nsw i64 %97, -1
  store i64 %98, ptr %12, align 8, !tbaa !5
  br label %120

99:                                               ; preds = %86
  %100 = load i64, ptr %11, align 8, !tbaa !5
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %100) #5
  %102 = load i64, ptr %101, align 8, !tbaa !5
  %103 = load i64, ptr %9, align 8, !tbaa !5
  %104 = icmp eq i64 %102, %103
  br i1 %104, label %105, label %108

105:                                              ; preds = %99
  %106 = load i64, ptr %11, align 8, !tbaa !5
  %107 = add nsw i64 %106, 1
  store i64 %107, ptr %11, align 8, !tbaa !5
  br label %119

108:                                              ; preds = %99
  %109 = load i64, ptr %12, align 8, !tbaa !5
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %109) #5
  %111 = load i64, ptr %110, align 8, !tbaa !5
  %112 = load i64, ptr %9, align 8, !tbaa !5
  %113 = icmp eq i64 %111, %112
  br i1 %113, label %114, label %117

114:                                              ; preds = %108
  %115 = load i64, ptr %12, align 8, !tbaa !5
  %116 = add nsw i64 %115, -1
  store i64 %116, ptr %12, align 8, !tbaa !5
  br label %118

117:                                              ; preds = %108
  store i8 0, ptr %13, align 1, !tbaa !12
  br label %121

118:                                              ; preds = %114
  br label %119

119:                                              ; preds = %118, %105
  br label %120

120:                                              ; preds = %119, %94
  br label %77, !llvm.loop !14

121:                                              ; preds = %117, %84
  store i64 0, ptr %11, align 8, !tbaa !5
  %122 = load i64, ptr %3, align 8, !tbaa !5
  %123 = sub nsw i64 %122, 1
  store i64 %123, ptr %12, align 8, !tbaa !5
  br label %124

124:                                              ; preds = %167, %121
  %125 = load i64, ptr %10, align 8, !tbaa !5
  %126 = icmp sgt i64 %125, 0
  br i1 %126, label %127, label %131

127:                                              ; preds = %124
  %128 = load i64, ptr %11, align 8, !tbaa !5
  %129 = load i64, ptr %12, align 8, !tbaa !5
  %130 = icmp slt i64 %128, %129
  br label %131

131:                                              ; preds = %127, %124
  %132 = phi i1 [ false, %124 ], [ %130, %127 ]
  br i1 %132, label %133, label %168

133:                                              ; preds = %131
  %134 = load i64, ptr %11, align 8, !tbaa !5
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %134) #5
  %136 = load i64, ptr %135, align 8, !tbaa !5
  %137 = load i64, ptr %12, align 8, !tbaa !5
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %137) #5
  %139 = load i64, ptr %138, align 8, !tbaa !5
  %140 = icmp eq i64 %136, %139
  br i1 %140, label %141, label %146

141:                                              ; preds = %133
  %142 = load i64, ptr %11, align 8, !tbaa !5
  %143 = add nsw i64 %142, 1
  store i64 %143, ptr %11, align 8, !tbaa !5
  %144 = load i64, ptr %12, align 8, !tbaa !5
  %145 = add nsw i64 %144, -1
  store i64 %145, ptr %12, align 8, !tbaa !5
  br label %167

146:                                              ; preds = %133
  %147 = load i64, ptr %11, align 8, !tbaa !5
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %147) #5
  %149 = load i64, ptr %148, align 8, !tbaa !5
  %150 = load i64, ptr %10, align 8, !tbaa !5
  %151 = icmp eq i64 %149, %150
  br i1 %151, label %152, label %155

152:                                              ; preds = %146
  %153 = load i64, ptr %11, align 8, !tbaa !5
  %154 = add nsw i64 %153, 1
  store i64 %154, ptr %11, align 8, !tbaa !5
  br label %166

155:                                              ; preds = %146
  %156 = load i64, ptr %12, align 8, !tbaa !5
  %157 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %156) #5
  %158 = load i64, ptr %157, align 8, !tbaa !5
  %159 = load i64, ptr %10, align 8, !tbaa !5
  %160 = icmp eq i64 %158, %159
  br i1 %160, label %161, label %164

161:                                              ; preds = %155
  %162 = load i64, ptr %12, align 8, !tbaa !5
  %163 = add nsw i64 %162, -1
  store i64 %163, ptr %12, align 8, !tbaa !5
  br label %165

164:                                              ; preds = %155
  store i8 0, ptr %14, align 1, !tbaa !12
  br label %168

165:                                              ; preds = %161
  br label %166

166:                                              ; preds = %165, %152
  br label %167

167:                                              ; preds = %166, %141
  br label %124, !llvm.loop !15

168:                                              ; preds = %164, %131
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #5
  %169 = load i8, ptr %13, align 1, !tbaa !12, !range !16, !noundef !17
  %170 = trunc i8 %169 to i1
  br i1 %170, label %174, label %171

171:                                              ; preds = %168
  %172 = load i8, ptr %14, align 1, !tbaa !12, !range !16, !noundef !17
  %173 = trunc i8 %172 to i1
  br label %174

174:                                              ; preds = %171, %168
  %175 = phi i1 [ true, %168 ], [ %173, %171 ]
  %176 = zext i1 %175 to i8
  store i8 %176, ptr %15, align 1, !tbaa !12
  %177 = load i8, ptr %15, align 1, !tbaa !12, !range !16, !noundef !17
  %178 = trunc i8 %177 to i1
  %179 = zext i1 %178 to i64
  %180 = select i1 %178, ptr @.str.1, ptr @.str.2
  %181 = invoke i32 @puts(ptr noundef %180)
          to label %182 unwind label %183

182:                                              ; preds = %174
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %17, !llvm.loop !18

183:                                              ; preds = %174
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %6, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %187

187:                                              ; preds = %183, %42
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  br label %188

188:                                              ; preds = %187, %30
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  br label %191

189:                                              ; preds = %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %190 = load i32, ptr %1, align 4
  ret i32 %190

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

declare i32 @puts(ptr noundef) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 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 = { nounwind }

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

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

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 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 i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %6 = load i64, ptr %1, align 8, !tbaa !5
  %7 = add nsw i64 %6, -1
  store i64 %7, ptr %1, align 8, !tbaa !5
  %.not88 = icmp eq i64 %6, 0
  br i1 %.not88, label %._crit_edge91, label %.lr.ph90

.lr.ph90:                                         ; preds = %0, %._crit_edge81
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  %9 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %9, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %10 unwind label %14

10:                                               ; preds = %.lr.ph90
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  %11 = load i64, ptr %2, align 8, !tbaa !5
  %12 = icmp sgt i64 %11, 0
  br i1 %12, label %.lr.ph, label %._crit_edge81

.preheader:                                       ; preds = %.lr.ph
  %13 = icmp sgt i64 %19, 1
  br i1 %13, label %.lr.ph65.preheader, label %._crit_edge81

.lr.ph65.preheader:                               ; preds = %.preheader
  %.04462 = add nsw i64 %19, -1
  br label %.lr.ph65

14:                                               ; preds = %.lr.ph90
  %15 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  resume { ptr, i32 } %15

.lr.ph:                                           ; preds = %10, %.lr.ph
  %.061 = phi i64 [ %18, %.lr.ph ], [ 0, %10 ]
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.061) #5
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %16)
  %18 = add nuw nsw i64 %.061, 1
  %19 = load i64, ptr %2, align 8, !tbaa !5
  %20 = icmp slt i64 %18, %19
  br i1 %20, label %.lr.ph, label %.preheader, !llvm.loop !9

.lr.ph65:                                         ; preds = %.lr.ph65.preheader, %26
  %.04464 = phi i64 [ %.044, %26 ], [ %.04462, %.lr.ph65.preheader ]
  %.04563 = phi i64 [ %27, %26 ], [ 0, %.lr.ph65.preheader ]
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04563) #5
  %22 = load i64, ptr %21, align 8, !tbaa !5
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04464) #5
  %24 = load i64, ptr %23, align 8, !tbaa !5
  %25 = icmp eq i64 %22, %24
  br i1 %25, label %26, label %.loopexit

26:                                               ; preds = %.lr.ph65
  %27 = add nuw nsw i64 %.04563, 1
  %.044 = add nsw i64 %.04464, -1
  %28 = icmp slt i64 %27, %.044
  br i1 %28, label %.lr.ph65, label %._crit_edge81, !llvm.loop !11

.loopexit:                                        ; preds = %.lr.ph65
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04563) #5
  %30 = load i64, ptr %29, align 8, !tbaa !5
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.04464) #5
  %32 = load i64, ptr %31, align 8, !tbaa !5
  %.050.fr = freeze i64 %32
  %.051.fr = freeze i64 %30
  %33 = load i64, ptr %2, align 8, !tbaa !5
  %34 = add nsw i64 %33, -1
  %35 = icmp slt i64 %.051.fr, 1
  %36 = icmp slt i64 %33, 2
  %.not5566 = select i1 %35, i1 true, i1 %36
  br i1 %.not5566, label %._crit_edge, label %.lr.ph70.split

.lr.ph70.split:                                   ; preds = %.loopexit, %57
  %.168 = phi i64 [ %.2, %57 ], [ %34, %.loopexit ]
  %.14667 = phi i64 [ %.247, %57 ], [ 0, %.loopexit ]
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.14667) #5
  %38 = load i64, ptr %37, align 8, !tbaa !5
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.168) #5
  %40 = load i64, ptr %39, align 8, !tbaa !5
  %41 = icmp eq i64 %38, %40
  br i1 %41, label %42, label %45

42:                                               ; preds = %.lr.ph70.split
  %43 = add nsw i64 %.14667, 1
  %44 = add nsw i64 %.168, -1
  br label %57

45:                                               ; preds = %.lr.ph70.split
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.14667) #5
  %47 = load i64, ptr %46, align 8, !tbaa !5
  %48 = icmp eq i64 %47, %.051.fr
  br i1 %48, label %49, label %51

49:                                               ; preds = %45
  %50 = add nsw i64 %.14667, 1
  br label %57

51:                                               ; preds = %45
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.168) #5
  %53 = load i64, ptr %52, align 8, !tbaa !5
  %54 = icmp eq i64 %53, %.051.fr
  br i1 %54, label %55, label %._crit_edge.loopexit

55:                                               ; preds = %51
  %56 = add nsw i64 %.168, -1
  br label %57

57:                                               ; preds = %49, %55, %42
  %.247 = phi i64 [ %43, %42 ], [ %50, %49 ], [ %.14667, %55 ]
  %.2 = phi i64 [ %44, %42 ], [ %.168, %49 ], [ %56, %55 ]
  %.not97 = icmp slt i64 %.247, %.2
  br i1 %.not97, label %.lr.ph70.split, label %._crit_edge.loopexit, !llvm.loop !12

._crit_edge.loopexit:                             ; preds = %51, %57
  %.not55.lcssa.ph = phi i1 [ true, %57 ], [ false, %51 ]
  %.pre = load i64, ptr %2, align 8, !tbaa !5
  %.pre96 = add nsw i64 %.pre, -1
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.loopexit
  %.pre-phi = phi i64 [ %.pre96, %._crit_edge.loopexit ], [ %34, %.loopexit ]
  %58 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ %33, %.loopexit ]
  %.not55.lcssa = phi i1 [ %.not55.lcssa.ph, %._crit_edge.loopexit ], [ true, %.loopexit ]
  %59 = icmp slt i64 %.050.fr, 1
  %60 = icmp slt i64 %58, 2
  %.not5875 = select i1 %59, i1 true, i1 %60
  br i1 %.not5875, label %._crit_edge81, label %.lr.ph80.split

.lr.ph80.split:                                   ; preds = %._crit_edge, %81
  %.377 = phi i64 [ %.4, %81 ], [ %.pre-phi, %._crit_edge ]
  %.34876 = phi i64 [ %.449, %81 ], [ 0, %._crit_edge ]
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.34876) #5
  %62 = load i64, ptr %61, align 8, !tbaa !5
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.377) #5
  %64 = load i64, ptr %63, align 8, !tbaa !5
  %65 = icmp eq i64 %62, %64
  br i1 %65, label %66, label %69

66:                                               ; preds = %.lr.ph80.split
  %67 = add nsw i64 %.34876, 1
  %68 = add nsw i64 %.377, -1
  br label %81

69:                                               ; preds = %.lr.ph80.split
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.34876) #5
  %71 = load i64, ptr %70, align 8, !tbaa !5
  %72 = icmp eq i64 %71, %.050.fr
  br i1 %72, label %73, label %75

73:                                               ; preds = %69
  %74 = add nsw i64 %.34876, 1
  br label %81

75:                                               ; preds = %69
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.377) #5
  %77 = load i64, ptr %76, align 8, !tbaa !5
  %78 = icmp eq i64 %77, %.050.fr
  br i1 %78, label %79, label %._crit_edge81

79:                                               ; preds = %75
  %80 = add nsw i64 %.377, -1
  br label %81

81:                                               ; preds = %73, %79, %66
  %.449 = phi i64 [ %67, %66 ], [ %74, %73 ], [ %.34876, %79 ]
  %.4 = phi i64 [ %68, %66 ], [ %.377, %73 ], [ %80, %79 ]
  %.not98 = icmp slt i64 %.449, %.4
  br i1 %.not98, label %.lr.ph80.split, label %._crit_edge81, !llvm.loop !13

._crit_edge81:                                    ; preds = %26, %81, %75, %.preheader, %10, %._crit_edge
  %.not55.lcssa110 = phi i1 [ %.not55.lcssa, %._crit_edge ], [ true, %10 ], [ true, %.preheader ], [ %.not55.lcssa, %75 ], [ %.not55.lcssa, %81 ], [ true, %26 ]
  %.not58.lcssa = phi i1 [ true, %._crit_edge ], [ true, %10 ], [ true, %.preheader ], [ true, %81 ], [ false, %75 ], [ true, %26 ]
  %82 = or i1 %.not55.lcssa110, %.not58.lcssa
  %83 = select i1 %82, ptr @.str.1, ptr @.str.2
  %84 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %83)
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  %85 = load i64, ptr %1, align 8, !tbaa !5
  %86 = add nsw i64 %85, -1
  store i64 %86, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i64 %85, 0
  br i1 %.not, label %._crit_edge91, label %.lr.ph90, !llvm.loop !14

._crit_edge91:                                    ; preds = %._crit_edge81, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i32 0
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { nounwind }

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

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


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