; LLVM IR from kazunetakahashi/atcoder :: 2017/0318_ARC070/F.ll (Z5solvev)

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

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

@A = external dso_local global i32, align 4
@B = external dso_local global i32, align 4
@N = external dso_local global i32, align 4
@kind = external dso_local global [4010 x i32], align 16

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z3queii(i32 noundef, i32 noundef) #0

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

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 uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector", align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca %"class.std::vector", align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr %1) #4
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %57, %0
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = load i32, ptr @N, align 4, !tbaa !5
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %60

31:                                               ; preds = %26
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %43

37:                                               ; preds = %31
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %38 unwind label %39

38:                                               ; preds = %37
  br label %56

39:                                               ; preds = %37
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %5, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %334

43:                                               ; preds = %31
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = icmp eq i32 %47, 1
  br i1 %48, label %49, label %52

49:                                               ; preds = %43
  %50 = load i32, ptr %2, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %2, align 4, !tbaa !5
  br label %55

52:                                               ; preds = %43
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %3, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %52, %49
  br label %56

56:                                               ; preds = %55, %38
  br label %57

57:                                               ; preds = %56
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %4, align 4, !tbaa !5
  br label %26, !llvm.loop !9

60:                                               ; preds = %30
  %61 = load i32, ptr @A, align 4, !tbaa !5
  %62 = load i32, ptr %2, align 4, !tbaa !5
  %63 = sub nsw i32 %61, %62
  store i32 %63, ptr %2, align 4, !tbaa !5
  %64 = load i32, ptr @B, align 4, !tbaa !5
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %66 = sub nsw i32 %64, %65
  store i32 %66, ptr %3, align 4, !tbaa !5
  %67 = load i32, ptr %2, align 4, !tbaa !5
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %90

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

70:                                               ; preds = %86, %69
  %71 = load i32, ptr %7, align 4, !tbaa !5
  %72 = load i32, ptr @N, align 4, !tbaa !5
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %89

75:                                               ; preds = %70
  %76 = load i32, ptr %7, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = icmp eq i32 %79, 0
  br i1 %80, label %81, label %85

81:                                               ; preds = %75
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %83
  store i32 2, ptr %84, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %81, %75
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %7, align 4, !tbaa !5
  br label %70, !llvm.loop !11

89:                                               ; preds = %74
  store i32 1, ptr %8, align 4
  br label %331

90:                                               ; preds = %60
  %91 = load i32, ptr %3, align 4, !tbaa !5
  %92 = icmp eq i32 %91, 0
  br i1 %92, label %93, label %114

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

94:                                               ; preds = %110, %93
  %95 = load i32, ptr %9, align 4, !tbaa !5
  %96 = load i32, ptr @N, align 4, !tbaa !5
  %97 = icmp slt i32 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %113

99:                                               ; preds = %94
  %100 = load i32, ptr %9, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = icmp eq i32 %103, 0
  br i1 %104, label %105, label %109

105:                                              ; preds = %99
  %106 = load i32, ptr %9, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %107
  store i32 1, ptr %108, align 4, !tbaa !5
  br label %109

109:                                              ; preds = %105, %99
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %9, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %9, align 4, !tbaa !5
  br label %94, !llvm.loop !12

113:                                              ; preds = %98
  store i32 1, ptr %8, align 4
  br label %331

114:                                              ; preds = %90
  br label %115

115:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %116

116:                                              ; preds = %324, %115
  %117 = load i32, ptr %10, align 4, !tbaa !5
  %118 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %119 = trunc i64 %118 to i32
  %120 = icmp slt i32 %117, %119
  br i1 %120, label %122, label %121

121:                                              ; preds = %116
  store i32 11, ptr %8, align 4
  br label %327

122:                                              ; preds = %116
  %123 = load i32, ptr %10, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %124) #4
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = load i32, ptr %10, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  %129 = sext i32 %128 to i64
  %130 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %129) #4
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = invoke noundef zeroext i1 @_Z3queii(i32 noundef %126, i32 noundef %131)
          to label %133 unwind label %135

133:                                              ; preds = %122
  br i1 %132, label %134, label %139

134:                                              ; preds = %133
  br label %324

135:                                              ; preds = %122
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %5, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %6, align 4
  br label %329

139:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #4
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #4
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %140

140:                                              ; preds = %314, %139
  %141 = load i32, ptr %13, align 4, !tbaa !5
  %142 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %143 = trunc i64 %142 to i32
  %144 = icmp slt i32 %141, %143
  br i1 %144, label %146, label %145

145:                                              ; preds = %140
  store i32 14, ptr %8, align 4
  br label %318

146:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %147 = load i32, ptr %10, align 4, !tbaa !5
  %148 = load i32, ptr %13, align 4, !tbaa !5
  %149 = add nsw i32 %147, %148
  %150 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %151 = trunc i64 %150 to i32
  %152 = srem i32 %149, %151
  store i32 %152, ptr %14, align 4, !tbaa !5
  %153 = load i32, ptr %14, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %154) #4
  %156 = load i32, ptr %155, align 4, !tbaa !5
  %157 = load i32, ptr %10, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %158) #4
  %160 = load i32, ptr %159, align 4, !tbaa !5
  %161 = invoke noundef zeroext i1 @_Z3queii(i32 noundef %156, i32 noundef %160)
          to label %162 unwind label %165

162:                                              ; preds = %146
  br i1 %161, label %163, label %169

163:                                              ; preds = %162
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %164 unwind label %165

164:                                              ; preds = %163
  br label %171

165:                                              ; preds = %307, %169, %163, %146
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %5, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %6, align 4
  br label %317

169:                                              ; preds = %162
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %170 unwind label %165

170:                                              ; preds = %169
  br label %171

171:                                              ; preds = %170, %164
  %172 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  %173 = trunc i64 %172 to i32
  %174 = load i32, ptr %2, align 4, !tbaa !5
  %175 = sub nsw i32 %174, 1
  %176 = icmp sge i32 %173, %175
  br i1 %176, label %177, label %274

177:                                              ; preds = %171
  %178 = load i32, ptr %10, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %179) #4
  %181 = load i32, ptr %180, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %182
  store i32 1, ptr %183, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store ptr %12, ptr %15, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %184 = load ptr, ptr %15, align 8, !tbaa !13
  %185 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %184) #4
  %186 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %185, ptr %186, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %187 = load ptr, ptr %15, align 8, !tbaa !13
  %188 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %187) #4
  %189 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %188, ptr %189, align 8
  br label %190

190:                                              ; preds = %202, %177
  %191 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #4
  br i1 %191, label %193, label %192

192:                                              ; preds = %190
  store i32 17, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %204

193:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %194 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  %195 = load i32, ptr %194, align 4, !tbaa !5
  store i32 %195, ptr %18, align 4, !tbaa !5
  %196 = load i32, ptr %18, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %197) #4
  %199 = load i32, ptr %198, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %200
  store i32 2, ptr %201, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %202

202:                                              ; preds = %193
  %203 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  br label %190

204:                                              ; preds = %192
  %205 = load i32, ptr %10, align 4, !tbaa !5
  %206 = icmp ne i32 %205, 0
  br i1 %206, label %207, label %240

207:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %208 = load i32, ptr %10, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %209) #4
  %211 = load i32, ptr %210, align 4, !tbaa !5
  %212 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #4
  %213 = load i32, ptr %212, align 4, !tbaa !5
  %214 = invoke noundef zeroext i1 @_Z3queii(i32 noundef %211, i32 noundef %213)
          to label %215 unwind label %224

215:                                              ; preds = %207
  %216 = zext i1 %214 to i64
  %217 = select i1 %214, i32 1, i32 2
  store i32 %217, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %218

218:                                              ; preds = %236, %215
  %219 = load i32, ptr %20, align 4, !tbaa !5
  %220 = load i32, ptr %10, align 4, !tbaa !5
  %221 = sub nsw i32 %220, 1
  %222 = icmp slt i32 %219, %221
  br i1 %222, label %228, label %223

223:                                              ; preds = %218
  store i32 19, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %239

224:                                              ; preds = %207
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %5, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %317

228:                                              ; preds = %218
  %229 = load i32, ptr %19, align 4, !tbaa !5
  %230 = load i32, ptr %20, align 4, !tbaa !5
  %231 = sext i32 %230 to i64
  %232 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %231) #4
  %233 = load i32, ptr %232, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %234
  store i32 %229, ptr %235, align 4, !tbaa !5
  br label %236

236:                                              ; preds = %228
  %237 = load i32, ptr %20, align 4, !tbaa !5
  %238 = add nsw i32 %237, 1
  store i32 %238, ptr %20, align 4, !tbaa !5
  br label %218, !llvm.loop !15

239:                                              ; preds = %223
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %240

240:                                              ; preds = %239, %204
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %241

241:                                              ; preds = %270, %240
  %242 = load i32, ptr %21, align 4, !tbaa !5
  %243 = load i32, ptr @N, align 4, !tbaa !5
  %244 = icmp slt i32 %242, %243
  br i1 %244, label %246, label %245

245:                                              ; preds = %241
  store i32 22, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  br label %273

246:                                              ; preds = %241
  %247 = load i32, ptr %21, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %248
  %250 = load i32, ptr %249, align 4, !tbaa !5
  %251 = icmp eq i32 %250, 0
  br i1 %251, label %252, label %269

252:                                              ; preds = %246
  %253 = load i32, ptr %10, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %254) #4
  %256 = load i32, ptr %255, align 4, !tbaa !5
  %257 = load i32, ptr %21, align 4, !tbaa !5
  %258 = invoke noundef zeroext i1 @_Z3queii(i32 noundef %256, i32 noundef %257)
          to label %259 unwind label %265

259:                                              ; preds = %252
  %260 = zext i1 %258 to i64
  %261 = select i1 %258, i32 1, i32 2
  %262 = load i32, ptr %21, align 4, !tbaa !5
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %263
  store i32 %261, ptr %264, align 4, !tbaa !5
  br label %269

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

269:                                              ; preds = %259, %246
  br label %270

270:                                              ; preds = %269
  %271 = load i32, ptr %21, align 4, !tbaa !5
  %272 = add nsw i32 %271, 1
  store i32 %272, ptr %21, align 4, !tbaa !5
  br label %241, !llvm.loop !16

273:                                              ; preds = %245
  store i32 1, ptr %8, align 4
  br label %311

274:                                              ; preds = %171
  %275 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  %276 = trunc i64 %275 to i32
  %277 = load i32, ptr %2, align 4, !tbaa !5
  %278 = sub nsw i32 %277, 1
  %279 = icmp sge i32 %276, %278
  br i1 %279, label %280, label %309

280:                                              ; preds = %274
  %281 = load i32, ptr %10, align 4, !tbaa !5
  %282 = sext i32 %281 to i64
  %283 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %282) #4
  %284 = load i32, ptr %283, align 4, !tbaa !5
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %285
  store i32 2, ptr %286, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  store ptr %11, ptr %22, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %287 = load ptr, ptr %22, align 8, !tbaa !13
  %288 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %287) #4
  %289 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %288, ptr %289, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %290 = load ptr, ptr %22, align 8, !tbaa !13
  %291 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %290) #4
  %292 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %291, ptr %292, align 8
  br label %293

293:                                              ; preds = %305, %280
  %294 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #4
  br i1 %294, label %296, label %295

295:                                              ; preds = %293
  store i32 25, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  br label %307

296:                                              ; preds = %293
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  %297 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #4
  %298 = load i32, ptr %297, align 4, !tbaa !5
  store i32 %298, ptr %25, align 4, !tbaa !5
  %299 = load i32, ptr %25, align 4, !tbaa !5
  %300 = sext i32 %299 to i64
  %301 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %300) #4
  %302 = load i32, ptr %301, align 4, !tbaa !5
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %303
  store i32 2, ptr %304, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  br label %305

305:                                              ; preds = %296
  %306 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #4
  br label %293

307:                                              ; preds = %295
  invoke void @_Z5solvev()
          to label %308 unwind label %165

308:                                              ; preds = %307
  br label %309

309:                                              ; preds = %308, %274
  br label %310

310:                                              ; preds = %309
  store i32 0, ptr %8, align 4
  br label %311

311:                                              ; preds = %310, %273
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  %312 = load i32, ptr %8, align 4
  switch i32 %312, label %318 [
    i32 0, label %313
  ]

313:                                              ; preds = %311
  br label %314

314:                                              ; preds = %313
  %315 = load i32, ptr %13, align 4, !tbaa !5
  %316 = add nsw i32 %315, 1
  store i32 %316, ptr %13, align 4, !tbaa !5
  br label %140, !llvm.loop !17

317:                                              ; preds = %265, %224, %165
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  br label %329

318:                                              ; preds = %311, %145
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  %319 = load i32, ptr %8, align 4
  switch i32 %319, label %321 [
    i32 14, label %320
  ]

320:                                              ; preds = %318
  store i32 0, ptr %8, align 4
  br label %321

321:                                              ; preds = %320, %318
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  %322 = load i32, ptr %8, align 4
  switch i32 %322, label %327 [
    i32 0, label %323
  ]

323:                                              ; preds = %321
  br label %324

324:                                              ; preds = %323, %134
  %325 = load i32, ptr %10, align 4, !tbaa !5
  %326 = add nsw i32 %325, 1
  store i32 %326, ptr %10, align 4, !tbaa !5
  br label %116, !llvm.loop !18

327:                                              ; preds = %321, %121
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %328 = load i32, ptr %8, align 4
  switch i32 %328, label %331 [
    i32 11, label %330
  ]

329:                                              ; preds = %317, %135
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %334

330:                                              ; preds = %327
  store i32 0, ptr %8, align 4
  br label %331

331:                                              ; preds = %330, %327, %113, %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %1) #4
  %332 = load i32, ptr %8, align 4
  switch i32 %332, label %340 [
    i32 0, label %333
    i32 1, label %333
  ]

333:                                              ; preds = %331, %331
  ret void

334:                                              ; preds = %329, %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %1) #4
  br label %335

335:                                              ; preds = %334
  %336 = load ptr, ptr %5, align 8
  %337 = load i32, ptr %6, align 4
  %338 = insertvalue { ptr, i32 } poison, ptr %336, 0
  %339 = insertvalue { ptr, i32 } %338, i32 %337, 1
  resume { ptr, i32 } %339

340:                                              ; preds = %331
  unreachable
}

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

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

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

; 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) #2 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!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<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@A = external dso_local local_unnamed_addr global i32, align 4
@B = external dso_local local_unnamed_addr global i32, align 4
@N = external dso_local local_unnamed_addr global i32, align 4
@kind = external dso_local local_unnamed_addr global [4010 x i32], align 16

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z3queii(i32 noundef, i32 noundef) local_unnamed_addr #0

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

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 uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector", align 8
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #4
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  %10 = load i32, ptr @N, align 4, !tbaa !5
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %54, %0
  %.055.lcssa = phi i32 [ 0, %0 ], [ %.156, %54 ]
  %.0.lcssa = phi i32 [ 0, %0 ], [ %.1, %54 ]
  %.lcssa = phi i32 [ %10, %0 ], [ %55, %54 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  %12 = load i32, ptr @A, align 4, !tbaa !5
  %13 = icmp eq i32 %12, %.0.lcssa
  br i1 %13, label %.preheader, label %64

.preheader:                                       ; preds = %._crit_edge
  %14 = icmp sgt i32 %.lcssa, 0
  br i1 %14, label %.lr.ph117.preheader, label %.loopexit

.lr.ph117.preheader:                              ; preds = %.preheader
  %wide.trip.count138 = zext nneg i32 %.lcssa to i64
  %min.iters.check166 = icmp ult i32 %.lcssa, 8
  br i1 %min.iters.check166, label %.lr.ph117.preheader193, label %vector.ph167

.lr.ph117.preheader193:                           ; preds = %middle.block164, %.lr.ph117.preheader
  %indvars.iv135.ph = phi i64 [ 0, %.lr.ph117.preheader ], [ %n.vec169, %middle.block164 ]
  br label %.lr.ph117

vector.ph167:                                     ; preds = %.lr.ph117.preheader
  %n.vec169 = and i64 %wide.trip.count138, 2147483640
  br label %vector.body171

vector.body171:                                   ; preds = %pred.store.continue190, %vector.ph167
  %index172 = phi i64 [ 0, %vector.ph167 ], [ %index.next191, %pred.store.continue190 ]
  %15 = or disjoint i64 %index172, 4
  %16 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %index172
  %17 = getelementptr inbounds i8, ptr %16, i64 16
  %wide.load173 = load <4 x i32>, ptr %16, align 16, !tbaa !5
  %wide.load174 = load <4 x i32>, ptr %17, align 16, !tbaa !5
  %18 = icmp eq <4 x i32> %wide.load173, zeroinitializer
  %19 = icmp eq <4 x i32> %wide.load174, zeroinitializer
  %20 = extractelement <4 x i1> %18, i64 0
  br i1 %20, label %pred.store.if175, label %pred.store.continue176

pred.store.if175:                                 ; preds = %vector.body171
  %21 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %index172
  store i32 2, ptr %21, align 16, !tbaa !5
  br label %pred.store.continue176

pred.store.continue176:                           ; preds = %pred.store.if175, %vector.body171
  %22 = extractelement <4 x i1> %18, i64 1
  br i1 %22, label %pred.store.if177, label %pred.store.continue178

pred.store.if177:                                 ; preds = %pred.store.continue176
  %23 = or disjoint i64 %index172, 1
  %24 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %23
  store i32 2, ptr %24, align 4, !tbaa !5
  br label %pred.store.continue178

pred.store.continue178:                           ; preds = %pred.store.if177, %pred.store.continue176
  %25 = extractelement <4 x i1> %18, i64 2
  br i1 %25, label %pred.store.if179, label %pred.store.continue180

pred.store.if179:                                 ; preds = %pred.store.continue178
  %26 = or disjoint i64 %index172, 2
  %27 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %26
  store i32 2, ptr %27, align 8, !tbaa !5
  br label %pred.store.continue180

pred.store.continue180:                           ; preds = %pred.store.if179, %pred.store.continue178
  %28 = extractelement <4 x i1> %18, i64 3
  br i1 %28, label %pred.store.if181, label %pred.store.continue182

pred.store.if181:                                 ; preds = %pred.store.continue180
  %29 = or disjoint i64 %index172, 3
  %30 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %29
  store i32 2, ptr %30, align 4, !tbaa !5
  br label %pred.store.continue182

pred.store.continue182:                           ; preds = %pred.store.if181, %pred.store.continue180
  %31 = extractelement <4 x i1> %19, i64 0
  br i1 %31, label %pred.store.if183, label %pred.store.continue184

pred.store.if183:                                 ; preds = %pred.store.continue182
  %32 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %15
  store i32 2, ptr %32, align 16, !tbaa !5
  br label %pred.store.continue184

pred.store.continue184:                           ; preds = %pred.store.if183, %pred.store.continue182
  %33 = extractelement <4 x i1> %19, i64 1
  br i1 %33, label %pred.store.if185, label %pred.store.continue186

pred.store.if185:                                 ; preds = %pred.store.continue184
  %34 = or disjoint i64 %index172, 5
  %35 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %34
  store i32 2, ptr %35, align 4, !tbaa !5
  br label %pred.store.continue186

pred.store.continue186:                           ; preds = %pred.store.if185, %pred.store.continue184
  %36 = extractelement <4 x i1> %19, i64 2
  br i1 %36, label %pred.store.if187, label %pred.store.continue188

pred.store.if187:                                 ; preds = %pred.store.continue186
  %37 = or disjoint i64 %index172, 6
  %38 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %37
  store i32 2, ptr %38, align 8, !tbaa !5
  br label %pred.store.continue188

pred.store.continue188:                           ; preds = %pred.store.if187, %pred.store.continue186
  %39 = extractelement <4 x i1> %19, i64 3
  br i1 %39, label %pred.store.if189, label %pred.store.continue190

pred.store.if189:                                 ; preds = %pred.store.continue188
  %40 = or disjoint i64 %index172, 7
  %41 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %40
  store i32 2, ptr %41, align 4, !tbaa !5
  br label %pred.store.continue190

pred.store.continue190:                           ; preds = %pred.store.if189, %pred.store.continue188
  %index.next191 = add nuw i64 %index172, 8
  %42 = icmp eq i64 %index.next191, %n.vec169
  br i1 %42, label %middle.block164, label %vector.body171, !llvm.loop !9

middle.block164:                                  ; preds = %pred.store.continue190
  %cmp.n192 = icmp eq i64 %n.vec169, %wide.trip.count138
  br i1 %cmp.n192, label %.loopexit, label %.lr.ph117.preheader193

.lr.ph:                                           ; preds = %0, %54
  %43 = phi i32 [ %55, %54 ], [ %10, %0 ]
  %.093 = phi i32 [ %.1, %54 ], [ 0, %0 ]
  %.05592 = phi i32 [ %.156, %54 ], [ 0, %0 ]
  %storemerge91 = phi i32 [ %57, %54 ], [ 0, %0 ]
  %44 = sext i32 %storemerge91 to i64
  %45 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  switch i32 %46, label %52 [
    i32 0, label %47
    i32 1, label %50
  ]

47:                                               ; preds = %.lr.ph
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
          to label %._crit_edge140 unwind label %48

._crit_edge140:                                   ; preds = %47
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  %.pre141 = load i32, ptr @N, align 4, !tbaa !5
  br label %54

48:                                               ; preds = %47
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  br label %217

50:                                               ; preds = %.lr.ph
  %51 = add nsw i32 %.093, 1
  br label %54

52:                                               ; preds = %.lr.ph
  %53 = add nsw i32 %.05592, 1
  br label %54

54:                                               ; preds = %._crit_edge140, %52, %50
  %55 = phi i32 [ %.pre141, %._crit_edge140 ], [ %43, %50 ], [ %43, %52 ]
  %56 = phi i32 [ %.pre, %._crit_edge140 ], [ %storemerge91, %50 ], [ %storemerge91, %52 ]
  %.156 = phi i32 [ %.05592, %._crit_edge140 ], [ %.05592, %50 ], [ %53, %52 ]
  %.1 = phi i32 [ %.093, %._crit_edge140 ], [ %51, %50 ], [ %.093, %52 ]
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %2, align 4, !tbaa !5
  %58 = icmp slt i32 %57, %55
  br i1 %58, label %.lr.ph, label %._crit_edge, !llvm.loop !13

.lr.ph117:                                        ; preds = %.lr.ph117.preheader193, %63
  %indvars.iv135 = phi i64 [ %indvars.iv.next136, %63 ], [ %indvars.iv135.ph, %.lr.ph117.preheader193 ]
  %59 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %indvars.iv135
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %62, label %63

62:                                               ; preds = %.lr.ph117
  store i32 2, ptr %59, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %.lr.ph117, %62
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %exitcond139.not = icmp eq i64 %indvars.iv.next136, %wide.trip.count138
  br i1 %exitcond139.not, label %.loopexit, label %.lr.ph117, !llvm.loop !14

64:                                               ; preds = %._crit_edge
  %65 = load i32, ptr @B, align 4, !tbaa !5
  %66 = icmp eq i32 %65, %.055.lcssa
  br i1 %66, label %.preheader82, label %.preheader86

.preheader86:                                     ; preds = %64
  %67 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %68 = trunc i64 %67 to i32
  %69 = icmp sgt i32 %68, 0
  br i1 %69, label %.lr.ph113, label %.loopexit

.lr.ph113:                                        ; preds = %.preheader86
  %70 = xor i32 %.0.lcssa, -1
  %71 = add i32 %12, %70
  br label %106

.preheader82:                                     ; preds = %64
  %72 = icmp sgt i32 %.lcssa, 0
  br i1 %72, label %.lr.ph115.preheader, label %.loopexit

.lr.ph115.preheader:                              ; preds = %.preheader82
  %wide.trip.count133 = zext nneg i32 %.lcssa to i64
  %min.iters.check = icmp ult i32 %.lcssa, 8
  br i1 %min.iters.check, label %.lr.ph115.preheader194, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph115.preheader
  %n.vec = and i64 %wide.trip.count133, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %pred.store.continue163, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %pred.store.continue163 ]
  %73 = or disjoint i64 %index, 4
  %74 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %index
  %75 = getelementptr inbounds i8, ptr %74, i64 16
  %wide.load = load <4 x i32>, ptr %74, align 16, !tbaa !5
  %wide.load149 = load <4 x i32>, ptr %75, align 16, !tbaa !5
  %76 = icmp eq <4 x i32> %wide.load, zeroinitializer
  %77 = icmp eq <4 x i32> %wide.load149, zeroinitializer
  %78 = extractelement <4 x i1> %76, i64 0
  br i1 %78, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body
  %79 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %index
  store i32 1, ptr %79, align 16, !tbaa !5
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body
  %80 = extractelement <4 x i1> %76, i64 1
  br i1 %80, label %pred.store.if150, label %pred.store.continue151

pred.store.if150:                                 ; preds = %pred.store.continue
  %81 = or disjoint i64 %index, 1
  %82 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %81
  store i32 1, ptr %82, align 4, !tbaa !5
  br label %pred.store.continue151

pred.store.continue151:                           ; preds = %pred.store.if150, %pred.store.continue
  %83 = extractelement <4 x i1> %76, i64 2
  br i1 %83, label %pred.store.if152, label %pred.store.continue153

pred.store.if152:                                 ; preds = %pred.store.continue151
  %84 = or disjoint i64 %index, 2
  %85 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %84
  store i32 1, ptr %85, align 8, !tbaa !5
  br label %pred.store.continue153

pred.store.continue153:                           ; preds = %pred.store.if152, %pred.store.continue151
  %86 = extractelement <4 x i1> %76, i64 3
  br i1 %86, label %pred.store.if154, label %pred.store.continue155

pred.store.if154:                                 ; preds = %pred.store.continue153
  %87 = or disjoint i64 %index, 3
  %88 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %87
  store i32 1, ptr %88, align 4, !tbaa !5
  br label %pred.store.continue155

pred.store.continue155:                           ; preds = %pred.store.if154, %pred.store.continue153
  %89 = extractelement <4 x i1> %77, i64 0
  br i1 %89, label %pred.store.if156, label %pred.store.continue157

pred.store.if156:                                 ; preds = %pred.store.continue155
  %90 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %73
  store i32 1, ptr %90, align 16, !tbaa !5
  br label %pred.store.continue157

pred.store.continue157:                           ; preds = %pred.store.if156, %pred.store.continue155
  %91 = extractelement <4 x i1> %77, i64 1
  br i1 %91, label %pred.store.if158, label %pred.store.continue159

pred.store.if158:                                 ; preds = %pred.store.continue157
  %92 = or disjoint i64 %index, 5
  %93 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %92
  store i32 1, ptr %93, align 4, !tbaa !5
  br label %pred.store.continue159

pred.store.continue159:                           ; preds = %pred.store.if158, %pred.store.continue157
  %94 = extractelement <4 x i1> %77, i64 2
  br i1 %94, label %pred.store.if160, label %pred.store.continue161

pred.store.if160:                                 ; preds = %pred.store.continue159
  %95 = or disjoint i64 %index, 6
  %96 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %95
  store i32 1, ptr %96, align 8, !tbaa !5
  br label %pred.store.continue161

pred.store.continue161:                           ; preds = %pred.store.if160, %pred.store.continue159
  %97 = extractelement <4 x i1> %77, i64 3
  br i1 %97, label %pred.store.if162, label %pred.store.continue163

pred.store.if162:                                 ; preds = %pred.store.continue161
  %98 = or disjoint i64 %index, 7
  %99 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %98
  store i32 1, ptr %99, align 4, !tbaa !5
  br label %pred.store.continue163

pred.store.continue163:                           ; preds = %pred.store.if162, %pred.store.continue161
  %index.next = add nuw i64 %index, 8
  %100 = icmp eq i64 %index.next, %n.vec
  br i1 %100, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %pred.store.continue163
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count133
  br i1 %cmp.n, label %.loopexit, label %.lr.ph115.preheader194

.lr.ph115.preheader194:                           ; preds = %middle.block, %.lr.ph115.preheader
  %indvars.iv130.ph = phi i64 [ 0, %.lr.ph115.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph115

.lr.ph115:                                        ; preds = %.lr.ph115.preheader194, %105
  %indvars.iv130 = phi i64 [ %indvars.iv.next131, %105 ], [ %indvars.iv130.ph, %.lr.ph115.preheader194 ]
  %101 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %indvars.iv130
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = icmp eq i32 %102, 0
  br i1 %103, label %104, label %105

104:                                              ; preds = %.lr.ph115
  store i32 1, ptr %101, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %.lr.ph115, %104
  %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1
  %exitcond134.not = icmp eq i64 %indvars.iv.next131, %wide.trip.count133
  br i1 %exitcond134.not, label %.loopexit, label %.lr.ph115, !llvm.loop !16

106:                                              ; preds = %.lr.ph113, %213
  %indvars.iv127 = phi i64 [ 0, %.lr.ph113 ], [ %indvars.iv.next128, %213 ]
  %indvars.iv122 = phi i32 [ -1, %.lr.ph113 ], [ %indvars.iv.next123, %213 ]
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv127) #4
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %indvars.iv.next128 = add nuw nsw i64 %indvars.iv127, 1
  %109 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv.next128) #4
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = invoke noundef zeroext i1 @_Z3queii(i32 noundef %108, i32 noundef %110)
          to label %112 unwind label %113

112:                                              ; preds = %106
  br i1 %111, label %213, label %115

113:                                              ; preds = %106
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %217

115:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  %116 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %117 = trunc i64 %116 to i32
  %.not77108 = icmp sgt i32 %117, 1
  br i1 %.not77108, label %.lr.ph111, label %.critedge

.lr.ph111:                                        ; preds = %115
  %.not76 = icmp eq i64 %indvars.iv127, 0
  %118 = icmp ugt i64 %indvars.iv127, 1
  %119 = trunc nuw nsw i64 %indvars.iv127 to i32
  %wide.trip.count = zext i32 %indvars.iv122 to i64
  br label %120

120:                                              ; preds = %.lr.ph111, %207
  %.065109 = phi i32 [ 1, %.lr.ph111 ], [ %208, %207 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %121 = add nuw nsw i32 %.065109, %119
  %122 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %123 = trunc i64 %122 to i32
  %124 = srem i32 %121, %123
  store i32 %124, ptr %5, align 4, !tbaa !5
  %125 = zext nneg i32 %124 to i64
  %126 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %125) #4
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv127) #4
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = invoke noundef zeroext i1 @_Z3queii(i32 noundef %127, i32 noundef %129)
          to label %.invoke unwind label %132

.invoke:                                          ; preds = %120
  %131 = select i1 %130, ptr %3, ptr %4
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %131, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %134 unwind label %132

132:                                              ; preds = %.invoke, %._crit_edge107, %120
  %133 = landingpad { ptr, i32 }
          cleanup
  br label %211

134:                                              ; preds = %.invoke
  %135 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  %136 = trunc i64 %135 to i32
  %.not = icmp sgt i32 %71, %136
  br i1 %.not, label %187, label %137

137:                                              ; preds = %134
  %138 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv127) #4
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %140
  store i32 1, ptr %141, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %142 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  store ptr %142, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %143 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  store ptr %143, ptr %7, align 8
  %144 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br i1 %144, label %.lr.ph97, label %._crit_edge98

._crit_edge98:                                    ; preds = %.lr.ph97, %137
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br i1 %.not76, label %.loopexit85, label %154

.lr.ph97:                                         ; preds = %137, %.lr.ph97
  %145 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %147) #4
  %149 = load i32, ptr %148, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %150
  store i32 2, ptr %151, align 4, !tbaa !5
  %152 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %153 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br i1 %153, label %.lr.ph97, label %._crit_edge98

154:                                              ; preds = %._crit_edge98
  %155 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv127) #4
  %156 = load i32, ptr %155, align 4, !tbaa !5
  %157 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #4
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = invoke noundef zeroext i1 @_Z3queii(i32 noundef %156, i32 noundef %158)
          to label %160 unwind label %162

160:                                              ; preds = %154
  %161 = select i1 %159, i32 1, i32 2
  br i1 %118, label %.lr.ph101, label %.loopexit85

162:                                              ; preds = %154
  %163 = landingpad { ptr, i32 }
          cleanup
  br label %211

.lr.ph101:                                        ; preds = %160, %.lr.ph101
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph101 ], [ 0, %160 ]
  %164 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #4
  %165 = load i32, ptr %164, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %166
  store i32 %161, ptr %167, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit85, label %.lr.ph101, !llvm.loop !17

.loopexit85:                                      ; preds = %.lr.ph101, %160, %._crit_edge98
  %168 = load i32, ptr @N, align 4, !tbaa !5
  %169 = icmp sgt i32 %168, 0
  br i1 %169, label %.lr.ph104, label %.loopexit84

.lr.ph104:                                        ; preds = %.loopexit85, %183
  %170 = phi i32 [ %184, %183 ], [ %168, %.loopexit85 ]
  %indvars.iv124 = phi i64 [ %indvars.iv.next125, %183 ], [ 0, %.loopexit85 ]
  %171 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %indvars.iv124
  %172 = load i32, ptr %171, align 4, !tbaa !5
  %173 = icmp eq i32 %172, 0
  br i1 %173, label %174, label %183

174:                                              ; preds = %.lr.ph104
  %175 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv127) #4
  %176 = load i32, ptr %175, align 4, !tbaa !5
  %177 = trunc nuw nsw i64 %indvars.iv124 to i32
  %178 = invoke noundef zeroext i1 @_Z3queii(i32 noundef %176, i32 noundef %177)
          to label %179 unwind label %181

179:                                              ; preds = %174
  %180 = select i1 %178, i32 1, i32 2
  store i32 %180, ptr %171, align 4, !tbaa !5
  %.pre142 = load i32, ptr @N, align 4, !tbaa !5
  br label %183

181:                                              ; preds = %174
  %182 = landingpad { ptr, i32 }
          cleanup
  br label %211

183:                                              ; preds = %.lr.ph104, %179
  %184 = phi i32 [ %170, %.lr.ph104 ], [ %.pre142, %179 ]
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 1
  %185 = sext i32 %184 to i64
  %186 = icmp slt i64 %indvars.iv.next125, %185
  br i1 %186, label %.lr.ph104, label %.loopexit84, !llvm.loop !18

187:                                              ; preds = %134
  %188 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  %189 = trunc i64 %188 to i32
  %.not75 = icmp sgt i32 %71, %189
  br i1 %.not75, label %.thread, label %190

.thread:                                          ; preds = %187
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  br label %207

190:                                              ; preds = %187
  %191 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv127) #4
  %192 = load i32, ptr %191, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %193
  store i32 2, ptr %194, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %195 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  store ptr %195, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %196 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  store ptr %196, ptr %9, align 8
  %197 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  br i1 %197, label %.lr.ph106, label %._crit_edge107

._crit_edge107:                                   ; preds = %.lr.ph106, %190
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  invoke void @_Z5solvev()
          to label %.loopexit84 unwind label %132

.lr.ph106:                                        ; preds = %190, %.lr.ph106
  %198 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  %199 = load i32, ptr %198, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %200) #4
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [4010 x i32], ptr @kind, i64 0, i64 %203
  store i32 2, ptr %204, align 4, !tbaa !5
  %205 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  %206 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  br i1 %206, label %.lr.ph106, label %._crit_edge107

.loopexit84:                                      ; preds = %183, %.loopexit85, %._crit_edge107
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  br i1 %.not, label %207, label %212

207:                                              ; preds = %.thread, %.loopexit84
  %208 = add nuw nsw i32 %.065109, 1
  %209 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %210 = trunc i64 %209 to i32
  %.not77 = icmp slt i32 %208, %210
  br i1 %.not77, label %120, label %.critedge, !llvm.loop !19

211:                                              ; preds = %181, %162, %132
  %.pn = phi { ptr, i32 } [ %182, %181 ], [ %163, %162 ], [ %133, %132 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  br label %217

212:                                              ; preds = %.loopexit84
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  br label %.loopexit

.critedge:                                        ; preds = %207, %115
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  br label %213

213:                                              ; preds = %.critedge, %112
  %214 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %sext = shl i64 %214, 32
  %215 = ashr exact i64 %sext, 32
  %216 = icmp slt i64 %indvars.iv.next128, %215
  %indvars.iv.next123 = add nsw i32 %indvars.iv122, 1
  br i1 %216, label %106, label %.loopexit, !llvm.loop !20

.loopexit:                                        ; preds = %213, %105, %63, %middle.block, %middle.block164, %.preheader86, %.preheader82, %.preheader, %212
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #4
  ret void

217:                                              ; preds = %113, %211, %48
  %.pn80 = phi { ptr, i32 } [ %49, %48 ], [ %.pn, %211 ], [ %114, %113 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #4
  resume { ptr, i32 } %.pn80
}

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

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

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

; 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 #2 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10, !12, !11}
!15 = distinct !{!15, !10, !11, !12}
!16 = distinct !{!16, !10, !12, !11}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}


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