; LLVM IR from tangjz/acm-icpc :: codeforces/gym/104023B.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<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon = type { ptr, ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%"class.std::allocator.2" = type { i8 }

@_ZZ5solvevE1a = external hidden global [100001 x i32], align 16
@_ZZ5solvevE1p = external hidden global [100001 x i32], align 16
@_ZZ5solvevE1s = external hidden global [100001 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [76 x i8], align 1
@__PRETTY_FUNCTION__._Z5solvev = external hidden unnamed_addr constant [13 x i8], align 1
@_ZZ5solvevE3pos = external hidden global [33 x i32], align 16
@_ZZ5solvevE3lim = external hidden global [33 x i32], align 16
@.str.3 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i8, align 1
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca %"class.std::function", align 8
  %12 = alloca %class.anon, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::vector.0", align 8
  %16 = alloca %"class.std::initializer_list", align 8
  %17 = alloca [4 x i32], align 4
  %18 = alloca %"class.std::allocator.2", align 1
  %19 = alloca %"class.std::initializer_list", align 8
  %20 = alloca [1 x i32], align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %1)
  %24 = icmp eq i32 %23, 1
  br i1 %24, label %25, label %31

25:                                               ; preds = %0
  %26 = load i32, ptr %1, align 4, !tbaa !5
  %27 = icmp sle i32 1, %26
  br i1 %27, label %28, label %31

28:                                               ; preds = %25
  %29 = load i32, ptr %1, align 4, !tbaa !5
  %30 = icmp slt i32 %29, 100001
  br label %31

31:                                               ; preds = %28, %25, %0
  %32 = phi i1 [ false, %25 ], [ false, %0 ], [ %30, %28 ]
  br i1 %32, label %33, label %34

33:                                               ; preds = %31
  br label %36

34:                                               ; preds = %31
  call void @__assert_fail(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 13, ptr noundef @__PRETTY_FUNCTION__._Z5solvev) #6
  unreachable

35:                                               ; No predecessors!
  br label %36

36:                                               ; preds = %35, %33
  call void @llvm.lifetime.start.p0(i64 1, ptr %2) #5
  store i8 0, ptr %2, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %37 = load i32, ptr %1, align 4, !tbaa !5
  %38 = sub nsw i32 %37, 1
  store i32 %38, ptr %5, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %114, %36
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = load i32, ptr %1, align 4, !tbaa !5
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %44, label %43

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

44:                                               ; preds = %39
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds i32, ptr @_ZZ5solvevE1s, i64 %46
  %48 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %47)
  %49 = icmp eq i32 %48, 1
  br i1 %49, label %50, label %62

50:                                               ; preds = %44
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1s, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = icmp sle i32 1, %54
  br i1 %55, label %56, label %62

56:                                               ; preds = %50
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1s, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = icmp sle i32 %60, 1000000000
  br label %62

62:                                               ; preds = %56, %50, %44
  %63 = phi i1 [ false, %50 ], [ false, %44 ], [ %61, %56 ]
  br i1 %63, label %64, label %65

64:                                               ; preds = %62
  br label %67

65:                                               ; preds = %62
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.2, i32 noundef 21, ptr noundef @__PRETTY_FUNCTION__._Z5solvev) #6
  unreachable

66:                                               ; No predecessors!
  br label %67

67:                                               ; preds = %66, %64
  %68 = load i32, ptr %4, align 4, !tbaa !5
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %71, label %70

70:                                               ; preds = %67
  br label %114

71:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %72 = load i32, ptr %4, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1s, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = load i32, ptr %4, align 4, !tbaa !5
  %77 = sub nsw i32 %76, 1
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1s, i64 0, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = sub nsw i32 %75, %80
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %7, align 4, !tbaa !5
  %83 = load i32, ptr %7, align 4, !tbaa !5
  %84 = icmp slt i32 %83, 0
  br i1 %84, label %85, label %86

85:                                               ; preds = %71
  store i8 1, ptr %2, align 1, !tbaa !9
  store i32 4, ptr %6, align 4
  br label %111

86:                                               ; preds = %71
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %95, label %89

89:                                               ; preds = %86
  %90 = load i32, ptr %5, align 4, !tbaa !5
  %91 = add nsw i32 %90, -1
  store i32 %91, ptr %5, align 4, !tbaa !5
  %92 = load i32, ptr %4, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %93
  store i32 %90, ptr %94, align 4, !tbaa !5
  store i32 4, ptr %6, align 4
  br label %111

95:                                               ; preds = %86
  %96 = load i32, ptr %3, align 4, !tbaa !5
  %97 = shl i32 2, %96
  %98 = icmp sle i32 %97, 1000000000
  br i1 %98, label %99, label %109

99:                                               ; preds = %95
  %100 = load i32, ptr %4, align 4, !tbaa !5
  %101 = load i32, ptr %3, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %3, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [33 x i32], ptr @_ZZ5solvevE3pos, i64 0, i64 %103
  store i32 %100, ptr %104, align 4, !tbaa !5
  %105 = load i32, ptr %7, align 4, !tbaa !5
  %106 = load i32, ptr %3, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [33 x i32], ptr @_ZZ5solvevE3lim, i64 0, i64 %107
  store i32 %105, ptr %108, align 4, !tbaa !5
  br label %110

109:                                              ; preds = %95
  store i8 1, ptr %2, align 1, !tbaa !9
  br label %110

110:                                              ; preds = %109, %99
  store i32 0, ptr %6, align 4
  br label %111

111:                                              ; preds = %110, %89, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  %112 = load i32, ptr %6, align 4
  switch i32 %112, label %278 [
    i32 0, label %113
    i32 4, label %114
  ]

113:                                              ; preds = %111
  br label %114

114:                                              ; preds = %113, %111, %70
  %115 = load i32, ptr %4, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %4, align 4, !tbaa !5
  br label %39, !llvm.loop !11

117:                                              ; preds = %43
  %118 = load i32, ptr @_ZZ5solvevE1s, align 16, !tbaa !5
  %119 = load i32, ptr %1, align 4, !tbaa !5
  %120 = load i32, ptr %3, align 4, !tbaa !5
  %121 = add nsw i32 %119, %120
  %122 = load i32, ptr %3, align 4, !tbaa !5
  %123 = icmp ne i32 %122, 0
  %124 = xor i1 %123, true
  %125 = xor i1 %124, true
  %126 = zext i1 %125 to i32
  %127 = add nsw i32 %121, %126
  %128 = icmp slt i32 %118, %127
  %129 = zext i1 %128 to i32
  %130 = load i8, ptr %2, align 1, !tbaa !9, !range !13, !noundef !14
  %131 = trunc i8 %130 to i1
  %132 = zext i1 %131 to i32
  %133 = or i32 %132, %129
  %134 = icmp ne i32 %133, 0
  %135 = zext i1 %134 to i8
  store i8 %135, ptr %2, align 1, !tbaa !9
  %136 = load i8, ptr %2, align 1, !tbaa !9, !range !13, !noundef !14
  %137 = trunc i8 %136 to i1
  br i1 %137, label %138, label %140

138:                                              ; preds = %117
  %139 = call i32 @puts(ptr noundef @.str.4)
  store i32 1, ptr %6, align 4
  br label %268

140:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %141 = load i32, ptr %3, align 4, !tbaa !5
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %8, align 4, !tbaa !5
  br label %143

143:                                              ; preds = %152, %140
  %144 = load i32, ptr %8, align 4, !tbaa !5
  %145 = load i32, ptr %1, align 4, !tbaa !5
  %146 = icmp sle i32 %144, %145
  br i1 %146, label %148, label %147

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

148:                                              ; preds = %143
  %149 = load i32, ptr %8, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %150
  store i32 1, ptr %151, align 4, !tbaa !5
  br label %152

152:                                              ; preds = %148
  %153 = load i32, ptr %8, align 4, !tbaa !5
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %8, align 4, !tbaa !5
  br label %143, !llvm.loop !15

155:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #5
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #5
  %156 = getelementptr inbounds %class.anon, ptr %12, i32 0, i32 0
  store ptr %1, ptr %156, align 8, !tbaa !16
  %157 = getelementptr inbounds %class.anon, ptr %12, i32 0, i32 1
  store ptr %10, ptr %157, align 8, !tbaa !16
  %158 = getelementptr inbounds %class.anon, ptr %12, i32 0, i32 2
  store ptr %9, ptr %158, align 8, !tbaa !16
  %159 = getelementptr inbounds %class.anon, ptr %12, i32 0, i32 3
  store ptr %11, ptr %159, align 8, !tbaa !16
  invoke void @"_ZNSt8functionIFbiEEC2IZ5solvevE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %160 unwind label %198

160:                                              ; preds = %155
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  %161 = load i32, ptr %1, align 4, !tbaa !5
  %162 = sub nsw i32 %161, 1
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1s, i64 0, i64 %163
  %165 = load i32, ptr %164, align 4, !tbaa !5
  store i32 %165, ptr %17, align 4, !tbaa !5
  %166 = getelementptr inbounds i32, ptr %17, i64 1
  store i32 -1, ptr %166, align 4, !tbaa !5
  %167 = getelementptr inbounds i32, ptr %17, i64 2
  store i32 -1, ptr %167, align 4, !tbaa !5
  %168 = getelementptr inbounds i32, ptr %17, i64 3
  store i32 -1, ptr %168, align 4, !tbaa !5
  %169 = getelementptr inbounds %"class.std::initializer_list", ptr %16, i32 0, i32 0
  store ptr %17, ptr %169, align 8, !tbaa !18
  %170 = getelementptr inbounds %"class.std::initializer_list", ptr %16, i32 0, i32 1
  store i64 4, ptr %170, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  %171 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 0
  %172 = load ptr, ptr %171, align 8
  %173 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 1
  %174 = load i64, ptr %173, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr %172, i64 %174, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %175 unwind label %202

175:                                              ; preds = %160
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %176 unwind label %206

176:                                              ; preds = %175
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #5
  %177 = load i32, ptr %3, align 4, !tbaa !5
  %178 = add nsw i32 %177, 1
  %179 = sext i32 %178 to i64
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %179)
          to label %180 unwind label %211

180:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !5
  %181 = getelementptr inbounds %"class.std::initializer_list", ptr %19, i32 0, i32 0
  store ptr %20, ptr %181, align 8, !tbaa !18
  %182 = getelementptr inbounds %"class.std::initializer_list", ptr %19, i32 0, i32 1
  store i64 1, ptr %182, align 8, !tbaa !21
  %183 = load i32, ptr %3, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %184) #5
  %186 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 0
  %187 = load ptr, ptr %186, align 8
  %188 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 1
  %189 = load i64, ptr %188, align 8
  %190 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSESt16initializer_listIiE(ptr noundef nonnull align 8 dereferenceable(24) %185, ptr %187, i64 %189)
          to label %191 unwind label %215

191:                                              ; preds = %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  %192 = load i32, ptr %3, align 4, !tbaa !5
  %193 = invoke noundef zeroext i1 @_ZNKSt8functionIFbiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %11, i32 noundef %192)
          to label %194 unwind label %211

194:                                              ; preds = %191
  br i1 %193, label %219, label %195

195:                                              ; preds = %194
  %196 = invoke i32 @puts(ptr noundef @.str.4)
          to label %197 unwind label %211

197:                                              ; preds = %195
  store i32 1, ptr %6, align 4
  br label %267

198:                                              ; preds = %155
  %199 = landingpad { ptr, i32 }
          cleanup
  %200 = extractvalue { ptr, i32 } %199, 0
  store ptr %200, ptr %13, align 8
  %201 = extractvalue { ptr, i32 } %199, 1
  store i32 %201, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  br label %272

202:                                              ; preds = %160
  %203 = landingpad { ptr, i32 }
          cleanup
  %204 = extractvalue { ptr, i32 } %203, 0
  store ptr %204, ptr %13, align 8
  %205 = extractvalue { ptr, i32 } %203, 1
  store i32 %205, ptr %14, align 4
  br label %210

206:                                              ; preds = %175
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %13, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %14, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  br label %210

210:                                              ; preds = %206, %202
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #5
  br label %271

211:                                              ; preds = %195, %191, %176
  %212 = landingpad { ptr, i32 }
          cleanup
  %213 = extractvalue { ptr, i32 } %212, 0
  store ptr %213, ptr %13, align 8
  %214 = extractvalue { ptr, i32 } %212, 1
  store i32 %214, ptr %14, align 4
  br label %271

215:                                              ; preds = %180
  %216 = landingpad { ptr, i32 }
          cleanup
  %217 = extractvalue { ptr, i32 } %216, 0
  store ptr %217, ptr %13, align 8
  %218 = extractvalue { ptr, i32 } %216, 1
  store i32 %218, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %271

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

220:                                              ; preds = %239, %219
  %221 = load i32, ptr %21, align 4, !tbaa !5
  %222 = load i32, ptr %1, align 4, !tbaa !5
  %223 = icmp sle i32 %221, %222
  br i1 %223, label %225, label %224

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

225:                                              ; preds = %220
  %226 = load i32, ptr %21, align 4, !tbaa !5
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %227
  %229 = load i32, ptr %228, align 4, !tbaa !5
  %230 = load i32, ptr %21, align 4, !tbaa !5
  %231 = load i32, ptr %1, align 4, !tbaa !5
  %232 = icmp eq i32 %230, %231
  %233 = zext i1 %232 to i64
  %234 = getelementptr inbounds [3 x i8], ptr @.str.6, i64 0, i64 %233
  %235 = load i8, ptr %234, align 1, !tbaa !22
  %236 = sext i8 %235 to i32
  %237 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %229, i32 noundef %236)
          to label %238 unwind label %242

238:                                              ; preds = %225
  br label %239

239:                                              ; preds = %238
  %240 = load i32, ptr %21, align 4, !tbaa !5
  %241 = add nsw i32 %240, 1
  store i32 %241, ptr %21, align 4, !tbaa !5
  br label %220, !llvm.loop !23

242:                                              ; preds = %225
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %13, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %271

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

247:                                              ; preds = %259, %246
  %248 = load i32, ptr %22, align 4, !tbaa !5
  %249 = load i32, ptr %1, align 4, !tbaa !5
  %250 = icmp slt i32 %248, %249
  br i1 %250, label %252, label %251

251:                                              ; preds = %247
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %266

252:                                              ; preds = %247
  %253 = load i32, ptr %22, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %254
  %256 = load i32, ptr %255, align 4, !tbaa !5
  %257 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %256)
          to label %258 unwind label %262

258:                                              ; preds = %252
  br label %259

259:                                              ; preds = %258
  %260 = load i32, ptr %22, align 4, !tbaa !5
  %261 = add nsw i32 %260, 1
  store i32 %261, ptr %22, align 4, !tbaa !5
  br label %247, !llvm.loop !24

262:                                              ; preds = %252
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %13, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %271

266:                                              ; preds = %251
  store i32 0, ptr %6, align 4
  br label %267

267:                                              ; preds = %266, %197
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  br label %268

268:                                              ; preds = %267, %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #5
  %269 = load i32, ptr %6, align 4
  switch i32 %269, label %278 [
    i32 0, label %270
    i32 1, label %270
  ]

270:                                              ; preds = %268, %268
  ret void

271:                                              ; preds = %262, %242, %215, %211, %210
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  br label %272

272:                                              ; preds = %271, %198
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #5
  br label %273

273:                                              ; preds = %272
  %274 = load ptr, ptr %13, align 8
  %275 = load i32, ptr %14, align 4
  %276 = insertvalue { ptr, i32 } poison, ptr %274, 0
  %277 = insertvalue { ptr, i32 } %276, i32 %275, 1
  resume { ptr, i32 } %277

278:                                              ; preds = %268, %111
  unreachable
}

; 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

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

declare i32 @puts(ptr noundef) #2

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIFbiEEC2IZ5solvevE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8functionIFbiEEclEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #0 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 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 = { noreturn 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { noreturn 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 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !12}
!16 = !{!17, !17, i64 0}
!17 = !{!"any pointer", !7, i64 0}
!18 = !{!19, !17, i64 0}
!19 = !{!"_ZTSSt16initializer_listIiE", !17, i64 0, !20, i64 8}
!20 = !{!"long", !7, i64 0}
!21 = !{!19, !20, i64 8}
!22 = !{!7, !7, i64 0}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !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<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon = type { ptr, ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.2" = type { i8 }

@_ZZ5solvevE1a = external hidden local_unnamed_addr global [100001 x i32], align 16
@_ZZ5solvevE1p = external hidden local_unnamed_addr global [100001 x i32], align 16
@_ZZ5solvevE1s = external hidden global [100001 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [76 x i8], align 1
@__PRETTY_FUNCTION__._Z5solvev = external hidden unnamed_addr constant [13 x i8], align 1
@_ZZ5solvevE3pos = external hidden local_unnamed_addr global [33 x i32], align 16
@_ZZ5solvevE3lim = external hidden local_unnamed_addr global [33 x i32], align 16
@.str.3 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::function", align 8
  %5 = alloca %class.anon, align 8
  %6 = alloca %"class.std::vector.0", align 8
  %7 = alloca [4 x i32], align 4
  %8 = alloca %"class.std::allocator.2", align 1
  %9 = alloca [1 x i32], align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %11 = icmp eq i32 %10, 1
  %12 = load i32, ptr %1, align 4
  %13 = add i32 %12, -1
  %14 = icmp ult i32 %13, 100000
  %or.cond5 = select i1 %11, i1 %14, i1 false
  br i1 %or.cond5, label %.lr.ph.preheader, label %.critedge

.lr.ph.preheader:                                 ; preds = %0
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @_ZZ5solvevE1s)
  %16 = icmp eq i32 %15, 1
  br i1 %16, label %17, label %.critedge3

17:                                               ; preds = %.lr.ph.preheader
  %18 = load i32, ptr @_ZZ5solvevE1s, align 16, !tbaa !5
  %19 = add i32 %18, -1
  %or.cond.peel = icmp ult i32 %19, 1000000000
  br i1 %or.cond.peel, label %20, label %.critedge3

20:                                               ; preds = %17
  %21 = load i32, ptr %1, align 4, !tbaa !5
  %22 = icmp sgt i32 %21, 1
  br i1 %22, label %.lr.ph, label %._crit_edge

.critedge:                                        ; preds = %0
  call void @__assert_fail(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 13, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5solvev) #6
  unreachable

._crit_edge:                                      ; preds = %58, %20
  %.348.lcssa = phi i32 [ 0, %20 ], [ %.348, %58 ]
  %.3.lcssa = phi i8 [ 0, %20 ], [ %.3, %58 ]
  %.lcssa94 = phi i32 [ %21, %20 ], [ %59, %58 ]
  %23 = load i32, ptr @_ZZ5solvevE1s, align 16, !tbaa !5
  %24 = add nsw i32 %.lcssa94, %.348.lcssa
  %25 = icmp ne i32 %.348.lcssa, 0
  %26 = zext i1 %25 to i32
  %27 = add nsw i32 %24, %26
  %28 = icmp slt i32 %23, %27
  %29 = and i8 %.3.lcssa, 1
  %30 = zext i1 %28 to i8
  %31 = or i8 %29, %30
  %.not = icmp eq i8 %31, 0
  br i1 %.not, label %64, label %62

.lr.ph:                                           ; preds = %20, %58
  %indvars.iv = phi i64 [ %indvars.iv.next, %58 ], [ 1, %20 ]
  %.04481 = phi i8 [ %.3, %58 ], [ 0, %20 ]
  %.04580 = phi i32 [ %.348, %58 ], [ 0, %20 ]
  %.05078 = phi i32 [ %.252, %58 ], [ %13, %20 ]
  %32 = getelementptr inbounds i32, ptr @_ZZ5solvevE1s, i64 %indvars.iv
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %32)
  %34 = icmp eq i32 %33, 1
  br i1 %34, label %35, label %.critedge3

35:                                               ; preds = %.lr.ph
  %36 = load i32, ptr %32, align 4, !tbaa !5
  %37 = add i32 %36, -1
  %or.cond = icmp ult i32 %37, 1000000000
  br i1 %or.cond, label %38, label %.critedge3

.critedge3:                                       ; preds = %35, %.lr.ph, %17, %.lr.ph.preheader
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.2, i32 noundef 21, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5solvev) #6
  unreachable

38:                                               ; preds = %35
  %39 = add nsw i64 %indvars.iv, -1
  %40 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1s, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = sub nsw i32 %36, %41
  %43 = add nsw i32 %42, 1
  %44 = icmp slt i32 %42, -1
  br i1 %44, label %58, label %45

45:                                               ; preds = %38
  %.not72 = icmp eq i32 %43, 0
  br i1 %.not72, label %46, label %49

46:                                               ; preds = %45
  %47 = add nsw i32 %.05078, -1
  %48 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %indvars.iv
  store i32 %.05078, ptr %48, align 4, !tbaa !5
  br label %58

49:                                               ; preds = %45
  %50 = shl i32 2, %.04580
  %51 = icmp slt i32 %50, 1000000001
  br i1 %51, label %52, label %58

52:                                               ; preds = %49
  %53 = add nsw i32 %.04580, 1
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [33 x i32], ptr @_ZZ5solvevE3pos, i64 0, i64 %54
  %56 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %56, ptr %55, align 4, !tbaa !5
  %57 = getelementptr inbounds [33 x i32], ptr @_ZZ5solvevE3lim, i64 0, i64 %54
  store i32 %43, ptr %57, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %46, %38, %49, %52
  %.252 = phi i32 [ %47, %46 ], [ %.05078, %38 ], [ %.05078, %49 ], [ %.05078, %52 ]
  %.348 = phi i32 [ %.04580, %46 ], [ %.04580, %38 ], [ %.04580, %49 ], [ %53, %52 ]
  %.3 = phi i8 [ %.04481, %46 ], [ 1, %38 ], [ 1, %49 ], [ %.04481, %52 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %59 = load i32, ptr %1, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = icmp slt i64 %indvars.iv.next, %60
  br i1 %61, label %.lr.ph, label %._crit_edge, !llvm.loop !9

62:                                               ; preds = %._crit_edge
  %63 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %132

64:                                               ; preds = %._crit_edge
  %65 = add nsw i32 %.348.lcssa, 1
  %.not6584.not = icmp slt i32 %.348.lcssa, %.lcssa94
  br i1 %.not6584.not, label %.lr.ph87.preheader, label %._crit_edge88

.lr.ph87.preheader:                               ; preds = %64
  %66 = sext i32 %.348.lcssa to i64
  %67 = add nsw i64 %66, 1
  %68 = add i32 %.lcssa94, 1
  %69 = xor i32 %.348.lcssa, -1
  %70 = add i32 %.lcssa94, %69
  %71 = zext i32 %70 to i64
  %72 = add nuw nsw i64 %71, 1
  %min.iters.check = icmp ult i32 %70, 7
  br i1 %min.iters.check, label %.lr.ph87.preheader115, label %vector.ph

.lr.ph87.preheader115:                            ; preds = %middle.block, %.lr.ph87.preheader
  %indvars.iv96.ph = phi i64 [ %67, %.lr.ph87.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph87

vector.ph:                                        ; preds = %.lr.ph87.preheader
  %n.vec = and i64 %72, 8589934584
  %ind.end = add nsw i64 %67, %n.vec
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = add i64 %67, %index
  %73 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %offset.idx
  %74 = getelementptr inbounds i8, ptr %73, i64 16
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %73, align 4, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %74, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %75 = icmp eq i64 %index.next, %n.vec
  br i1 %75, label %middle.block, label %vector.body, !llvm.loop !12

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %72, %n.vec
  br i1 %cmp.n, label %._crit_edge88, label %.lr.ph87.preheader115

._crit_edge88:                                    ; preds = %.lr.ph87, %middle.block, %64
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #5
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  store ptr %1, ptr %5, align 8, !tbaa !15
  %76 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr %3, ptr %76, align 8, !tbaa !15
  %77 = getelementptr inbounds i8, ptr %5, i64 16
  store ptr %2, ptr %77, align 8, !tbaa !15
  %78 = getelementptr inbounds i8, ptr %5, i64 24
  store ptr %4, ptr %78, align 8, !tbaa !15
  invoke void @"_ZNSt8functionIFbiEEC2IZ5solvevE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %80 unwind label %102

.lr.ph87:                                         ; preds = %.lr.ph87.preheader115, %.lr.ph87
  %indvars.iv96 = phi i64 [ %indvars.iv.next97, %.lr.ph87 ], [ %indvars.iv96.ph, %.lr.ph87.preheader115 ]
  %79 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %indvars.iv96
  store i32 1, ptr %79, align 4, !tbaa !5
  %indvars.iv.next97 = add nsw i64 %indvars.iv96, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next97 to i32
  %exitcond.not = icmp eq i32 %68, %lftr.wideiv
  br i1 %exitcond.not, label %._crit_edge88, label %.lr.ph87, !llvm.loop !17

80:                                               ; preds = %._crit_edge88
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  %81 = load i32, ptr %1, align 4, !tbaa !5
  %82 = add nsw i32 %81, -1
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1s, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  store i32 %85, ptr %7, align 4, !tbaa !5
  %86 = getelementptr inbounds i8, ptr %7, i64 4
  store i32 -1, ptr %86, align 4, !tbaa !5
  %87 = getelementptr inbounds i8, ptr %7, i64 8
  store i32 -1, ptr %87, align 4, !tbaa !5
  %88 = getelementptr inbounds i8, ptr %7, i64 12
  store i32 -1, ptr %88, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr nonnull %7, i64 4, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %89 unwind label %104

89:                                               ; preds = %80
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %90 unwind label %106

90:                                               ; preds = %89
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  %91 = sext i32 %65 to i64
  invoke void @_ZNSt6vectorIS_IiSaIiEESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %91)
          to label %92 unwind label %109

92:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  %93 = sext i32 %.348.lcssa to i64
  %94 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %93) #5
  %95 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSESt16initializer_listIiE(ptr noundef nonnull align 8 dereferenceable(24) %94, ptr nonnull %9, i64 1)
          to label %96 unwind label %111

96:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  %97 = invoke noundef zeroext i1 @_ZNKSt8functionIFbiEEclEi(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %.348.lcssa)
          to label %98 unwind label %109

98:                                               ; preds = %96
  br i1 %97, label %.preheader73, label %100

.preheader73:                                     ; preds = %98
  %99 = load i32, ptr %1, align 4, !tbaa !5
  %.not7089 = icmp slt i32 %99, 1
  br i1 %.not7089, label %.loopexit, label %.lr.ph91

100:                                              ; preds = %98
  %101 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %.loopexit

102:                                              ; preds = %._crit_edge88
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  br label %134

104:                                              ; preds = %80
  %105 = landingpad { ptr, i32 }
          cleanup
  br label %108

106:                                              ; preds = %89
  %107 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  br label %108

108:                                              ; preds = %106, %104
  %.pn = phi { ptr, i32 } [ %107, %106 ], [ %105, %104 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  br label %133

109:                                              ; preds = %96, %90
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %133

111:                                              ; preds = %92
  %112 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  br label %133

.preheader:                                       ; preds = %.lr.ph91
  %113 = icmp sgt i32 %124, 1
  br i1 %113, label %.lr.ph93, label %.loopexit

.lr.ph91:                                         ; preds = %.preheader73, %.lr.ph91
  %indvars.iv99 = phi i64 [ %indvars.iv.next100, %.lr.ph91 ], [ 1, %.preheader73 ]
  %114 = phi i32 [ %124, %.lr.ph91 ], [ %99, %.preheader73 ]
  %115 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %indvars.iv99
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = zext i32 %114 to i64
  %118 = icmp eq i64 %indvars.iv99, %117
  %119 = zext i1 %118 to i64
  %120 = getelementptr inbounds [3 x i8], ptr @.str.6, i64 0, i64 %119
  %121 = load i8, ptr %120, align 1, !tbaa !18
  %122 = sext i8 %121 to i32
  %123 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %116, i32 noundef %122)
  %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, 1
  %124 = load i32, ptr %1, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %.not70.not = icmp slt i64 %indvars.iv99, %125
  br i1 %.not70.not, label %.lr.ph91, label %.preheader, !llvm.loop !19

.lr.ph93:                                         ; preds = %.preheader, %.lr.ph93
  %indvars.iv102 = phi i64 [ %indvars.iv.next103, %.lr.ph93 ], [ 1, %.preheader ]
  %126 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE1p, i64 0, i64 %indvars.iv102
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %128 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %127)
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %129 = load i32, ptr %1, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = icmp slt i64 %indvars.iv.next103, %130
  br i1 %131, label %.lr.ph93, label %.loopexit, !llvm.loop !20

.loopexit:                                        ; preds = %.lr.ph93, %.preheader73, %.preheader, %100
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  br label %132

132:                                              ; preds = %.loopexit, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret void

133:                                              ; preds = %111, %109, %108
  %.pn67 = phi { ptr, i32 } [ %110, %109 ], [ %112, %111 ], [ %.pn, %108 ]
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %134

134:                                              ; preds = %133, %102
  %.pn67.pn = phi { ptr, i32 } [ %.pn67, %133 ], [ %103, %102 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @_ZNSt6vectorIS_IiSaIiEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn67.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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIFbiEEC2IZ5solvevE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8functionIFbiEEclEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #0 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 @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 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 = { 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 = { noreturn 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { noreturn 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}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.peeled.count", i32 1}
!12 = distinct !{!12, !10, !13, !14}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = distinct !{!17, !10, !14, !13}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}


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