; LLVM IR from Tian-Xie/NLS :: NestPiecewiseLinearGenerator.ll (ZN5TNest23GeneratePiecewiseLinearEi)

; 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.std::pair" = type { i32, double }
%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.TCandidate = type { double, double, double, double }

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

55:                                               ; preds = %69, %2
  %56 = load i32, ptr %8, align 4, !tbaa !9
  %57 = load i32, ptr %5, align 4, !tbaa !9
  %58 = icmp sle i32 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %72

60:                                               ; preds = %55
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = load i32, ptr %8, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds i32, ptr %61, i64 %63
  store i32 0, ptr %64, align 4, !tbaa !9
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = load i32, ptr %8, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds ptr, ptr %65, i64 %67
  store ptr null, ptr %68, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %60
  %70 = load i32, ptr %8, align 4, !tbaa !9
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %8, align 4, !tbaa !9
  br label %55, !llvm.loop !18

72:                                               ; preds = %59
  %73 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 8
  %74 = load ptr, ptr %73, align 8, !tbaa !20
  %75 = icmp ne ptr %74, null
  br i1 %75, label %76, label %165

76:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %119, %76
  %78 = load i32, ptr %9, align 4, !tbaa !9
  %79 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 10
  %80 = load i32, ptr %79, align 8, !tbaa !21
  %81 = icmp slt i32 %78, %80
  br i1 %81, label %82, label %86

82:                                               ; preds = %77
  %83 = load i32, ptr %9, align 4, !tbaa !9
  %84 = load i32, ptr %5, align 4, !tbaa !9
  %85 = icmp sle i32 %83, %84
  br label %86

86:                                               ; preds = %82, %77
  %87 = phi i1 [ false, %77 ], [ %85, %82 ]
  br i1 %87, label %89, label %88

88:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %122

89:                                               ; preds = %86
  %90 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 9
  %91 = load ptr, ptr %90, align 8, !tbaa !22
  %92 = load i32, ptr %9, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds i32, ptr %91, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !9
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %97, label %118

97:                                               ; preds = %89
  %98 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 9
  %99 = load ptr, ptr %98, align 8, !tbaa !22
  %100 = load i32, ptr %9, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i32, ptr %99, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !9
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = load i32, ptr %9, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds i32, ptr %104, i64 %106
  store i32 %103, ptr %107, align 4, !tbaa !9
  %108 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 8
  %109 = load ptr, ptr %108, align 8, !tbaa !20
  %110 = load i32, ptr %9, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds ptr, ptr %109, i64 %111
  %113 = load ptr, ptr %112, align 8, !tbaa !5
  %114 = load ptr, ptr %7, align 8, !tbaa !5
  %115 = load i32, ptr %9, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds ptr, ptr %114, i64 %116
  store ptr %113, ptr %117, align 8, !tbaa !5
  br label %118

118:                                              ; preds = %97, %89
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %9, align 4, !tbaa !9
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %9, align 4, !tbaa !9
  br label %77, !llvm.loop !23

122:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %123 = load i32, ptr %5, align 4, !tbaa !9
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %10, align 4, !tbaa !9
  br label %125

125:                                              ; preds = %150, %122
  %126 = load i32, ptr %10, align 4, !tbaa !9
  %127 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 10
  %128 = load i32, ptr %127, align 8, !tbaa !21
  %129 = icmp slt i32 %126, %128
  br i1 %129, label %131, label %130

130:                                              ; preds = %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %153

131:                                              ; preds = %125
  %132 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 9
  %133 = load ptr, ptr %132, align 8, !tbaa !22
  %134 = load i32, ptr %10, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds i32, ptr %133, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !9
  %138 = icmp ne i32 %137, 0
  br i1 %138, label %139, label %149

139:                                              ; preds = %131
  %140 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 8
  %141 = load ptr, ptr %140, align 8, !tbaa !20
  %142 = load i32, ptr %10, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds ptr, ptr %141, i64 %143
  %145 = load ptr, ptr %144, align 8, !tbaa !5
  %146 = icmp eq ptr %145, null
  br i1 %146, label %148, label %147

147:                                              ; preds = %139
  call void @_ZdlPvm(ptr noundef %145, i64 noundef 16) #9
  br label %148

148:                                              ; preds = %147, %139
  br label %149

149:                                              ; preds = %148, %131
  br label %150

150:                                              ; preds = %149
  %151 = load i32, ptr %10, align 4, !tbaa !9
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %10, align 4, !tbaa !9
  br label %125, !llvm.loop !24

153:                                              ; preds = %130
  %154 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 8
  %155 = load ptr, ptr %154, align 8, !tbaa !20
  %156 = icmp eq ptr %155, null
  br i1 %156, label %158, label %157

157:                                              ; preds = %153
  call void @_ZdlPvm(ptr noundef %155, i64 noundef 8) #9
  br label %158

158:                                              ; preds = %157, %153
  %159 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 9
  %160 = load ptr, ptr %159, align 8, !tbaa !22
  %161 = icmp eq ptr %160, null
  br i1 %161, label %163, label %162

162:                                              ; preds = %158
  call void @_ZdlPvm(ptr noundef %160, i64 noundef 4) #9
  br label %163

163:                                              ; preds = %162, %158
  %164 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 8
  store ptr null, ptr %164, align 8, !tbaa !20
  br label %165

165:                                              ; preds = %163, %72
  %166 = load ptr, ptr %7, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 8
  store ptr %166, ptr %167, align 8, !tbaa !20
  %168 = load ptr, ptr %6, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 9
  store ptr %168, ptr %169, align 8, !tbaa !22
  %170 = load i32, ptr %5, align 4, !tbaa !9
  %171 = add nsw i32 %170, 1
  %172 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 10
  store i32 %171, ptr %172, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %173 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 0
  %174 = load i32, ptr %173, align 8, !tbaa !11
  store i32 %174, ptr %12, align 4, !tbaa !9
  %175 = load i32, ptr %4, align 4, !tbaa !9
  %176 = icmp ne i32 %175, -1
  br i1 %176, label %177, label %184

177:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !9
  %178 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %179 = load i32, ptr %178, align 4, !tbaa !9
  store i32 %179, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  %180 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 0
  %181 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %180)
  %182 = load i32, ptr %181, align 4, !tbaa !9
  store i32 %182, ptr %4, align 4, !tbaa !9
  %183 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %183, ptr %12, align 4, !tbaa !9
  store i32 %183, ptr %11, align 4, !tbaa !9
  br label %184

184:                                              ; preds = %177, %165
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %185 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %185, ptr %15, align 4, !tbaa !9
  br label %186

186:                                              ; preds = %199, %184
  %187 = load i32, ptr %15, align 4, !tbaa !9
  %188 = load i32, ptr %12, align 4, !tbaa !9
  %189 = icmp sle i32 %187, %188
  br i1 %189, label %191, label %190

190:                                              ; preds = %186
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %202

191:                                              ; preds = %186
  %192 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 5
  %193 = load ptr, ptr %192, align 8, !tbaa !25
  %194 = load i32, ptr %15, align 4, !tbaa !9
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds i32, ptr %193, i64 %195
  %197 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %196)
  %198 = load i32, ptr %197, align 4, !tbaa !9
  store i32 %198, ptr %14, align 4, !tbaa !9
  br label %199

199:                                              ; preds = %191
  %200 = load i32, ptr %15, align 4, !tbaa !9
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %15, align 4, !tbaa !9
  br label %186, !llvm.loop !26

202:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %203 = load i32, ptr %14, align 4, !tbaa !9
  %204 = sext i32 %203 to i64
  %205 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %204, i64 16)
  %206 = extractvalue { i64, i1 } %205, 1
  %207 = extractvalue { i64, i1 } %205, 0
  %208 = select i1 %206, i64 -1, i64 %207
  %209 = call noalias noundef nonnull ptr @_Znam(i64 noundef %208) #8
  %210 = icmp eq i64 %204, 0
  br i1 %210, label %218, label %211

211:                                              ; preds = %202
  %212 = getelementptr inbounds %"struct.std::pair", ptr %209, i64 %204
  br label %213

213:                                              ; preds = %215, %211
  %214 = phi ptr [ %209, %211 ], [ %216, %215 ]
  invoke void @_ZNSt4pairIidEC2IidTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %214)
          to label %215 unwind label %225

215:                                              ; preds = %213
  %216 = getelementptr inbounds %"struct.std::pair", ptr %214, i64 1
  %217 = icmp eq ptr %216, %212
  br i1 %217, label %218, label %213

218:                                              ; preds = %215, %202
  store ptr %209, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %219 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %219, ptr %19, align 4, !tbaa !9
  br label %220

220:                                              ; preds = %439, %218
  %221 = load i32, ptr %19, align 4, !tbaa !9
  %222 = load i32, ptr %12, align 4, !tbaa !9
  %223 = icmp sle i32 %221, %222
  br i1 %223, label %229, label %224

224:                                              ; preds = %220
  store i32 14, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %442

225:                                              ; preds = %213
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %17, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %18, align 4
  call void @_ZdaPvm(ptr noundef %209, i64 noundef %208) #9
  br label %447

229:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %230 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 4
  %231 = load ptr, ptr %230, align 8, !tbaa !27
  %232 = load i32, ptr %19, align 4, !tbaa !9
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds ptr, ptr %231, i64 %233
  %235 = load ptr, ptr %234, align 8, !tbaa !5
  store ptr %235, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %236 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 5
  %237 = load ptr, ptr %236, align 8, !tbaa !25
  %238 = load i32, ptr %19, align 4, !tbaa !9
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds i32, ptr %237, i64 %239
  %241 = load i32, ptr %240, align 4, !tbaa !9
  store i32 %241, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 1, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  store i32 0, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  store double -1.000000e+100, ptr %26, align 8, !tbaa !28
  %242 = call { i32, double } @_ZSt9make_pairIidESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 8 dereferenceable(8) %26)
  %243 = getelementptr inbounds { i32, double }, ptr %24, i32 0, i32 0
  %244 = extractvalue { i32, double } %242, 0
  store i32 %244, ptr %243, align 8
  %245 = getelementptr inbounds { i32, double }, ptr %24, i32 0, i32 1
  %246 = extractvalue { i32, double } %242, 1
  store double %246, ptr %245, align 8
  %247 = load ptr, ptr %16, align 8, !tbaa !5
  %248 = getelementptr inbounds %"struct.std::pair", ptr %247, i64 0
  %249 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIidEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %248, ptr noundef nonnull align 8 dereferenceable(16) %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  store i32 1, ptr %27, align 4, !tbaa !9
  br label %250

250:                                              ; preds = %380, %229
  %251 = load i32, ptr %27, align 4, !tbaa !9
  %252 = load i32, ptr %22, align 4, !tbaa !9
  %253 = icmp slt i32 %251, %252
  br i1 %253, label %255, label %254

254:                                              ; preds = %250
  store i32 17, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %383

255:                                              ; preds = %250
  %256 = load ptr, ptr %21, align 8, !tbaa !5
  %257 = load i32, ptr %27, align 4, !tbaa !9
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds %struct.TCandidate, ptr %256, i64 %258
  %260 = getelementptr inbounds %struct.TCandidate, ptr %259, i32 0, i32 3
  %261 = load double, ptr %260, align 8, !tbaa !29
  %262 = load ptr, ptr %21, align 8, !tbaa !5
  %263 = load i32, ptr %27, align 4, !tbaa !9
  %264 = sub nsw i32 %263, 1
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds %struct.TCandidate, ptr %262, i64 %265
  %267 = getelementptr inbounds %struct.TCandidate, ptr %266, i32 0, i32 3
  %268 = load double, ptr %267, align 8, !tbaa !29
  %269 = fsub double %261, %268
  %270 = call double @llvm.fabs.f64(double %269)
  %271 = fcmp olt double %270, 1.000000e-08
  br i1 %271, label %272, label %273

272:                                              ; preds = %255
  br label %380

273:                                              ; preds = %255
  br label %274

274:                                              ; preds = %333, %273
  %275 = load i32, ptr %23, align 4, !tbaa !9
  %276 = icmp sgt i32 %275, 1
  br i1 %276, label %277, label %334

277:                                              ; preds = %274
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %278 = load ptr, ptr %16, align 8, !tbaa !5
  %279 = load i32, ptr %23, align 4, !tbaa !9
  %280 = sub nsw i32 %279, 1
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds %"struct.std::pair", ptr %278, i64 %281
  %283 = getelementptr inbounds %"struct.std::pair", ptr %282, i32 0, i32 0
  %284 = load i32, ptr %283, align 8, !tbaa !31
  store i32 %284, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %285 = load ptr, ptr %16, align 8, !tbaa !5
  %286 = load i32, ptr %23, align 4, !tbaa !9
  %287 = sub nsw i32 %286, 1
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds %"struct.std::pair", ptr %285, i64 %288
  %290 = getelementptr inbounds %"struct.std::pair", ptr %289, i32 0, i32 1
  %291 = load double, ptr %290, align 8, !tbaa !33
  store double %291, ptr %29, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %292 = load ptr, ptr %21, align 8, !tbaa !5
  %293 = load i32, ptr %28, align 4, !tbaa !9
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds %struct.TCandidate, ptr %292, i64 %294
  %296 = getelementptr inbounds %struct.TCandidate, ptr %295, i32 0, i32 2
  %297 = load double, ptr %296, align 8, !tbaa !34
  %298 = load double, ptr %29, align 8, !tbaa !28
  %299 = load ptr, ptr %21, align 8, !tbaa !5
  %300 = load i32, ptr %28, align 4, !tbaa !9
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds %struct.TCandidate, ptr %299, i64 %301
  %303 = getelementptr inbounds %struct.TCandidate, ptr %302, i32 0, i32 3
  %304 = load double, ptr %303, align 8, !tbaa !29
  %305 = fneg double %298
  %306 = call double @llvm.fmuladd.f64(double %305, double %304, double %297)
  store double %306, ptr %30, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %307 = load ptr, ptr %21, align 8, !tbaa !5
  %308 = load i32, ptr %27, align 4, !tbaa !9
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds %struct.TCandidate, ptr %307, i64 %309
  %311 = getelementptr inbounds %struct.TCandidate, ptr %310, i32 0, i32 2
  %312 = load double, ptr %311, align 8, !tbaa !34
  %313 = load double, ptr %29, align 8, !tbaa !28
  %314 = load ptr, ptr %21, align 8, !tbaa !5
  %315 = load i32, ptr %27, align 4, !tbaa !9
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds %struct.TCandidate, ptr %314, i64 %316
  %318 = getelementptr inbounds %struct.TCandidate, ptr %317, i32 0, i32 3
  %319 = load double, ptr %318, align 8, !tbaa !29
  %320 = fneg double %313
  %321 = call double @llvm.fmuladd.f64(double %320, double %319, double %312)
  store double %321, ptr %31, align 8, !tbaa !28
  %322 = load double, ptr %30, align 8, !tbaa !28
  %323 = load double, ptr %31, align 8, !tbaa !28
  %324 = fadd double %323, 1.000000e-08
  %325 = fcmp ole double %322, %324
  br i1 %325, label %326, label %329

326:                                              ; preds = %277
  %327 = load i32, ptr %23, align 4, !tbaa !9
  %328 = add nsw i32 %327, -1
  store i32 %328, ptr %23, align 4, !tbaa !9
  br label %330

329:                                              ; preds = %277
  store i32 21, ptr %20, align 4
  br label %331

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

331:                                              ; preds = %330, %329
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  %332 = load i32, ptr %20, align 4
  switch i32 %332, label %453 [
    i32 0, label %333
    i32 21, label %334
  ]

333:                                              ; preds = %331
  br label %274, !llvm.loop !35

334:                                              ; preds = %331, %274
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  %335 = load ptr, ptr %16, align 8, !tbaa !5
  %336 = load i32, ptr %23, align 4, !tbaa !9
  %337 = sub nsw i32 %336, 1
  %338 = sext i32 %337 to i64
  %339 = getelementptr inbounds %"struct.std::pair", ptr %335, i64 %338
  %340 = getelementptr inbounds %"struct.std::pair", ptr %339, i32 0, i32 0
  %341 = load i32, ptr %340, align 8, !tbaa !31
  store i32 %341, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #7
  %342 = load ptr, ptr %21, align 8, !tbaa !5
  %343 = load i32, ptr %32, align 4, !tbaa !9
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds %struct.TCandidate, ptr %342, i64 %344
  %346 = getelementptr inbounds %struct.TCandidate, ptr %345, i32 0, i32 2
  %347 = load double, ptr %346, align 8, !tbaa !34
  %348 = load ptr, ptr %21, align 8, !tbaa !5
  %349 = load i32, ptr %27, align 4, !tbaa !9
  %350 = sext i32 %349 to i64
  %351 = getelementptr inbounds %struct.TCandidate, ptr %348, i64 %350
  %352 = getelementptr inbounds %struct.TCandidate, ptr %351, i32 0, i32 2
  %353 = load double, ptr %352, align 8, !tbaa !34
  %354 = fsub double %347, %353
  %355 = load ptr, ptr %21, align 8, !tbaa !5
  %356 = load i32, ptr %32, align 4, !tbaa !9
  %357 = sext i32 %356 to i64
  %358 = getelementptr inbounds %struct.TCandidate, ptr %355, i64 %357
  %359 = getelementptr inbounds %struct.TCandidate, ptr %358, i32 0, i32 3
  %360 = load double, ptr %359, align 8, !tbaa !29
  %361 = load ptr, ptr %21, align 8, !tbaa !5
  %362 = load i32, ptr %27, align 4, !tbaa !9
  %363 = sext i32 %362 to i64
  %364 = getelementptr inbounds %struct.TCandidate, ptr %361, i64 %363
  %365 = getelementptr inbounds %struct.TCandidate, ptr %364, i32 0, i32 3
  %366 = load double, ptr %365, align 8, !tbaa !29
  %367 = fsub double %360, %366
  %368 = fdiv double %354, %367
  store double %368, ptr %34, align 8, !tbaa !28
  %369 = call { i32, double } @_ZSt9make_pairIRidESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 8 dereferenceable(8) %34)
  %370 = getelementptr inbounds { i32, double }, ptr %33, i32 0, i32 0
  %371 = extractvalue { i32, double } %369, 0
  store i32 %371, ptr %370, align 8
  %372 = getelementptr inbounds { i32, double }, ptr %33, i32 0, i32 1
  %373 = extractvalue { i32, double } %369, 1
  store double %373, ptr %372, align 8
  %374 = load ptr, ptr %16, align 8, !tbaa !5
  %375 = load i32, ptr %23, align 4, !tbaa !9
  %376 = add nsw i32 %375, 1
  store i32 %376, ptr %23, align 4, !tbaa !9
  %377 = sext i32 %375 to i64
  %378 = getelementptr inbounds %"struct.std::pair", ptr %374, i64 %377
  %379 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIidEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %378, ptr noundef nonnull align 8 dereferenceable(16) %33) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  br label %380

380:                                              ; preds = %334, %272
  %381 = load i32, ptr %27, align 4, !tbaa !9
  %382 = add nsw i32 %381, 1
  store i32 %382, ptr %27, align 4, !tbaa !9
  br label %250, !llvm.loop !36

383:                                              ; preds = %254
  %384 = load i32, ptr %23, align 4, !tbaa !9
  %385 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 9
  %386 = load ptr, ptr %385, align 8, !tbaa !22
  %387 = load i32, ptr %19, align 4, !tbaa !9
  %388 = sext i32 %387 to i64
  %389 = getelementptr inbounds i32, ptr %386, i64 %388
  store i32 %384, ptr %389, align 4, !tbaa !9
  %390 = load i32, ptr %23, align 4, !tbaa !9
  %391 = sext i32 %390 to i64
  %392 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %391, i64 16)
  %393 = extractvalue { i64, i1 } %392, 1
  %394 = extractvalue { i64, i1 } %392, 0
  %395 = select i1 %393, i64 -1, i64 %394
  %396 = call noalias noundef nonnull ptr @_Znam(i64 noundef %395) #8
  %397 = icmp eq i64 %391, 0
  br i1 %397, label %405, label %398

398:                                              ; preds = %383
  %399 = getelementptr inbounds %"struct.std::pair", ptr %396, i64 %391
  br label %400

400:                                              ; preds = %402, %398
  %401 = phi ptr [ %396, %398 ], [ %403, %402 ]
  invoke void @_ZNSt4pairIidEC2IidTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %401)
          to label %402 unwind label %416

402:                                              ; preds = %400
  %403 = getelementptr inbounds %"struct.std::pair", ptr %401, i64 1
  %404 = icmp eq ptr %403, %399
  br i1 %404, label %405, label %400

405:                                              ; preds = %402, %383
  %406 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 8
  %407 = load ptr, ptr %406, align 8, !tbaa !20
  %408 = load i32, ptr %19, align 4, !tbaa !9
  %409 = sext i32 %408 to i64
  %410 = getelementptr inbounds ptr, ptr %407, i64 %409
  store ptr %396, ptr %410, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  store i32 0, ptr %35, align 4, !tbaa !9
  br label %411

411:                                              ; preds = %435, %405
  %412 = load i32, ptr %35, align 4, !tbaa !9
  %413 = load i32, ptr %23, align 4, !tbaa !9
  %414 = icmp slt i32 %412, %413
  br i1 %414, label %420, label %415

415:                                              ; preds = %411
  store i32 22, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  br label %438

416:                                              ; preds = %400
  %417 = landingpad { ptr, i32 }
          cleanup
  %418 = extractvalue { ptr, i32 } %417, 0
  store ptr %418, ptr %17, align 8
  %419 = extractvalue { ptr, i32 } %417, 1
  store i32 %419, ptr %18, align 4
  call void @_ZdaPvm(ptr noundef %396, i64 noundef %395) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %447

420:                                              ; preds = %411
  %421 = load ptr, ptr %16, align 8, !tbaa !5
  %422 = load i32, ptr %35, align 4, !tbaa !9
  %423 = sext i32 %422 to i64
  %424 = getelementptr inbounds %"struct.std::pair", ptr %421, i64 %423
  %425 = getelementptr inbounds %struct.TNest, ptr %36, i32 0, i32 8
  %426 = load ptr, ptr %425, align 8, !tbaa !20
  %427 = load i32, ptr %19, align 4, !tbaa !9
  %428 = sext i32 %427 to i64
  %429 = getelementptr inbounds ptr, ptr %426, i64 %428
  %430 = load ptr, ptr %429, align 8, !tbaa !5
  %431 = load i32, ptr %35, align 4, !tbaa !9
  %432 = sext i32 %431 to i64
  %433 = getelementptr inbounds %"struct.std::pair", ptr %430, i64 %432
  %434 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIidEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %433, ptr noundef nonnull align 8 dereferenceable(16) %424)
  br label %435

435:                                              ; preds = %420
  %436 = load i32, ptr %35, align 4, !tbaa !9
  %437 = add nsw i32 %436, 1
  store i32 %437, ptr %35, align 4, !tbaa !9
  br label %411, !llvm.loop !37

438:                                              ; preds = %415
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %439

439:                                              ; preds = %438
  %440 = load i32, ptr %19, align 4, !tbaa !9
  %441 = add nsw i32 %440, 1
  store i32 %441, ptr %19, align 4, !tbaa !9
  br label %220, !llvm.loop !38

442:                                              ; preds = %224
  %443 = load ptr, ptr %16, align 8, !tbaa !5
  %444 = icmp eq ptr %443, null
  br i1 %444, label %446, label %445

445:                                              ; preds = %442
  call void @_ZdlPvm(ptr noundef %443, i64 noundef 16) #9
  br label %446

446:                                              ; preds = %445, %442
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  ret void

447:                                              ; preds = %416, %225
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %448

448:                                              ; preds = %447
  %449 = load ptr, ptr %17, align 8
  %450 = load i32, ptr %18, align 4
  %451 = insertvalue { ptr, i32 } poison, ptr %449, 0
  %452 = insertvalue { ptr, i32 } %451, i32 %450, 1
  resume { ptr, i32 } %452

453:                                              ; preds = %331
  unreachable
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #2

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local { i32, double } @_ZSt9make_pairIidESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i32, double } @_ZSt9make_pairIRidESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) #0

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS5TNest", !10, i64 0, !13, i64 8, !14, i64 16, !6, i64 40, !6, i64 48, !10, i64 56, !6, i64 64, !6, i64 72, !10, i64 80}
!13 = !{!"double", !7, i64 0}
!14 = !{!"_ZTSSt6vectorI8TProductSaIS0_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseI8TProductSaIS0_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseI8TProductSaIS0_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseI8TProductSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!12, !6, i64 64}
!21 = !{!12, !10, i64 80}
!22 = !{!12, !6, i64 72}
!23 = distinct !{!23, !19}
!24 = distinct !{!24, !19}
!25 = !{!12, !6, i64 48}
!26 = distinct !{!26, !19}
!27 = !{!12, !6, i64 40}
!28 = !{!13, !13, i64 0}
!29 = !{!30, !13, i64 24}
!30 = !{!"_ZTS10TCandidate", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!31 = !{!32, !10, i64 0}
!32 = !{!"_ZTSSt4pairIidE", !10, i64 0, !13, i64 8}
!33 = !{!32, !13, i64 8}
!34 = !{!30, !13, i64 16}
!35 = distinct !{!35, !19}
!36 = distinct !{!36, !19}
!37 = distinct !{!37, !19}
!38 = distinct !{!38, !19}


; 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.std::pair" = type { i32, double }
%struct.TCandidate = type { double, double, double, double }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5TNest23GeneratePiecewiseLinearEi(ptr noundef nonnull align 8 dereferenceable(84) %0, i32 noundef %1) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca double, align 8
  store i32 %1, ptr %3, align 4, !tbaa !5
  %12 = load i32, ptr %0, align 8, !tbaa !9
  %13 = add i32 %12, 1
  %14 = sext i32 %13 to i64
  %15 = icmp slt i32 %12, -1
  %16 = shl nsw i64 %14, 2
  %17 = select i1 %15, i64 -1, i64 %16
  %18 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %17) #9
  %19 = shl nsw i64 %14, 3
  %20 = select i1 %15, i64 -1, i64 %19
  %21 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %20) #9
  %.not108 = icmp slt i32 %12, 0
  br i1 %.not108, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %2
  %22 = zext i32 %13 to i64
  %23 = shl nuw nsw i64 %22, 2
  tail call void @llvm.memset.p0.i64(ptr nonnull align 4 %18, i8 0, i64 %23, i1 false), !tbaa !5
  %24 = shl nuw nsw i64 %22, 3
  tail call void @llvm.memset.p0.i64(ptr nonnull align 8 %21, i8 0, i64 %24, i1 false), !tbaa !17
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.preheader, %2
  %25 = getelementptr inbounds i8, ptr %0, i64 64
  %26 = load ptr, ptr %25, align 8, !tbaa !18
  %.not99 = icmp eq ptr %26, null
  br i1 %.not99, label %87, label %.preheader107

.preheader107:                                    ; preds = %._crit_edge
  %27 = getelementptr inbounds i8, ptr %0, i64 80
  %28 = load i32, ptr %27, align 8, !tbaa !19
  %29 = icmp sgt i32 %28, 0
  %30 = icmp sgt i32 %12, -1
  %31 = and i1 %30, %29
  br i1 %31, label %.lr.ph111, label %.preheader106

.lr.ph111:                                        ; preds = %.preheader107
  %32 = getelementptr inbounds i8, ptr %0, i64 72
  %33 = load ptr, ptr %32, align 8, !tbaa !20
  %34 = add nsw i32 %28, -1
  %umin = tail call i32 @llvm.umin.i32(i32 %12, i32 %34)
  %35 = add nuw i32 %umin, 1
  %wide.trip.count = zext i32 %35 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %36 = icmp eq i32 %umin, 0
  br i1 %36, label %.preheader106.loopexit.unr-lcssa, label %.lr.ph111.new

.lr.ph111.new:                                    ; preds = %.lr.ph111
  %unroll_iter = and i64 %wide.trip.count, 4294967294
  br label %46

.preheader106.loopexit.unr-lcssa:                 ; preds = %62, %.lr.ph111
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph111 ], [ %indvars.iv.next.1, %62 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader106, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader106.loopexit.unr-lcssa
  %37 = getelementptr inbounds i32, ptr %33, i64 %indvars.iv.unr
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %.not104.epil = icmp eq i32 %38, 0
  br i1 %.not104.epil, label %.preheader106, label %39

39:                                               ; preds = %.epil.preheader
  %40 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv.unr
  store i32 %38, ptr %40, align 4, !tbaa !5
  %41 = getelementptr inbounds ptr, ptr %26, i64 %indvars.iv.unr
  %42 = load ptr, ptr %41, align 8, !tbaa !17
  %43 = getelementptr inbounds ptr, ptr %21, i64 %indvars.iv.unr
  store ptr %42, ptr %43, align 8, !tbaa !17
  br label %.preheader106

.preheader106:                                    ; preds = %.preheader106.loopexit.unr-lcssa, %39, %.epil.preheader, %.preheader107
  %44 = icmp slt i32 %13, %28
  br i1 %44, label %.lr.ph113, label %._crit_edge114

.lr.ph113:                                        ; preds = %.preheader106
  %45 = getelementptr inbounds i8, ptr %0, i64 72
  br label %65

46:                                               ; preds = %62, %.lr.ph111.new
  %indvars.iv = phi i64 [ 0, %.lr.ph111.new ], [ %indvars.iv.next.1, %62 ]
  %niter = phi i64 [ 0, %.lr.ph111.new ], [ %niter.next.1, %62 ]
  %47 = getelementptr inbounds i32, ptr %33, i64 %indvars.iv
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %.not104 = icmp eq i32 %48, 0
  br i1 %.not104, label %54, label %49

49:                                               ; preds = %46
  %50 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv
  store i32 %48, ptr %50, align 4, !tbaa !5
  %51 = getelementptr inbounds ptr, ptr %26, i64 %indvars.iv
  %52 = load ptr, ptr %51, align 8, !tbaa !17
  %53 = getelementptr inbounds ptr, ptr %21, i64 %indvars.iv
  store ptr %52, ptr %53, align 8, !tbaa !17
  br label %54

54:                                               ; preds = %46, %49
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %55 = getelementptr inbounds i32, ptr %33, i64 %indvars.iv.next
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %.not104.1 = icmp eq i32 %56, 0
  br i1 %.not104.1, label %62, label %57

57:                                               ; preds = %54
  %58 = getelementptr inbounds i32, ptr %18, i64 %indvars.iv.next
  store i32 %56, ptr %58, align 4, !tbaa !5
  %59 = getelementptr inbounds ptr, ptr %26, i64 %indvars.iv.next
  %60 = load ptr, ptr %59, align 8, !tbaa !17
  %61 = getelementptr inbounds ptr, ptr %21, i64 %indvars.iv.next
  store ptr %60, ptr %61, align 8, !tbaa !17
  br label %62

62:                                               ; preds = %57, %54
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader106.loopexit.unr-lcssa, label %46, !llvm.loop !21

._crit_edge114.loopexit:                          ; preds = %76
  %.pre156 = load ptr, ptr %25, align 8, !tbaa !18
  br label %._crit_edge114

._crit_edge114:                                   ; preds = %._crit_edge114.loopexit, %.preheader106
  %63 = phi ptr [ %.pre156, %._crit_edge114.loopexit ], [ %26, %.preheader106 ]
  %64 = icmp eq ptr %63, null
  br i1 %64, label %81, label %80

65:                                               ; preds = %.lr.ph113, %76
  %66 = phi i32 [ %28, %.lr.ph113 ], [ %77, %76 ]
  %indvars.iv136 = phi i64 [ %14, %.lr.ph113 ], [ %indvars.iv.next137, %76 ]
  %67 = load ptr, ptr %45, align 8, !tbaa !20
  %68 = getelementptr inbounds i32, ptr %67, i64 %indvars.iv136
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %.not103 = icmp eq i32 %69, 0
  br i1 %.not103, label %76, label %70

70:                                               ; preds = %65
  %71 = load ptr, ptr %25, align 8, !tbaa !18
  %72 = getelementptr inbounds ptr, ptr %71, i64 %indvars.iv136
  %73 = load ptr, ptr %72, align 8, !tbaa !17
  %74 = icmp eq ptr %73, null
  br i1 %74, label %76, label %75

75:                                               ; preds = %70
  tail call void @_ZdlPvm(ptr noundef nonnull %73, i64 noundef 16) #10
  %.pre = load i32, ptr %27, align 8, !tbaa !19
  br label %76

76:                                               ; preds = %65, %75, %70
  %77 = phi i32 [ %66, %65 ], [ %.pre, %75 ], [ %66, %70 ]
  %indvars.iv.next137 = add nsw i64 %indvars.iv136, 1
  %78 = sext i32 %77 to i64
  %79 = icmp slt i64 %indvars.iv.next137, %78
  br i1 %79, label %65, label %._crit_edge114.loopexit, !llvm.loop !23

80:                                               ; preds = %._crit_edge114
  tail call void @_ZdlPvm(ptr noundef nonnull %63, i64 noundef 8) #10
  br label %81

81:                                               ; preds = %80, %._crit_edge114
  %82 = getelementptr inbounds i8, ptr %0, i64 72
  %83 = load ptr, ptr %82, align 8, !tbaa !20
  %84 = icmp eq ptr %83, null
  br i1 %84, label %86, label %85

85:                                               ; preds = %81
  tail call void @_ZdlPvm(ptr noundef nonnull %83, i64 noundef 4) #10
  br label %86

86:                                               ; preds = %85, %81
  %.pre157 = load i32, ptr %0, align 8, !tbaa !9
  br label %87

87:                                               ; preds = %86, %._crit_edge
  %88 = phi i32 [ %.pre157, %86 ], [ %12, %._crit_edge ]
  store ptr %21, ptr %25, align 8, !tbaa !18
  %89 = getelementptr inbounds i8, ptr %0, i64 72
  store ptr %18, ptr %89, align 8, !tbaa !20
  %90 = getelementptr inbounds i8, ptr %0, i64 80
  store i32 %13, ptr %90, align 8, !tbaa !19
  %.not100 = icmp eq i32 %1, -1
  br i1 %.not100, label %96, label %.thread

.thread:                                          ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #11
  store i32 0, ptr %4, align 4, !tbaa !5
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %92 = load i32, ptr %91, align 4, !tbaa !5
  store i32 %92, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #11
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %0)
  %94 = load i32, ptr %93, align 4, !tbaa !5
  store i32 %94, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #11
  store i32 0, ptr %5, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  br label %.lr.ph118

96:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #11
  store i32 0, ptr %5, align 4, !tbaa !5
  %.not101115 = icmp slt i32 %88, 0
  br i1 %.not101115, label %.loopexit105.thread, label %.lr.ph118

.loopexit105.thread:                              ; preds = %96
  %97 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef 0) #9
  br label %._crit_edge133

.lr.ph118:                                        ; preds = %.thread, %96
  %.085165 = phi i64 [ %95, %.thread ], [ 0, %96 ]
  %.086163 = phi i32 [ %94, %.thread ], [ %88, %96 ]
  %98 = getelementptr inbounds i8, ptr %0, i64 48
  %99 = add i32 %.086163, 1
  br label %105

._crit_edge119:                                   ; preds = %105
  %100 = sext i32 %.fr to i64
  %101 = icmp slt i32 %.fr, 0
  %102 = shl nsw i64 %100, 4
  %spec.select = select i1 %101, i64 -1, i64 %102
  %103 = call noalias noundef nonnull ptr @_Znam(i64 noundef %spec.select) #9
  %104 = icmp eq i32 %.fr, 0
  br i1 %104, label %.lr.ph132, label %110

105:                                              ; preds = %.lr.ph118, %105
  %indvars.iv139 = phi i64 [ %.085165, %.lr.ph118 ], [ %indvars.iv.next140, %105 ]
  %106 = load ptr, ptr %98, align 8, !tbaa !24
  %107 = getelementptr inbounds i32, ptr %106, i64 %indvars.iv139
  %108 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %107)
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %.fr = freeze i32 %109
  store i32 %.fr, ptr %5, align 4, !tbaa !5
  %indvars.iv.next140 = add nsw i64 %indvars.iv139, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next140 to i32
  %exitcond142.not = icmp eq i32 %99, %lftr.wideiv
  br i1 %exitcond142.not, label %._crit_edge119, label %105, !llvm.loop !25

110:                                              ; preds = %._crit_edge119
  %111 = getelementptr inbounds %"struct.std::pair", ptr %103, i64 %100
  br label %112

112:                                              ; preds = %112, %110
  %113 = phi ptr [ %103, %110 ], [ %114, %112 ]
  call void @_ZNSt4pairIidEC2IidTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %113)
  %114 = getelementptr inbounds i8, ptr %113, i64 16
  %115 = icmp eq ptr %114, %111
  br i1 %115, label %.lr.ph132, label %112

.lr.ph132:                                        ; preds = %112, %._crit_edge119
  %116 = getelementptr inbounds i8, ptr %0, i64 40
  %117 = getelementptr inbounds i8, ptr %0, i64 48
  %118 = getelementptr inbounds i8, ptr %6, i64 8
  %119 = getelementptr inbounds i8, ptr %10, i64 8
  %120 = add i32 %.086163, 1
  br label %121

121:                                              ; preds = %.lr.ph132, %._crit_edge128
  %indvars.iv151 = phi i64 [ %.085165, %.lr.ph132 ], [ %indvars.iv.next152, %._crit_edge128 ]
  %122 = load ptr, ptr %116, align 8, !tbaa !26
  %123 = getelementptr inbounds ptr, ptr %122, i64 %indvars.iv151
  %124 = load ptr, ptr %123, align 8, !tbaa !17
  %125 = load ptr, ptr %117, align 8, !tbaa !24
  %126 = getelementptr inbounds i32, ptr %125, i64 %indvars.iv151
  %127 = load i32, ptr %126, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #11
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #11
  store double -1.000000e+100, ptr %8, align 8, !tbaa !27
  %128 = call { i32, double } @_ZSt9make_pairIidESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %129 = extractvalue { i32, double } %128, 0
  store i32 %129, ptr %6, align 8
  %130 = extractvalue { i32, double } %128, 1
  store double %130, ptr %118, align 8
  %131 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIidEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %103, ptr noundef nonnull align 8 dereferenceable(16) %6) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #11
  store i32 1, ptr %9, align 4, !tbaa !5
  %132 = icmp sgt i32 %127, 1
  br i1 %132, label %.lr.ph123, label %.thread190

.thread190:                                       ; preds = %121
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #11
  %133 = load ptr, ptr %89, align 8, !tbaa !20
  %134 = getelementptr inbounds i32, ptr %133, i64 %indvars.iv151
  store i32 1, ptr %134, align 4, !tbaa !5
  %135 = call noalias noundef nonnull dereferenceable(16) ptr @_Znam(i64 noundef 16) #9
  br label %199

._crit_edge124:                                   ; preds = %195
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #11
  %136 = load ptr, ptr %89, align 8, !tbaa !20
  %137 = getelementptr inbounds i32, ptr %136, i64 %indvars.iv151
  store i32 %.4.fr, ptr %137, align 4, !tbaa !5
  %138 = sext i32 %.4.fr to i64
  %139 = icmp slt i32 %.4.fr, 0
  %140 = shl nsw i64 %138, 4
  %spec.select195 = select i1 %139, i64 -1, i64 %140
  %141 = call noalias noundef nonnull ptr @_Znam(i64 noundef %spec.select195) #9
  %142 = icmp eq i32 %.4.fr, 0
  br i1 %142, label %.loopexit.thread, label %199

.loopexit.thread:                                 ; preds = %._crit_edge124
  %143 = load ptr, ptr %25, align 8, !tbaa !18
  %144 = getelementptr inbounds ptr, ptr %143, i64 %indvars.iv151
  store ptr %141, ptr %144, align 8, !tbaa !17
  br label %._crit_edge128

.lr.ph123:                                        ; preds = %121, %195
  %.087121 = phi i32 [ %.4.fr, %195 ], [ 1, %121 ]
  %storemerge120 = phi i32 [ %197, %195 ], [ 1, %121 ]
  %145 = sext i32 %storemerge120 to i64
  %146 = getelementptr inbounds %struct.TCandidate, ptr %124, i64 %145, i32 3
  %147 = load double, ptr %146, align 8, !tbaa !28
  %148 = getelementptr %struct.TCandidate, ptr %124, i64 %145
  %149 = getelementptr i8, ptr %148, i64 -8
  %150 = load double, ptr %149, align 8, !tbaa !28
  %151 = fsub double %147, %150
  %152 = call double @llvm.fabs.f64(double %151)
  %153 = fcmp olt double %152, 1.000000e-08
  br i1 %153, label %195, label %.preheader

.preheader:                                       ; preds = %.lr.ph123
  %154 = getelementptr inbounds i8, ptr %148, i64 16
  %155 = zext i32 %.087121 to i64
  %smin = call i32 @llvm.smin.i32(i32 %.087121, i32 1)
  %.pre158.pre = load double, ptr %154, align 8, !tbaa !30
  br label %156

156:                                              ; preds = %.preheader, %159
  %indvars.iv143 = phi i64 [ %155, %.preheader ], [ %indvars.iv.next144, %159 ]
  %157 = trunc nuw i64 %indvars.iv143 to i32
  %158 = icmp sgt i32 %157, 1
  br i1 %158, label %159, label %176

159:                                              ; preds = %156
  %160 = getelementptr %"struct.std::pair", ptr %103, i64 %indvars.iv143
  %161 = getelementptr i8, ptr %160, i64 -16
  %162 = load i32, ptr %161, align 8, !tbaa !31
  %163 = getelementptr i8, ptr %160, i64 -8
  %164 = load double, ptr %163, align 8, !tbaa !33
  %165 = sext i32 %162 to i64
  %166 = getelementptr inbounds %struct.TCandidate, ptr %124, i64 %165
  %167 = getelementptr inbounds i8, ptr %166, i64 16
  %168 = load double, ptr %167, align 8, !tbaa !30
  %169 = getelementptr inbounds i8, ptr %166, i64 24
  %170 = load double, ptr %169, align 8, !tbaa !28
  %171 = fneg double %164
  %172 = call double @llvm.fmuladd.f64(double %171, double %170, double %168)
  %173 = call double @llvm.fmuladd.f64(double %171, double %147, double %.pre158.pre)
  %174 = fadd double %173, 1.000000e-08
  %175 = fcmp ugt double %172, %174
  %indvars.iv.next144 = add nsw i64 %indvars.iv143, -1
  br i1 %175, label %176, label %156

176:                                              ; preds = %159, %156
  %.1.lcssa = phi i32 [ %157, %159 ], [ %smin, %156 ]
  %177 = sext i32 %.1.lcssa to i64
  %178 = getelementptr %"struct.std::pair", ptr %103, i64 %177
  %179 = getelementptr i8, ptr %178, i64 -16
  %180 = load i32, ptr %179, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #11
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds %struct.TCandidate, ptr %124, i64 %181, i32 2
  %183 = load <2 x double>, ptr %182, align 8, !tbaa !27
  %184 = insertelement <2 x double> poison, double %.pre158.pre, i64 0
  %185 = insertelement <2 x double> %184, double %147, i64 1
  %186 = fsub <2 x double> %183, %185
  %187 = extractelement <2 x double> %186, i64 0
  %188 = extractelement <2 x double> %186, i64 1
  %189 = fdiv double %187, %188
  store double %189, ptr %11, align 8, !tbaa !27
  %190 = call { i32, double } @_ZSt9make_pairIRidESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %191 = extractvalue { i32, double } %190, 0
  store i32 %191, ptr %10, align 8
  %192 = extractvalue { i32, double } %190, 1
  store double %192, ptr %119, align 8
  %193 = add nsw i32 %.1.lcssa, 1
  %194 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIidEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %178, ptr noundef nonnull align 8 dereferenceable(16) %10) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #11
  %.pre159 = load i32, ptr %9, align 4, !tbaa !5
  br label %195

195:                                              ; preds = %.lr.ph123, %176
  %196 = phi i32 [ %storemerge120, %.lr.ph123 ], [ %.pre159, %176 ]
  %.4 = phi i32 [ %.087121, %.lr.ph123 ], [ %193, %176 ]
  %.4.fr = freeze i32 %.4
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %9, align 4, !tbaa !5
  %198 = icmp slt i32 %197, %127
  br i1 %198, label %.lr.ph123, label %._crit_edge124, !llvm.loop !34

199:                                              ; preds = %.thread190, %._crit_edge124
  %200 = phi ptr [ %135, %.thread190 ], [ %141, %._crit_edge124 ]
  %.087.lcssa189192 = phi i32 [ 1, %.thread190 ], [ %.4.fr, %._crit_edge124 ]
  %201 = phi i64 [ 1, %.thread190 ], [ %138, %._crit_edge124 ]
  %202 = getelementptr inbounds %"struct.std::pair", ptr %200, i64 %201
  br label %203

203:                                              ; preds = %203, %199
  %204 = phi ptr [ %200, %199 ], [ %205, %203 ]
  call void @_ZNSt4pairIidEC2IidTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %204)
  %205 = getelementptr inbounds i8, ptr %204, i64 16
  %206 = icmp eq ptr %205, %202
  br i1 %206, label %.loopexit, label %203

.loopexit:                                        ; preds = %203
  %207 = load ptr, ptr %25, align 8, !tbaa !18
  %208 = getelementptr inbounds ptr, ptr %207, i64 %indvars.iv151
  store ptr %200, ptr %208, align 8, !tbaa !17
  %209 = icmp sgt i32 %.087.lcssa189192, 0
  br i1 %209, label %.lr.ph127.preheader, label %._crit_edge128

.lr.ph127.preheader:                              ; preds = %.loopexit
  %wide.trip.count149 = zext nneg i32 %.087.lcssa189192 to i64
  br label %.lr.ph127

._crit_edge128:                                   ; preds = %.lr.ph127, %.loopexit.thread, %.loopexit
  %indvars.iv.next152 = add nsw i64 %indvars.iv151, 1
  %lftr.wideiv154 = trunc i64 %indvars.iv.next152 to i32
  %exitcond155.not = icmp eq i32 %120, %lftr.wideiv154
  br i1 %exitcond155.not, label %._crit_edge133, label %121, !llvm.loop !35

.lr.ph127:                                        ; preds = %.lr.ph127.preheader, %.lr.ph127
  %indvars.iv146 = phi i64 [ 0, %.lr.ph127.preheader ], [ %indvars.iv.next147, %.lr.ph127 ]
  %210 = getelementptr inbounds %"struct.std::pair", ptr %103, i64 %indvars.iv146
  %211 = load ptr, ptr %25, align 8, !tbaa !18
  %212 = getelementptr inbounds ptr, ptr %211, i64 %indvars.iv151
  %213 = load ptr, ptr %212, align 8, !tbaa !17
  %214 = getelementptr inbounds %"struct.std::pair", ptr %213, i64 %indvars.iv146
  %215 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIidEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %214, ptr noundef nonnull align 8 dereferenceable(16) %210)
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %exitcond150.not = icmp eq i64 %indvars.iv.next147, %wide.trip.count149
  br i1 %exitcond150.not, label %._crit_edge128, label %.lr.ph127, !llvm.loop !36

._crit_edge133:                                   ; preds = %._crit_edge128, %.loopexit105.thread
  %216 = phi ptr [ %97, %.loopexit105.thread ], [ %103, %._crit_edge128 ]
  call void @_ZdlPvm(ptr noundef nonnull %216, i64 noundef 16) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #11
  ret void
}

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local { i32, double } @_ZSt9make_pairIidESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i32, double } @_ZSt9make_pairIRidESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umin.i32(i32, i32) #8

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #8

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS5TNest", !6, i64 0, !11, i64 8, !12, i64 16, !16, i64 40, !16, i64 48, !6, i64 56, !16, i64 64, !16, i64 72, !6, i64 80}
!11 = !{!"double", !7, i64 0}
!12 = !{!"_ZTSSt6vectorI8TProductSaIS0_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseI8TProductSaIS0_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseI8TProductSaIS0_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseI8TProductSaIS0_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!16, !16, i64 0}
!18 = !{!10, !16, i64 64}
!19 = !{!10, !6, i64 80}
!20 = !{!10, !16, i64 72}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = !{!10, !16, i64 48}
!25 = distinct !{!25, !22}
!26 = !{!10, !16, i64 40}
!27 = !{!11, !11, i64 0}
!28 = !{!29, !11, i64 24}
!29 = !{!"_ZTS10TCandidate", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!30 = !{!29, !11, i64 16}
!31 = !{!32, !6, i64 0}
!32 = !{!"_ZTSSt4pairIidE", !6, i64 0, !11, i64 8}
!33 = !{!32, !11, i64 8}
!34 = distinct !{!34, !22}
!35 = distinct !{!35, !22}
!36 = distinct !{!36, !22}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass