; LLVM IR from ravireddy07/cpp-book :: src/Code-Chef/NOV2020-Long/CNDYGAME.ll (Z4testv)

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

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

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4testv() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca %"class.std::initializer_list", align 8
  %13 = alloca [2 x i64], align 8
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr %2) #5
  %24 = load i64, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #5
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %24, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %25 unwind label %32

25:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %42, %25
  %27 = load i32, ptr %6, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = load i64, ptr %1, align 8, !tbaa !5
  %30 = icmp slt i64 %28, %29
  br i1 %30, label %36, label %31

31:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %49

32:                                               ; preds = %0
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %4, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %5, align 4
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #5
  br label %274

36:                                               ; preds = %26
  %37 = load i32, ptr %6, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %38) #5
  %40 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %39)
          to label %41 unwind label %45

41:                                               ; preds = %36
  br label %42

42:                                               ; preds = %41
  %43 = load i32, ptr %6, align 4, !tbaa !9
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %6, align 4, !tbaa !9
  br label %26, !llvm.loop !11

45:                                               ; preds = %36
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %4, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %273

49:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %50 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %7)
          to label %51 unwind label %60

51:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #5
  %52 = load i64, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #5
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %52, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %53 unwind label %64

53:                                               ; preds = %51
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %74, %53
  %55 = load i32, ptr %10, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = load i64, ptr %7, align 8, !tbaa !5
  %58 = icmp slt i64 %56, %57
  br i1 %58, label %68, label %59

59:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %81

60:                                               ; preds = %49
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %4, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %5, align 4
  br label %272

64:                                               ; preds = %51
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %4, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %5, align 4
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  br label %271

68:                                               ; preds = %54
  %69 = load i32, ptr %10, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %70) #5
  %72 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %71)
          to label %73 unwind label %77

73:                                               ; preds = %68
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %10, align 4, !tbaa !9
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %10, align 4, !tbaa !9
  br label %54, !llvm.loop !13

77:                                               ; preds = %68
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %4, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %270

81:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  store i64 0, ptr %13, align 8, !tbaa !5
  %82 = getelementptr inbounds i64, ptr %13, i64 1
  store i64 0, ptr %82, align 8, !tbaa !5
  %83 = getelementptr inbounds %"class.std::initializer_list", ptr %12, i32 0, i32 0
  store ptr %13, ptr %83, align 8, !tbaa !14
  %84 = getelementptr inbounds %"class.std::initializer_list", ptr %12, i32 0, i32 1
  store i64 2, ptr %84, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  %85 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8
  %87 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 1
  %88 = load i64, ptr %87, align 8
  invoke void @_ZNSt6vectorIxSaIxEEC2ESt16initializer_listIxERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr %86, i64 %88, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %89 unwind label %126

89:                                               ; preds = %81
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store i64 0, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %90 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %91 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %90, ptr %91, align 8
  %92 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %93 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %92, ptr %93, align 8
  %94 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8
  %96 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8
  %98 = invoke ptr @_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEEET_S7_S7_(ptr %95, ptr %97)
          to label %99 unwind label %130

99:                                               ; preds = %89
  %100 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %98, ptr %100, align 8
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  %102 = load i64, ptr %101, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  store i64 %102, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %256, %99
  %104 = load i32, ptr %22, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = load i64, ptr %16, align 8, !tbaa !5
  %107 = icmp sle i64 %105, %106
  br i1 %107, label %108, label %259

108:                                              ; preds = %103
  %109 = load i32, ptr %22, align 4, !tbaa !9
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %22, align 4, !tbaa !9
  %111 = load i32, ptr %22, align 4, !tbaa !9
  %112 = sext i32 %111 to i64
  %113 = load i32, ptr %21, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %114) #5
  %116 = load i64, ptr %115, align 8, !tbaa !5
  %117 = icmp sgt i64 %112, %116
  br i1 %117, label %118, label %134

118:                                              ; preds = %108
  %119 = load i64, ptr %15, align 8, !tbaa !5
  %120 = icmp ne i64 %119, 0
  %121 = zext i1 %120 to i64
  %122 = select i1 %120, i32 0, i32 1
  %123 = sext i32 %122 to i64
  store i64 %123, ptr %15, align 8, !tbaa !5
  %124 = load i32, ptr %21, align 4, !tbaa !9
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %21, align 4, !tbaa !9
  br label %134

126:                                              ; preds = %81
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %4, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %5, align 4
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  br label %269

130:                                              ; preds = %89
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %4, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %268

134:                                              ; preds = %118, %108
  %135 = load i32, ptr %20, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = load i64, ptr %1, align 8, !tbaa !5
  %138 = icmp sgt i64 %136, %137
  br i1 %138, label %139, label %145

139:                                              ; preds = %134
  %140 = load i64, ptr %1, align 8, !tbaa !5
  %141 = load i32, ptr %20, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = srem i64 %142, %140
  %144 = trunc i64 %143 to i32
  store i32 %144, ptr %20, align 4, !tbaa !9
  br label %145

145:                                              ; preds = %139, %134
  %146 = load i32, ptr %20, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = load i64, ptr %1, align 8, !tbaa !5
  %149 = sub nsw i64 %148, 1
  %150 = icmp eq i64 %147, %149
  br i1 %150, label %151, label %178

151:                                              ; preds = %145
  %152 = load i32, ptr %20, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %153) #5
  %155 = load i64, ptr %154, align 8, !tbaa !5
  %156 = srem i64 %155, 2
  %157 = icmp eq i64 %156, 0
  br i1 %157, label %158, label %168

158:                                              ; preds = %151
  %159 = load i32, ptr %20, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %160) #5
  %162 = load i64, ptr %161, align 8, !tbaa !5
  %163 = sub nsw i64 %162, 1
  %164 = load i64, ptr %15, align 8, !tbaa !5
  %165 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %164) #5
  %166 = load i64, ptr %165, align 8, !tbaa !5
  %167 = add nsw i64 %166, %163
  store i64 %167, ptr %165, align 8, !tbaa !5
  br label %177

168:                                              ; preds = %151
  %169 = load i32, ptr %20, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %170) #5
  %172 = load i64, ptr %171, align 8, !tbaa !5
  %173 = load i64, ptr %15, align 8, !tbaa !5
  %174 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %173) #5
  %175 = load i64, ptr %174, align 8, !tbaa !5
  %176 = add nsw i64 %175, %172
  store i64 %176, ptr %174, align 8, !tbaa !5
  br label %177

177:                                              ; preds = %168, %158
  br label %255

178:                                              ; preds = %145
  %179 = load i32, ptr %20, align 4, !tbaa !9
  %180 = add nsw i32 %179, 1
  %181 = sext i32 %180 to i64
  %182 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %181) #5
  %183 = load i64, ptr %182, align 8, !tbaa !5
  %184 = icmp eq i64 %183, 1
  br i1 %184, label %185, label %199

185:                                              ; preds = %178
  %186 = load i32, ptr %20, align 4, !tbaa !9
  %187 = sext i32 %186 to i64
  %188 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %187) #5
  %189 = load i64, ptr %188, align 8, !tbaa !5
  %190 = load i64, ptr %15, align 8, !tbaa !5
  %191 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %190) #5
  %192 = load i64, ptr %191, align 8, !tbaa !5
  %193 = add nsw i64 %192, %189
  store i64 %193, ptr %191, align 8, !tbaa !5
  %194 = load i64, ptr %15, align 8, !tbaa !5
  %195 = icmp ne i64 %194, 0
  %196 = zext i1 %195 to i64
  %197 = select i1 %195, i32 0, i32 1
  %198 = sext i32 %197 to i64
  store i64 %198, ptr %15, align 8, !tbaa !5
  br label %254

199:                                              ; preds = %178
  %200 = load i32, ptr %20, align 4, !tbaa !9
  %201 = sext i32 %200 to i64
  %202 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %201) #5
  %203 = load i64, ptr %202, align 8, !tbaa !5
  %204 = icmp eq i64 %203, 1
  br i1 %204, label %205, label %219

205:                                              ; preds = %199
  %206 = load i32, ptr %20, align 4, !tbaa !9
  %207 = sext i32 %206 to i64
  %208 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %207) #5
  %209 = load i64, ptr %208, align 8, !tbaa !5
  %210 = load i64, ptr %15, align 8, !tbaa !5
  %211 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %210) #5
  %212 = load i64, ptr %211, align 8, !tbaa !5
  %213 = add nsw i64 %212, %209
  store i64 %213, ptr %211, align 8, !tbaa !5
  %214 = load i64, ptr %15, align 8, !tbaa !5
  %215 = icmp ne i64 %214, 0
  %216 = zext i1 %215 to i64
  %217 = select i1 %215, i32 0, i32 1
  %218 = sext i32 %217 to i64
  store i64 %218, ptr %15, align 8, !tbaa !5
  br label %253

219:                                              ; preds = %199
  %220 = load i32, ptr %20, align 4, !tbaa !9
  %221 = sext i32 %220 to i64
  %222 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %221) #5
  %223 = load i64, ptr %222, align 8, !tbaa !5
  %224 = icmp sgt i64 %223, 1
  br i1 %224, label %225, label %252

225:                                              ; preds = %219
  %226 = load i32, ptr %20, align 4, !tbaa !9
  %227 = sext i32 %226 to i64
  %228 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %227) #5
  %229 = load i64, ptr %228, align 8, !tbaa !5
  %230 = srem i64 %229, 2
  %231 = icmp eq i64 %230, 0
  br i1 %231, label %232, label %241

232:                                              ; preds = %225
  %233 = load i32, ptr %20, align 4, !tbaa !9
  %234 = sext i32 %233 to i64
  %235 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %234) #5
  %236 = load i64, ptr %235, align 8, !tbaa !5
  %237 = load i64, ptr %15, align 8, !tbaa !5
  %238 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %237) #5
  %239 = load i64, ptr %238, align 8, !tbaa !5
  %240 = add nsw i64 %239, %236
  store i64 %240, ptr %238, align 8, !tbaa !5
  br label %251

241:                                              ; preds = %225
  %242 = load i32, ptr %20, align 4, !tbaa !9
  %243 = sext i32 %242 to i64
  %244 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %243) #5
  %245 = load i64, ptr %244, align 8, !tbaa !5
  %246 = sub nsw i64 %245, 1
  %247 = load i64, ptr %15, align 8, !tbaa !5
  %248 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %247) #5
  %249 = load i64, ptr %248, align 8, !tbaa !5
  %250 = add nsw i64 %249, %246
  store i64 %250, ptr %248, align 8, !tbaa !5
  br label %251

251:                                              ; preds = %241, %232
  br label %252

252:                                              ; preds = %251, %219
  br label %253

253:                                              ; preds = %252, %205
  br label %254

254:                                              ; preds = %253, %185
  br label %255

255:                                              ; preds = %254, %177
  br label %256

256:                                              ; preds = %255
  %257 = load i32, ptr %20, align 4, !tbaa !9
  %258 = add nsw i32 %257, 1
  store i32 %258, ptr %20, align 4, !tbaa !9
  br label %103, !llvm.loop !19

259:                                              ; preds = %103
  %260 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef 0) #5
  %261 = load i64, ptr %260, align 8, !tbaa !5
  %262 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %261)
          to label %263 unwind label %264

263:                                              ; preds = %259
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  ret void

264:                                              ; preds = %259
  %265 = landingpad { ptr, i32 }
          cleanup
  %266 = extractvalue { ptr, i32 } %265, 0
  store ptr %266, ptr %4, align 8
  %267 = extractvalue { ptr, i32 } %265, 1
  store i32 %267, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %268

268:                                              ; preds = %264, %130
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  br label %269

269:                                              ; preds = %268, %126
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  br label %270

270:                                              ; preds = %269, %77
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  br label %271

271:                                              ; preds = %270, %64
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  br label %272

272:                                              ; preds = %271, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %273

273:                                              ; preds = %272, %45
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  br label %274

274:                                              ; preds = %273, %32
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  br label %275

275:                                              ; preds = %274
  %276 = load ptr, ptr %4, align 8
  %277 = load i32, ptr %5, align 4
  %278 = insertvalue { ptr, i32 } poison, ptr %276, 0
  %279 = insertvalue { ptr, i32 } %278, i32 %277, 1
  resume { ptr, i32 } %279
}

; 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 @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 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 @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEEET_S7_S7_(ptr, ptr) #4

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIxED2Ev(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 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !16, i64 0}
!15 = !{!"_ZTSSt16initializer_listIxE", !16, i64 0, !17, i64 8}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!15, !17, i64 8}
!19 = distinct !{!19, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4testv() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca [2 x i64], align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #6
  %12 = load i64, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #6
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %12, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %13 unwind label %18

13:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  %14 = load i64, ptr %1, align 8, !tbaa !5
  %15 = icmp sgt i64 %14, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  %17 = load i64, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %17, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %24 unwind label %27

18:                                               ; preds = %0
  %19 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  br label %122

.lr.ph:                                           ; preds = %13, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %13 ]
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv) #6
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %20)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %22 = load i64, ptr %1, align 8, !tbaa !5
  %23 = icmp sgt i64 %22, %indvars.iv.next
  br i1 %23, label %.lr.ph, label %._crit_edge, !llvm.loop !9

24:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  %25 = load i64, ptr %4, align 8, !tbaa !5
  %26 = icmp sgt i64 %25, 0
  br i1 %26, label %.lr.ph67, label %._crit_edge68

._crit_edge68:                                    ; preds = %.lr.ph67, %24
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %8, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #6
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  invoke void @_ZNSt6vectorIxSaIxEEC2ESt16initializer_listIxERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr nonnull %8, i64 2, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %33 unwind label %49

27:                                               ; preds = %._crit_edge
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  br label %121

.lr.ph67:                                         ; preds = %24, %.lr.ph67
  %indvars.iv78 = phi i64 [ %indvars.iv.next79, %.lr.ph67 ], [ 0, %24 ]
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv78) #6
  %30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %29)
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %31 = load i64, ptr %4, align 8, !tbaa !5
  %32 = icmp sgt i64 %31, %indvars.iv.next79
  br i1 %32, label %.lr.ph67, label %._crit_edge68, !llvm.loop !11

33:                                               ; preds = %._crit_edge68
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %34 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %35 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %36 = invoke ptr @_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEEET_S7_S7_(ptr %34, ptr %35)
          to label %37 unwind label %51

37:                                               ; preds = %33
  store ptr %36, ptr %10, align 8
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  %39 = load i64, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  %.not69 = icmp slt i64 %39, 0
  br i1 %.not69, label %._crit_edge76, label %.lr.ph75

.lr.ph75:                                         ; preds = %37, %115
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %115 ], [ 0, %37 ]
  %.03972 = phi i32 [ %.1, %115 ], [ 0, %37 ]
  %.04071 = phi i32 [ %116, %115 ], [ 0, %37 ]
  %.04870 = phi i64 [ %.250, %115 ], [ 0, %37 ]
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %40 = zext nneg i32 %.03972 to i64
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %40) #6
  %42 = load i64, ptr %41, align 8, !tbaa !5
  %43 = icmp sle i64 %42, %indvars.iv81
  %.not61 = icmp eq i64 %.04870, 0
  %44 = zext i1 %.not61 to i64
  %.149 = select i1 %43, i64 %44, i64 %.04870
  %45 = zext i1 %43 to i32
  %.1 = add nuw nsw i32 %.03972, %45
  %46 = sext i32 %.04071 to i64
  %47 = load i64, ptr %1, align 8, !tbaa !5
  %48 = icmp slt i64 %47, %46
  br i1 %48, label %53, label %56

49:                                               ; preds = %._crit_edge68
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  br label %120

51:                                               ; preds = %33
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  br label %120

53:                                               ; preds = %.lr.ph75
  %54 = srem i64 %46, %47
  %55 = trunc nsw i64 %54 to i32
  br label %56

56:                                               ; preds = %53, %.lr.ph75
  %.pre-phi = phi i64 [ %54, %53 ], [ %46, %.lr.ph75 ]
  %.141 = phi i32 [ %55, %53 ], [ %.04071, %.lr.ph75 ]
  %57 = add nsw i64 %47, -1
  %58 = icmp eq i64 %57, %.pre-phi
  br i1 %58, label %59, label %75

59:                                               ; preds = %56
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.pre-phi) #6
  %61 = load i64, ptr %60, align 8, !tbaa !5
  %62 = and i64 %61, 1
  %63 = icmp eq i64 %62, 0
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.pre-phi) #6
  %65 = load i64, ptr %64, align 8, !tbaa !5
  br i1 %63, label %66, label %71

66:                                               ; preds = %59
  %67 = add nsw i64 %65, -1
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.149) #6
  %69 = load i64, ptr %68, align 8, !tbaa !5
  %70 = add nsw i64 %67, %69
  store i64 %70, ptr %68, align 8, !tbaa !5
  br label %115

71:                                               ; preds = %59
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.149) #6
  %73 = load i64, ptr %72, align 8, !tbaa !5
  %74 = add nsw i64 %73, %65
  store i64 %74, ptr %72, align 8, !tbaa !5
  br label %115

75:                                               ; preds = %56
  %76 = add nsw i32 %.141, 1
  %77 = sext i32 %76 to i64
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %77) #6
  %79 = load i64, ptr %78, align 8, !tbaa !5
  %80 = icmp eq i64 %79, 1
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.pre-phi) #6
  %82 = load i64, ptr %81, align 8, !tbaa !5
  br i1 %80, label %83, label %88

83:                                               ; preds = %75
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.149) #6
  %85 = load i64, ptr %84, align 8, !tbaa !5
  %86 = add nsw i64 %85, %82
  store i64 %86, ptr %84, align 8, !tbaa !5
  %.not63 = icmp eq i64 %.149, 0
  %87 = zext i1 %.not63 to i64
  br label %115

88:                                               ; preds = %75
  %89 = icmp eq i64 %82, 1
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.pre-phi) #6
  %91 = load i64, ptr %90, align 8, !tbaa !5
  br i1 %89, label %92, label %97

92:                                               ; preds = %88
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.149) #6
  %94 = load i64, ptr %93, align 8, !tbaa !5
  %95 = add nsw i64 %94, %91
  store i64 %95, ptr %93, align 8, !tbaa !5
  %.not62 = icmp eq i64 %.149, 0
  %96 = zext i1 %.not62 to i64
  br label %115

97:                                               ; preds = %88
  %98 = icmp sgt i64 %91, 1
  br i1 %98, label %99, label %115

99:                                               ; preds = %97
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.pre-phi) #6
  %101 = load i64, ptr %100, align 8, !tbaa !5
  %102 = and i64 %101, 1
  %103 = icmp eq i64 %102, 0
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.pre-phi) #6
  %105 = load i64, ptr %104, align 8, !tbaa !5
  br i1 %103, label %106, label %110

106:                                              ; preds = %99
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.149) #6
  %108 = load i64, ptr %107, align 8, !tbaa !5
  %109 = add nsw i64 %108, %105
  store i64 %109, ptr %107, align 8, !tbaa !5
  br label %115

110:                                              ; preds = %99
  %111 = add nsw i64 %105, -1
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.149) #6
  %113 = load i64, ptr %112, align 8, !tbaa !5
  %114 = add nsw i64 %111, %113
  store i64 %114, ptr %112, align 8, !tbaa !5
  br label %115

115:                                              ; preds = %71, %66, %92, %106, %110, %97, %83
  %.250 = phi i64 [ %.149, %66 ], [ %.149, %71 ], [ %87, %83 ], [ %96, %92 ], [ %.149, %106 ], [ %.149, %110 ], [ %.149, %97 ]
  %116 = add nsw i32 %.141, 1
  %.not.not = icmp sgt i64 %39, %indvars.iv81
  br i1 %.not.not, label %.lr.ph75, label %._crit_edge76, !llvm.loop !12

._crit_edge76:                                    ; preds = %115, %37
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef 0) #6
  %118 = load i64, ptr %117, align 8, !tbaa !5
  %119 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %118)
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret void

120:                                              ; preds = %51, %49
  %.pn = phi { ptr, i32 } [ %52, %51 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  br label %121

121:                                              ; preds = %120, %27
  %.pn.pn = phi { ptr, i32 } [ %.pn, %120 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  br label %122

122:                                              ; preds = %121, %18
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %121 ], [ %19, %18 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn.pn.pn
}

; 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 @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 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 @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEEET_S7_S7_(ptr, ptr) local_unnamed_addr #4

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

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

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

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

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass