; LLVM IR from Tian-Xie/NLS :: NestCandidateGenerator.ll (ZN5TNest20GenerateCandidateSetEv)

; 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"

%struct.TCandidate = type { double, double, double, double }
%"struct.std::pair.0" = type { i32, i32 }
%"struct.std::pair" = type { double, double }
%struct.TCrossPoint = type { i32, i32 }
%class.anon = type { ptr }
%struct.FenwickTree = type { i32, ptr }
%struct.TNest = type <{ i32, [4 x i8], double, %"class.std::vector", ptr, ptr, i32, [4 x i8], ptr, ptr, i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<TProduct, std::allocator<TProduct>>::_Vector_impl" }
%"struct.std::_Vector_base<TProduct, std::allocator<TProduct>>::_Vector_impl" = type { %"struct.std::_Vector_base<TProduct, std::allocator<TProduct>>::_Vector_impl_data" }
%"struct.std::_Vector_base<TProduct, std::allocator<TProduct>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.TProduct = type { double, double }

@.str = external hidden unnamed_addr constant [33 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@__PRETTY_FUNCTION__._ZN5TNest20GenerateCandidateSetEv = external hidden unnamed_addr constant [35 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13MakeCandidateddd(ptr dead_on_unwind noalias writable sret(%struct.TCandidate) align 8, double noundef, double noundef, double noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5TNest20GenerateCandidateSetEv(ptr noundef nonnull align 8 dereferenceable(84) %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair.0", align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca double, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %struct.TCrossPoint, align 4
  %19 = alloca %class.anon, align 8
  %20 = alloca %struct.FenwickTree, align 8
  %21 = alloca %struct.FenwickTree, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca %struct.TCandidate, align 8
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca ptr, align 8
  %37 = alloca double, align 8
  %38 = alloca double, align 8
  %39 = alloca i32, align 4
  %40 = alloca %struct.TCandidate, align 8
  %41 = alloca %struct.TCandidate, align 8
  %42 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %43 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #12
  %44 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 0
  %45 = load i32, ptr %44, align 8, !tbaa !9
  store i32 %45, ptr %3, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #12
  %46 = load i32, ptr %3, align 4, !tbaa !17
  %47 = add nsw i32 %46, 1
  %48 = sext i32 %47 to i64
  %49 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %48, i64 16)
  %50 = extractvalue { i64, i1 } %49, 1
  %51 = extractvalue { i64, i1 } %49, 0
  %52 = select i1 %50, i64 -1, i64 %51
  %53 = call noalias noundef nonnull ptr @_Znam(i64 noundef %52) #13
  %54 = icmp eq i64 %48, 0
  br i1 %54, label %62, label %55

55:                                               ; preds = %1
  %56 = getelementptr inbounds %"struct.std::pair", ptr %53, i64 %48
  br label %57

57:                                               ; preds = %59, %55
  %58 = phi ptr [ %53, %55 ], [ %60, %59 ]
  invoke void @_ZNSt4pairIddEC2IddTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %58)
          to label %59 unwind label %72

59:                                               ; preds = %57
  %60 = getelementptr inbounds %"struct.std::pair", ptr %58, i64 1
  %61 = icmp eq ptr %60, %56
  br i1 %61, label %62, label %57

62:                                               ; preds = %59, %1
  store ptr %53, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #12
  store i32 0, ptr %8, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #12
  store i32 0, ptr %9, align 4, !tbaa !17
  %63 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i64 %63, ptr %7, align 4
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.std::pair", ptr %64, i64 0
  %66 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIddEaSIiiEENSt9enable_ifIXsr6__and_ISt13is_assignableIRdOT_ES3_IS4_OT0_EEE5valueERS0_E4typeEOS_IS5_S8_E(ptr noundef nonnull align 8 dereferenceable(16) %65, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #12
  store i32 0, ptr %10, align 4, !tbaa !17
  br label %67

67:                                               ; preds = %106, %62
  %68 = load i32, ptr %10, align 4, !tbaa !17
  %69 = load i32, ptr %3, align 4, !tbaa !17
  %70 = icmp slt i32 %68, %69
  br i1 %70, label %76, label %71

71:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #12
  br label %109

72:                                               ; preds = %57
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %5, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %6, align 4
  call void @_ZdaPvm(ptr noundef %53, i64 noundef %52) #14
  br label %896

76:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #12
  %77 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 3
  %78 = load i32, ptr %10, align 4, !tbaa !17
  %79 = sext i32 %78 to i64
  %80 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI8TProductSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %77, i64 noundef %79) #12
  %81 = getelementptr inbounds %struct.TProduct, ptr %80, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #12
  %82 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 3
  %83 = load i32, ptr %10, align 4, !tbaa !17
  %84 = sext i32 %83 to i64
  %85 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI8TProductSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef %84) #12
  %86 = getelementptr inbounds %struct.TProduct, ptr %85, i32 0, i32 0
  %87 = load double, ptr %86, align 8, !tbaa !18
  %88 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 3
  %89 = load i32, ptr %10, align 4, !tbaa !17
  %90 = sext i32 %89 to i64
  %91 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI8TProductSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef %90) #12
  %92 = getelementptr inbounds %struct.TProduct, ptr %91, i32 0, i32 1
  %93 = load double, ptr %92, align 8, !tbaa !20
  %94 = fmul double %87, %93
  store double %94, ptr %12, align 8, !tbaa !21
  %95 = call { double, double } @_ZSt9make_pairIRddESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %96 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %97 = extractvalue { double, double } %95, 0
  store double %97, ptr %96, align 8
  %98 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %99 = extractvalue { double, double } %95, 1
  store double %99, ptr %98, align 8
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = load i32, ptr %10, align 4, !tbaa !17
  %102 = add nsw i32 %101, 1
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds %"struct.std::pair", ptr %100, i64 %103
  %105 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIddEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %104, ptr noundef nonnull align 8 dereferenceable(16) %11) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #12
  br label %106

106:                                              ; preds = %76
  %107 = load i32, ptr %10, align 4, !tbaa !17
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %10, align 4, !tbaa !17
  br label %67, !llvm.loop !22

109:                                              ; preds = %71
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = load i32, ptr %3, align 4, !tbaa !17
  %113 = add nsw i32 %112, 1
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds %"struct.std::pair", ptr %111, i64 %114
  call void @_ZSt4sortIPSt4pairIddEEvT_S3_(ptr noundef %110, ptr noundef %115)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #12
  %116 = load i32, ptr %3, align 4, !tbaa !17
  %117 = add nsw i32 %116, 1
  %118 = load i32, ptr %3, align 4, !tbaa !17
  %119 = mul nsw i32 %117, %118
  %120 = sdiv i32 %119, 2
  %121 = sext i32 %120 to i64
  %122 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %121, i64 8)
  %123 = extractvalue { i64, i1 } %122, 1
  %124 = extractvalue { i64, i1 } %122, 0
  %125 = select i1 %123, i64 -1, i64 %124
  %126 = call noalias noundef nonnull ptr @_Znam(i64 noundef %125) #13
  %127 = icmp eq i64 %121, 0
  br i1 %127, label %135, label %128

128:                                              ; preds = %109
  %129 = getelementptr inbounds %struct.TCrossPoint, ptr %126, i64 %121
  br label %130

130:                                              ; preds = %132, %128
  %131 = phi ptr [ %126, %128 ], [ %133, %132 ]
  invoke void @_ZN11TCrossPointC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %131)
          to label %132 unwind label %141

132:                                              ; preds = %130
  %133 = getelementptr inbounds %struct.TCrossPoint, ptr %131, i64 1
  %134 = icmp eq ptr %133, %129
  br i1 %134, label %135, label %130

135:                                              ; preds = %132, %109
  store ptr %126, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #12
  store i32 0, ptr %14, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #12
  store i32 0, ptr %15, align 4, !tbaa !17
  br label %136

136:                                              ; preds = %182, %135
  %137 = load i32, ptr %15, align 4, !tbaa !17
  %138 = load i32, ptr %3, align 4, !tbaa !17
  %139 = icmp sle i32 %137, %138
  br i1 %139, label %145, label %140

140:                                              ; preds = %136
  store i32 5, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #12
  br label %185

141:                                              ; preds = %130
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %5, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %6, align 4
  call void @_ZdaPvm(ptr noundef %126, i64 noundef %125) #14
  br label %895

145:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #12
  %146 = load i32, ptr %15, align 4, !tbaa !17
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %17, align 4, !tbaa !17
  br label %148

148:                                              ; preds = %178, %145
  %149 = load i32, ptr %17, align 4, !tbaa !17
  %150 = load i32, ptr %3, align 4, !tbaa !17
  %151 = icmp sle i32 %149, %150
  br i1 %151, label %153, label %152

152:                                              ; preds = %148
  store i32 8, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #12
  br label %181

153:                                              ; preds = %148
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = load i32, ptr %15, align 4, !tbaa !17
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds %"struct.std::pair", ptr %154, i64 %156
  %158 = getelementptr inbounds %"struct.std::pair", ptr %157, i32 0, i32 0
  %159 = load double, ptr %158, align 8, !tbaa !24
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  %161 = load i32, ptr %17, align 4, !tbaa !17
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds %"struct.std::pair", ptr %160, i64 %162
  %164 = getelementptr inbounds %"struct.std::pair", ptr %163, i32 0, i32 0
  %165 = load double, ptr %164, align 8, !tbaa !24
  %166 = fsub double %159, %165
  %167 = call double @llvm.fabs.f64(double %166)
  %168 = fcmp olt double %167, 1.000000e-08
  br i1 %168, label %169, label %170

169:                                              ; preds = %153
  br label %178

170:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #12
  %171 = load i32, ptr %15, align 4, !tbaa !17
  %172 = load i32, ptr %17, align 4, !tbaa !17
  call void @_ZN11TCrossPointC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %18, i32 noundef %171, i32 noundef %172)
  %173 = load ptr, ptr %13, align 8, !tbaa !5
  %174 = load i32, ptr %14, align 4, !tbaa !17
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %14, align 4, !tbaa !17
  %176 = sext i32 %174 to i64
  %177 = getelementptr inbounds %struct.TCrossPoint, ptr %173, i64 %176
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %177, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #12
  br label %178

178:                                              ; preds = %170, %169
  %179 = load i32, ptr %17, align 4, !tbaa !17
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %17, align 4, !tbaa !17
  br label %148, !llvm.loop !27

181:                                              ; preds = %152
  br label %182

182:                                              ; preds = %181
  %183 = load i32, ptr %15, align 4, !tbaa !17
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %15, align 4, !tbaa !17
  br label %136, !llvm.loop !28

185:                                              ; preds = %140
  %186 = load ptr, ptr %13, align 8, !tbaa !5
  %187 = load ptr, ptr %13, align 8, !tbaa !5
  %188 = load i32, ptr %14, align 4, !tbaa !17
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds %struct.TCrossPoint, ptr %187, i64 %189
  %191 = getelementptr inbounds %class.anon, ptr %19, i32 0, i32 0
  store ptr %4, ptr %191, align 8, !tbaa !5
  %192 = getelementptr inbounds %class.anon, ptr %19, i32 0, i32 0
  %193 = load ptr, ptr %192, align 8
  call void @"_ZSt4sortIP11TCrossPointZN5TNest20GenerateCandidateSetEvE3$_0EvT_S4_T0_"(ptr noundef %186, ptr noundef %190, ptr %193)
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #12
  %194 = load i32, ptr %3, align 4, !tbaa !17
  %195 = add nsw i32 %194, 1
  call void @_ZN11FenwickTreeC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %195)
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #12
  %196 = load i32, ptr %3, align 4, !tbaa !17
  %197 = add nsw i32 %196, 1
  invoke void @_ZN11FenwickTreeC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef %197)
          to label %198 unwind label %204

198:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #12
  store i32 0, ptr %22, align 4, !tbaa !17
  br label %199

199:                                              ; preds = %229, %198
  %200 = load i32, ptr %22, align 4, !tbaa !17
  %201 = load i32, ptr %3, align 4, !tbaa !17
  %202 = icmp sle i32 %200, %201
  br i1 %202, label %208, label %203

203:                                              ; preds = %199
  store i32 11, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #12
  br label %236

204:                                              ; preds = %185
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %5, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %6, align 4
  br label %894

208:                                              ; preds = %199
  %209 = load i32, ptr %22, align 4, !tbaa !17
  %210 = load ptr, ptr %4, align 8, !tbaa !5
  %211 = load i32, ptr %3, align 4, !tbaa !17
  %212 = load i32, ptr %22, align 4, !tbaa !17
  %213 = sub nsw i32 %211, %212
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds %"struct.std::pair", ptr %210, i64 %214
  %216 = getelementptr inbounds %"struct.std::pair", ptr %215, i32 0, i32 0
  %217 = load double, ptr %216, align 8, !tbaa !24
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %209, double noundef %217)
          to label %218 unwind label %232

218:                                              ; preds = %208
  %219 = load i32, ptr %22, align 4, !tbaa !17
  %220 = load ptr, ptr %4, align 8, !tbaa !5
  %221 = load i32, ptr %3, align 4, !tbaa !17
  %222 = load i32, ptr %22, align 4, !tbaa !17
  %223 = sub nsw i32 %221, %222
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds %"struct.std::pair", ptr %220, i64 %224
  %226 = getelementptr inbounds %"struct.std::pair", ptr %225, i32 0, i32 1
  %227 = load double, ptr %226, align 8, !tbaa !29
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef %219, double noundef %227)
          to label %228 unwind label %232

228:                                              ; preds = %218
  br label %229

229:                                              ; preds = %228
  %230 = load i32, ptr %22, align 4, !tbaa !17
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %22, align 4, !tbaa !17
  br label %199, !llvm.loop !30

232:                                              ; preds = %218, %208
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %5, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #12
  br label %893

236:                                              ; preds = %203
  %237 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 4
  %238 = load ptr, ptr %237, align 8, !tbaa !31
  %239 = icmp ne ptr %238, null
  br i1 %239, label %240, label %272

240:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #12
  store i32 0, ptr %23, align 4, !tbaa !17
  br label %241

241:                                              ; preds = %257, %240
  %242 = load i32, ptr %23, align 4, !tbaa !17
  %243 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 6
  %244 = load i32, ptr %243, align 8, !tbaa !32
  %245 = icmp slt i32 %242, %244
  br i1 %245, label %247, label %246

246:                                              ; preds = %241
  store i32 14, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #12
  br label %260

247:                                              ; preds = %241
  %248 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 4
  %249 = load ptr, ptr %248, align 8, !tbaa !31
  %250 = load i32, ptr %23, align 4, !tbaa !17
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds ptr, ptr %249, i64 %251
  %253 = load ptr, ptr %252, align 8, !tbaa !5
  %254 = icmp eq ptr %253, null
  br i1 %254, label %256, label %255

255:                                              ; preds = %247
  call void @_ZdlPvm(ptr noundef %253, i64 noundef 32) #14
  br label %256

256:                                              ; preds = %255, %247
  br label %257

257:                                              ; preds = %256
  %258 = load i32, ptr %23, align 4, !tbaa !17
  %259 = add nsw i32 %258, 1
  store i32 %259, ptr %23, align 4, !tbaa !17
  br label %241, !llvm.loop !33

260:                                              ; preds = %246
  %261 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 4
  %262 = load ptr, ptr %261, align 8, !tbaa !31
  %263 = icmp eq ptr %262, null
  br i1 %263, label %265, label %264

264:                                              ; preds = %260
  call void @_ZdlPvm(ptr noundef %262, i64 noundef 8) #14
  br label %265

265:                                              ; preds = %264, %260
  %266 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 5
  %267 = load ptr, ptr %266, align 8, !tbaa !34
  %268 = icmp eq ptr %267, null
  br i1 %268, label %270, label %269

269:                                              ; preds = %265
  call void @_ZdlPvm(ptr noundef %267, i64 noundef 4) #14
  br label %270

270:                                              ; preds = %269, %265
  %271 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 4
  store ptr null, ptr %271, align 8, !tbaa !31
  br label %272

272:                                              ; preds = %270, %236
  %273 = load i32, ptr %3, align 4, !tbaa !17
  %274 = add nsw i32 %273, 1
  %275 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 6
  store i32 %274, ptr %275, align 8, !tbaa !32
  %276 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 6
  %277 = load i32, ptr %276, align 8, !tbaa !32
  %278 = sext i32 %277 to i64
  %279 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %278, i64 4)
  %280 = extractvalue { i64, i1 } %279, 1
  %281 = extractvalue { i64, i1 } %279, 0
  %282 = select i1 %280, i64 -1, i64 %281
  %283 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %282) #13
          to label %284 unwind label %310

284:                                              ; preds = %272
  %285 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 5
  store ptr %283, ptr %285, align 8, !tbaa !34
  %286 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 6
  %287 = load i32, ptr %286, align 8, !tbaa !32
  %288 = sext i32 %287 to i64
  %289 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %288, i64 8)
  %290 = extractvalue { i64, i1 } %289, 1
  %291 = extractvalue { i64, i1 } %289, 0
  %292 = select i1 %290, i64 -1, i64 %291
  %293 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %292) #13
          to label %294 unwind label %310

294:                                              ; preds = %284
  %295 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 4
  store ptr %293, ptr %295, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #12
  %296 = load i32, ptr %3, align 4, !tbaa !17
  %297 = add nsw i32 %296, 1
  %298 = sext i32 %297 to i64
  %299 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %298, i64 4)
  %300 = extractvalue { i64, i1 } %299, 1
  %301 = extractvalue { i64, i1 } %299, 0
  %302 = select i1 %300, i64 -1, i64 %301
  %303 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %302) #13
          to label %304 unwind label %314

304:                                              ; preds = %294
  store ptr %303, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #12
  store i32 0, ptr %25, align 4, !tbaa !17
  br label %305

305:                                              ; preds = %331, %304
  %306 = load i32, ptr %25, align 4, !tbaa !17
  %307 = load i32, ptr %3, align 4, !tbaa !17
  %308 = icmp sle i32 %306, %307
  br i1 %308, label %318, label %309

309:                                              ; preds = %305
  store i32 17, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #12
  br label %334

310:                                              ; preds = %284, %272
  %311 = landingpad { ptr, i32 }
          cleanup
  %312 = extractvalue { ptr, i32 } %311, 0
  store ptr %312, ptr %5, align 8
  %313 = extractvalue { ptr, i32 } %311, 1
  store i32 %313, ptr %6, align 4
  br label %893

314:                                              ; preds = %294
  %315 = landingpad { ptr, i32 }
          cleanup
  %316 = extractvalue { ptr, i32 } %315, 0
  store ptr %316, ptr %5, align 8
  %317 = extractvalue { ptr, i32 } %315, 1
  store i32 %317, ptr %6, align 4
  br label %892

318:                                              ; preds = %305
  %319 = load i32, ptr %3, align 4, !tbaa !17
  %320 = load i32, ptr %25, align 4, !tbaa !17
  %321 = sub nsw i32 %319, %320
  %322 = load ptr, ptr %24, align 8, !tbaa !5
  %323 = load i32, ptr %25, align 4, !tbaa !17
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds i32, ptr %322, i64 %324
  store i32 %321, ptr %325, align 4, !tbaa !17
  %326 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 5
  %327 = load ptr, ptr %326, align 8, !tbaa !34
  %328 = load i32, ptr %25, align 4, !tbaa !17
  %329 = sext i32 %328 to i64
  %330 = getelementptr inbounds i32, ptr %327, i64 %329
  store i32 1, ptr %330, align 4, !tbaa !17
  br label %331

331:                                              ; preds = %318
  %332 = load i32, ptr %25, align 4, !tbaa !17
  %333 = add nsw i32 %332, 1
  store i32 %333, ptr %25, align 4, !tbaa !17
  br label %305, !llvm.loop !35

334:                                              ; preds = %309
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #12
  store i32 0, ptr %26, align 4, !tbaa !17
  br label %335

335:                                              ; preds = %410, %334
  %336 = load i32, ptr %26, align 4, !tbaa !17
  %337 = load i32, ptr %14, align 4, !tbaa !17
  %338 = icmp slt i32 %336, %337
  br i1 %338, label %340, label %339

339:                                              ; preds = %335
  store i32 20, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #12
  br label %413

340:                                              ; preds = %335
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #12
  %341 = load ptr, ptr %13, align 8, !tbaa !5
  %342 = load i32, ptr %26, align 4, !tbaa !17
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds %struct.TCrossPoint, ptr %341, i64 %343
  store ptr %344, ptr %27, align 8, !tbaa !5
  %345 = load ptr, ptr %27, align 8, !tbaa !5
  %346 = getelementptr inbounds %struct.TCrossPoint, ptr %345, i32 0, i32 0
  %347 = load i32, ptr %346, align 4, !tbaa !36
  %348 = icmp eq i32 %347, 0
  br i1 %348, label %349, label %370

349:                                              ; preds = %340
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #12
  %350 = load ptr, ptr %24, align 8, !tbaa !5
  %351 = getelementptr inbounds i32, ptr %350, i64 0
  %352 = load i32, ptr %351, align 4, !tbaa !17
  store i32 %352, ptr %28, align 4, !tbaa !17
  br label %353

353:                                              ; preds = %366, %349
  %354 = load i32, ptr %28, align 4, !tbaa !17
  %355 = load i32, ptr %3, align 4, !tbaa !17
  %356 = icmp sle i32 %354, %355
  br i1 %356, label %358, label %357

357:                                              ; preds = %353
  store i32 23, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #12
  br label %369

358:                                              ; preds = %353
  %359 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 5
  %360 = load ptr, ptr %359, align 8, !tbaa !34
  %361 = load i32, ptr %28, align 4, !tbaa !17
  %362 = sext i32 %361 to i64
  %363 = getelementptr inbounds i32, ptr %360, i64 %362
  %364 = load i32, ptr %363, align 4, !tbaa !17
  %365 = add nsw i32 %364, 1
  store i32 %365, ptr %363, align 4, !tbaa !17
  br label %366

366:                                              ; preds = %358
  %367 = load i32, ptr %28, align 4, !tbaa !17
  %368 = add nsw i32 %367, 1
  store i32 %368, ptr %28, align 4, !tbaa !17
  br label %353, !llvm.loop !38

369:                                              ; preds = %357
  br label %397

370:                                              ; preds = %340
  %371 = load ptr, ptr %24, align 8, !tbaa !5
  %372 = load ptr, ptr %27, align 8, !tbaa !5
  %373 = getelementptr inbounds %struct.TCrossPoint, ptr %372, i32 0, i32 0
  %374 = load i32, ptr %373, align 4, !tbaa !36
  %375 = sext i32 %374 to i64
  %376 = getelementptr inbounds i32, ptr %371, i64 %375
  %377 = load i32, ptr %376, align 4, !tbaa !17
  %378 = load ptr, ptr %24, align 8, !tbaa !5
  %379 = getelementptr inbounds i32, ptr %378, i64 0
  %380 = load i32, ptr %379, align 4, !tbaa !17
  %381 = icmp slt i32 %377, %380
  br i1 %381, label %382, label %396

382:                                              ; preds = %370
  %383 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 5
  %384 = load ptr, ptr %383, align 8, !tbaa !34
  %385 = load ptr, ptr %24, align 8, !tbaa !5
  %386 = load ptr, ptr %27, align 8, !tbaa !5
  %387 = getelementptr inbounds %struct.TCrossPoint, ptr %386, i32 0, i32 0
  %388 = load i32, ptr %387, align 4, !tbaa !36
  %389 = sext i32 %388 to i64
  %390 = getelementptr inbounds i32, ptr %385, i64 %389
  %391 = load i32, ptr %390, align 4, !tbaa !17
  %392 = sext i32 %391 to i64
  %393 = getelementptr inbounds i32, ptr %384, i64 %392
  %394 = load i32, ptr %393, align 4, !tbaa !17
  %395 = add nsw i32 %394, 1
  store i32 %395, ptr %393, align 4, !tbaa !17
  br label %396

396:                                              ; preds = %382, %370
  br label %397

397:                                              ; preds = %396, %369
  %398 = load ptr, ptr %24, align 8, !tbaa !5
  %399 = load ptr, ptr %27, align 8, !tbaa !5
  %400 = getelementptr inbounds %struct.TCrossPoint, ptr %399, i32 0, i32 0
  %401 = load i32, ptr %400, align 4, !tbaa !36
  %402 = sext i32 %401 to i64
  %403 = getelementptr inbounds i32, ptr %398, i64 %402
  %404 = load ptr, ptr %24, align 8, !tbaa !5
  %405 = load ptr, ptr %27, align 8, !tbaa !5
  %406 = getelementptr inbounds %struct.TCrossPoint, ptr %405, i32 0, i32 1
  %407 = load i32, ptr %406, align 4, !tbaa !39
  %408 = sext i32 %407 to i64
  %409 = getelementptr inbounds i32, ptr %404, i64 %408
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %403, ptr noundef nonnull align 4 dereferenceable(4) %409) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #12
  br label %410

410:                                              ; preds = %397
  %411 = load i32, ptr %26, align 4, !tbaa !17
  %412 = add nsw i32 %411, 1
  store i32 %412, ptr %26, align 4, !tbaa !17
  br label %335, !llvm.loop !40

413:                                              ; preds = %339
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #12
  store i32 0, ptr %29, align 4, !tbaa !17
  br label %414

414:                                              ; preds = %447, %413
  %415 = load i32, ptr %29, align 4, !tbaa !17
  %416 = load i32, ptr %3, align 4, !tbaa !17
  %417 = icmp sle i32 %415, %416
  br i1 %417, label %419, label %418

418:                                              ; preds = %414
  store i32 26, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #12
  br label %459

419:                                              ; preds = %414
  %420 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 5
  %421 = load ptr, ptr %420, align 8, !tbaa !34
  %422 = load i32, ptr %29, align 4, !tbaa !17
  %423 = sext i32 %422 to i64
  %424 = getelementptr inbounds i32, ptr %421, i64 %423
  %425 = load i32, ptr %424, align 4, !tbaa !17
  %426 = sext i32 %425 to i64
  %427 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %426, i64 32)
  %428 = extractvalue { i64, i1 } %427, 1
  %429 = extractvalue { i64, i1 } %427, 0
  %430 = select i1 %428, i64 -1, i64 %429
  %431 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %430) #13
          to label %432 unwind label %450

432:                                              ; preds = %419
  %433 = icmp eq i64 %426, 0
  br i1 %433, label %441, label %434

434:                                              ; preds = %432
  %435 = getelementptr inbounds %struct.TCandidate, ptr %431, i64 %426
  br label %436

436:                                              ; preds = %438, %434
  %437 = phi ptr [ %431, %434 ], [ %439, %438 ]
  invoke void @_ZN10TCandidateC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %437)
          to label %438 unwind label %454

438:                                              ; preds = %436
  %439 = getelementptr inbounds %struct.TCandidate, ptr %437, i64 1
  %440 = icmp eq ptr %439, %435
  br i1 %440, label %441, label %436

441:                                              ; preds = %438, %432
  %442 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 4
  %443 = load ptr, ptr %442, align 8, !tbaa !31
  %444 = load i32, ptr %29, align 4, !tbaa !17
  %445 = sext i32 %444 to i64
  %446 = getelementptr inbounds ptr, ptr %443, i64 %445
  store ptr %431, ptr %446, align 8, !tbaa !5
  br label %447

447:                                              ; preds = %441
  %448 = load i32, ptr %29, align 4, !tbaa !17
  %449 = add nsw i32 %448, 1
  store i32 %449, ptr %29, align 4, !tbaa !17
  br label %414, !llvm.loop !41

450:                                              ; preds = %419
  %451 = landingpad { ptr, i32 }
          cleanup
  %452 = extractvalue { ptr, i32 } %451, 0
  store ptr %452, ptr %5, align 8
  %453 = extractvalue { ptr, i32 } %451, 1
  store i32 %453, ptr %6, align 4
  br label %458

454:                                              ; preds = %436
  %455 = landingpad { ptr, i32 }
          cleanup
  %456 = extractvalue { ptr, i32 } %455, 0
  store ptr %456, ptr %5, align 8
  %457 = extractvalue { ptr, i32 } %455, 1
  store i32 %457, ptr %6, align 4
  call void @_ZdaPvm(ptr noundef %431, i64 noundef %430) #14
  br label %458

458:                                              ; preds = %454, %450
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #12
  br label %892

459:                                              ; preds = %418
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #12
  store i32 0, ptr %30, align 4, !tbaa !17
  br label %460

460:                                              ; preds = %478, %459
  %461 = load i32, ptr %30, align 4, !tbaa !17
  %462 = load i32, ptr %3, align 4, !tbaa !17
  %463 = icmp sle i32 %461, %462
  br i1 %463, label %465, label %464

464:                                              ; preds = %460
  store i32 29, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #12
  br label %481

465:                                              ; preds = %460
  %466 = load i32, ptr %3, align 4, !tbaa !17
  %467 = load i32, ptr %30, align 4, !tbaa !17
  %468 = sub nsw i32 %466, %467
  %469 = load ptr, ptr %24, align 8, !tbaa !5
  %470 = load i32, ptr %30, align 4, !tbaa !17
  %471 = sext i32 %470 to i64
  %472 = getelementptr inbounds i32, ptr %469, i64 %471
  store i32 %468, ptr %472, align 4, !tbaa !17
  %473 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 5
  %474 = load ptr, ptr %473, align 8, !tbaa !34
  %475 = load i32, ptr %30, align 4, !tbaa !17
  %476 = sext i32 %475 to i64
  %477 = getelementptr inbounds i32, ptr %474, i64 %476
  store i32 1, ptr %477, align 4, !tbaa !17
  br label %478

478:                                              ; preds = %465
  %479 = load i32, ptr %30, align 4, !tbaa !17
  %480 = add nsw i32 %479, 1
  store i32 %480, ptr %30, align 4, !tbaa !17
  br label %460, !llvm.loop !42

481:                                              ; preds = %464
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #12
  store i32 0, ptr %31, align 4, !tbaa !17
  br label %482

482:                                              ; preds = %516, %481
  %483 = load i32, ptr %31, align 4, !tbaa !17
  %484 = load i32, ptr %3, align 4, !tbaa !17
  %485 = icmp sle i32 %483, %484
  br i1 %485, label %487, label %486

486:                                              ; preds = %482
  store i32 32, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #12
  br label %528

487:                                              ; preds = %482
  call void @llvm.lifetime.start.p0(i64 32, ptr %32) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #12
  %488 = load i32, ptr %31, align 4, !tbaa !17
  %489 = sub nsw i32 %488, 1
  store i32 %489, ptr %33, align 4, !tbaa !17
  %490 = load ptr, ptr %24, align 8, !tbaa !5
  %491 = getelementptr inbounds i32, ptr %490, i64 0
  %492 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %33, ptr noundef nonnull align 4 dereferenceable(4) %491)
          to label %493 unwind label %519

493:                                              ; preds = %487
  %494 = load i32, ptr %492, align 4, !tbaa !17
  %495 = invoke noundef double @_ZN11FenwickTree12GetPrefixSumEi(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %494)
          to label %496 unwind label %519

496:                                              ; preds = %493
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #12
  %497 = load i32, ptr %31, align 4, !tbaa !17
  %498 = sub nsw i32 %497, 1
  store i32 %498, ptr %34, align 4, !tbaa !17
  %499 = load ptr, ptr %24, align 8, !tbaa !5
  %500 = getelementptr inbounds i32, ptr %499, i64 0
  %501 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %34, ptr noundef nonnull align 4 dereferenceable(4) %500)
          to label %502 unwind label %523

502:                                              ; preds = %496
  %503 = load i32, ptr %501, align 4, !tbaa !17
  %504 = invoke noundef double @_ZN11FenwickTree12GetPrefixSumEi(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef %503)
          to label %505 unwind label %523

505:                                              ; preds = %502
  %506 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 2
  %507 = load double, ptr %506, align 8, !tbaa !43
  invoke void @_Z13MakeCandidateddd(ptr dead_on_unwind writable sret(%struct.TCandidate) align 8 %32, double noundef %495, double noundef %504, double noundef %507)
          to label %508 unwind label %523

508:                                              ; preds = %505
  %509 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 4
  %510 = load ptr, ptr %509, align 8, !tbaa !31
  %511 = load i32, ptr %31, align 4, !tbaa !17
  %512 = sext i32 %511 to i64
  %513 = getelementptr inbounds ptr, ptr %510, i64 %512
  %514 = load ptr, ptr %513, align 8, !tbaa !5
  %515 = getelementptr inbounds %struct.TCandidate, ptr %514, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %515, ptr align 8 %32, i64 32, i1 false), !tbaa.struct !44
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #12
  call void @llvm.lifetime.end.p0(i64 32, ptr %32) #12
  br label %516

516:                                              ; preds = %508
  %517 = load i32, ptr %31, align 4, !tbaa !17
  %518 = add nsw i32 %517, 1
  store i32 %518, ptr %31, align 4, !tbaa !17
  br label %482, !llvm.loop !45

519:                                              ; preds = %493, %487
  %520 = landingpad { ptr, i32 }
          cleanup
  %521 = extractvalue { ptr, i32 } %520, 0
  store ptr %521, ptr %5, align 8
  %522 = extractvalue { ptr, i32 } %520, 1
  store i32 %522, ptr %6, align 4
  br label %527

523:                                              ; preds = %505, %502, %496
  %524 = landingpad { ptr, i32 }
          cleanup
  %525 = extractvalue { ptr, i32 } %524, 0
  store ptr %525, ptr %5, align 8
  %526 = extractvalue { ptr, i32 } %524, 1
  store i32 %526, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #12
  br label %527

527:                                              ; preds = %523, %519
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #12
  call void @llvm.lifetime.end.p0(i64 32, ptr %32) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #12
  br label %892

528:                                              ; preds = %486
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #12
  store i32 0, ptr %35, align 4, !tbaa !17
  br label %529

529:                                              ; preds = %840, %528
  %530 = load i32, ptr %35, align 4, !tbaa !17
  %531 = load i32, ptr %14, align 4, !tbaa !17
  %532 = icmp slt i32 %530, %531
  br i1 %532, label %534, label %533

533:                                              ; preds = %529
  store i32 35, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #12
  br label %844

534:                                              ; preds = %529
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #12
  %535 = load ptr, ptr %13, align 8, !tbaa !5
  %536 = load i32, ptr %35, align 4, !tbaa !17
  %537 = sext i32 %536 to i64
  %538 = getelementptr inbounds %struct.TCrossPoint, ptr %535, i64 %537
  store ptr %538, ptr %36, align 8, !tbaa !5
  %539 = load ptr, ptr %24, align 8, !tbaa !5
  %540 = load ptr, ptr %36, align 8, !tbaa !5
  %541 = getelementptr inbounds %struct.TCrossPoint, ptr %540, i32 0, i32 1
  %542 = load i32, ptr %541, align 4, !tbaa !39
  %543 = sext i32 %542 to i64
  %544 = getelementptr inbounds i32, ptr %539, i64 %543
  %545 = load i32, ptr %544, align 4, !tbaa !17
  %546 = add nsw i32 %545, 1
  %547 = load ptr, ptr %24, align 8, !tbaa !5
  %548 = load ptr, ptr %36, align 8, !tbaa !5
  %549 = getelementptr inbounds %struct.TCrossPoint, ptr %548, i32 0, i32 0
  %550 = load i32, ptr %549, align 4, !tbaa !36
  %551 = sext i32 %550 to i64
  %552 = getelementptr inbounds i32, ptr %547, i64 %551
  %553 = load i32, ptr %552, align 4, !tbaa !17
  %554 = icmp eq i32 %546, %553
  br i1 %554, label %555, label %556

555:                                              ; preds = %534
  br label %558

556:                                              ; preds = %534
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 133, ptr noundef @__PRETTY_FUNCTION__._ZN5TNest20GenerateCandidateSetEv) #15
  unreachable

557:                                              ; No predecessors!
  br label %558

558:                                              ; preds = %557, %555
  %559 = load ptr, ptr %24, align 8, !tbaa !5
  %560 = load ptr, ptr %36, align 8, !tbaa !5
  %561 = getelementptr inbounds %struct.TCrossPoint, ptr %560, i32 0, i32 0
  %562 = load i32, ptr %561, align 4, !tbaa !36
  %563 = sext i32 %562 to i64
  %564 = getelementptr inbounds i32, ptr %559, i64 %563
  %565 = load i32, ptr %564, align 4, !tbaa !17
  %566 = load ptr, ptr %4, align 8, !tbaa !5
  %567 = load ptr, ptr %36, align 8, !tbaa !5
  %568 = getelementptr inbounds %struct.TCrossPoint, ptr %567, i32 0, i32 0
  %569 = load i32, ptr %568, align 4, !tbaa !36
  %570 = sext i32 %569 to i64
  %571 = getelementptr inbounds %"struct.std::pair", ptr %566, i64 %570
  %572 = getelementptr inbounds %"struct.std::pair", ptr %571, i32 0, i32 0
  %573 = load double, ptr %572, align 8, !tbaa !24
  %574 = fneg double %573
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %565, double noundef %574)
          to label %575 unwind label %716

575:                                              ; preds = %558
  %576 = load ptr, ptr %24, align 8, !tbaa !5
  %577 = load ptr, ptr %36, align 8, !tbaa !5
  %578 = getelementptr inbounds %struct.TCrossPoint, ptr %577, i32 0, i32 0
  %579 = load i32, ptr %578, align 4, !tbaa !36
  %580 = sext i32 %579 to i64
  %581 = getelementptr inbounds i32, ptr %576, i64 %580
  %582 = load i32, ptr %581, align 4, !tbaa !17
  %583 = load ptr, ptr %4, align 8, !tbaa !5
  %584 = load ptr, ptr %36, align 8, !tbaa !5
  %585 = getelementptr inbounds %struct.TCrossPoint, ptr %584, i32 0, i32 1
  %586 = load i32, ptr %585, align 4, !tbaa !39
  %587 = sext i32 %586 to i64
  %588 = getelementptr inbounds %"struct.std::pair", ptr %583, i64 %587
  %589 = getelementptr inbounds %"struct.std::pair", ptr %588, i32 0, i32 0
  %590 = load double, ptr %589, align 8, !tbaa !24
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %582, double noundef %590)
          to label %591 unwind label %716

591:                                              ; preds = %575
  %592 = load ptr, ptr %24, align 8, !tbaa !5
  %593 = load ptr, ptr %36, align 8, !tbaa !5
  %594 = getelementptr inbounds %struct.TCrossPoint, ptr %593, i32 0, i32 1
  %595 = load i32, ptr %594, align 4, !tbaa !39
  %596 = sext i32 %595 to i64
  %597 = getelementptr inbounds i32, ptr %592, i64 %596
  %598 = load i32, ptr %597, align 4, !tbaa !17
  %599 = load ptr, ptr %4, align 8, !tbaa !5
  %600 = load ptr, ptr %36, align 8, !tbaa !5
  %601 = getelementptr inbounds %struct.TCrossPoint, ptr %600, i32 0, i32 1
  %602 = load i32, ptr %601, align 4, !tbaa !39
  %603 = sext i32 %602 to i64
  %604 = getelementptr inbounds %"struct.std::pair", ptr %599, i64 %603
  %605 = getelementptr inbounds %"struct.std::pair", ptr %604, i32 0, i32 0
  %606 = load double, ptr %605, align 8, !tbaa !24
  %607 = fneg double %606
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %598, double noundef %607)
          to label %608 unwind label %716

608:                                              ; preds = %591
  %609 = load ptr, ptr %24, align 8, !tbaa !5
  %610 = load ptr, ptr %36, align 8, !tbaa !5
  %611 = getelementptr inbounds %struct.TCrossPoint, ptr %610, i32 0, i32 1
  %612 = load i32, ptr %611, align 4, !tbaa !39
  %613 = sext i32 %612 to i64
  %614 = getelementptr inbounds i32, ptr %609, i64 %613
  %615 = load i32, ptr %614, align 4, !tbaa !17
  %616 = load ptr, ptr %4, align 8, !tbaa !5
  %617 = load ptr, ptr %36, align 8, !tbaa !5
  %618 = getelementptr inbounds %struct.TCrossPoint, ptr %617, i32 0, i32 0
  %619 = load i32, ptr %618, align 4, !tbaa !36
  %620 = sext i32 %619 to i64
  %621 = getelementptr inbounds %"struct.std::pair", ptr %616, i64 %620
  %622 = getelementptr inbounds %"struct.std::pair", ptr %621, i32 0, i32 0
  %623 = load double, ptr %622, align 8, !tbaa !24
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %615, double noundef %623)
          to label %624 unwind label %716

624:                                              ; preds = %608
  %625 = load ptr, ptr %24, align 8, !tbaa !5
  %626 = load ptr, ptr %36, align 8, !tbaa !5
  %627 = getelementptr inbounds %struct.TCrossPoint, ptr %626, i32 0, i32 0
  %628 = load i32, ptr %627, align 4, !tbaa !36
  %629 = sext i32 %628 to i64
  %630 = getelementptr inbounds i32, ptr %625, i64 %629
  %631 = load i32, ptr %630, align 4, !tbaa !17
  %632 = load ptr, ptr %4, align 8, !tbaa !5
  %633 = load ptr, ptr %36, align 8, !tbaa !5
  %634 = getelementptr inbounds %struct.TCrossPoint, ptr %633, i32 0, i32 0
  %635 = load i32, ptr %634, align 4, !tbaa !36
  %636 = sext i32 %635 to i64
  %637 = getelementptr inbounds %"struct.std::pair", ptr %632, i64 %636
  %638 = getelementptr inbounds %"struct.std::pair", ptr %637, i32 0, i32 1
  %639 = load double, ptr %638, align 8, !tbaa !29
  %640 = fneg double %639
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef %631, double noundef %640)
          to label %641 unwind label %716

641:                                              ; preds = %624
  %642 = load ptr, ptr %24, align 8, !tbaa !5
  %643 = load ptr, ptr %36, align 8, !tbaa !5
  %644 = getelementptr inbounds %struct.TCrossPoint, ptr %643, i32 0, i32 0
  %645 = load i32, ptr %644, align 4, !tbaa !36
  %646 = sext i32 %645 to i64
  %647 = getelementptr inbounds i32, ptr %642, i64 %646
  %648 = load i32, ptr %647, align 4, !tbaa !17
  %649 = load ptr, ptr %4, align 8, !tbaa !5
  %650 = load ptr, ptr %36, align 8, !tbaa !5
  %651 = getelementptr inbounds %struct.TCrossPoint, ptr %650, i32 0, i32 1
  %652 = load i32, ptr %651, align 4, !tbaa !39
  %653 = sext i32 %652 to i64
  %654 = getelementptr inbounds %"struct.std::pair", ptr %649, i64 %653
  %655 = getelementptr inbounds %"struct.std::pair", ptr %654, i32 0, i32 1
  %656 = load double, ptr %655, align 8, !tbaa !29
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef %648, double noundef %656)
          to label %657 unwind label %716

657:                                              ; preds = %641
  %658 = load ptr, ptr %24, align 8, !tbaa !5
  %659 = load ptr, ptr %36, align 8, !tbaa !5
  %660 = getelementptr inbounds %struct.TCrossPoint, ptr %659, i32 0, i32 1
  %661 = load i32, ptr %660, align 4, !tbaa !39
  %662 = sext i32 %661 to i64
  %663 = getelementptr inbounds i32, ptr %658, i64 %662
  %664 = load i32, ptr %663, align 4, !tbaa !17
  %665 = load ptr, ptr %4, align 8, !tbaa !5
  %666 = load ptr, ptr %36, align 8, !tbaa !5
  %667 = getelementptr inbounds %struct.TCrossPoint, ptr %666, i32 0, i32 1
  %668 = load i32, ptr %667, align 4, !tbaa !39
  %669 = sext i32 %668 to i64
  %670 = getelementptr inbounds %"struct.std::pair", ptr %665, i64 %669
  %671 = getelementptr inbounds %"struct.std::pair", ptr %670, i32 0, i32 1
  %672 = load double, ptr %671, align 8, !tbaa !29
  %673 = fneg double %672
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef %664, double noundef %673)
          to label %674 unwind label %716

674:                                              ; preds = %657
  %675 = load ptr, ptr %24, align 8, !tbaa !5
  %676 = load ptr, ptr %36, align 8, !tbaa !5
  %677 = getelementptr inbounds %struct.TCrossPoint, ptr %676, i32 0, i32 1
  %678 = load i32, ptr %677, align 4, !tbaa !39
  %679 = sext i32 %678 to i64
  %680 = getelementptr inbounds i32, ptr %675, i64 %679
  %681 = load i32, ptr %680, align 4, !tbaa !17
  %682 = load ptr, ptr %4, align 8, !tbaa !5
  %683 = load ptr, ptr %36, align 8, !tbaa !5
  %684 = getelementptr inbounds %struct.TCrossPoint, ptr %683, i32 0, i32 0
  %685 = load i32, ptr %684, align 4, !tbaa !36
  %686 = sext i32 %685 to i64
  %687 = getelementptr inbounds %"struct.std::pair", ptr %682, i64 %686
  %688 = getelementptr inbounds %"struct.std::pair", ptr %687, i32 0, i32 1
  %689 = load double, ptr %688, align 8, !tbaa !29
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef %681, double noundef %689)
          to label %690 unwind label %716

690:                                              ; preds = %674
  %691 = load ptr, ptr %36, align 8, !tbaa !5
  %692 = getelementptr inbounds %struct.TCrossPoint, ptr %691, i32 0, i32 0
  %693 = load i32, ptr %692, align 4, !tbaa !36
  %694 = icmp eq i32 %693, 0
  br i1 %694, label %695, label %759

695:                                              ; preds = %690
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #12
  %696 = load ptr, ptr %24, align 8, !tbaa !5
  %697 = getelementptr inbounds i32, ptr %696, i64 0
  %698 = load i32, ptr %697, align 4, !tbaa !17
  %699 = sub nsw i32 %698, 1
  %700 = invoke noundef double @_ZN11FenwickTree12GetPrefixSumEi(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %699)
          to label %701 unwind label %720

701:                                              ; preds = %695
  store double %700, ptr %37, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #12
  %702 = load ptr, ptr %24, align 8, !tbaa !5
  %703 = getelementptr inbounds i32, ptr %702, i64 0
  %704 = load i32, ptr %703, align 4, !tbaa !17
  %705 = sub nsw i32 %704, 1
  %706 = invoke noundef double @_ZN11FenwickTree12GetPrefixSumEi(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef %705)
          to label %707 unwind label %724

707:                                              ; preds = %701
  store double %706, ptr %38, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #12
  %708 = load ptr, ptr %24, align 8, !tbaa !5
  %709 = getelementptr inbounds i32, ptr %708, i64 0
  %710 = load i32, ptr %709, align 4, !tbaa !17
  store i32 %710, ptr %39, align 4, !tbaa !17
  br label %711

711:                                              ; preds = %749, %707
  %712 = load i32, ptr %39, align 4, !tbaa !17
  %713 = load i32, ptr %3, align 4, !tbaa !17
  %714 = icmp sle i32 %712, %713
  br i1 %714, label %728, label %715

715:                                              ; preds = %711
  store i32 38, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #12
  br label %756

716:                                              ; preds = %674, %657, %641, %624, %608, %591, %575, %558
  %717 = landingpad { ptr, i32 }
          cleanup
  %718 = extractvalue { ptr, i32 } %717, 0
  store ptr %718, ptr %5, align 8
  %719 = extractvalue { ptr, i32 } %717, 1
  store i32 %719, ptr %6, align 4
  br label %843

720:                                              ; preds = %695
  %721 = landingpad { ptr, i32 }
          cleanup
  %722 = extractvalue { ptr, i32 } %721, 0
  store ptr %722, ptr %5, align 8
  %723 = extractvalue { ptr, i32 } %721, 1
  store i32 %723, ptr %6, align 4
  br label %758

724:                                              ; preds = %701
  %725 = landingpad { ptr, i32 }
          cleanup
  %726 = extractvalue { ptr, i32 } %725, 0
  store ptr %726, ptr %5, align 8
  %727 = extractvalue { ptr, i32 } %725, 1
  store i32 %727, ptr %6, align 4
  br label %757

728:                                              ; preds = %711
  call void @llvm.lifetime.start.p0(i64 32, ptr %40) #12
  %729 = load double, ptr %37, align 8, !tbaa !21
  %730 = load double, ptr %38, align 8, !tbaa !21
  %731 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 2
  %732 = load double, ptr %731, align 8, !tbaa !43
  invoke void @_Z13MakeCandidateddd(ptr dead_on_unwind writable sret(%struct.TCandidate) align 8 %40, double noundef %729, double noundef %730, double noundef %732)
          to label %733 unwind label %752

733:                                              ; preds = %728
  %734 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 4
  %735 = load ptr, ptr %734, align 8, !tbaa !31
  %736 = load i32, ptr %39, align 4, !tbaa !17
  %737 = sext i32 %736 to i64
  %738 = getelementptr inbounds ptr, ptr %735, i64 %737
  %739 = load ptr, ptr %738, align 8, !tbaa !5
  %740 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 5
  %741 = load ptr, ptr %740, align 8, !tbaa !34
  %742 = load i32, ptr %39, align 4, !tbaa !17
  %743 = sext i32 %742 to i64
  %744 = getelementptr inbounds i32, ptr %741, i64 %743
  %745 = load i32, ptr %744, align 4, !tbaa !17
  %746 = add nsw i32 %745, 1
  store i32 %746, ptr %744, align 4, !tbaa !17
  %747 = sext i32 %745 to i64
  %748 = getelementptr inbounds %struct.TCandidate, ptr %739, i64 %747
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %748, ptr align 8 %40, i64 32, i1 false), !tbaa.struct !44
  call void @llvm.lifetime.end.p0(i64 32, ptr %40) #12
  br label %749

749:                                              ; preds = %733
  %750 = load i32, ptr %39, align 4, !tbaa !17
  %751 = add nsw i32 %750, 1
  store i32 %751, ptr %39, align 4, !tbaa !17
  br label %711, !llvm.loop !46

752:                                              ; preds = %728
  %753 = landingpad { ptr, i32 }
          cleanup
  %754 = extractvalue { ptr, i32 } %753, 0
  store ptr %754, ptr %5, align 8
  %755 = extractvalue { ptr, i32 } %753, 1
  store i32 %755, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %40) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #12
  br label %757

756:                                              ; preds = %715
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #12
  br label %827

757:                                              ; preds = %752, %724
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #12
  br label %758

758:                                              ; preds = %757, %720
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #12
  br label %843

759:                                              ; preds = %690
  %760 = load ptr, ptr %24, align 8, !tbaa !5
  %761 = load ptr, ptr %36, align 8, !tbaa !5
  %762 = getelementptr inbounds %struct.TCrossPoint, ptr %761, i32 0, i32 0
  %763 = load i32, ptr %762, align 4, !tbaa !36
  %764 = sext i32 %763 to i64
  %765 = getelementptr inbounds i32, ptr %760, i64 %764
  %766 = load i32, ptr %765, align 4, !tbaa !17
  %767 = load ptr, ptr %24, align 8, !tbaa !5
  %768 = getelementptr inbounds i32, ptr %767, i64 0
  %769 = load i32, ptr %768, align 4, !tbaa !17
  %770 = icmp slt i32 %766, %769
  br i1 %770, label %771, label %826

771:                                              ; preds = %759
  call void @llvm.lifetime.start.p0(i64 32, ptr %41) #12
  %772 = load ptr, ptr %24, align 8, !tbaa !5
  %773 = load ptr, ptr %36, align 8, !tbaa !5
  %774 = getelementptr inbounds %struct.TCrossPoint, ptr %773, i32 0, i32 0
  %775 = load i32, ptr %774, align 4, !tbaa !36
  %776 = sext i32 %775 to i64
  %777 = getelementptr inbounds i32, ptr %772, i64 %776
  %778 = load i32, ptr %777, align 4, !tbaa !17
  %779 = sub nsw i32 %778, 1
  %780 = invoke noundef double @_ZN11FenwickTree12GetPrefixSumEi(ptr noundef nonnull align 8 dereferenceable(16) %20, i32 noundef %779)
          to label %781 unwind label %822

781:                                              ; preds = %771
  %782 = load ptr, ptr %24, align 8, !tbaa !5
  %783 = load ptr, ptr %36, align 8, !tbaa !5
  %784 = getelementptr inbounds %struct.TCrossPoint, ptr %783, i32 0, i32 0
  %785 = load i32, ptr %784, align 4, !tbaa !36
  %786 = sext i32 %785 to i64
  %787 = getelementptr inbounds i32, ptr %782, i64 %786
  %788 = load i32, ptr %787, align 4, !tbaa !17
  %789 = sub nsw i32 %788, 1
  %790 = invoke noundef double @_ZN11FenwickTree12GetPrefixSumEi(ptr noundef nonnull align 8 dereferenceable(16) %21, i32 noundef %789)
          to label %791 unwind label %822

791:                                              ; preds = %781
  %792 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 2
  %793 = load double, ptr %792, align 8, !tbaa !43
  invoke void @_Z13MakeCandidateddd(ptr dead_on_unwind writable sret(%struct.TCandidate) align 8 %41, double noundef %780, double noundef %790, double noundef %793)
          to label %794 unwind label %822

794:                                              ; preds = %791
  %795 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 4
  %796 = load ptr, ptr %795, align 8, !tbaa !31
  %797 = load ptr, ptr %24, align 8, !tbaa !5
  %798 = load ptr, ptr %36, align 8, !tbaa !5
  %799 = getelementptr inbounds %struct.TCrossPoint, ptr %798, i32 0, i32 0
  %800 = load i32, ptr %799, align 4, !tbaa !36
  %801 = sext i32 %800 to i64
  %802 = getelementptr inbounds i32, ptr %797, i64 %801
  %803 = load i32, ptr %802, align 4, !tbaa !17
  %804 = sext i32 %803 to i64
  %805 = getelementptr inbounds ptr, ptr %796, i64 %804
  %806 = load ptr, ptr %805, align 8, !tbaa !5
  %807 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 5
  %808 = load ptr, ptr %807, align 8, !tbaa !34
  %809 = load ptr, ptr %24, align 8, !tbaa !5
  %810 = load ptr, ptr %36, align 8, !tbaa !5
  %811 = getelementptr inbounds %struct.TCrossPoint, ptr %810, i32 0, i32 0
  %812 = load i32, ptr %811, align 4, !tbaa !36
  %813 = sext i32 %812 to i64
  %814 = getelementptr inbounds i32, ptr %809, i64 %813
  %815 = load i32, ptr %814, align 4, !tbaa !17
  %816 = sext i32 %815 to i64
  %817 = getelementptr inbounds i32, ptr %808, i64 %816
  %818 = load i32, ptr %817, align 4, !tbaa !17
  %819 = add nsw i32 %818, 1
  store i32 %819, ptr %817, align 4, !tbaa !17
  %820 = sext i32 %818 to i64
  %821 = getelementptr inbounds %struct.TCandidate, ptr %806, i64 %820
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %821, ptr align 8 %41, i64 32, i1 false), !tbaa.struct !44
  call void @llvm.lifetime.end.p0(i64 32, ptr %41) #12
  br label %826

822:                                              ; preds = %791, %781, %771
  %823 = landingpad { ptr, i32 }
          cleanup
  %824 = extractvalue { ptr, i32 } %823, 0
  store ptr %824, ptr %5, align 8
  %825 = extractvalue { ptr, i32 } %823, 1
  store i32 %825, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %41) #12
  br label %843

826:                                              ; preds = %794, %759
  br label %827

827:                                              ; preds = %826, %756
  %828 = load ptr, ptr %24, align 8, !tbaa !5
  %829 = load ptr, ptr %36, align 8, !tbaa !5
  %830 = getelementptr inbounds %struct.TCrossPoint, ptr %829, i32 0, i32 0
  %831 = load i32, ptr %830, align 4, !tbaa !36
  %832 = sext i32 %831 to i64
  %833 = getelementptr inbounds i32, ptr %828, i64 %832
  %834 = load ptr, ptr %24, align 8, !tbaa !5
  %835 = load ptr, ptr %36, align 8, !tbaa !5
  %836 = getelementptr inbounds %struct.TCrossPoint, ptr %835, i32 0, i32 1
  %837 = load i32, ptr %836, align 4, !tbaa !39
  %838 = sext i32 %837 to i64
  %839 = getelementptr inbounds i32, ptr %834, i64 %838
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %833, ptr noundef nonnull align 4 dereferenceable(4) %839) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #12
  br label %840

840:                                              ; preds = %827
  %841 = load i32, ptr %35, align 4, !tbaa !17
  %842 = add nsw i32 %841, 1
  store i32 %842, ptr %35, align 4, !tbaa !17
  br label %529, !llvm.loop !47

843:                                              ; preds = %822, %758, %716
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #12
  br label %892

844:                                              ; preds = %533
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #12
  store i32 0, ptr %42, align 4, !tbaa !17
  br label %845

845:                                              ; preds = %872, %844
  %846 = load i32, ptr %42, align 4, !tbaa !17
  %847 = load i32, ptr %3, align 4, !tbaa !17
  %848 = icmp sle i32 %846, %847
  br i1 %848, label %850, label %849

849:                                              ; preds = %845
  store i32 41, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #12
  br label %879

850:                                              ; preds = %845
  %851 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 4
  %852 = load ptr, ptr %851, align 8, !tbaa !31
  %853 = load i32, ptr %42, align 4, !tbaa !17
  %854 = sext i32 %853 to i64
  %855 = getelementptr inbounds ptr, ptr %852, i64 %854
  %856 = load ptr, ptr %855, align 8, !tbaa !5
  %857 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 4
  %858 = load ptr, ptr %857, align 8, !tbaa !31
  %859 = load i32, ptr %42, align 4, !tbaa !17
  %860 = sext i32 %859 to i64
  %861 = getelementptr inbounds ptr, ptr %858, i64 %860
  %862 = load ptr, ptr %861, align 8, !tbaa !5
  %863 = getelementptr inbounds %struct.TNest, ptr %43, i32 0, i32 5
  %864 = load ptr, ptr %863, align 8, !tbaa !34
  %865 = load i32, ptr %42, align 4, !tbaa !17
  %866 = sext i32 %865 to i64
  %867 = getelementptr inbounds i32, ptr %864, i64 %866
  %868 = load i32, ptr %867, align 4, !tbaa !17
  %869 = sext i32 %868 to i64
  %870 = getelementptr inbounds %struct.TCandidate, ptr %862, i64 %869
  invoke void @_ZSt4sortIP10TCandidateEvT_S2_(ptr noundef %856, ptr noundef %870)
          to label %871 unwind label %875

871:                                              ; preds = %850
  br label %872

872:                                              ; preds = %871
  %873 = load i32, ptr %42, align 4, !tbaa !17
  %874 = add nsw i32 %873, 1
  store i32 %874, ptr %42, align 4, !tbaa !17
  br label %845, !llvm.loop !48

875:                                              ; preds = %850
  %876 = landingpad { ptr, i32 }
          cleanup
  %877 = extractvalue { ptr, i32 } %876, 0
  store ptr %877, ptr %5, align 8
  %878 = extractvalue { ptr, i32 } %876, 1
  store i32 %878, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #12
  br label %892

879:                                              ; preds = %849
  %880 = load ptr, ptr %24, align 8, !tbaa !5
  %881 = icmp eq ptr %880, null
  br i1 %881, label %883, label %882

882:                                              ; preds = %879
  call void @_ZdlPvm(ptr noundef %880, i64 noundef 4) #14
  br label %883

883:                                              ; preds = %882, %879
  %884 = load ptr, ptr %4, align 8, !tbaa !5
  %885 = icmp eq ptr %884, null
  br i1 %885, label %887, label %886

886:                                              ; preds = %883
  call void @_ZdlPvm(ptr noundef %884, i64 noundef 16) #14
  br label %887

887:                                              ; preds = %886, %883
  %888 = load ptr, ptr %13, align 8, !tbaa !5
  %889 = icmp eq ptr %888, null
  br i1 %889, label %891, label %890

890:                                              ; preds = %887
  call void @_ZdlPvm(ptr noundef %888, i64 noundef 8) #14
  br label %891

891:                                              ; preds = %890, %887
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #12
  call void @_ZN11FenwickTreeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #12
  call void @_ZN11FenwickTreeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #12
  ret void

892:                                              ; preds = %875, %843, %527, %458, %314
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #12
  br label %893

893:                                              ; preds = %892, %310, %232
  call void @_ZN11FenwickTreeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #12
  br label %894

894:                                              ; preds = %893, %204
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #12
  call void @_ZN11FenwickTreeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #12
  br label %895

895:                                              ; preds = %894, %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #12
  br label %896

896:                                              ; preds = %895, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #12
  br label %897

897:                                              ; preds = %896
  %898 = load ptr, ptr %5, align 8
  %899 = load i32, ptr %6, align 4
  %900 = insertvalue { ptr, i32 } poison, ptr %898, 0
  %901 = insertvalue { ptr, i32 } %900, i32 %899, 1
  resume { ptr, i32 } %901
}

; 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 speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #0

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #3

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPvm(ptr noundef, i64 noundef) #5

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZSt9make_pairIRddESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIP11TCrossPointZN5TNest20GenerateCandidateSetEvE3$_0EvT_S4_T0_"(ptr noundef, ptr noundef, ptr) #6

declare void @_ZN11FenwickTreeC1Ei(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) unnamed_addr #8

declare void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, double noundef) #8

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #5

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

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

declare noundef double @_ZN11FenwickTree12GetPrefixSumEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #8

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #9

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #10

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

; Function Attrs: nounwind
declare void @_ZN11FenwickTreeD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #11

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nobuiltin allocsize(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 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 = { nobuiltin 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { "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 #9 = { 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 #10 = { 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 #11 = { 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 #12 = { nounwind }
attributes #13 = { builtin allocsize(0) }
attributes #14 = { builtin nounwind }
attributes #15 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS5TNest", !11, i64 0, !12, i64 8, !13, i64 16, !6, i64 40, !6, i64 48, !11, i64 56, !6, i64 64, !6, i64 72, !11, i64 80}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!"_ZTSSt6vectorI8TProductSaIS0_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseI8TProductSaIS0_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseI8TProductSaIS0_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseI8TProductSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!11, !11, i64 0}
!18 = !{!19, !12, i64 0}
!19 = !{!"_ZTS8TProduct", !12, i64 0, !12, i64 8}
!20 = !{!19, !12, i64 8}
!21 = !{!12, !12, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !12, i64 0}
!25 = !{!"_ZTSSt4pairIddE", !12, i64 0, !12, i64 8}
!26 = !{i64 0, i64 4, !17, i64 4, i64 4, !17}
!27 = distinct !{!27, !23}
!28 = distinct !{!28, !23}
!29 = !{!25, !12, i64 8}
!30 = distinct !{!30, !23}
!31 = !{!10, !6, i64 40}
!32 = !{!10, !11, i64 56}
!33 = distinct !{!33, !23}
!34 = !{!10, !6, i64 48}
!35 = distinct !{!35, !23}
!36 = !{!37, !11, i64 0}
!37 = !{!"_ZTS11TCrossPoint", !11, i64 0, !11, i64 4}
!38 = distinct !{!38, !23}
!39 = !{!37, !11, i64 4}
!40 = distinct !{!40, !23}
!41 = distinct !{!41, !23}
!42 = distinct !{!42, !23}
!43 = !{!10, !12, i64 8}
!44 = !{i64 0, i64 8, !21, i64 8, i64 8, !21, i64 16, i64 8, !21, i64 24, i64 8, !21}
!45 = distinct !{!45, !23}
!46 = distinct !{!46, !23}
!47 = distinct !{!47, !23}
!48 = distinct !{!48, !23}


; 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"

%struct.TCandidate = type { double, double, double, double }
%"struct.std::pair.0" = type { i32, i32 }
%"struct.std::pair" = type { double, double }
%struct.TCrossPoint = type { i32, i32 }
%struct.FenwickTree = type { i32, ptr }

@.str = external hidden unnamed_addr constant [33 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@__PRETTY_FUNCTION__._ZN5TNest20GenerateCandidateSetEv = external hidden unnamed_addr constant [35 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13MakeCandidateddd(ptr dead_on_unwind noalias writable sret(%struct.TCandidate) align 8, double noundef, double noundef, double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5TNest20GenerateCandidateSetEv(ptr noundef nonnull align 8 dereferenceable(84) %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"struct.std::pair.0", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca double, align 8
  %8 = alloca %struct.TCrossPoint, align 8
  %9 = alloca %struct.FenwickTree, align 8
  %10 = alloca %struct.FenwickTree, align 8
  %11 = alloca %struct.TCandidate, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.TCandidate, align 8
  %15 = alloca %struct.TCandidate, align 8
  %16 = load i32, ptr %0, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #12
  %17 = add i32 %16, 1
  %18 = sext i32 %17 to i64
  %19 = icmp slt i32 %16, -1
  %20 = shl nsw i64 %18, 4
  %21 = select i1 %19, i64 -1, i64 %20
  %22 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %21) #13
  %23 = icmp eq i32 %17, 0
  br i1 %23, label %.loopexit229, label %24

24:                                               ; preds = %1
  %25 = getelementptr inbounds %"struct.std::pair", ptr %22, i64 %18
  br label %26

26:                                               ; preds = %26, %24
  %27 = phi ptr [ %22, %24 ], [ %28, %26 ]
  tail call void @_ZNSt4pairIddEC2IddTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %27)
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  %29 = icmp eq ptr %28, %25
  br i1 %29, label %.loopexit229, label %26

.loopexit229:                                     ; preds = %26, %1
  store ptr %22, ptr %2, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #12
  store i32 0, ptr %4, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #12
  store i32 0, ptr %5, align 4, !tbaa !17
  %30 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %30, ptr %3, align 8
  %31 = load ptr, ptr %2, align 8, !tbaa !16
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIddEaSIiiEENSt9enable_ifIXsr6__and_ISt13is_assignableIRdOT_ES3_IS4_OT0_EEE5valueERS0_E4typeEOS_IS5_S8_E(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef nonnull align 4 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #12
  %33 = icmp sgt i32 %16, 0
  br i1 %33, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.loopexit229
  %34 = getelementptr inbounds i8, ptr %0, i64 16
  %35 = getelementptr inbounds i8, ptr %6, i64 8
  %wide.trip.count = zext nneg i32 %16 to i64
  br label %46

._crit_edge:                                      ; preds = %46, %.loopexit229
  %36 = load ptr, ptr %2, align 8, !tbaa !16
  %37 = getelementptr inbounds %"struct.std::pair", ptr %36, i64 %18
  call void @_ZSt4sortIPSt4pairIddEEvT_S3_(ptr noundef %36, ptr noundef %37)
  %38 = mul nsw i32 %17, %16
  %39 = sdiv i32 %38, 2
  %40 = sext i32 %39 to i64
  %41 = icmp slt i32 %38, -1
  %42 = shl nsw i64 %40, 3
  %43 = select i1 %41, i64 -1, i64 %42
  %44 = call noalias noundef nonnull ptr @_Znam(i64 noundef %43) #13
  %.off = add i32 %38, 1
  %45 = icmp ult i32 %.off, 3
  br i1 %45, label %.loopexit228, label %60

46:                                               ; preds = %.lr.ph, %46
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %46 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #12
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI8TProductSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %indvars.iv) #12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #12
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI8TProductSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %indvars.iv) #12
  %49 = load double, ptr %48, align 8, !tbaa !18
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorI8TProductSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %indvars.iv) #12
  %51 = getelementptr inbounds i8, ptr %50, i64 8
  %52 = load double, ptr %51, align 8, !tbaa !20
  %53 = fmul double %49, %52
  store double %53, ptr %7, align 8, !tbaa !21
  %54 = call { double, double } @_ZSt9make_pairIRddESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %55 = extractvalue { double, double } %54, 0
  store double %55, ptr %6, align 8
  %56 = extractvalue { double, double } %54, 1
  store double %56, ptr %35, align 8
  %57 = load ptr, ptr %2, align 8, !tbaa !16
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %58 = getelementptr inbounds %"struct.std::pair", ptr %57, i64 %indvars.iv.next
  %59 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIddEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %58, ptr noundef nonnull align 8 dereferenceable(16) %6) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #12
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %46, !llvm.loop !22

60:                                               ; preds = %._crit_edge
  %61 = getelementptr inbounds %struct.TCrossPoint, ptr %44, i64 %40
  br label %62

62:                                               ; preds = %62, %60
  %63 = phi ptr [ %44, %60 ], [ %64, %62 ]
  call void @_ZN11TCrossPointC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %63)
  %64 = getelementptr inbounds i8, ptr %63, i64 8
  %65 = icmp eq ptr %64, %61
  br i1 %65, label %.loopexit228, label %62

.loopexit228:                                     ; preds = %62, %._crit_edge
  %.not236 = icmp slt i32 %16, 0
  br i1 %.not236, label %._crit_edge241, label %.lr.ph240.preheader

.lr.ph240.preheader:                              ; preds = %.loopexit228
  %66 = zext nneg i32 %16 to i64
  %wide.trip.count288 = zext i32 %17 to i64
  br label %.lr.ph240

.loopexit227:                                     ; preds = %86, %.lr.ph240
  %.1177.lcssa = phi i32 [ %.0176238, %.lr.ph240 ], [ %.2178, %86 ]
  %indvars.iv.next280 = add nuw nsw i64 %indvars.iv279, 1
  %exitcond289.not = icmp eq i64 %indvars.iv.next286, %wide.trip.count288
  br i1 %exitcond289.not, label %._crit_edge241, label %.lr.ph240, !llvm.loop !24

._crit_edge241:                                   ; preds = %.loopexit227, %.loopexit228
  %.0176.lcssa = phi i32 [ 0, %.loopexit228 ], [ %.1177.lcssa, %.loopexit227 ]
  %67 = sext i32 %.0176.lcssa to i64
  %68 = getelementptr inbounds %struct.TCrossPoint, ptr %44, i64 %67
  call void @"_ZSt4sortIP11TCrossPointZN5TNest20GenerateCandidateSetEvE3$_0EvT_S4_T0_"(ptr noundef nonnull %44, ptr noundef nonnull %68, ptr nonnull %2)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #12
  call void @_ZN11FenwickTreeC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %17)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #12
  invoke void @_ZN11FenwickTreeC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef %17)
          to label %.preheader226 unwind label %92

.preheader226:                                    ; preds = %._crit_edge241
  br i1 %.not236, label %._crit_edge246, label %.lr.ph245.preheader

.lr.ph245.preheader:                              ; preds = %.preheader226
  %69 = zext nneg i32 %16 to i64
  %wide.trip.count293 = zext i32 %17 to i64
  br label %.lr.ph245

.lr.ph240:                                        ; preds = %.lr.ph240.preheader, %.loopexit227
  %indvars.iv285 = phi i64 [ 0, %.lr.ph240.preheader ], [ %indvars.iv.next286, %.loopexit227 ]
  %indvars.iv279 = phi i64 [ 1, %.lr.ph240.preheader ], [ %indvars.iv.next280, %.loopexit227 ]
  %.0176238 = phi i32 [ 0, %.lr.ph240.preheader ], [ %.1177.lcssa, %.loopexit227 ]
  %indvars.iv.next286 = add nuw nsw i64 %indvars.iv285, 1
  %.not216231.not = icmp ult i64 %indvars.iv285, %66
  br i1 %.not216231.not, label %.lr.ph235, label %.loopexit227

.lr.ph235:                                        ; preds = %.lr.ph240
  %70 = trunc nuw nsw i64 %indvars.iv285 to i32
  br label %71

71:                                               ; preds = %.lr.ph235, %86
  %indvars.iv281 = phi i64 [ %indvars.iv279, %.lr.ph235 ], [ %indvars.iv.next282, %86 ]
  %.1177233 = phi i32 [ %.0176238, %.lr.ph235 ], [ %.2178, %86 ]
  %72 = load ptr, ptr %2, align 8, !tbaa !16
  %73 = getelementptr inbounds %"struct.std::pair", ptr %72, i64 %indvars.iv285
  %74 = load double, ptr %73, align 8, !tbaa !25
  %75 = getelementptr inbounds %"struct.std::pair", ptr %72, i64 %indvars.iv281
  %76 = load double, ptr %75, align 8, !tbaa !25
  %77 = fsub double %74, %76
  %78 = call double @llvm.fabs.f64(double %77)
  %79 = fcmp olt double %78, 1.000000e-08
  br i1 %79, label %86, label %80

80:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #12
  %81 = trunc nuw i64 %indvars.iv281 to i32
  call void @_ZN11TCrossPointC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %8, i32 noundef %70, i32 noundef %81)
  %82 = add nsw i32 %.1177233, 1
  %83 = sext i32 %.1177233 to i64
  %84 = getelementptr inbounds %struct.TCrossPoint, ptr %44, i64 %83
  %85 = load i64, ptr %8, align 8
  store i64 %85, ptr %84, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #12
  br label %86

86:                                               ; preds = %71, %80
  %.2178 = phi i32 [ %.1177233, %71 ], [ %82, %80 ]
  %indvars.iv.next282 = add nuw nsw i64 %indvars.iv281, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next282 to i32
  %exitcond284.not = icmp eq i32 %17, %lftr.wideiv
  br i1 %exitcond284.not, label %.loopexit227, label %71, !llvm.loop !27

._crit_edge246:                                   ; preds = %103, %.preheader226
  %87 = getelementptr inbounds i8, ptr %0, i64 40
  %88 = load ptr, ptr %87, align 8, !tbaa !28
  %.not198 = icmp eq ptr %88, null
  br i1 %.not198, label %124, label %.preheader225

.preheader225:                                    ; preds = %._crit_edge246
  %89 = getelementptr inbounds i8, ptr %0, i64 56
  %90 = load i32, ptr %89, align 8, !tbaa !29
  %91 = icmp sgt i32 %90, 0
  br i1 %91, label %.lr.ph248, label %._crit_edge249.thread

92:                                               ; preds = %._crit_edge241
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %440

.lr.ph245:                                        ; preds = %.lr.ph245.preheader, %103
  %indvars.iv290 = phi i64 [ 0, %.lr.ph245.preheader ], [ %indvars.iv.next291, %103 ]
  %94 = load ptr, ptr %2, align 8, !tbaa !16
  %95 = sub nsw i64 %69, %indvars.iv290
  %96 = getelementptr inbounds %"struct.std::pair", ptr %94, i64 %95
  %97 = load double, ptr %96, align 8, !tbaa !25
  %98 = trunc nuw nsw i64 %indvars.iv290 to i32
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %98, double noundef %97)
          to label %99 unwind label %104

99:                                               ; preds = %.lr.ph245
  %100 = load ptr, ptr %2, align 8, !tbaa !16
  %101 = getelementptr inbounds %"struct.std::pair", ptr %100, i64 %95, i32 1
  %102 = load double, ptr %101, align 8, !tbaa !30
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef %98, double noundef %102)
          to label %103 unwind label %104

103:                                              ; preds = %99
  %indvars.iv.next291 = add nuw nsw i64 %indvars.iv290, 1
  %exitcond294.not = icmp eq i64 %indvars.iv.next291, %wide.trip.count293
  br i1 %exitcond294.not, label %._crit_edge246, label %.lr.ph245, !llvm.loop !31

104:                                              ; preds = %99, %.lr.ph245
  %105 = landingpad { ptr, i32 }
          cleanup
  br label %439

._crit_edge249:                                   ; preds = %113
  %.pre343 = load ptr, ptr %87, align 8, !tbaa !28
  %106 = icmp eq ptr %.pre343, null
  br i1 %106, label %118, label %._crit_edge249.thread

.lr.ph248:                                        ; preds = %.preheader225, %113
  %107 = phi i32 [ %114, %113 ], [ %90, %.preheader225 ]
  %indvars.iv295 = phi i64 [ %indvars.iv.next296, %113 ], [ 0, %.preheader225 ]
  %108 = load ptr, ptr %87, align 8, !tbaa !28
  %109 = getelementptr inbounds ptr, ptr %108, i64 %indvars.iv295
  %110 = load ptr, ptr %109, align 8, !tbaa !16
  %111 = icmp eq ptr %110, null
  br i1 %111, label %113, label %112

112:                                              ; preds = %.lr.ph248
  call void @_ZdlPvm(ptr noundef nonnull %110, i64 noundef 32) #14
  %.pre = load i32, ptr %89, align 8, !tbaa !29
  br label %113

113:                                              ; preds = %.lr.ph248, %112
  %114 = phi i32 [ %107, %.lr.ph248 ], [ %.pre, %112 ]
  %indvars.iv.next296 = add nuw nsw i64 %indvars.iv295, 1
  %115 = sext i32 %114 to i64
  %116 = icmp slt i64 %indvars.iv.next296, %115
  br i1 %116, label %.lr.ph248, label %._crit_edge249, !llvm.loop !32

._crit_edge249.thread:                            ; preds = %.preheader225, %._crit_edge249
  %117 = phi ptr [ %.pre343, %._crit_edge249 ], [ %88, %.preheader225 ]
  call void @_ZdlPvm(ptr noundef nonnull %117, i64 noundef 8) #14
  br label %118

118:                                              ; preds = %._crit_edge249.thread, %._crit_edge249
  %119 = getelementptr inbounds i8, ptr %0, i64 48
  %120 = load ptr, ptr %119, align 8, !tbaa !33
  %121 = icmp eq ptr %120, null
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  call void @_ZdlPvm(ptr noundef nonnull %120, i64 noundef 4) #14
  br label %123

123:                                              ; preds = %122, %118
  store ptr null, ptr %87, align 8, !tbaa !28
  br label %124

124:                                              ; preds = %123, %._crit_edge246
  %125 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 %17, ptr %125, align 8, !tbaa !29
  %126 = shl nsw i64 %18, 2
  %127 = select i1 %19, i64 -1, i64 %126
  %128 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %127) #13
          to label %129 unwind label %145

129:                                              ; preds = %124
  %130 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %128, ptr %130, align 8, !tbaa !33
  %131 = shl nsw i64 %18, 3
  %132 = select i1 %19, i64 -1, i64 %131
  %133 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %132) #13
          to label %134 unwind label %145

134:                                              ; preds = %129
  store ptr %133, ptr %87, align 8, !tbaa !28
  %135 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %127) #13
          to label %.preheader224 unwind label %147

.preheader224:                                    ; preds = %134
  %136 = ptrtoint ptr %135 to i64
  br i1 %.not236, label %.preheader223, label %.lr.ph252.preheader

.lr.ph252.preheader:                              ; preds = %.preheader224
  %wide.trip.count301 = zext i32 %17 to i64
  %min.iters.check = icmp ult i32 %17, 8
  br i1 %min.iters.check, label %.lr.ph252.preheader375, label %vector.ph

.lr.ph252.preheader375:                           ; preds = %middle.block, %.lr.ph252.preheader
  %indvars.iv298.ph = phi i64 [ 0, %.lr.ph252.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph252

vector.ph:                                        ; preds = %.lr.ph252.preheader
  %n.vec = and i64 %wide.trip.count301, 4294967288
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %16, 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 ]
  %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %137 = getelementptr inbounds i32, ptr %135, i64 %index
  %138 = sub <4 x i32> %broadcast.splat, %vec.ind
  %139 = sub <4 x i32> %broadcast.splat, %step.add
  %140 = getelementptr inbounds i8, ptr %137, i64 16
  store <4 x i32> %138, ptr %137, align 4, !tbaa !17
  store <4 x i32> %139, ptr %140, align 4, !tbaa !17
  %141 = getelementptr inbounds i32, ptr %128, i64 %index
  %142 = getelementptr inbounds i8, ptr %141, i64 16
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %141, align 4, !tbaa !17
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %142, align 4, !tbaa !17
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %143 = icmp eq i64 %index.next, %n.vec
  br i1 %143, label %middle.block, label %vector.body, !llvm.loop !34

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count301
  br i1 %cmp.n, label %.preheader223, label %.lr.ph252.preheader375

.preheader223:                                    ; preds = %.lr.ph252, %middle.block, %.preheader224
  %144 = icmp sgt i32 %.0176.lcssa, 0
  br i1 %144, label %.lr.ph258.preheader, label %.preheader221

.lr.ph258.preheader:                              ; preds = %.preheader223
  %wide.trip.count311 = zext nneg i32 %.0176.lcssa to i64
  br label %.lr.ph258

145:                                              ; preds = %129, %124
  %146 = landingpad { ptr, i32 }
          cleanup
  br label %439

147:                                              ; preds = %134
  %148 = landingpad { ptr, i32 }
          cleanup
  br label %439

.lr.ph252:                                        ; preds = %.lr.ph252.preheader375, %.lr.ph252
  %indvars.iv298 = phi i64 [ %indvars.iv.next299, %.lr.ph252 ], [ %indvars.iv298.ph, %.lr.ph252.preheader375 ]
  %149 = getelementptr inbounds i32, ptr %135, i64 %indvars.iv298
  %150 = trunc i64 %indvars.iv298 to i32
  %151 = sub i32 %16, %150
  store i32 %151, ptr %149, align 4, !tbaa !17
  %152 = getelementptr inbounds i32, ptr %128, i64 %indvars.iv298
  store i32 1, ptr %152, align 4, !tbaa !17
  %indvars.iv.next299 = add nuw nsw i64 %indvars.iv298, 1
  %exitcond302.not = icmp eq i64 %indvars.iv.next299, %wide.trip.count301
  br i1 %exitcond302.not, label %.preheader223, label %.lr.ph252, !llvm.loop !37

.preheader221:                                    ; preds = %.loopexit222, %.preheader223
  br i1 %.not236, label %.preheader217, label %.lr.ph261.preheader

.lr.ph261.preheader:                              ; preds = %.preheader221
  %wide.trip.count316 = zext i32 %17 to i64
  br label %.lr.ph261

.lr.ph258:                                        ; preds = %.lr.ph258.preheader, %.loopexit222
  %indvars.iv308 = phi i64 [ 0, %.lr.ph258.preheader ], [ %indvars.iv.next309, %.loopexit222 ]
  %153 = getelementptr inbounds %struct.TCrossPoint, ptr %44, i64 %indvars.iv308
  %154 = load i32, ptr %153, align 4, !tbaa !38
  %155 = icmp eq i32 %154, 0
  br i1 %155, label %156, label %170

156:                                              ; preds = %.lr.ph258
  %157 = load i32, ptr %135, align 4, !tbaa !17
  %.not212253 = icmp sgt i32 %157, %16
  br i1 %.not212253, label %.loopexit222, label %.lr.ph256

.lr.ph256:                                        ; preds = %156
  %158 = load ptr, ptr %130, align 8, !tbaa !33
  %159 = sext i32 %157 to i64
  %160 = sub i32 %16, %157
  %161 = zext i32 %160 to i64
  %162 = add nuw nsw i64 %161, 1
  %min.iters.check347 = icmp ult i32 %160, 7
  br i1 %min.iters.check347, label %scalar.ph346.preheader, label %vector.ph348

vector.ph348:                                     ; preds = %.lr.ph256
  %n.vec350 = and i64 %162, 8589934584
  %ind.end = add nsw i64 %n.vec350, %159
  %invariant.gep = getelementptr i32, ptr %158, i64 %159
  br label %vector.body352

vector.body352:                                   ; preds = %vector.body352, %vector.ph348
  %index353 = phi i64 [ 0, %vector.ph348 ], [ %index.next355, %vector.body352 ]
  %gep = getelementptr i32, ptr %invariant.gep, i64 %index353
  %163 = getelementptr inbounds i8, ptr %gep, i64 16
  %wide.load = load <4 x i32>, ptr %gep, align 4, !tbaa !17
  %wide.load354 = load <4 x i32>, ptr %163, align 4, !tbaa !17
  %164 = add nsw <4 x i32> %wide.load, <i32 1, i32 1, i32 1, i32 1>
  %165 = add nsw <4 x i32> %wide.load354, <i32 1, i32 1, i32 1, i32 1>
  store <4 x i32> %164, ptr %gep, align 4, !tbaa !17
  store <4 x i32> %165, ptr %163, align 4, !tbaa !17
  %index.next355 = add nuw i64 %index353, 8
  %166 = icmp eq i64 %index.next355, %n.vec350
  br i1 %166, label %middle.block345, label %vector.body352, !llvm.loop !40

middle.block345:                                  ; preds = %vector.body352
  %cmp.n356 = icmp eq i64 %162, %n.vec350
  br i1 %cmp.n356, label %.loopexit222, label %scalar.ph346.preheader

scalar.ph346.preheader:                           ; preds = %middle.block345, %.lr.ph256
  %indvars.iv303.ph = phi i64 [ %159, %.lr.ph256 ], [ %ind.end, %middle.block345 ]
  br label %scalar.ph346

scalar.ph346:                                     ; preds = %scalar.ph346.preheader, %scalar.ph346
  %indvars.iv303 = phi i64 [ %indvars.iv.next304, %scalar.ph346 ], [ %indvars.iv303.ph, %scalar.ph346.preheader ]
  %167 = getelementptr inbounds i32, ptr %158, i64 %indvars.iv303
  %168 = load i32, ptr %167, align 4, !tbaa !17
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %167, align 4, !tbaa !17
  %indvars.iv.next304 = add nsw i64 %indvars.iv303, 1
  %lftr.wideiv306 = trunc i64 %indvars.iv.next304 to i32
  %exitcond307.not = icmp eq i32 %17, %lftr.wideiv306
  br i1 %exitcond307.not, label %.loopexit222, label %scalar.ph346, !llvm.loop !41

170:                                              ; preds = %.lr.ph258
  %171 = sext i32 %154 to i64
  %172 = getelementptr inbounds i32, ptr %135, i64 %171
  %173 = load i32, ptr %172, align 4, !tbaa !17
  %174 = load i32, ptr %135, align 4, !tbaa !17
  %175 = icmp slt i32 %173, %174
  br i1 %175, label %176, label %.loopexit222

176:                                              ; preds = %170
  %177 = load ptr, ptr %130, align 8, !tbaa !33
  %178 = sext i32 %173 to i64
  %179 = getelementptr inbounds i32, ptr %177, i64 %178
  %180 = load i32, ptr %179, align 4, !tbaa !17
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %179, align 4, !tbaa !17
  br label %.loopexit222

.loopexit222:                                     ; preds = %scalar.ph346, %middle.block345, %156, %170, %176
  %182 = load i32, ptr %153, align 4, !tbaa !38
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds i32, ptr %135, i64 %183
  %185 = getelementptr inbounds i8, ptr %153, i64 4
  %186 = load i32, ptr %185, align 4, !tbaa !42
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds i32, ptr %135, i64 %187
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %184, ptr noundef nonnull align 4 dereferenceable(4) %188) #12
  %indvars.iv.next309 = add nuw nsw i64 %indvars.iv308, 1
  %exitcond312.not = icmp eq i64 %indvars.iv.next309, %wide.trip.count311
  br i1 %exitcond312.not, label %.preheader221, label %.lr.ph258, !llvm.loop !43

.preheader219:                                    ; preds = %.loopexit220
  br i1 %.not236, label %.preheader217, label %.lr.ph264

.lr.ph264:                                        ; preds = %.preheader219
  %189 = load ptr, ptr %130, align 8, !tbaa !33
  %wide.trip.count321 = zext i32 %17 to i64
  %min.iters.check359 = icmp ult i32 %17, 8
  %190 = ptrtoint ptr %189 to i64
  %191 = sub i64 %190, %136
  %diff.check = icmp ult i64 %191, 32
  %or.cond = select i1 %min.iters.check359, i1 true, i1 %diff.check
  br i1 %or.cond, label %scalar.ph358.preheader, label %vector.ph360

scalar.ph358.preheader:                           ; preds = %middle.block357, %.lr.ph264
  %indvars.iv318.ph = phi i64 [ 0, %.lr.ph264 ], [ %n.vec362, %middle.block357 ]
  %xtraiter = and i64 %wide.trip.count316, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph358.prol.loopexit, label %scalar.ph358.prol

scalar.ph358.prol:                                ; preds = %scalar.ph358.preheader, %scalar.ph358.prol
  %indvars.iv318.prol = phi i64 [ %indvars.iv.next319.prol, %scalar.ph358.prol ], [ %indvars.iv318.ph, %scalar.ph358.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph358.prol ], [ 0, %scalar.ph358.preheader ]
  %192 = getelementptr inbounds i32, ptr %135, i64 %indvars.iv318.prol
  %193 = trunc i64 %indvars.iv318.prol to i32
  %194 = sub i32 %16, %193
  store i32 %194, ptr %192, align 4, !tbaa !17
  %195 = getelementptr inbounds i32, ptr %189, i64 %indvars.iv318.prol
  store i32 1, ptr %195, align 4, !tbaa !17
  %indvars.iv.next319.prol = add nuw nsw i64 %indvars.iv318.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph358.prol.loopexit, label %scalar.ph358.prol, !llvm.loop !44

scalar.ph358.prol.loopexit:                       ; preds = %scalar.ph358.prol, %scalar.ph358.preheader
  %indvars.iv318.unr = phi i64 [ %indvars.iv318.ph, %scalar.ph358.preheader ], [ %indvars.iv.next319.prol, %scalar.ph358.prol ]
  %196 = sub nsw i64 %indvars.iv318.ph, %wide.trip.count316
  %197 = icmp ugt i64 %196, -4
  br i1 %197, label %.preheader218, label %scalar.ph358

vector.ph360:                                     ; preds = %.lr.ph264
  %n.vec362 = and i64 %wide.trip.count316, 4294967288
  %broadcast.splatinsert370 = insertelement <4 x i32> poison, i32 %16, i64 0
  %broadcast.splat371 = shufflevector <4 x i32> %broadcast.splatinsert370, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body364

vector.body364:                                   ; preds = %vector.body364, %vector.ph360
  %index365 = phi i64 [ 0, %vector.ph360 ], [ %index.next372, %vector.body364 ]
  %vec.ind366 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph360 ], [ %vec.ind.next369, %vector.body364 ]
  %step.add367 = add <4 x i32> %vec.ind366, <i32 4, i32 4, i32 4, i32 4>
  %198 = getelementptr inbounds i32, ptr %135, i64 %index365
  %199 = sub <4 x i32> %broadcast.splat371, %vec.ind366
  %200 = sub <4 x i32> %broadcast.splat371, %step.add367
  %201 = getelementptr inbounds i8, ptr %198, i64 16
  store <4 x i32> %199, ptr %198, align 4, !tbaa !17
  store <4 x i32> %200, ptr %201, align 4, !tbaa !17
  %202 = getelementptr inbounds i32, ptr %189, i64 %index365
  %203 = getelementptr inbounds i8, ptr %202, i64 16
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %202, align 4, !tbaa !17
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %203, align 4, !tbaa !17
  %index.next372 = add nuw i64 %index365, 8
  %vec.ind.next369 = add <4 x i32> %vec.ind366, <i32 8, i32 8, i32 8, i32 8>
  %204 = icmp eq i64 %index.next372, %n.vec362
  br i1 %204, label %middle.block357, label %vector.body364, !llvm.loop !46

middle.block357:                                  ; preds = %vector.body364
  %cmp.n373 = icmp eq i64 %n.vec362, %wide.trip.count316
  br i1 %cmp.n373, label %.preheader218, label %scalar.ph358.preheader

.lr.ph261:                                        ; preds = %.lr.ph261.preheader, %.loopexit220
  %indvars.iv313 = phi i64 [ 0, %.lr.ph261.preheader ], [ %indvars.iv.next314, %.loopexit220 ]
  %205 = load ptr, ptr %130, align 8, !tbaa !33
  %206 = getelementptr inbounds i32, ptr %205, i64 %indvars.iv313
  %207 = load i32, ptr %206, align 4, !tbaa !17
  %208 = sext i32 %207 to i64
  %209 = icmp slt i32 %207, 0
  %210 = shl nsw i64 %208, 5
  %211 = select i1 %209, i64 -1, i64 %210
  %212 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %211) #13
          to label %213 unwind label %223

213:                                              ; preds = %.lr.ph261
  %214 = icmp eq i32 %207, 0
  br i1 %214, label %.loopexit220, label %215

215:                                              ; preds = %213
  %216 = getelementptr inbounds %struct.TCandidate, ptr %212, i64 %208
  br label %217

217:                                              ; preds = %217, %215
  %218 = phi ptr [ %212, %215 ], [ %219, %217 ]
  call void @_ZN10TCandidateC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %218)
  %219 = getelementptr inbounds i8, ptr %218, i64 32
  %220 = icmp eq ptr %219, %216
  br i1 %220, label %.loopexit220, label %217

.loopexit220:                                     ; preds = %217, %213
  %221 = load ptr, ptr %87, align 8, !tbaa !28
  %222 = getelementptr inbounds ptr, ptr %221, i64 %indvars.iv313
  store ptr %212, ptr %222, align 8, !tbaa !16
  %indvars.iv.next314 = add nuw nsw i64 %indvars.iv313, 1
  %exitcond317.not = icmp eq i64 %indvars.iv.next314, %wide.trip.count316
  br i1 %exitcond317.not, label %.preheader219, label %.lr.ph261, !llvm.loop !47

223:                                              ; preds = %.lr.ph261
  %224 = landingpad { ptr, i32 }
          cleanup
  br label %439

.preheader218:                                    ; preds = %scalar.ph358.prol.loopexit, %scalar.ph358, %middle.block357
  br i1 %.not236, label %.preheader217, label %.lr.ph267

.lr.ph267:                                        ; preds = %.preheader218
  %225 = getelementptr inbounds i8, ptr %0, i64 8
  %wide.trip.count326 = zext i32 %17 to i64
  br label %243

scalar.ph358:                                     ; preds = %scalar.ph358.prol.loopexit, %scalar.ph358
  %indvars.iv318 = phi i64 [ %indvars.iv.next319.3, %scalar.ph358 ], [ %indvars.iv318.unr, %scalar.ph358.prol.loopexit ]
  %226 = getelementptr inbounds i32, ptr %135, i64 %indvars.iv318
  %227 = trunc i64 %indvars.iv318 to i32
  %228 = sub i32 %16, %227
  store i32 %228, ptr %226, align 4, !tbaa !17
  %229 = getelementptr inbounds i32, ptr %189, i64 %indvars.iv318
  store i32 1, ptr %229, align 4, !tbaa !17
  %indvars.iv.next319 = add nuw nsw i64 %indvars.iv318, 1
  %230 = getelementptr inbounds i32, ptr %135, i64 %indvars.iv.next319
  %231 = trunc i64 %indvars.iv.next319 to i32
  %232 = sub i32 %16, %231
  store i32 %232, ptr %230, align 4, !tbaa !17
  %233 = getelementptr inbounds i32, ptr %189, i64 %indvars.iv.next319
  store i32 1, ptr %233, align 4, !tbaa !17
  %indvars.iv.next319.1 = add nuw nsw i64 %indvars.iv318, 2
  %234 = getelementptr inbounds i32, ptr %135, i64 %indvars.iv.next319.1
  %235 = trunc i64 %indvars.iv.next319.1 to i32
  %236 = sub i32 %16, %235
  store i32 %236, ptr %234, align 4, !tbaa !17
  %237 = getelementptr inbounds i32, ptr %189, i64 %indvars.iv.next319.1
  store i32 1, ptr %237, align 4, !tbaa !17
  %indvars.iv.next319.2 = add nuw nsw i64 %indvars.iv318, 3
  %238 = getelementptr inbounds i32, ptr %135, i64 %indvars.iv.next319.2
  %239 = trunc i64 %indvars.iv.next319.2 to i32
  %240 = sub i32 %16, %239
  store i32 %240, ptr %238, align 4, !tbaa !17
  %241 = getelementptr inbounds i32, ptr %189, i64 %indvars.iv.next319.2
  store i32 1, ptr %241, align 4, !tbaa !17
  %indvars.iv.next319.3 = add nuw nsw i64 %indvars.iv318, 4
  %exitcond322.not.3 = icmp eq i64 %indvars.iv.next319.3, %wide.trip.count321
  br i1 %exitcond322.not.3, label %.preheader218, label %scalar.ph358, !llvm.loop !48

.preheader217:                                    ; preds = %255, %.preheader221, %.preheader219, %.preheader218
  br i1 %144, label %.lr.ph273, label %.preheader

.lr.ph273:                                        ; preds = %.preheader217
  %242 = getelementptr inbounds i8, ptr %0, i64 8
  %wide.trip.count336 = zext nneg i32 %.0176.lcssa to i64
  br label %264

243:                                              ; preds = %.lr.ph267, %255
  %indvars.iv323 = phi i64 [ 0, %.lr.ph267 ], [ %indvars.iv.next324, %255 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #12
  %244 = trunc i64 %indvars.iv323 to i32
  %245 = add i32 %244, -1
  store i32 %245, ptr %12, align 4, !tbaa !17
  %246 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %135)
  %247 = load i32, ptr %246, align 4, !tbaa !17
  %248 = invoke noundef double @_ZN11FenwickTree12GetPrefixSumEi(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %247)
          to label %249 unwind label %259

249:                                              ; preds = %243
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #12
  store i32 %245, ptr %13, align 4, !tbaa !17
  %250 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %135)
  %251 = load i32, ptr %250, align 4, !tbaa !17
  %252 = invoke noundef double @_ZN11FenwickTree12GetPrefixSumEi(ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef %251)
          to label %253 unwind label %261

253:                                              ; preds = %249
  %254 = load double, ptr %225, align 8, !tbaa !49
  invoke void @_Z13MakeCandidateddd(ptr dead_on_unwind nonnull writable sret(%struct.TCandidate) align 8 %11, double noundef %248, double noundef %252, double noundef %254)
          to label %255 unwind label %261

255:                                              ; preds = %253
  %256 = load ptr, ptr %87, align 8, !tbaa !28
  %257 = getelementptr inbounds ptr, ptr %256, i64 %indvars.iv323
  %258 = load ptr, ptr %257, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %258, ptr noundef nonnull align 8 dereferenceable(32) %11, i64 32, i1 false), !tbaa.struct !50
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #12
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #12
  %indvars.iv.next324 = add nuw nsw i64 %indvars.iv323, 1
  %exitcond327.not = icmp eq i64 %indvars.iv.next324, %wide.trip.count326
  br i1 %exitcond327.not, label %.preheader217, label %243, !llvm.loop !51

259:                                              ; preds = %243
  %260 = landingpad { ptr, i32 }
          cleanup
  br label %263

261:                                              ; preds = %253, %249
  %262 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #12
  br label %263

263:                                              ; preds = %261, %259
  %.pn208 = phi { ptr, i32 } [ %262, %261 ], [ %260, %259 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #12
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #12
  br label %439

.preheader:                                       ; preds = %.loopexit, %.preheader217
  br i1 %.not236, label %._crit_edge277, label %.lr.ph276.preheader

.lr.ph276.preheader:                              ; preds = %.preheader
  %wide.trip.count341 = zext i32 %17 to i64
  br label %.lr.ph276

264:                                              ; preds = %.lr.ph273, %.loopexit
  %indvars.iv333 = phi i64 [ 0, %.lr.ph273 ], [ %indvars.iv.next334, %.loopexit ]
  %265 = getelementptr inbounds %struct.TCrossPoint, ptr %44, i64 %indvars.iv333
  %266 = getelementptr inbounds i8, ptr %265, i64 4
  %267 = load i32, ptr %266, align 4, !tbaa !42
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds i32, ptr %135, i64 %268
  %270 = load i32, ptr %269, align 4, !tbaa !17
  %271 = add nsw i32 %270, 1
  %272 = load i32, ptr %265, align 4, !tbaa !38
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds i32, ptr %135, i64 %273
  %275 = load i32, ptr %274, align 4, !tbaa !17
  %276 = icmp eq i32 %271, %275
  br i1 %276, label %278, label %277

277:                                              ; preds = %264
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 133, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5TNest20GenerateCandidateSetEv) #15
  unreachable

278:                                              ; preds = %264
  %279 = load ptr, ptr %2, align 8, !tbaa !16
  %280 = getelementptr inbounds %"struct.std::pair", ptr %279, i64 %273
  %281 = load double, ptr %280, align 8, !tbaa !25
  %282 = fneg double %281
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %271, double noundef %282)
          to label %283 unwind label %364

283:                                              ; preds = %278
  %284 = load i32, ptr %265, align 4, !tbaa !38
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds i32, ptr %135, i64 %285
  %287 = load i32, ptr %286, align 4, !tbaa !17
  %288 = load ptr, ptr %2, align 8, !tbaa !16
  %289 = load i32, ptr %266, align 4, !tbaa !42
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds %"struct.std::pair", ptr %288, i64 %290
  %292 = load double, ptr %291, align 8, !tbaa !25
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %287, double noundef %292)
          to label %293 unwind label %364

293:                                              ; preds = %283
  %294 = load i32, ptr %266, align 4, !tbaa !42
  %295 = sext i32 %294 to i64
  %296 = getelementptr inbounds i32, ptr %135, i64 %295
  %297 = load i32, ptr %296, align 4, !tbaa !17
  %298 = load ptr, ptr %2, align 8, !tbaa !16
  %299 = getelementptr inbounds %"struct.std::pair", ptr %298, i64 %295
  %300 = load double, ptr %299, align 8, !tbaa !25
  %301 = fneg double %300
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %297, double noundef %301)
          to label %302 unwind label %364

302:                                              ; preds = %293
  %303 = load i32, ptr %266, align 4, !tbaa !42
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds i32, ptr %135, i64 %304
  %306 = load i32, ptr %305, align 4, !tbaa !17
  %307 = load ptr, ptr %2, align 8, !tbaa !16
  %308 = load i32, ptr %265, align 4, !tbaa !38
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds %"struct.std::pair", ptr %307, i64 %309
  %311 = load double, ptr %310, align 8, !tbaa !25
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %306, double noundef %311)
          to label %312 unwind label %364

312:                                              ; preds = %302
  %313 = load i32, ptr %265, align 4, !tbaa !38
  %314 = sext i32 %313 to i64
  %315 = getelementptr inbounds i32, ptr %135, i64 %314
  %316 = load i32, ptr %315, align 4, !tbaa !17
  %317 = load ptr, ptr %2, align 8, !tbaa !16
  %318 = getelementptr inbounds %"struct.std::pair", ptr %317, i64 %314, i32 1
  %319 = load double, ptr %318, align 8, !tbaa !30
  %320 = fneg double %319
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef %316, double noundef %320)
          to label %321 unwind label %364

321:                                              ; preds = %312
  %322 = load i32, ptr %265, align 4, !tbaa !38
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds i32, ptr %135, i64 %323
  %325 = load i32, ptr %324, align 4, !tbaa !17
  %326 = load ptr, ptr %2, align 8, !tbaa !16
  %327 = load i32, ptr %266, align 4, !tbaa !42
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds %"struct.std::pair", ptr %326, i64 %328, i32 1
  %330 = load double, ptr %329, align 8, !tbaa !30
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef %325, double noundef %330)
          to label %331 unwind label %364

331:                                              ; preds = %321
  %332 = load i32, ptr %266, align 4, !tbaa !42
  %333 = sext i32 %332 to i64
  %334 = getelementptr inbounds i32, ptr %135, i64 %333
  %335 = load i32, ptr %334, align 4, !tbaa !17
  %336 = load ptr, ptr %2, align 8, !tbaa !16
  %337 = getelementptr inbounds %"struct.std::pair", ptr %336, i64 %333, i32 1
  %338 = load double, ptr %337, align 8, !tbaa !30
  %339 = fneg double %338
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef %335, double noundef %339)
          to label %340 unwind label %364

340:                                              ; preds = %331
  %341 = load i32, ptr %266, align 4, !tbaa !42
  %342 = sext i32 %341 to i64
  %343 = getelementptr inbounds i32, ptr %135, i64 %342
  %344 = load i32, ptr %343, align 4, !tbaa !17
  %345 = load ptr, ptr %2, align 8, !tbaa !16
  %346 = load i32, ptr %265, align 4, !tbaa !38
  %347 = sext i32 %346 to i64
  %348 = getelementptr inbounds %"struct.std::pair", ptr %345, i64 %347, i32 1
  %349 = load double, ptr %348, align 8, !tbaa !30
  invoke void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef %344, double noundef %349)
          to label %350 unwind label %364

350:                                              ; preds = %340
  %351 = load i32, ptr %265, align 4, !tbaa !38
  %352 = icmp eq i32 %351, 0
  br i1 %352, label %353, label %383

353:                                              ; preds = %350
  %354 = load i32, ptr %135, align 4, !tbaa !17
  %355 = add nsw i32 %354, -1
  %356 = invoke noundef double @_ZN11FenwickTree12GetPrefixSumEi(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %355)
          to label %357 unwind label %366

357:                                              ; preds = %353
  %358 = load i32, ptr %135, align 4, !tbaa !17
  %359 = add nsw i32 %358, -1
  %360 = invoke noundef double @_ZN11FenwickTree12GetPrefixSumEi(ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef %359)
          to label %361 unwind label %368

361:                                              ; preds = %357
  %362 = load i32, ptr %135, align 4, !tbaa !17
  %.not204268 = icmp sgt i32 %362, %16
  br i1 %.not204268, label %.loopexit, label %.lr.ph271.preheader

.lr.ph271.preheader:                              ; preds = %361
  %363 = sext i32 %362 to i64
  br label %.lr.ph271

364:                                              ; preds = %340, %331, %321, %312, %302, %293, %283, %278
  %365 = landingpad { ptr, i32 }
          cleanup
  br label %439

366:                                              ; preds = %353
  %367 = landingpad { ptr, i32 }
          cleanup
  br label %439

368:                                              ; preds = %357
  %369 = landingpad { ptr, i32 }
          cleanup
  br label %439

.lr.ph271:                                        ; preds = %.lr.ph271.preheader, %371
  %indvars.iv328 = phi i64 [ %363, %.lr.ph271.preheader ], [ %indvars.iv.next329, %371 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #12
  %370 = load double, ptr %242, align 8, !tbaa !49
  invoke void @_Z13MakeCandidateddd(ptr dead_on_unwind nonnull writable sret(%struct.TCandidate) align 8 %14, double noundef %356, double noundef %360, double noundef %370)
          to label %371 unwind label %381

371:                                              ; preds = %.lr.ph271
  %372 = load ptr, ptr %87, align 8, !tbaa !28
  %373 = getelementptr inbounds ptr, ptr %372, i64 %indvars.iv328
  %374 = load ptr, ptr %373, align 8, !tbaa !16
  %375 = load ptr, ptr %130, align 8, !tbaa !33
  %376 = getelementptr inbounds i32, ptr %375, i64 %indvars.iv328
  %377 = load i32, ptr %376, align 4, !tbaa !17
  %378 = add nsw i32 %377, 1
  store i32 %378, ptr %376, align 4, !tbaa !17
  %379 = sext i32 %377 to i64
  %380 = getelementptr inbounds %struct.TCandidate, ptr %374, i64 %379
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %380, ptr noundef nonnull align 8 dereferenceable(32) %14, i64 32, i1 false), !tbaa.struct !50
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #12
  %indvars.iv.next329 = add nsw i64 %indvars.iv328, 1
  %lftr.wideiv331 = trunc i64 %indvars.iv.next329 to i32
  %exitcond332.not = icmp eq i32 %17, %lftr.wideiv331
  br i1 %exitcond332.not, label %.loopexit, label %.lr.ph271, !llvm.loop !52

381:                                              ; preds = %.lr.ph271
  %382 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #12
  br label %439

383:                                              ; preds = %350
  %384 = sext i32 %351 to i64
  %385 = getelementptr inbounds i32, ptr %135, i64 %384
  %386 = load i32, ptr %385, align 4, !tbaa !17
  %387 = load i32, ptr %135, align 4, !tbaa !17
  %388 = icmp slt i32 %386, %387
  br i1 %388, label %389, label %.loopexit

389:                                              ; preds = %383
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #12
  %390 = add nsw i32 %386, -1
  %391 = invoke noundef double @_ZN11FenwickTree12GetPrefixSumEi(ptr noundef nonnull align 8 dereferenceable(16) %9, i32 noundef %390)
          to label %392 unwind label %416

392:                                              ; preds = %389
  %393 = load i32, ptr %265, align 4, !tbaa !38
  %394 = sext i32 %393 to i64
  %395 = getelementptr inbounds i32, ptr %135, i64 %394
  %396 = load i32, ptr %395, align 4, !tbaa !17
  %397 = add nsw i32 %396, -1
  %398 = invoke noundef double @_ZN11FenwickTree12GetPrefixSumEi(ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef %397)
          to label %399 unwind label %416

399:                                              ; preds = %392
  %400 = load double, ptr %242, align 8, !tbaa !49
  invoke void @_Z13MakeCandidateddd(ptr dead_on_unwind nonnull writable sret(%struct.TCandidate) align 8 %15, double noundef %391, double noundef %398, double noundef %400)
          to label %401 unwind label %416

401:                                              ; preds = %399
  %402 = load ptr, ptr %87, align 8, !tbaa !28
  %403 = load i32, ptr %265, align 4, !tbaa !38
  %404 = sext i32 %403 to i64
  %405 = getelementptr inbounds i32, ptr %135, i64 %404
  %406 = load i32, ptr %405, align 4, !tbaa !17
  %407 = sext i32 %406 to i64
  %408 = getelementptr inbounds ptr, ptr %402, i64 %407
  %409 = load ptr, ptr %408, align 8, !tbaa !16
  %410 = load ptr, ptr %130, align 8, !tbaa !33
  %411 = getelementptr inbounds i32, ptr %410, i64 %407
  %412 = load i32, ptr %411, align 4, !tbaa !17
  %413 = add nsw i32 %412, 1
  store i32 %413, ptr %411, align 4, !tbaa !17
  %414 = sext i32 %412 to i64
  %415 = getelementptr inbounds %struct.TCandidate, ptr %409, i64 %414
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %415, ptr noundef nonnull align 8 dereferenceable(32) %15, i64 32, i1 false), !tbaa.struct !50
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #12
  br label %.loopexit

416:                                              ; preds = %399, %392, %389
  %417 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #12
  br label %439

.loopexit:                                        ; preds = %371, %361, %383, %401
  %418 = load i32, ptr %265, align 4, !tbaa !38
  %419 = sext i32 %418 to i64
  %420 = getelementptr inbounds i32, ptr %135, i64 %419
  %421 = load i32, ptr %266, align 4, !tbaa !42
  %422 = sext i32 %421 to i64
  %423 = getelementptr inbounds i32, ptr %135, i64 %422
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %420, ptr noundef nonnull align 4 dereferenceable(4) %423) #12
  %indvars.iv.next334 = add nuw nsw i64 %indvars.iv333, 1
  %exitcond337.not = icmp eq i64 %indvars.iv.next334, %wide.trip.count336
  br i1 %exitcond337.not, label %.preheader, label %264, !llvm.loop !53

.lr.ph276:                                        ; preds = %.lr.ph276.preheader, %432
  %indvars.iv338 = phi i64 [ 0, %.lr.ph276.preheader ], [ %indvars.iv.next339, %432 ]
  %424 = load ptr, ptr %87, align 8, !tbaa !28
  %425 = getelementptr inbounds ptr, ptr %424, i64 %indvars.iv338
  %426 = load ptr, ptr %425, align 8, !tbaa !16
  %427 = load ptr, ptr %130, align 8, !tbaa !33
  %428 = getelementptr inbounds i32, ptr %427, i64 %indvars.iv338
  %429 = load i32, ptr %428, align 4, !tbaa !17
  %430 = sext i32 %429 to i64
  %431 = getelementptr inbounds %struct.TCandidate, ptr %426, i64 %430
  invoke void @_ZSt4sortIP10TCandidateEvT_S2_(ptr noundef %426, ptr noundef %431)
          to label %432 unwind label %433

432:                                              ; preds = %.lr.ph276
  %indvars.iv.next339 = add nuw nsw i64 %indvars.iv338, 1
  %exitcond342.not = icmp eq i64 %indvars.iv.next339, %wide.trip.count341
  br i1 %exitcond342.not, label %._crit_edge277, label %.lr.ph276, !llvm.loop !54

433:                                              ; preds = %.lr.ph276
  %434 = landingpad { ptr, i32 }
          cleanup
  br label %439

._crit_edge277:                                   ; preds = %432, %.preheader
  call void @_ZdlPvm(ptr noundef nonnull %135, i64 noundef 4) #14
  %435 = load ptr, ptr %2, align 8, !tbaa !16
  %436 = icmp eq ptr %435, null
  br i1 %436, label %438, label %437

437:                                              ; preds = %._crit_edge277
  call void @_ZdlPvm(ptr noundef nonnull %435, i64 noundef 16) #14
  br label %438

438:                                              ; preds = %._crit_edge277, %437
  call void @_ZdlPvm(ptr noundef nonnull %44, i64 noundef 8) #14
  call void @_ZN11FenwickTreeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #12
  call void @_ZN11FenwickTreeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #12
  ret void

439:                                              ; preds = %147, %223, %263, %433, %366, %381, %368, %416, %364, %145, %104
  %.pn213 = phi { ptr, i32 } [ %105, %104 ], [ %146, %145 ], [ %224, %223 ], [ %.pn208, %263 ], [ %434, %433 ], [ %148, %147 ], [ %417, %416 ], [ %365, %364 ], [ %367, %366 ], [ %382, %381 ], [ %369, %368 ]
  call void @_ZN11FenwickTreeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #12
  br label %440

440:                                              ; preds = %439, %92
  %.pn213.pn = phi { ptr, i32 } [ %.pn213, %439 ], [ %93, %92 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #12
  call void @_ZN11FenwickTreeD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #12
  resume { ptr, i32 } %.pn213.pn
}

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #3

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIddEaSIiiEENSt9enable_ifIXsr6__and_ISt13is_assignableIRdOT_ES3_IS4_OT0_EEE5valueERS0_E4typeEOS_IS5_S8_E(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #4 align 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: mustprogress uwtable
declare dso_local { double, double } @_ZSt9make_pairIRddESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPSt4pairIddEEvT_S3_(ptr noundef, ptr noundef) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress 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) #6

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIP11TCrossPointZN5TNest20GenerateCandidateSetEvE3$_0EvT_S4_T0_"(ptr noundef, ptr noundef, ptr) local_unnamed_addr #5

declare void @_ZN11FenwickTreeC1Ei(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) unnamed_addr #7

declare void @_ZN11FenwickTree10MakeChangeEid(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, double noundef) local_unnamed_addr #7

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #8

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

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

declare noundef double @_ZN11FenwickTree12GetPrefixSumEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #9

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #10

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP10TCandidateEvT_S2_(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind
declare void @_ZN11FenwickTreeD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #11

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { nobuiltin allocsize(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 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 = { 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { "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 #8 = { nobuiltin 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 #9 = { 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 #10 = { 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 #11 = { 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 #12 = { nounwind }
attributes #13 = { builtin allocsize(0) }
attributes #14 = { builtin nounwind }
attributes #15 = { 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, !7, i64 0}
!6 = !{!"_ZTS5TNest", !7, i64 0, !10, i64 8, !11, i64 16, !15, i64 40, !15, i64 48, !7, i64 56, !15, i64 64, !15, i64 72, !7, i64 80}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"_ZTSSt6vectorI8TProductSaIS0_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseI8TProductSaIS0_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseI8TProductSaIS0_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseI8TProductSaIS0_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!15 = !{!"any pointer", !8, i64 0}
!16 = !{!15, !15, i64 0}
!17 = !{!7, !7, i64 0}
!18 = !{!19, !10, i64 0}
!19 = !{!"_ZTS8TProduct", !10, i64 0, !10, i64 8}
!20 = !{!19, !10, i64 8}
!21 = !{!10, !10, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = !{!26, !10, i64 0}
!26 = !{!"_ZTSSt4pairIddE", !10, i64 0, !10, i64 8}
!27 = distinct !{!27, !23}
!28 = !{!6, !15, i64 40}
!29 = !{!6, !7, i64 56}
!30 = !{!26, !10, i64 8}
!31 = distinct !{!31, !23}
!32 = distinct !{!32, !23}
!33 = !{!6, !15, i64 48}
!34 = distinct !{!34, !23, !35, !36}
!35 = !{!"llvm.loop.isvectorized", i32 1}
!36 = !{!"llvm.loop.unroll.runtime.disable"}
!37 = distinct !{!37, !23, !36, !35}
!38 = !{!39, !7, i64 0}
!39 = !{!"_ZTS11TCrossPoint", !7, i64 0, !7, i64 4}
!40 = distinct !{!40, !23, !35, !36}
!41 = distinct !{!41, !23, !36, !35}
!42 = !{!39, !7, i64 4}
!43 = distinct !{!43, !23}
!44 = distinct !{!44, !45}
!45 = !{!"llvm.loop.unroll.disable"}
!46 = distinct !{!46, !23, !35, !36}
!47 = distinct !{!47, !23}
!48 = distinct !{!48, !23, !35}
!49 = !{!6, !10, i64 8}
!50 = !{i64 0, i64 8, !21, i64 8, i64 8, !21, i64 16, i64 8, !21, i64 24, i64 8, !21}
!51 = distinct !{!51, !23}
!52 = distinct !{!52, !23}
!53 = distinct !{!53, !23}
!54 = distinct !{!54, !23}


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