; LLVM IR from Izaron/ACM-ICPC :: Timus Online Judge/Volume 11/2047. Maths (main)

; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"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 }

@dels = external dso_local global [3000005 x i32], align 16
@tmpar = external dso_local global [3000005 x i32], align 16
@len = external dso_local global [3000005 x i32], align 16
@used = external dso_local global [3000005 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %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 i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::vector", align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @dels, ptr noundef getelementptr inbounds (i32, ptr @dels, i64 3000005), ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @len, ptr noundef getelementptr inbounds (i32, ptr @len, i64 3000005), ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #6
  store i8 0, ptr %4, align 1, !tbaa !9
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef @used, ptr noundef getelementptr inbounds (i8, ptr @used, i64 3000005), ptr noundef nonnull align 1 dereferenceable(1) %4)
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 2, ptr %5, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %117, %0
  %24 = load i32, ptr %5, align 4, !tbaa !5
  %25 = icmp slt i32 %24, 3000005
  br i1 %25, label %27, label %26

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

27:                                               ; preds = %23
  %28 = load i32, ptr %5, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [3000005 x i8], ptr @used, i64 0, i64 %29
  %31 = load i8, ptr %30, align 1, !tbaa !9, !range !11, !noundef !12
  %32 = trunc i8 %31 to i1
  br i1 %32, label %33, label %34

33:                                               ; preds = %27
  br label %117

34:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %35 = load i32, ptr %5, align 4, !tbaa !5
  %36 = mul nsw i32 2, %35
  store i32 %36, ptr %7, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %45, %34
  %38 = load i32, ptr %7, align 4, !tbaa !5
  %39 = icmp slt i32 %38, 3000005
  br i1 %39, label %41, label %40

40:                                               ; preds = %37
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %49

41:                                               ; preds = %37
  %42 = load i32, ptr %7, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [3000005 x i8], ptr @used, i64 0, i64 %43
  store i8 1, ptr %44, align 1, !tbaa !9
  br label %45

45:                                               ; preds = %41
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = load i32, ptr %7, align 4, !tbaa !5
  %48 = add nsw i32 %47, %46
  store i32 %48, ptr %7, align 4, !tbaa !5
  br label %37, !llvm.loop !13

49:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %50 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %50, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %51 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %51, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %52 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %52, ptr %10, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %61, %49
  %54 = load i32, ptr %10, align 4, !tbaa !5
  %55 = icmp slt i32 %54, 3000005
  br i1 %55, label %57, label %56

56:                                               ; preds = %53
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %65

57:                                               ; preds = %53
  %58 = load i32, ptr %10, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [3000005 x i32], ptr @tmpar, i64 0, i64 %59
  store i32 1, ptr %60, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %57
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = load i32, ptr %10, align 4, !tbaa !5
  %64 = add nsw i32 %63, %62
  store i32 %64, ptr %10, align 4, !tbaa !5
  br label %53, !llvm.loop !15

65:                                               ; preds = %56
  br label %66

66:                                               ; preds = %94, %65
  br label %67

67:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %68 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %68, ptr %11, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %79, %67
  %70 = load i32, ptr %11, align 4, !tbaa !5
  %71 = icmp slt i32 %70, 3000005
  br i1 %71, label %73, label %72

72:                                               ; preds = %69
  store i32 13, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %83

73:                                               ; preds = %69
  %74 = load i32, ptr %11, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [3000005 x i32], ptr @tmpar, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %76, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %73
  %80 = load i32, ptr %8, align 4, !tbaa !5
  %81 = load i32, ptr %11, align 4, !tbaa !5
  %82 = add nsw i32 %81, %80
  store i32 %82, ptr %11, align 4, !tbaa !5
  br label %69, !llvm.loop !16

83:                                               ; preds = %72
  %84 = load i32, ptr %5, align 4, !tbaa !5
  %85 = load i32, ptr %8, align 4, !tbaa !5
  %86 = mul nsw i32 %85, %84
  store i32 %86, ptr %8, align 4, !tbaa !5
  %87 = load i32, ptr %8, align 4, !tbaa !5
  %88 = icmp sge i32 %87, 3000005
  br i1 %88, label %93, label %89

89:                                               ; preds = %83
  %90 = load i32, ptr %8, align 4, !tbaa !5
  %91 = load i32, ptr %9, align 4, !tbaa !5
  %92 = icmp sle i32 %90, %91
  br i1 %92, label %93, label %94

93:                                               ; preds = %89, %83
  br label %96

94:                                               ; preds = %89
  %95 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %95, ptr %9, align 4, !tbaa !5
  br label %66, !llvm.loop !17

96:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %97 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %97, ptr %12, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %112, %96
  %99 = load i32, ptr %12, align 4, !tbaa !5
  %100 = icmp slt i32 %99, 3000005
  br i1 %100, label %102, label %101

101:                                              ; preds = %98
  store i32 16, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %116

102:                                              ; preds = %98
  %103 = load i32, ptr %12, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [3000005 x i32], ptr @tmpar, i64 0, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = load i32, ptr %12, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [3000005 x i32], ptr @dels, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = mul nsw i32 %110, %106
  store i32 %111, ptr %109, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %102
  %113 = load i32, ptr %5, align 4, !tbaa !5
  %114 = load i32, ptr %12, align 4, !tbaa !5
  %115 = add nsw i32 %114, %113
  store i32 %115, ptr %12, align 4, !tbaa !5
  br label %98, !llvm.loop !18

116:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %117

117:                                              ; preds = %116, %33
  %118 = load i32, ptr %5, align 4, !tbaa !5
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %5, align 4, !tbaa !5
  br label %23, !llvm.loop !19

120:                                              ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %121

121:                                              ; preds = %152, %120
  %122 = load i32, ptr %15, align 4, !tbaa !5
  %123 = icmp slt i32 %122, 3000005
  br i1 %123, label %125, label %124

124:                                              ; preds = %121
  store i32 19, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %155

125:                                              ; preds = %121
  %126 = load i32, ptr %15, align 4, !tbaa !5
  %127 = load i32, ptr %15, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [3000005 x i32], ptr @dels, i64 0, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %131 = sub nsw i32 %126, %130
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [3000005 x i32], ptr @len, i64 0, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  %136 = load i32, ptr %15, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [3000005 x i32], ptr @len, i64 0, i64 %137
  store i32 %135, ptr %138, align 4, !tbaa !5
  %139 = load i32, ptr %15, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [3000005 x i32], ptr @len, i64 0, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = load i32, ptr %13, align 4, !tbaa !5
  %144 = icmp sgt i32 %142, %143
  br i1 %144, label %145, label %151

145:                                              ; preds = %125
  %146 = load i32, ptr %15, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [3000005 x i32], ptr @len, i64 0, i64 %147
  %149 = load i32, ptr %148, align 4, !tbaa !5
  store i32 %149, ptr %13, align 4, !tbaa !5
  %150 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %150, ptr %14, align 4, !tbaa !5
  br label %151

151:                                              ; preds = %145, %125
  br label %152

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

155:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #6
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  br label %156

156:                                              ; preds = %166, %155
  br label %157

157:                                              ; preds = %156
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %158 unwind label %162

158:                                              ; preds = %157
  %159 = load i32, ptr %14, align 4, !tbaa !5
  %160 = icmp eq i32 %159, 0
  br i1 %160, label %161, label %166

161:                                              ; preds = %158
  br label %173

162:                                              ; preds = %173, %157
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %17, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %18, align 4
  br label %219

166:                                              ; preds = %158
  %167 = load i32, ptr %14, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [3000005 x i32], ptr @dels, i64 0, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = load i32, ptr %14, align 4, !tbaa !5
  %172 = sub nsw i32 %171, %170
  store i32 %172, ptr %14, align 4, !tbaa !5
  br label %156, !llvm.loop !21

173:                                              ; preds = %161
  %174 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  %175 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %174, ptr %175, align 8
  %176 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  %177 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %176, ptr %177, align 8
  %178 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  %179 = load ptr, ptr %178, align 8
  %180 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  %181 = load ptr, ptr %180, align 8
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %179, ptr %181)
          to label %182 unwind label %162

182:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %183 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %184 unwind label %190

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

185:                                              ; preds = %209, %184
  %186 = load i32, ptr %22, align 4, !tbaa !5
  %187 = load i32, ptr %21, align 4, !tbaa !5
  %188 = icmp sle i32 %186, %187
  br i1 %188, label %194, label %189

189:                                              ; preds = %185
  store i32 24, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %216

190:                                              ; preds = %182
  %191 = landingpad { ptr, i32 }
          cleanup
  %192 = extractvalue { ptr, i32 } %191, 0
  store ptr %192, ptr %17, align 8
  %193 = extractvalue { ptr, i32 } %191, 1
  store i32 %193, ptr %18, align 4
  br label %218

194:                                              ; preds = %185
  %195 = load i32, ptr %22, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %196) #6
  %198 = load i32, ptr %197, align 4, !tbaa !5
  %199 = load i32, ptr %22, align 4, !tbaa !5
  %200 = sub nsw i32 %199, 1
  %201 = sext i32 %200 to i64
  %202 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %201) #6
  %203 = load i32, ptr %202, align 4, !tbaa !5
  %204 = sub nsw i32 %198, %203
  %205 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %204)
          to label %206 unwind label %212

206:                                              ; preds = %194
  %207 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %205, ptr noundef @.str)
          to label %208 unwind label %212

208:                                              ; preds = %206
  br label %209

209:                                              ; preds = %208
  %210 = load i32, ptr %22, align 4, !tbaa !5
  %211 = add nsw i32 %210, 1
  store i32 %211, ptr %22, align 4, !tbaa !5
  br label %185, !llvm.loop !22

212:                                              ; preds = %206, %194
  %213 = landingpad { ptr, i32 }
          cleanup
  %214 = extractvalue { ptr, i32 } %213, 0
  store ptr %214, ptr %17, align 8
  %215 = extractvalue { ptr, i32 } %213, 1
  store i32 %215, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %218

216:                                              ; preds = %189
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  %217 = load i32, ptr %1, align 4
  ret i32 %217

218:                                              ; preds = %212, %190
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %219

219:                                              ; preds = %218, %162
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %220

220:                                              ; preds = %219
  %221 = load ptr, ptr %17, align 8
  %222 = load i32, ptr %18, align 4
  %223 = insertvalue { ptr, i32 } poison, ptr %221, 0
  %224 = insertvalue { ptr, i32 } %223, i32 %222, 1
  resume { ptr, i32 } %224
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 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)) #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr, ptr) #1

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #5

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}


; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"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 }

@dels = external dso_local global [3000005 x i32], align 16
@tmpar = external dso_local local_unnamed_addr global [3000005 x i32], align 16
@len = external dso_local global [3000005 x i32], align 16
@used = external dso_local global [3000005 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i8, align 1
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 1, ptr %1, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @dels, ptr noundef nonnull getelementptr inbounds (i8, ptr @dels, i64 12000020), ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @len, ptr noundef nonnull getelementptr inbounds (i8, ptr @len, i64 12000020), ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  store i8 0, ptr %3, align 1, !tbaa !9
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull @used, ptr noundef nonnull getelementptr inbounds (i8, ptr @used, i64 3000005), ptr noundef nonnull align 1 dereferenceable(1) %3)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  br label %8

7:                                                ; preds = %.loopexit69
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  br label %48

8:                                                ; preds = %0, %.loopexit69
  %indvars.iv91 = phi i64 [ 2, %0 ], [ %indvars.iv.next92, %.loopexit69 ]
  %indvars.iv = phi i64 [ 4, %0 ], [ %indvars.iv.next, %.loopexit69 ]
  %9 = getelementptr inbounds [3000005 x i8], ptr @used, i64 0, i64 %indvars.iv91
  %10 = load i8, ptr %9, align 1, !tbaa !9, !range !11, !noundef !12
  %11 = trunc nuw i8 %10 to i1
  br i1 %11, label %.loopexit69, label %12

12:                                               ; preds = %8
  %13 = icmp ult i64 %indvars.iv91, 1500003
  br i1 %13, label %.lr.ph, label %.lr.ph74.preheader

.lr.ph74.preheader:                               ; preds = %.lr.ph, %12
  br label %.lr.ph74

.lr.ph:                                           ; preds = %12, %.lr.ph
  %indvars.iv93 = phi i64 [ %indvars.iv.next94, %.lr.ph ], [ %indvars.iv, %12 ]
  %14 = getelementptr inbounds [3000005 x i8], ptr @used, i64 0, i64 %indvars.iv93
  store i8 1, ptr %14, align 1, !tbaa !9
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, %indvars.iv91
  %15 = icmp ult i64 %indvars.iv.next94, 3000005
  br i1 %15, label %.lr.ph, label %.lr.ph74.preheader, !llvm.loop !13

.preheader70:                                     ; preds = %.lr.ph74
  %16 = trunc nuw nsw i64 %indvars.iv91 to i32
  br label %19

.lr.ph74:                                         ; preds = %.lr.ph74.preheader, %.lr.ph74
  %indvars.iv96 = phi i64 [ %indvars.iv.next97, %.lr.ph74 ], [ %indvars.iv91, %.lr.ph74.preheader ]
  %17 = getelementptr inbounds [3000005 x i32], ptr @tmpar, i64 0, i64 %indvars.iv96
  store i32 1, ptr %17, align 4, !tbaa !5
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, %indvars.iv91
  %18 = icmp ult i64 %indvars.iv.next97, 3000005
  br i1 %18, label %.lr.ph74, label %.preheader70, !llvm.loop !15

19:                                               ; preds = %.preheader70, %._crit_edge
  %.058 = phi i32 [ %35, %._crit_edge ], [ %16, %.preheader70 ]
  %20 = icmp ult i32 %.058, 3000005
  br i1 %20, label %.lr.ph76.preheader, label %._crit_edge

.lr.ph76.preheader:                               ; preds = %19
  %21 = zext nneg i32 %.058 to i64
  %22 = shl nuw nsw i64 %21, 1
  %umax = call i64 @llvm.umax.i64(i64 %22, i64 3000005)
  %23 = icmp ult i32 %.058, 1500003
  %umin.neg = sext i1 %23 to i64
  %24 = select i1 %23, i64 2, i64 1
  %25 = add nsw i64 %umax, %umin.neg
  %26 = sub nsw i64 %25, %22
  %27 = udiv i64 %26, %21
  %28 = add i64 %24, %27
  %min.iters.check = icmp ugt i64 %28, 7
  %ident.check.not = icmp eq i32 %.058, 1
  %or.cond114 = and i1 %min.iters.check, %ident.check.not
  br i1 %or.cond114, label %vector.ph, label %.lr.ph76.preheader115

.lr.ph76.preheader115:                            ; preds = %middle.block, %.lr.ph76.preheader
  %indvars.iv99.ph = phi i64 [ %21, %.lr.ph76.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph76

vector.ph:                                        ; preds = %.lr.ph76.preheader
  %n.vec = and i64 %28, -8
  %29 = or disjoint i64 %n.vec, 1
  %ind.end = mul nuw i64 %29, %21
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %30 = getelementptr inbounds [3000005 x i32], ptr @tmpar, i64 0, i64 %offset.idx
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  %wide.load = load <4 x i32>, ptr %30, align 4, !tbaa !5
  %wide.load113 = load <4 x i32>, ptr %31, align 4, !tbaa !5
  %32 = add nsw <4 x i32> %wide.load, <i32 1, i32 1, i32 1, i32 1>
  %33 = add nsw <4 x i32> %wide.load113, <i32 1, i32 1, i32 1, i32 1>
  store <4 x i32> %32, ptr %30, align 4, !tbaa !5
  store <4 x i32> %33, ptr %31, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %34 = icmp eq i64 %index.next, %n.vec
  br i1 %34, label %middle.block, label %vector.body, !llvm.loop !16

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %28, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph76.preheader115

._crit_edge:                                      ; preds = %.lr.ph76, %middle.block, %19
  %35 = mul nuw nsw i32 %.058, %16
  %36 = icmp ult i32 %35, 3000005
  %.not67 = icmp ugt i32 %35, %.058
  %or.cond = and i1 %36, %.not67
  br i1 %or.cond, label %19, label %.lr.ph78, !llvm.loop !19

.lr.ph76:                                         ; preds = %.lr.ph76.preheader115, %.lr.ph76
  %indvars.iv99 = phi i64 [ %indvars.iv.next100, %.lr.ph76 ], [ %indvars.iv99.ph, %.lr.ph76.preheader115 ]
  %37 = getelementptr inbounds [3000005 x i32], ptr @tmpar, i64 0, i64 %indvars.iv99
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %37, align 4, !tbaa !5
  %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, %21
  %40 = icmp ult i64 %indvars.iv.next100, 3000005
  br i1 %40, label %.lr.ph76, label %._crit_edge, !llvm.loop !20

.lr.ph78:                                         ; preds = %._crit_edge, %.lr.ph78
  %indvars.iv102 = phi i64 [ %indvars.iv.next103, %.lr.ph78 ], [ %indvars.iv91, %._crit_edge ]
  %41 = getelementptr inbounds [3000005 x i32], ptr @tmpar, i64 0, i64 %indvars.iv102
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = getelementptr inbounds [3000005 x i32], ptr @dels, i64 0, i64 %indvars.iv102
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = mul nsw i32 %44, %42
  store i32 %45, ptr %43, align 4, !tbaa !5
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, %indvars.iv91
  %46 = icmp ult i64 %indvars.iv.next103, 3000005
  br i1 %46, label %.lr.ph78, label %.loopexit69, !llvm.loop !21

.loopexit69:                                      ; preds = %.lr.ph78, %8
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not = icmp eq i64 %indvars.iv.next92, 3000005
  br i1 %exitcond.not, label %7, label %8, !llvm.loop !22

47:                                               ; preds = %48
  store i32 %spec.select.1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  br label %67

48:                                               ; preds = %48, %7
  %indvars.iv106 = phi i64 [ 1, %7 ], [ %indvars.iv.next107.1, %48 ]
  %.05384 = phi i32 [ 0, %7 ], [ %spec.select90.1, %48 ]
  %.0528283 = phi i32 [ 0, %7 ], [ %spec.select.1, %48 ]
  %49 = getelementptr inbounds [3000005 x i32], ptr @dels, i64 0, i64 %indvars.iv106
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = trunc nuw nsw i64 %indvars.iv106 to i32
  %52 = sub nsw i32 %51, %50
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [3000005 x i32], ptr @len, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  %57 = getelementptr inbounds [3000005 x i32], ptr @len, i64 0, i64 %indvars.iv106
  store i32 %56, ptr %57, align 4, !tbaa !5
  %.not66 = icmp slt i32 %55, %.05384
  %spec.select = select i1 %.not66, i32 %.0528283, i32 %51
  %spec.select90 = select i1 %.not66, i32 %.05384, i32 %56
  %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
  %58 = getelementptr inbounds [3000005 x i32], ptr @dels, i64 0, i64 %indvars.iv.next107
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = trunc nuw nsw i64 %indvars.iv.next107 to i32
  %61 = sub nsw i32 %60, %59
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [3000005 x i32], ptr @len, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  %66 = getelementptr inbounds [3000005 x i32], ptr @len, i64 0, i64 %indvars.iv.next107
  store i32 %65, ptr %66, align 4, !tbaa !5
  %.not66.1 = icmp slt i32 %64, %spec.select90
  %spec.select.1 = select i1 %.not66.1, i32 %spec.select, i32 %60
  %spec.select90.1 = select i1 %.not66.1, i32 %spec.select90, i32 %65
  %indvars.iv.next107.1 = add nuw nsw i64 %indvars.iv106, 2
  %exitcond109.not.1 = icmp eq i64 %indvars.iv.next107.1, 3000005
  br i1 %exitcond109.not.1, label %47, label %48, !llvm.loop !23

67:                                               ; preds = %71, %47
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %68 unwind label %.loopexit

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

.loopexit:                                        ; preds = %67
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %99

.loopexit.split-lp:                               ; preds = %76
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %99

71:                                               ; preds = %68
  %72 = sext i32 %69 to i64
  %73 = getelementptr inbounds [3000005 x i32], ptr @dels, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = sub nsw i32 %69, %74
  store i32 %75, ptr %4, align 4, !tbaa !5
  br label %67, !llvm.loop !24

76:                                               ; preds = %68
  %77 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  %78 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  invoke void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr %77, ptr %78)
          to label %79 unwind label %.loopexit.split-lp

79:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %80 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %.preheader unwind label %82

.preheader:                                       ; preds = %79
  %81 = load i32, ptr %6, align 4, !tbaa !5
  %.not86 = icmp slt i32 %81, 1
  br i1 %.not86, label %._crit_edge89, label %.lr.ph88

._crit_edge89:                                    ; preds = %93, %.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  ret i32 0

82:                                               ; preds = %79
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %98

.lr.ph88:                                         ; preds = %.preheader, %93
  %indvars.iv110 = phi i64 [ %indvars.iv.next111, %93 ], [ 1, %.preheader ]
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %indvars.iv110) #7
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = add nsw i64 %indvars.iv110, -1
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %86) #7
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = sub nsw i32 %85, %88
  %90 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %89)
          to label %91 unwind label %96

91:                                               ; preds = %.lr.ph88
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull @.str)
          to label %93 unwind label %96

93:                                               ; preds = %91
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %94 = load i32, ptr %6, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %.not.not = icmp slt i64 %indvars.iv110, %95
  br i1 %.not.not, label %.lr.ph88, label %._crit_edge89, !llvm.loop !25

96:                                               ; preds = %91, %.lr.ph88
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %98

98:                                               ; preds = %96, %82
  %.pn = phi { ptr, i32 } [ %97, %96 ], [ %83, %82 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  br label %99

99:                                               ; preds = %.loopexit, %.loopexit.split-lp, %98
  %.pn.pn = phi { ptr, i32 } [ %.pn, %98 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 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 #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEEEvT_S7_(ptr, ptr) local_unnamed_addr #1

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #5

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umax.i64(i64, i64) #6

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14, !17, !18}
!17 = !{!"llvm.loop.isvectorized", i32 1}
!18 = !{!"llvm.loop.unroll.runtime.disable"}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14, !17}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !14}


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