; LLVM IR from sunkafei/xcpc-algorithm-templates :: 算法/莫队算法/回滚莫队.ll (ZN5MoDui4workEiSt6vectorINS_5queryESaIS1_EE)

; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.MoDui::query" = type { i32, i32, i32 }

@_ZN5MoDui4leftE = external dso_local global [110000 x i32], align 16
@_ZN5MoDui5rightE = external dso_local global [110000 x i32], align 16
@_ZN5MoDui6belongE = external dso_local global [110000 x i32], align 16
@_ZN5MoDui3ansE = external dso_local global [110000 x i32], align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z4initv() #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z9add_righti(i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z8add_lefti(i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z10breakpointv() #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z6resumev() #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7get_ansv() #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5MoDui4workEiSt6vectorINS_5queryESaIS1_EE(i32 noundef %0, ptr noundef %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %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 %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"struct.MoDui::query", align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %23)
  %25 = fptosi double %24 to i32
  store i32 %25, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = sitofp i32 %26 to double
  %28 = load i32, ptr %5, align 4, !tbaa !5
  %29 = sitofp i32 %28 to double
  %30 = fdiv double %27, %29
  %31 = call double @llvm.ceil.f64(double %30)
  %32 = fptosi double %31 to i32
  store i32 %32, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %74, %2
  %34 = load i32, ptr %7, align 4, !tbaa !5
  %35 = load i32, ptr %6, align 4, !tbaa !5
  %36 = icmp sle i32 %34, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %33
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %77

38:                                               ; preds = %33
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = load i32, ptr %7, align 4, !tbaa !5
  %41 = sub nsw i32 %40, 1
  %42 = mul nsw i32 %39, %41
  %43 = add nsw i32 %42, 1
  %44 = load i32, ptr %7, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui4leftE, i64 0, i64 %45
  store i32 %43, ptr %46, align 4, !tbaa !5
  %47 = load i32, ptr %5, align 4, !tbaa !5
  %48 = load i32, ptr %7, align 4, !tbaa !5
  %49 = mul nsw i32 %47, %48
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui5rightE, i64 0, i64 %51
  store i32 %49, ptr %52, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %53 = load i32, ptr %7, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui4leftE, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  store i32 %56, ptr %9, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %70, %38
  %58 = load i32, ptr %9, align 4, !tbaa !5
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui5rightE, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = icmp sle i32 %58, %62
  br i1 %63, label %65, label %64

64:                                               ; preds = %57
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %73

65:                                               ; preds = %57
  %66 = load i32, ptr %7, align 4, !tbaa !5
  %67 = load i32, ptr %9, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui6belongE, i64 0, i64 %68
  store i32 %66, ptr %69, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %65
  %71 = load i32, ptr %9, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %9, align 4, !tbaa !5
  br label %57, !llvm.loop !11

73:                                               ; preds = %64
  br label %74

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

77:                                               ; preds = %37
  %78 = load i32, ptr %3, align 4, !tbaa !5
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui5rightE, i64 0, i64 %80
  store i32 %78, ptr %81, align 4, !tbaa !5
  %82 = call ptr @_ZNSt6vectorIN5MoDui5queryESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %83 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %82, ptr %83, align 8
  %84 = call ptr @_ZNSt6vectorIN5MoDui5queryESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %85 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %84, ptr %85, align 8
  %86 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8
  %88 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  %89 = load ptr, ptr %88, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPN5MoDui5queryESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %87, ptr %89)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store ptr %1, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %90 = load ptr, ptr %12, align 8, !tbaa !9
  %91 = call ptr @_ZNSt6vectorIN5MoDui5queryESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %90) #7
  %92 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %91, ptr %92, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %93 = load ptr, ptr %12, align 8, !tbaa !9
  %94 = call ptr @_ZNSt6vectorIN5MoDui5queryESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %93) #7
  %95 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %94, ptr %95, align 8
  br label %96

96:                                               ; preds = %133, %77
  %97 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN5MoDui5queryESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br i1 %97, label %99, label %98

98:                                               ; preds = %96
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %135

99:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #7
  %100 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5MoDui5queryESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %100, i64 12, i1 false), !tbaa.struct !14
  %101 = getelementptr inbounds %"struct.MoDui::query", ptr %15, i32 0, i32 0
  %102 = load i32, ptr %101, align 4, !tbaa !15
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui6belongE, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = getelementptr inbounds %"struct.MoDui::query", ptr %15, i32 0, i32 1
  %107 = load i32, ptr %106, align 4, !tbaa !17
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui6belongE, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = icmp eq i32 %105, %110
  br i1 %111, label %112, label %132

112:                                              ; preds = %99
  call void @_Z4initv()
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %113 = getelementptr inbounds %"struct.MoDui::query", ptr %15, i32 0, i32 0
  %114 = load i32, ptr %113, align 4, !tbaa !15
  store i32 %114, ptr %16, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %123, %112
  %116 = load i32, ptr %16, align 4, !tbaa !5
  %117 = getelementptr inbounds %"struct.MoDui::query", ptr %15, i32 0, i32 1
  %118 = load i32, ptr %117, align 4, !tbaa !17
  %119 = icmp sle i32 %116, %118
  br i1 %119, label %121, label %120

120:                                              ; preds = %115
  store i32 10, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %126

121:                                              ; preds = %115
  %122 = load i32, ptr %16, align 4, !tbaa !5
  call void @_Z9add_righti(i32 noundef %122)
  br label %123

123:                                              ; preds = %121
  %124 = load i32, ptr %16, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %16, align 4, !tbaa !5
  br label %115, !llvm.loop !18

126:                                              ; preds = %120
  %127 = call noundef i32 @_Z7get_ansv()
  %128 = getelementptr inbounds %"struct.MoDui::query", ptr %15, i32 0, i32 2
  %129 = load i32, ptr %128, align 4, !tbaa !19
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui3ansE, i64 0, i64 %130
  store i32 %127, ptr %131, align 4, !tbaa !5
  br label %132

132:                                              ; preds = %126, %99
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #7
  br label %133

133:                                              ; preds = %132
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN5MoDui5queryESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br label %96

135:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 1, ptr %18, align 4, !tbaa !5
  br label %136

136:                                              ; preds = %222, %135
  %137 = load i32, ptr %18, align 4, !tbaa !5
  %138 = load i32, ptr %6, align 4, !tbaa !5
  %139 = icmp sle i32 %137, %138
  br i1 %139, label %141, label %140

140:                                              ; preds = %136
  store i32 13, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %225

141:                                              ; preds = %136
  call void @_Z4initv()
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %142 = load i32, ptr %18, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui5rightE, i64 0, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !5
  store i32 %145, ptr %19, align 4, !tbaa !5
  br label %146

146:                                              ; preds = %218, %141
  %147 = load i32, ptr %17, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = call noundef i64 @_ZNKSt6vectorIN5MoDui5queryESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %150 = icmp ult i64 %148, %149
  br i1 %150, label %151, label %162

151:                                              ; preds = %146
  %152 = load i32, ptr %17, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5MoDui5queryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %153) #7
  %155 = getelementptr inbounds %"struct.MoDui::query", ptr %154, i32 0, i32 0
  %156 = load i32, ptr %155, align 4, !tbaa !15
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui6belongE, i64 0, i64 %157
  %159 = load i32, ptr %158, align 4, !tbaa !5
  %160 = load i32, ptr %18, align 4, !tbaa !5
  %161 = icmp eq i32 %159, %160
  br label %162

162:                                              ; preds = %151, %146
  %163 = phi i1 [ false, %146 ], [ %161, %151 ]
  br i1 %163, label %165, label %164

164:                                              ; preds = %162
  store i32 16, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %221

165:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %166 = load i32, ptr %17, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5MoDui5queryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %167) #7
  %169 = getelementptr inbounds %"struct.MoDui::query", ptr %168, i32 0, i32 0
  %170 = load i32, ptr %169, align 4, !tbaa !15
  store i32 %170, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %171 = load i32, ptr %17, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5MoDui5queryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %172) #7
  %174 = getelementptr inbounds %"struct.MoDui::query", ptr %173, i32 0, i32 1
  %175 = load i32, ptr %174, align 4, !tbaa !17
  store i32 %175, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %176 = load i32, ptr %18, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui5rightE, i64 0, i64 %177
  %179 = load i32, ptr %178, align 4, !tbaa !5
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %22, align 4, !tbaa !5
  %181 = load i32, ptr %20, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui6belongE, i64 0, i64 %182
  %184 = load i32, ptr %183, align 4, !tbaa !5
  %185 = load i32, ptr %21, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui6belongE, i64 0, i64 %186
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = icmp ne i32 %184, %188
  br i1 %189, label %190, label %217

190:                                              ; preds = %165
  br label %191

191:                                              ; preds = %195, %190
  %192 = load i32, ptr %19, align 4, !tbaa !5
  %193 = load i32, ptr %21, align 4, !tbaa !5
  %194 = icmp slt i32 %192, %193
  br i1 %194, label %195, label %199

195:                                              ; preds = %191
  %196 = load i32, ptr %19, align 4, !tbaa !5
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %19, align 4, !tbaa !5
  %198 = load i32, ptr %19, align 4, !tbaa !5
  call void @_Z9add_righti(i32 noundef %198)
  br label %191, !llvm.loop !20

199:                                              ; preds = %191
  call void @_Z10breakpointv()
  br label %200

200:                                              ; preds = %204, %199
  %201 = load i32, ptr %22, align 4, !tbaa !5
  %202 = load i32, ptr %20, align 4, !tbaa !5
  %203 = icmp sgt i32 %201, %202
  br i1 %203, label %204, label %208

204:                                              ; preds = %200
  %205 = load i32, ptr %22, align 4, !tbaa !5
  %206 = add nsw i32 %205, -1
  store i32 %206, ptr %22, align 4, !tbaa !5
  %207 = load i32, ptr %22, align 4, !tbaa !5
  call void @_Z8add_lefti(i32 noundef %207)
  br label %200, !llvm.loop !21

208:                                              ; preds = %200
  %209 = call noundef i32 @_Z7get_ansv()
  %210 = load i32, ptr %17, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5MoDui5queryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %211) #7
  %213 = getelementptr inbounds %"struct.MoDui::query", ptr %212, i32 0, i32 2
  %214 = load i32, ptr %213, align 4, !tbaa !19
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui3ansE, i64 0, i64 %215
  store i32 %209, ptr %216, align 4, !tbaa !5
  call void @_Z6resumev()
  br label %217

217:                                              ; preds = %208, %165
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %218

218:                                              ; preds = %217
  %219 = load i32, ptr %17, align 4, !tbaa !5
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr %17, align 4, !tbaa !5
  br label %146, !llvm.loop !22

221:                                              ; preds = %164
  br label %222

222:                                              ; preds = %221
  %223 = load i32, ptr %18, align 4, !tbaa !5
  %224 = add nsw i32 %223, 1
  store i32 %224, ptr %18, align 4, !tbaa !5
  br label %136, !llvm.loop !23

225:                                              ; preds = %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  ret void
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #5

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

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

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

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

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

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

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

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

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

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

@_ZN5MoDui4leftE = external dso_local local_unnamed_addr global [110000 x i32], align 16
@_ZN5MoDui5rightE = external dso_local local_unnamed_addr global [110000 x i32], align 16
@_ZN5MoDui6belongE = external dso_local local_unnamed_addr global [110000 x i32], align 16
@_ZN5MoDui3ansE = external dso_local local_unnamed_addr global [110000 x i32], align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z4initv() local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z9add_righti(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z8add_lefti(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z10breakpointv() local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z6resumev() local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7get_ansv() local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5MoDui4workEiSt6vectorINS_5queryESaIS1_EE(i32 noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = tail call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %0)
  %6 = fptosi double %5 to i32
  %7 = sitofp i32 %0 to double
  %8 = sitofp i32 %6 to double
  %9 = fdiv double %7, %8
  %10 = tail call double @llvm.ceil.f64(double %9)
  %11 = fptosi double %10 to i32
  %.not65 = icmp slt i32 %11, 1
  br i1 %.not65, label %._crit_edge69, label %.lr.ph68.preheader

.lr.ph68.preheader:                               ; preds = %2
  %12 = add i32 %6, 1
  %13 = sext i32 %6 to i64
  %14 = add nuw i32 %11, 1
  %wide.trip.count = zext i32 %14 to i64
  %15 = add i32 %6, -1
  %16 = zext i32 %15 to i64
  %17 = add nuw nsw i64 %16, 1
  %min.iters.check = icmp ult i32 %15, 7
  %n.vec = and i64 %17, 8589934584
  %cmp.n = icmp eq i64 %17, %n.vec
  br label %.lr.ph68

._crit_edge69:                                    ; preds = %._crit_edge, %2
  %18 = sext i32 %11 to i64
  %19 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui5rightE, i64 0, i64 %18
  store i32 %0, ptr %19, align 4, !tbaa !5
  %20 = tail call ptr @_ZNSt6vectorIN5MoDui5queryESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %21 = tail call ptr @_ZNSt6vectorIN5MoDui5queryESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  tail call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPN5MoDui5queryESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %20, ptr %21)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %22 = tail call ptr @_ZNSt6vectorIN5MoDui5queryESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  store ptr %22, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %23 = tail call ptr @_ZNSt6vectorIN5MoDui5queryESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  store ptr %23, ptr %4, align 8
  %24 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN5MoDui5queryESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %24, label %.lr.ph76, label %._crit_edge77

.lr.ph68:                                         ; preds = %.lr.ph68.preheader, %._crit_edge
  %indvars.iv103 = phi i64 [ 1, %.lr.ph68.preheader ], [ %indvars.iv.next104, %._crit_edge ]
  %indvars.iv101 = phi i32 [ %12, %.lr.ph68.preheader ], [ %indvars.iv.next102, %._crit_edge ]
  %indvars.iv = phi i32 [ 1, %.lr.ph68.preheader ], [ %indvars.iv.next, %._crit_edge ]
  %25 = add nsw i64 %indvars.iv103, -1
  %26 = mul nsw i64 %25, %13
  %27 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui4leftE, i64 0, i64 %indvars.iv103
  %28 = trunc i64 %26 to i32
  %29 = add i32 %28, 1
  store i32 %29, ptr %27, align 4, !tbaa !5
  %30 = mul nsw i64 %indvars.iv103, %13
  %31 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui5rightE, i64 0, i64 %indvars.iv103
  %32 = trunc nsw i64 %30 to i32
  store i32 %32, ptr %31, align 4, !tbaa !5
  %.not6263.not = icmp slt i64 %26, %30
  br i1 %.not6263.not, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.lr.ph68
  %33 = sext i32 %indvars.iv to i64
  %34 = trunc nuw nsw i64 %indvars.iv103 to i32
  br i1 %min.iters.check, label %.lr.ph.preheader118, label %vector.ph

.lr.ph.preheader118:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv98.ph = phi i64 [ %33, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %ind.end = add nsw i64 %n.vec, %33
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %34, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  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 %index, %33
  %35 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui6belongE, i64 0, i64 %offset.idx
  %36 = getelementptr inbounds i8, ptr %35, i64 16
  store <4 x i32> %broadcast.splat, ptr %35, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %36, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %37 = icmp eq i64 %index.next, %n.vec
  br i1 %37, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader118

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %.lr.ph68
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %indvars.iv.next = add i32 %indvars.iv, %6
  %indvars.iv.next102 = add i32 %indvars.iv101, %6
  %exitcond106.not = icmp eq i64 %indvars.iv.next104, %wide.trip.count
  br i1 %exitcond106.not, label %._crit_edge69, label %.lr.ph68, !llvm.loop !13

.lr.ph:                                           ; preds = %.lr.ph.preheader118, %.lr.ph
  %indvars.iv98 = phi i64 [ %indvars.iv.next99, %.lr.ph ], [ %indvars.iv98.ph, %.lr.ph.preheader118 ]
  %38 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui6belongE, i64 0, i64 %indvars.iv98
  store i32 %34, ptr %38, align 4, !tbaa !5
  %indvars.iv.next99 = add nsw i64 %indvars.iv98, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next99 to i32
  %exitcond.not = icmp eq i32 %indvars.iv101, %lftr.wideiv
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !14

._crit_edge77:                                    ; preds = %53, %._crit_edge69
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br i1 %.not65, label %._crit_edge97, label %.lr.ph96.preheader

.lr.ph96.preheader:                               ; preds = %._crit_edge77
  %39 = add nuw i32 %11, 1
  %wide.trip.count116 = zext i32 %39 to i64
  br label %.lr.ph96

.lr.ph76:                                         ; preds = %._crit_edge69, %53
  %40 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN5MoDui5queryESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %.sroa.0.0.copyload = load i32, ptr %40, align 4, !tbaa !5
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 4
  %.sroa.5.0.copyload = load i32, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !5
  %.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %40, i64 8
  %.sroa.7.0.copyload = load i32, ptr %.sroa.7.0..sroa_idx, align 4, !tbaa !5
  %41 = sext i32 %.sroa.0.0.copyload to i64
  %42 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui6belongE, i64 0, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = sext i32 %.sroa.5.0.copyload to i64
  %45 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui6belongE, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = icmp eq i32 %43, %46
  br i1 %47, label %48, label %53

48:                                               ; preds = %.lr.ph76
  call void @_Z4initv()
  %.not6170 = icmp sgt i32 %.sroa.0.0.copyload, %.sroa.5.0.copyload
  br i1 %.not6170, label %._crit_edge74, label %.lr.ph73

._crit_edge74:                                    ; preds = %.lr.ph73, %48
  %49 = call noundef i32 @_Z7get_ansv()
  %50 = sext i32 %.sroa.7.0.copyload to i64
  %51 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui3ansE, i64 0, i64 %50
  store i32 %49, ptr %51, align 4, !tbaa !5
  br label %53

.lr.ph73:                                         ; preds = %48, %.lr.ph73
  %.05571 = phi i32 [ %52, %.lr.ph73 ], [ %.sroa.0.0.copyload, %48 ]
  call void @_Z9add_righti(i32 noundef %.05571)
  %52 = add i32 %.05571, 1
  %exitcond107.not = icmp eq i32 %.05571, %.sroa.5.0.copyload
  br i1 %exitcond107.not, label %._crit_edge74, label %.lr.ph73, !llvm.loop !15

53:                                               ; preds = %._crit_edge74, %.lr.ph76
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN5MoDui5queryESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %55 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN5MoDui5queryESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %55, label %.lr.ph76, label %._crit_edge77

._crit_edge97:                                    ; preds = %.critedge, %._crit_edge77
  ret void

.lr.ph96:                                         ; preds = %.lr.ph96.preheader, %.critedge
  %indvars.iv112 = phi i64 [ 1, %.lr.ph96.preheader ], [ %indvars.iv.next113, %.critedge ]
  %.05393 = phi i32 [ 0, %.lr.ph96.preheader ], [ %.154.lcssa, %.critedge ]
  call void @_Z4initv()
  %56 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui5rightE, i64 0, i64 %indvars.iv112
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = sext i32 %.05393 to i64
  %59 = call noundef i64 @_ZNKSt6vectorIN5MoDui5queryESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %60 = icmp ugt i64 %59, %58
  br i1 %60, label %.lr.ph88, label %.critedge

.lr.ph88:                                         ; preds = %.lr.ph96, %92
  %indvars.iv109 = phi i64 [ %indvars.iv.next110, %92 ], [ %58, %.lr.ph96 ]
  %.05186 = phi i32 [ %.2, %92 ], [ %57, %.lr.ph96 ]
  %61 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5MoDui5queryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv109) #6
  %62 = load i32, ptr %61, align 4, !tbaa !16
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui6belongE, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = zext i32 %65 to i64
  %67 = icmp eq i64 %indvars.iv112, %66
  br i1 %67, label %68, label %.critedge.loopexit

.critedge.loopexit:                               ; preds = %92, %.lr.ph88
  %.154.lcssa.ph.in = phi i64 [ %indvars.iv109, %.lr.ph88 ], [ %indvars.iv.next110, %92 ]
  %.154.lcssa.ph = trunc i64 %.154.lcssa.ph.in to i32
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %.lr.ph96
  %.154.lcssa = phi i32 [ %.05393, %.lr.ph96 ], [ %.154.lcssa.ph, %.critedge.loopexit ]
  %indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1
  %exitcond117.not = icmp eq i64 %indvars.iv.next113, %wide.trip.count116
  br i1 %exitcond117.not, label %._crit_edge97, label %.lr.ph96, !llvm.loop !18

68:                                               ; preds = %.lr.ph88
  %69 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5MoDui5queryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv109) #6
  %70 = load i32, ptr %69, align 4, !tbaa !16
  %71 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5MoDui5queryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv109) #6
  %72 = getelementptr inbounds i8, ptr %71, i64 4
  %73 = load i32, ptr %72, align 4, !tbaa !19
  %74 = load i32, ptr %56, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  %76 = sext i32 %70 to i64
  %77 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui6belongE, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = sext i32 %73 to i64
  %80 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui6belongE, i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %.not60 = icmp eq i32 %78, %81
  br i1 %.not60, label %92, label %.preheader

.preheader:                                       ; preds = %68
  %82 = icmp slt i32 %.05186, %73
  br i1 %82, label %.lr.ph79, label %._crit_edge80

.lr.ph79:                                         ; preds = %.preheader, %.lr.ph79
  %.178 = phi i32 [ %83, %.lr.ph79 ], [ %.05186, %.preheader ]
  %83 = add nsw i32 %.178, 1
  call void @_Z9add_righti(i32 noundef %83)
  %exitcond108.not = icmp eq i32 %83, %73
  br i1 %exitcond108.not, label %._crit_edge80, label %.lr.ph79, !llvm.loop !20

._crit_edge80:                                    ; preds = %.lr.ph79, %.preheader
  %.1.lcssa = phi i32 [ %.05186, %.preheader ], [ %73, %.lr.ph79 ]
  call void @_Z10breakpointv()
  %.not = icmp slt i32 %74, %70
  br i1 %.not, label %._crit_edge84, label %.lr.ph83

.lr.ph83:                                         ; preds = %._crit_edge80, %.lr.ph83
  %.081 = phi i32 [ %84, %.lr.ph83 ], [ %75, %._crit_edge80 ]
  %84 = add nsw i32 %.081, -1
  call void @_Z8add_lefti(i32 noundef %84)
  %85 = icmp sgt i32 %84, %70
  br i1 %85, label %.lr.ph83, label %._crit_edge84, !llvm.loop !21

._crit_edge84:                                    ; preds = %.lr.ph83, %._crit_edge80
  %86 = call noundef i32 @_Z7get_ansv()
  %87 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5MoDui5queryESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv109) #6
  %88 = getelementptr inbounds i8, ptr %87, i64 8
  %89 = load i32, ptr %88, align 4, !tbaa !22
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [110000 x i32], ptr @_ZN5MoDui3ansE, i64 0, i64 %90
  store i32 %86, ptr %91, align 4, !tbaa !5
  call void @_Z6resumev()
  br label %92

92:                                               ; preds = %._crit_edge84, %68
  %.2 = phi i32 [ %.1.lcssa, %._crit_edge84 ], [ %.05186, %68 ]
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %93 = call noundef i64 @_ZNKSt6vectorIN5MoDui5queryESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %94 = icmp ugt i64 %93, %indvars.iv.next110
  br i1 %94, label %.lr.ph88, label %.critedge.loopexit, !llvm.loop !23
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #4

; 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 @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPN5MoDui5queryESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr, ptr) local_unnamed_addr #5

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

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

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

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

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

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

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

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


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