; LLVM IR from QiaoLiuHit/LSOTB-TIR :: vlfeat-0.9.19/vl/svm.ll (vl_svm_sgd_train)

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

%union.anon = type { i64 }
%struct.VlSvm_ = type { i32, i64, ptr, double, double, double, ptr, i64, ptr, ptr, ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64, double, %struct.VlSvmStatistics_, ptr, double, ptr }
%struct.VlSvmStatistics_ = type { i32, i64, i64, double, double, double, double, double, double, double, double }

@vl_infinity_d = external hidden constant %union.anon, align 8

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

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

declare ptr @vl_calloc(i64 noundef, i64 noundef) #1

declare void @vl_free(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @_vl_svm_update_statistics(ptr noundef) #3

declare double @vl_get_cpu_time() #1

declare ptr @vl_get_rand() #1

declare void @vl_rand_permute_indexes(ptr noundef, ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @_vl_svm_sgd_train(ptr noundef %0) #3 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca i64, align 8
  %17 = alloca double, align 8
  %18 = alloca ptr, align 8
  %19 = alloca double, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store double 1.000000e+00, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store double 1.000000e+00, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.VlSvm_, ptr %20, i32 0, i32 5
  %22 = load double, ptr %21, align 8, !tbaa !11
  %23 = fdiv double 1.000000e+00, %22
  %24 = call i64 @vl_ceil_d(double noundef %23)
  %25 = icmp sgt i64 2, %24
  br i1 %25, label %26, label %27

26:                                               ; preds = %1
  br label %33

27:                                               ; preds = %1
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.VlSvm_, ptr %28, i32 0, i32 5
  %30 = load double, ptr %29, align 8, !tbaa !11
  %31 = fdiv double 1.000000e+00, %30
  %32 = call i64 @vl_ceil_d(double noundef %31)
  br label %33

33:                                               ; preds = %27, %26
  %34 = phi i64 [ 2, %26 ], [ %32, %27 ]
  store i64 %34, ptr %16, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %35 = call double @vl_get_cpu_time()
  store double %35, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %36 = call ptr @vl_get_rand()
  store ptr %36, ptr %18, align 8, !tbaa !5
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.VlSvm_, ptr %37, i32 0, i32 7
  %39 = load i64, ptr %38, align 8, !tbaa !17
  %40 = call ptr @vl_calloc(i64 noundef %39, i64 noundef 8)
  store ptr %40, ptr %3, align 8, !tbaa !5
  %41 = load ptr, ptr %2, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.VlSvm_, ptr %41, i32 0, i32 7
  %43 = load i64, ptr %42, align 8, !tbaa !17
  %44 = mul i64 %43, 2
  %45 = call ptr @vl_calloc(i64 noundef %44, i64 noundef 8)
  store ptr %45, ptr %4, align 8, !tbaa !5
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = load ptr, ptr %2, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.VlSvm_, ptr %47, i32 0, i32 7
  %49 = load i64, ptr %48, align 8, !tbaa !17
  %50 = getelementptr inbounds double, ptr %46, i64 %49
  store ptr %50, ptr %5, align 8, !tbaa !5
  store i64 0, ptr %6, align 8, !tbaa !16
  br label %51

51:                                               ; preds = %69, %33
  %52 = load i64, ptr %6, align 8, !tbaa !16
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.VlSvm_, ptr %53, i32 0, i32 7
  %55 = load i64, ptr %54, align 8, !tbaa !17
  %56 = trunc i64 %55 to i32
  %57 = zext i32 %56 to i64
  %58 = icmp ult i64 %52, %57
  br i1 %58, label %59, label %72

59:                                               ; preds = %51
  %60 = load i64, ptr %6, align 8, !tbaa !16
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = load i64, ptr %6, align 8, !tbaa !16
  %63 = getelementptr inbounds i64, ptr %61, i64 %62
  store i64 %60, ptr %63, align 8, !tbaa !16
  %64 = load double, ptr @vl_infinity_d, align 8, !tbaa !18
  %65 = fneg double %64
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = load i64, ptr %6, align 8, !tbaa !16
  %68 = getelementptr inbounds double, ptr %66, i64 %67
  store double %65, ptr %68, align 8, !tbaa !9
  br label %69

69:                                               ; preds = %59
  %70 = load i64, ptr %6, align 8, !tbaa !16
  %71 = add i64 %70, 1
  store i64 %71, ptr %6, align 8, !tbaa !16
  br label %51, !llvm.loop !19

72:                                               ; preds = %51
  store i64 0, ptr %7, align 8, !tbaa !16
  br label %73

73:                                               ; preds = %374, %72
  br i1 true, label %74, label %377

74:                                               ; preds = %73
  %75 = load i64, ptr %7, align 8, !tbaa !16
  %76 = load ptr, ptr %2, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.VlSvm_, ptr %76, i32 0, i32 7
  %78 = load i64, ptr %77, align 8, !tbaa !17
  %79 = urem i64 %75, %78
  %80 = icmp eq i64 %79, 0
  br i1 %80, label %81, label %87

81:                                               ; preds = %74
  %82 = load ptr, ptr %18, align 8, !tbaa !5
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = load ptr, ptr %2, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.VlSvm_, ptr %84, i32 0, i32 7
  %86 = load i64, ptr %85, align 8, !tbaa !17
  call void @vl_rand_permute_indexes(ptr noundef %82, ptr noundef %83, i64 noundef %86)
  br label %87

87:                                               ; preds = %81, %74
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  %89 = load i64, ptr %7, align 8, !tbaa !16
  %90 = load ptr, ptr %2, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.VlSvm_, ptr %90, i32 0, i32 7
  %92 = load i64, ptr %91, align 8, !tbaa !17
  %93 = urem i64 %89, %92
  %94 = getelementptr inbounds i64, ptr %88, i64 %93
  %95 = load i64, ptr %94, align 8, !tbaa !16
  store i64 %95, ptr %6, align 8, !tbaa !16
  %96 = load ptr, ptr %2, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.VlSvm_, ptr %96, i32 0, i32 9
  %98 = load ptr, ptr %97, align 8, !tbaa !21
  %99 = icmp ne ptr %98, null
  br i1 %99, label %100, label %107

100:                                              ; preds = %87
  %101 = load ptr, ptr %2, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.VlSvm_, ptr %101, i32 0, i32 9
  %103 = load ptr, ptr %102, align 8, !tbaa !21
  %104 = load i64, ptr %6, align 8, !tbaa !16
  %105 = getelementptr inbounds double, ptr %103, i64 %104
  %106 = load double, ptr %105, align 8, !tbaa !9
  br label %108

107:                                              ; preds = %87
  br label %108

108:                                              ; preds = %107, %100
  %109 = phi double [ %106, %100 ], [ 1.000000e+00, %107 ]
  store double %109, ptr %13, align 8, !tbaa !9
  %110 = load double, ptr %13, align 8, !tbaa !9
  %111 = fcmp ogt double 0.000000e+00, %110
  br i1 %111, label %112, label %113

112:                                              ; preds = %108
  br label %115

113:                                              ; preds = %108
  %114 = load double, ptr %13, align 8, !tbaa !9
  br label %115

115:                                              ; preds = %113, %112
  %116 = phi double [ 0.000000e+00, %112 ], [ %114, %113 ]
  store double %116, ptr %13, align 8, !tbaa !9
  %117 = load double, ptr %14, align 8, !tbaa !9
  %118 = load ptr, ptr %2, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.VlSvm_, ptr %118, i32 0, i32 18
  %120 = load ptr, ptr %119, align 8, !tbaa !22
  %121 = load ptr, ptr %2, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.VlSvm_, ptr %121, i32 0, i32 6
  %123 = load ptr, ptr %122, align 8, !tbaa !23
  %124 = load i64, ptr %6, align 8, !tbaa !16
  %125 = load ptr, ptr %2, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.VlSvm_, ptr %125, i32 0, i32 2
  %127 = load ptr, ptr %126, align 8, !tbaa !24
  %128 = call double %120(ptr noundef %123, i64 noundef %124, ptr noundef %127)
  %129 = fmul double %117, %128
  store double %129, ptr %9, align 8, !tbaa !9
  %130 = load double, ptr %15, align 8, !tbaa !9
  %131 = load ptr, ptr %2, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.VlSvm_, ptr %131, i32 0, i32 4
  %133 = load double, ptr %132, align 8, !tbaa !25
  %134 = load ptr, ptr %2, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.VlSvm_, ptr %134, i32 0, i32 3
  %136 = load double, ptr %135, align 8, !tbaa !26
  %137 = fmul double %133, %136
  %138 = load double, ptr %9, align 8, !tbaa !9
  %139 = call double @llvm.fmuladd.f64(double %130, double %137, double %138)
  store double %139, ptr %9, align 8, !tbaa !9
  %140 = load double, ptr %13, align 8, !tbaa !9
  %141 = load ptr, ptr %2, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.VlSvm_, ptr %141, i32 0, i32 16
  %143 = load ptr, ptr %142, align 8, !tbaa !27
  %144 = load double, ptr %9, align 8, !tbaa !9
  %145 = load ptr, ptr %2, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.VlSvm_, ptr %145, i32 0, i32 8
  %147 = load ptr, ptr %146, align 8, !tbaa !28
  %148 = load i64, ptr %6, align 8, !tbaa !16
  %149 = getelementptr inbounds double, ptr %147, i64 %148
  %150 = load double, ptr %149, align 8, !tbaa !9
  %151 = call double %143(double noundef %144, double noundef %150)
  %152 = fmul double %140, %151
  store double %152, ptr %10, align 8, !tbaa !9
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = load i64, ptr %6, align 8, !tbaa !16
  %155 = getelementptr inbounds double, ptr %153, i64 %154
  %156 = load double, ptr %155, align 8, !tbaa !9
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  %158 = load i64, ptr %6, align 8, !tbaa !16
  %159 = getelementptr inbounds double, ptr %157, i64 %158
  store double %156, ptr %159, align 8, !tbaa !9
  %160 = load double, ptr %9, align 8, !tbaa !9
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  %162 = load i64, ptr %6, align 8, !tbaa !16
  %163 = getelementptr inbounds double, ptr %161, i64 %162
  store double %160, ptr %163, align 8, !tbaa !9
  %164 = load ptr, ptr %2, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.VlSvm_, ptr %164, i32 0, i32 5
  %166 = load double, ptr %165, align 8, !tbaa !11
  %167 = load i64, ptr %7, align 8, !tbaa !16
  %168 = load i64, ptr %16, align 8, !tbaa !16
  %169 = add i64 %167, %168
  %170 = uitofp i64 %169 to double
  %171 = fmul double %166, %170
  %172 = fdiv double 1.000000e+00, %171
  store double %172, ptr %11, align 8, !tbaa !9
  %173 = load double, ptr %11, align 8, !tbaa !9
  %174 = load ptr, ptr %2, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.VlSvm_, ptr %174, i32 0, i32 25
  %176 = load double, ptr %175, align 8, !tbaa !29
  %177 = fmul double %173, %176
  store double %177, ptr %12, align 8, !tbaa !9
  %178 = load ptr, ptr %2, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.VlSvm_, ptr %178, i32 0, i32 5
  %180 = load double, ptr %179, align 8, !tbaa !11
  %181 = load double, ptr %11, align 8, !tbaa !9
  %182 = fneg double %180
  %183 = call double @llvm.fmuladd.f64(double %182, double %181, double 1.000000e+00)
  %184 = load double, ptr %14, align 8, !tbaa !9
  %185 = fmul double %184, %183
  store double %185, ptr %14, align 8, !tbaa !9
  %186 = load ptr, ptr %2, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.VlSvm_, ptr %186, i32 0, i32 5
  %188 = load double, ptr %187, align 8, !tbaa !11
  %189 = load double, ptr %12, align 8, !tbaa !9
  %190 = fneg double %188
  %191 = call double @llvm.fmuladd.f64(double %190, double %189, double 1.000000e+00)
  %192 = load double, ptr %15, align 8, !tbaa !9
  %193 = fmul double %192, %191
  store double %193, ptr %15, align 8, !tbaa !9
  %194 = load double, ptr %10, align 8, !tbaa !9
  %195 = fcmp une double %194, 0.000000e+00
  br i1 %195, label %196, label %226

196:                                              ; preds = %115
  %197 = load ptr, ptr %2, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.VlSvm_, ptr %197, i32 0, i32 19
  %199 = load ptr, ptr %198, align 8, !tbaa !30
  %200 = load ptr, ptr %2, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.VlSvm_, ptr %200, i32 0, i32 6
  %202 = load ptr, ptr %201, align 8, !tbaa !23
  %203 = load i64, ptr %6, align 8, !tbaa !16
  %204 = load ptr, ptr %2, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.VlSvm_, ptr %204, i32 0, i32 2
  %206 = load ptr, ptr %205, align 8, !tbaa !24
  %207 = load double, ptr %10, align 8, !tbaa !9
  %208 = fneg double %207
  %209 = load double, ptr %11, align 8, !tbaa !9
  %210 = fmul double %208, %209
  %211 = load double, ptr %14, align 8, !tbaa !9
  %212 = fdiv double %210, %211
  call void %199(ptr noundef %202, i64 noundef %203, ptr noundef %206, double noundef %212)
  %213 = load ptr, ptr %2, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.VlSvm_, ptr %213, i32 0, i32 4
  %215 = load double, ptr %214, align 8, !tbaa !25
  %216 = load double, ptr %10, align 8, !tbaa !9
  %217 = fneg double %216
  %218 = load double, ptr %12, align 8, !tbaa !9
  %219 = fmul double %217, %218
  %220 = load double, ptr %15, align 8, !tbaa !9
  %221 = fdiv double %219, %220
  %222 = load ptr, ptr %2, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.VlSvm_, ptr %222, i32 0, i32 3
  %224 = load double, ptr %223, align 8, !tbaa !26
  %225 = call double @llvm.fmuladd.f64(double %215, double %221, double %224)
  store double %225, ptr %223, align 8, !tbaa !26
  br label %226

226:                                              ; preds = %196, %115
  %227 = load i64, ptr %7, align 8, !tbaa !16
  %228 = add i64 %227, 1
  %229 = load ptr, ptr %2, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.VlSvm_, ptr %229, i32 0, i32 13
  %231 = load i64, ptr %230, align 8, !tbaa !31
  %232 = urem i64 %228, %231
  %233 = icmp eq i64 %232, 0
  br i1 %233, label %241, label %234

234:                                              ; preds = %226
  %235 = load i64, ptr %7, align 8, !tbaa !16
  %236 = add i64 %235, 1
  %237 = load ptr, ptr %2, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.VlSvm_, ptr %237, i32 0, i32 21
  %239 = load i64, ptr %238, align 8, !tbaa !32
  %240 = icmp eq i64 %236, %239
  br i1 %240, label %241, label %373

241:                                              ; preds = %234, %226
  store i64 0, ptr %8, align 8, !tbaa !16
  br label %242

242:                                              ; preds = %257, %241
  %243 = load i64, ptr %8, align 8, !tbaa !16
  %244 = load ptr, ptr %2, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.VlSvm_, ptr %244, i32 0, i32 1
  %246 = load i64, ptr %245, align 8, !tbaa !33
  %247 = icmp ult i64 %243, %246
  br i1 %247, label %248, label %260

248:                                              ; preds = %242
  %249 = load double, ptr %14, align 8, !tbaa !9
  %250 = load ptr, ptr %2, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.VlSvm_, ptr %250, i32 0, i32 2
  %252 = load ptr, ptr %251, align 8, !tbaa !24
  %253 = load i64, ptr %8, align 8, !tbaa !16
  %254 = getelementptr inbounds double, ptr %252, i64 %253
  %255 = load double, ptr %254, align 8, !tbaa !9
  %256 = fmul double %255, %249
  store double %256, ptr %254, align 8, !tbaa !9
  br label %257

257:                                              ; preds = %248
  %258 = load i64, ptr %8, align 8, !tbaa !16
  %259 = add i64 %258, 1
  store i64 %259, ptr %8, align 8, !tbaa !16
  br label %242, !llvm.loop !34

260:                                              ; preds = %242
  %261 = load double, ptr %15, align 8, !tbaa !9
  %262 = load ptr, ptr %2, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.VlSvm_, ptr %262, i32 0, i32 3
  %264 = load double, ptr %263, align 8, !tbaa !26
  %265 = fmul double %264, %261
  store double %265, ptr %263, align 8, !tbaa !26
  store double 1.000000e+00, ptr %14, align 8, !tbaa !9
  store double 1.000000e+00, ptr %15, align 8, !tbaa !9
  %266 = load ptr, ptr %2, align 8, !tbaa !5
  call void @_vl_svm_update_statistics(ptr noundef %266)
  store i64 0, ptr %8, align 8, !tbaa !16
  br label %267

267:                                              ; preds = %290, %260
  %268 = load i64, ptr %8, align 8, !tbaa !16
  %269 = load ptr, ptr %2, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.VlSvm_, ptr %269, i32 0, i32 7
  %271 = load i64, ptr %270, align 8, !tbaa !17
  %272 = icmp ult i64 %268, %271
  br i1 %272, label %273, label %293

273:                                              ; preds = %267
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %274 = load ptr, ptr %4, align 8, !tbaa !5
  %275 = load i64, ptr %8, align 8, !tbaa !16
  %276 = getelementptr inbounds double, ptr %274, i64 %275
  %277 = load double, ptr %276, align 8, !tbaa !9
  %278 = load ptr, ptr %5, align 8, !tbaa !5
  %279 = load i64, ptr %8, align 8, !tbaa !16
  %280 = getelementptr inbounds double, ptr %278, i64 %279
  %281 = load double, ptr %280, align 8, !tbaa !9
  %282 = fsub double %277, %281
  store double %282, ptr %19, align 8, !tbaa !9
  %283 = load double, ptr %19, align 8, !tbaa !9
  %284 = load double, ptr %19, align 8, !tbaa !9
  %285 = load ptr, ptr %2, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.VlSvm_, ptr %285, i32 0, i32 23
  %287 = getelementptr inbounds %struct.VlSvmStatistics_, ptr %286, i32 0, i32 9
  %288 = load double, ptr %287, align 8, !tbaa !35
  %289 = call double @llvm.fmuladd.f64(double %283, double %284, double %288)
  store double %289, ptr %287, align 8, !tbaa !35
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %290

290:                                              ; preds = %273
  %291 = load i64, ptr %8, align 8, !tbaa !16
  %292 = add i64 %291, 1
  store i64 %292, ptr %8, align 8, !tbaa !16
  br label %267, !llvm.loop !36

293:                                              ; preds = %267
  %294 = load ptr, ptr %2, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.VlSvm_, ptr %294, i32 0, i32 23
  %296 = getelementptr inbounds %struct.VlSvmStatistics_, ptr %295, i32 0, i32 9
  %297 = load double, ptr %296, align 8, !tbaa !35
  %298 = call double @sqrt(double noundef %297) #6
  %299 = load ptr, ptr %2, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct.VlSvm_, ptr %299, i32 0, i32 7
  %301 = load i64, ptr %300, align 8, !tbaa !17
  %302 = uitofp i64 %301 to double
  %303 = fdiv double %298, %302
  %304 = load ptr, ptr %2, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.VlSvm_, ptr %304, i32 0, i32 23
  %306 = getelementptr inbounds %struct.VlSvmStatistics_, ptr %305, i32 0, i32 9
  store double %303, ptr %306, align 8, !tbaa !35
  %307 = call double @vl_get_cpu_time()
  %308 = load double, ptr %17, align 8, !tbaa !9
  %309 = fsub double %307, %308
  %310 = load ptr, ptr %2, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.VlSvm_, ptr %310, i32 0, i32 23
  %312 = getelementptr inbounds %struct.VlSvmStatistics_, ptr %311, i32 0, i32 10
  store double %309, ptr %312, align 8, !tbaa !37
  %313 = load i64, ptr %7, align 8, !tbaa !16
  %314 = load ptr, ptr %2, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.VlSvm_, ptr %314, i32 0, i32 23
  %316 = getelementptr inbounds %struct.VlSvmStatistics_, ptr %315, i32 0, i32 1
  store i64 %313, ptr %316, align 8, !tbaa !38
  %317 = load i64, ptr %7, align 8, !tbaa !16
  %318 = load ptr, ptr %2, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.VlSvm_, ptr %318, i32 0, i32 7
  %320 = load i64, ptr %319, align 8, !tbaa !17
  %321 = udiv i64 %317, %320
  %322 = load ptr, ptr %2, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.VlSvm_, ptr %322, i32 0, i32 23
  %324 = getelementptr inbounds %struct.VlSvmStatistics_, ptr %323, i32 0, i32 2
  store i64 %321, ptr %324, align 8, !tbaa !39
  %325 = load ptr, ptr %2, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.VlSvm_, ptr %325, i32 0, i32 23
  %327 = getelementptr inbounds %struct.VlSvmStatistics_, ptr %326, i32 0, i32 0
  store i32 1, ptr %327, align 8, !tbaa !40
  %328 = load ptr, ptr %2, align 8, !tbaa !5
  %329 = getelementptr inbounds %struct.VlSvm_, ptr %328, i32 0, i32 23
  %330 = getelementptr inbounds %struct.VlSvmStatistics_, ptr %329, i32 0, i32 9
  %331 = load double, ptr %330, align 8, !tbaa !35
  %332 = load ptr, ptr %2, align 8, !tbaa !5
  %333 = getelementptr inbounds %struct.VlSvm_, ptr %332, i32 0, i32 22
  %334 = load double, ptr %333, align 8, !tbaa !41
  %335 = fcmp olt double %331, %334
  br i1 %335, label %336, label %340

336:                                              ; preds = %293
  %337 = load ptr, ptr %2, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.VlSvm_, ptr %337, i32 0, i32 23
  %339 = getelementptr inbounds %struct.VlSvmStatistics_, ptr %338, i32 0, i32 0
  store i32 2, ptr %339, align 8, !tbaa !40
  br label %352

340:                                              ; preds = %293
  %341 = load i64, ptr %7, align 8, !tbaa !16
  %342 = add i64 %341, 1
  %343 = load ptr, ptr %2, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct.VlSvm_, ptr %343, i32 0, i32 21
  %345 = load i64, ptr %344, align 8, !tbaa !32
  %346 = icmp eq i64 %342, %345
  br i1 %346, label %347, label %351

347:                                              ; preds = %340
  %348 = load ptr, ptr %2, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct.VlSvm_, ptr %348, i32 0, i32 23
  %350 = getelementptr inbounds %struct.VlSvmStatistics_, ptr %349, i32 0, i32 0
  store i32 3, ptr %350, align 8, !tbaa !40
  br label %351

351:                                              ; preds = %347, %340
  br label %352

352:                                              ; preds = %351, %336
  %353 = load ptr, ptr %2, align 8, !tbaa !5
  %354 = getelementptr inbounds %struct.VlSvm_, ptr %353, i32 0, i32 11
  %355 = load ptr, ptr %354, align 8, !tbaa !42
  %356 = icmp ne ptr %355, null
  br i1 %356, label %357, label %365

357:                                              ; preds = %352
  %358 = load ptr, ptr %2, align 8, !tbaa !5
  %359 = getelementptr inbounds %struct.VlSvm_, ptr %358, i32 0, i32 11
  %360 = load ptr, ptr %359, align 8, !tbaa !42
  %361 = load ptr, ptr %2, align 8, !tbaa !5
  %362 = load ptr, ptr %2, align 8, !tbaa !5
  %363 = getelementptr inbounds %struct.VlSvm_, ptr %362, i32 0, i32 12
  %364 = load ptr, ptr %363, align 8, !tbaa !43
  call void %360(ptr noundef %361, ptr noundef %364)
  br label %365

365:                                              ; preds = %357, %352
  %366 = load ptr, ptr %2, align 8, !tbaa !5
  %367 = getelementptr inbounds %struct.VlSvm_, ptr %366, i32 0, i32 23
  %368 = getelementptr inbounds %struct.VlSvmStatistics_, ptr %367, i32 0, i32 0
  %369 = load i32, ptr %368, align 8, !tbaa !40
  %370 = icmp ne i32 %369, 1
  br i1 %370, label %371, label %372

371:                                              ; preds = %365
  br label %377

372:                                              ; preds = %365
  br label %373

373:                                              ; preds = %372, %234
  br label %374

374:                                              ; preds = %373
  %375 = load i64, ptr %7, align 8, !tbaa !16
  %376 = add i64 %375, 1
  store i64 %376, ptr %7, align 8, !tbaa !16
  br label %73

377:                                              ; preds = %371, %73
  %378 = load ptr, ptr %4, align 8, !tbaa !5
  call void @vl_free(ptr noundef %378)
  %379 = load ptr, ptr %3, align 8, !tbaa !5
  call void @vl_free(ptr noundef %379)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @vl_ceil_d(double noundef) #4

; Function Attrs: nounwind
declare double @sqrt(double noundef) #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !10, i64 40}
!12 = !{!"VlSvm_", !13, i64 0, !14, i64 8, !6, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !6, i64 48, !14, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !14, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !14, i64 160, !14, i64 168, !10, i64 176, !15, i64 184, !6, i64 272, !10, i64 280, !6, i64 288}
!13 = !{!"int", !7, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = !{!"VlSvmStatistics_", !13, i64 0, !14, i64 8, !14, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80}
!16 = !{!14, !14, i64 0}
!17 = !{!12, !14, i64 56}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!12, !6, i64 72}
!22 = !{!12, !6, i64 144}
!23 = !{!12, !6, i64 48}
!24 = !{!12, !6, i64 16}
!25 = !{!12, !10, i64 32}
!26 = !{!12, !10, i64 24}
!27 = !{!12, !6, i64 128}
!28 = !{!12, !6, i64 64}
!29 = !{!12, !10, i64 280}
!30 = !{!12, !6, i64 152}
!31 = !{!12, !14, i64 104}
!32 = !{!12, !14, i64 168}
!33 = !{!12, !14, i64 8}
!34 = distinct !{!34, !20}
!35 = !{!12, !10, i64 256}
!36 = distinct !{!36, !20}
!37 = !{!12, !10, i64 264}
!38 = !{!12, !14, i64 192}
!39 = !{!12, !14, i64 200}
!40 = !{!12, !13, i64 184}
!41 = !{!12, !10, i64 176}
!42 = !{!12, !6, i64 88}
!43 = !{!12, !6, i64 96}


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

%union.anon = type { i64 }

@vl_infinity_d = external hidden local_unnamed_addr constant %union.anon, align 8

declare ptr @vl_calloc(i64 noundef, i64 noundef) local_unnamed_addr #0

declare void @vl_free(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local void @_vl_svm_update_statistics(ptr noundef) local_unnamed_addr #2

declare double @vl_get_cpu_time() local_unnamed_addr #0

declare ptr @vl_get_rand() local_unnamed_addr #0

declare void @vl_rand_permute_indexes(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @_vl_svm_sgd_train(ptr noundef %0) local_unnamed_addr #2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 40
  %3 = load double, ptr %2, align 8, !tbaa !5
  %4 = fdiv double 1.000000e+00, %3
  %5 = tail call i64 @vl_ceil_d(double noundef %4)
  %6 = icmp slt i64 %5, 2
  br i1 %6, label %11, label %7

7:                                                ; preds = %1
  %8 = load double, ptr %2, align 8, !tbaa !5
  %9 = fdiv double 1.000000e+00, %8
  %10 = tail call i64 @vl_ceil_d(double noundef %9)
  br label %11

11:                                               ; preds = %1, %7
  %12 = phi i64 [ %10, %7 ], [ 2, %1 ]
  %13 = tail call double @vl_get_cpu_time() #6
  %14 = tail call ptr @vl_get_rand() #6
  %15 = getelementptr inbounds i8, ptr %0, i64 56
  %16 = load i64, ptr %15, align 8, !tbaa !14
  %17 = tail call ptr @vl_calloc(i64 noundef %16, i64 noundef 8) #6
  %18 = load i64, ptr %15, align 8, !tbaa !14
  %19 = shl i64 %18, 1
  %20 = tail call ptr @vl_calloc(i64 noundef %19, i64 noundef 8) #6
  %21 = load i64, ptr %15, align 8, !tbaa !14
  %22 = getelementptr inbounds double, ptr %20, i64 %21
  %23 = and i64 %21, 4294967295
  %.not137 = icmp eq i64 %23, 0
  br i1 %.not137, label %.preheader, label %.lr.ph

.lr.ph:                                           ; preds = %11
  %24 = load double, ptr @vl_infinity_d, align 8, !tbaa !15
  %25 = fneg double %24
  br label %48

.preheader:                                       ; preds = %48, %11
  %26 = phi i64 [ %21, %11 ], [ %52, %48 ]
  %27 = getelementptr inbounds i8, ptr %0, i64 72
  %28 = getelementptr inbounds i8, ptr %0, i64 144
  %29 = getelementptr inbounds i8, ptr %0, i64 48
  %30 = getelementptr inbounds i8, ptr %0, i64 16
  %31 = getelementptr inbounds i8, ptr %0, i64 32
  %32 = getelementptr inbounds i8, ptr %0, i64 24
  %33 = getelementptr inbounds i8, ptr %0, i64 128
  %34 = getelementptr inbounds i8, ptr %0, i64 64
  %35 = getelementptr inbounds i8, ptr %0, i64 280
  %36 = getelementptr inbounds i8, ptr %0, i64 152
  %37 = getelementptr inbounds i8, ptr %0, i64 104
  %38 = getelementptr inbounds i8, ptr %0, i64 168
  %39 = getelementptr inbounds i8, ptr %0, i64 8
  %40 = getelementptr inbounds i8, ptr %0, i64 256
  %41 = getelementptr inbounds i8, ptr %0, i64 184
  %42 = getelementptr inbounds i8, ptr %0, i64 264
  %43 = getelementptr inbounds i8, ptr %0, i64 192
  %44 = getelementptr inbounds i8, ptr %0, i64 200
  %45 = getelementptr inbounds i8, ptr %0, i64 176
  %46 = getelementptr inbounds i8, ptr %0, i64 88
  %47 = getelementptr inbounds i8, ptr %0, i64 96
  br label %55

48:                                               ; preds = %.lr.ph, %48
  %.0130 = phi i64 [ 0, %.lr.ph ], [ %51, %48 ]
  %49 = getelementptr inbounds i64, ptr %17, i64 %.0130
  store i64 %.0130, ptr %49, align 8, !tbaa !16
  %50 = getelementptr inbounds double, ptr %22, i64 %.0130
  store double %25, ptr %50, align 8, !tbaa !17
  %51 = add nuw nsw i64 %.0130, 1
  %52 = load i64, ptr %15, align 8, !tbaa !14
  %53 = and i64 %52, 4294967295
  %54 = icmp ult i64 %51, %53
  br i1 %54, label %48, label %.preheader, !llvm.loop !18

55:                                               ; preds = %.preheader, %190
  %56 = phi i64 [ %.pre, %190 ], [ %26, %.preheader ]
  %.0119 = phi i64 [ %122, %190 ], [ 0, %.preheader ]
  %57 = phi <2 x double> [ %191, %190 ], [ <double 1.000000e+00, double 1.000000e+00>, %.preheader ]
  %58 = urem i64 %.0119, %56
  %59 = icmp eq i64 %58, 0
  br i1 %59, label %60, label %61

60:                                               ; preds = %55
  tail call void @vl_rand_permute_indexes(ptr noundef %14, ptr noundef %17, i64 noundef %56) #6
  %.pre141 = load i64, ptr %15, align 8, !tbaa !14
  %.pre144 = urem i64 %.0119, %.pre141
  br label %61

61:                                               ; preds = %60, %55
  %.pre-phi = phi i64 [ %.pre144, %60 ], [ %58, %55 ]
  %62 = getelementptr inbounds i64, ptr %17, i64 %.pre-phi
  %63 = load i64, ptr %62, align 8, !tbaa !16
  %64 = load ptr, ptr %27, align 8, !tbaa !20
  %.not = icmp eq ptr %64, null
  br i1 %.not, label %68, label %65

65:                                               ; preds = %61
  %66 = getelementptr inbounds double, ptr %64, i64 %63
  %67 = load double, ptr %66, align 8, !tbaa !17
  br label %68

68:                                               ; preds = %61, %65
  %69 = phi double [ %67, %65 ], [ 1.000000e+00, %61 ]
  %70 = fcmp olt double %69, 0.000000e+00
  %71 = select i1 %70, double 0.000000e+00, double %69
  %72 = load ptr, ptr %28, align 8, !tbaa !21
  %73 = load ptr, ptr %29, align 8, !tbaa !22
  %74 = load ptr, ptr %30, align 8, !tbaa !23
  %75 = tail call double %72(ptr noundef %73, i64 noundef %63, ptr noundef %74) #6
  %76 = extractelement <2 x double> %57, i64 1
  %77 = fmul double %76, %75
  %78 = load double, ptr %31, align 8, !tbaa !24
  %79 = load double, ptr %32, align 8, !tbaa !25
  %80 = fmul double %78, %79
  %81 = extractelement <2 x double> %57, i64 0
  %82 = tail call double @llvm.fmuladd.f64(double %81, double %80, double %77)
  %83 = load ptr, ptr %33, align 8, !tbaa !26
  %84 = load ptr, ptr %34, align 8, !tbaa !27
  %85 = getelementptr inbounds double, ptr %84, i64 %63
  %86 = load double, ptr %85, align 8, !tbaa !17
  %87 = tail call double %83(double noundef %82, double noundef %86) #6
  %88 = fmul double %71, %87
  %89 = getelementptr inbounds double, ptr %20, i64 %63
  %90 = load double, ptr %89, align 8, !tbaa !17
  %91 = getelementptr inbounds double, ptr %22, i64 %63
  store double %90, ptr %91, align 8, !tbaa !17
  store double %82, ptr %89, align 8, !tbaa !17
  %92 = load double, ptr %2, align 8, !tbaa !5
  %93 = add i64 %.0119, %12
  %94 = uitofp i64 %93 to double
  %95 = fmul double %92, %94
  %96 = fdiv double 1.000000e+00, %95
  %97 = load double, ptr %35, align 8, !tbaa !28
  %98 = fmul double %97, %96
  %99 = fneg double %92
  %100 = insertelement <2 x double> poison, double %99, i64 0
  %101 = shufflevector <2 x double> %100, <2 x double> poison, <2 x i32> zeroinitializer
  %102 = insertelement <2 x double> poison, double %98, i64 0
  %103 = insertelement <2 x double> %102, double %96, i64 1
  %104 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %101, <2 x double> %103, <2 x double> <double 1.000000e+00, double 1.000000e+00>)
  %105 = fmul <2 x double> %57, %104
  %106 = fcmp une double %88, 0.000000e+00
  br i1 %106, label %107, label %121

107:                                              ; preds = %68
  %108 = load ptr, ptr %36, align 8, !tbaa !29
  %109 = load ptr, ptr %29, align 8, !tbaa !22
  %110 = load ptr, ptr %30, align 8, !tbaa !23
  %111 = fneg double %88
  %112 = fmul double %96, %111
  %113 = extractelement <2 x double> %105, i64 1
  %114 = fdiv double %112, %113
  tail call void %108(ptr noundef %109, i64 noundef %63, ptr noundef %110, double noundef %114) #6
  %115 = load double, ptr %31, align 8, !tbaa !24
  %116 = fmul double %98, %111
  %117 = extractelement <2 x double> %105, i64 0
  %118 = fdiv double %116, %117
  %119 = load double, ptr %32, align 8, !tbaa !25
  %120 = tail call double @llvm.fmuladd.f64(double %115, double %118, double %119)
  store double %120, ptr %32, align 8, !tbaa !25
  br label %121

121:                                              ; preds = %107, %68
  %122 = add i64 %.0119, 1
  %123 = load i64, ptr %37, align 8, !tbaa !30
  %124 = urem i64 %122, %123
  %125 = icmp eq i64 %124, 0
  br i1 %125, label %129, label %126

126:                                              ; preds = %121
  %127 = load i64, ptr %38, align 8, !tbaa !31
  %128 = icmp eq i64 %122, %127
  br i1 %128, label %129, label %190

129:                                              ; preds = %126, %121
  %130 = load i64, ptr %39, align 8, !tbaa !32
  %.not138 = icmp eq i64 %130, 0
  br i1 %.not138, label %._crit_edge, label %.lr.ph132

.lr.ph132:                                        ; preds = %129
  %131 = load ptr, ptr %30, align 8, !tbaa !23
  %min.iters.check = icmp ult i64 %130, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph132
  %n.vec = and i64 %130, -4
  %broadcast.splat = shufflevector <2 x double> %105, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %132 = getelementptr inbounds double, ptr %131, i64 %index
  %133 = getelementptr inbounds i8, ptr %132, i64 16
  %wide.load = load <2 x double>, ptr %132, align 8, !tbaa !17
  %wide.load147 = load <2 x double>, ptr %133, align 8, !tbaa !17
  %134 = fmul <2 x double> %broadcast.splat, %wide.load
  %135 = fmul <2 x double> %broadcast.splat, %wide.load147
  store <2 x double> %134, ptr %132, align 8, !tbaa !17
  store <2 x double> %135, ptr %133, align 8, !tbaa !17
  %index.next = add nuw i64 %index, 4
  %136 = icmp eq i64 %index.next, %n.vec
  br i1 %136, label %middle.block, label %vector.body, !llvm.loop !33

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %130, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph132
  %.0120131.ph = phi i64 [ 0, %.lr.ph132 ], [ %n.vec, %middle.block ]
  %137 = extractelement <2 x double> %105, i64 1
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %.0120131 = phi i64 [ %141, %scalar.ph ], [ %.0120131.ph, %scalar.ph.preheader ]
  %138 = getelementptr inbounds double, ptr %131, i64 %.0120131
  %139 = load double, ptr %138, align 8, !tbaa !17
  %140 = fmul double %137, %139
  store double %140, ptr %138, align 8, !tbaa !17
  %141 = add nuw i64 %.0120131, 1
  %exitcond.not = icmp eq i64 %141, %130
  br i1 %exitcond.not, label %._crit_edge, label %scalar.ph, !llvm.loop !36

._crit_edge:                                      ; preds = %scalar.ph, %middle.block, %129
  %142 = load double, ptr %32, align 8, !tbaa !25
  %143 = extractelement <2 x double> %105, i64 0
  %144 = fmul double %143, %142
  store double %144, ptr %32, align 8, !tbaa !25
  tail call void @_vl_svm_update_statistics(ptr noundef nonnull %0)
  %145 = load i64, ptr %15, align 8, !tbaa !14
  %.not139 = icmp eq i64 %145, 0
  %.pre142 = load double, ptr %40, align 8, !tbaa !37
  br i1 %.not139, label %._crit_edge136, label %.lr.ph135.preheader

.lr.ph135.preheader:                              ; preds = %._crit_edge
  %xtraiter = and i64 %145, 1
  %146 = icmp eq i64 %145, 1
  br i1 %146, label %._crit_edge136.loopexit.unr-lcssa, label %.lr.ph135.preheader.new

.lr.ph135.preheader.new:                          ; preds = %.lr.ph135.preheader
  %unroll_iter = and i64 %145, -2
  br label %.lr.ph135

.lr.ph135:                                        ; preds = %.lr.ph135, %.lr.ph135.preheader.new
  %147 = phi double [ %.pre142, %.lr.ph135.preheader.new ], [ %160, %.lr.ph135 ]
  %.1133 = phi i64 [ 0, %.lr.ph135.preheader.new ], [ %161, %.lr.ph135 ]
  %niter = phi i64 [ 0, %.lr.ph135.preheader.new ], [ %niter.next.1, %.lr.ph135 ]
  %148 = getelementptr inbounds double, ptr %20, i64 %.1133
  %149 = load double, ptr %148, align 8, !tbaa !17
  %150 = getelementptr inbounds double, ptr %22, i64 %.1133
  %151 = load double, ptr %150, align 8, !tbaa !17
  %152 = fsub double %149, %151
  %153 = tail call double @llvm.fmuladd.f64(double %152, double %152, double %147)
  store double %153, ptr %40, align 8, !tbaa !37
  %154 = or disjoint i64 %.1133, 1
  %155 = getelementptr inbounds double, ptr %20, i64 %154
  %156 = load double, ptr %155, align 8, !tbaa !17
  %157 = getelementptr inbounds double, ptr %22, i64 %154
  %158 = load double, ptr %157, align 8, !tbaa !17
  %159 = fsub double %156, %158
  %160 = tail call double @llvm.fmuladd.f64(double %159, double %159, double %153)
  store double %160, ptr %40, align 8, !tbaa !37
  %161 = add nuw i64 %.1133, 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 %._crit_edge136.loopexit.unr-lcssa, label %.lr.ph135, !llvm.loop !38

._crit_edge136.loopexit.unr-lcssa:                ; preds = %.lr.ph135, %.lr.ph135.preheader
  %.lcssa.ph = phi double [ poison, %.lr.ph135.preheader ], [ %160, %.lr.ph135 ]
  %.unr = phi double [ %.pre142, %.lr.ph135.preheader ], [ %160, %.lr.ph135 ]
  %.1133.unr = phi i64 [ 0, %.lr.ph135.preheader ], [ %161, %.lr.ph135 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge136, label %.lr.ph135.epil

.lr.ph135.epil:                                   ; preds = %._crit_edge136.loopexit.unr-lcssa
  %162 = getelementptr inbounds double, ptr %20, i64 %.1133.unr
  %163 = load double, ptr %162, align 8, !tbaa !17
  %164 = getelementptr inbounds double, ptr %22, i64 %.1133.unr
  %165 = load double, ptr %164, align 8, !tbaa !17
  %166 = fsub double %163, %165
  %167 = tail call double @llvm.fmuladd.f64(double %166, double %166, double %.unr)
  store double %167, ptr %40, align 8, !tbaa !37
  br label %._crit_edge136

._crit_edge136:                                   ; preds = %.lr.ph135.epil, %._crit_edge136.loopexit.unr-lcssa, %._crit_edge
  %168 = phi double [ %.pre142, %._crit_edge ], [ %.lcssa.ph, %._crit_edge136.loopexit.unr-lcssa ], [ %167, %.lr.ph135.epil ]
  %169 = tail call double @sqrt(double noundef %168) #6
  %170 = load i64, ptr %15, align 8, !tbaa !14
  %171 = uitofp i64 %170 to double
  %172 = fdiv double %169, %171
  store double %172, ptr %40, align 8, !tbaa !37
  %173 = tail call double @vl_get_cpu_time() #6
  %174 = fsub double %173, %13
  store double %174, ptr %42, align 8, !tbaa !39
  store i64 %.0119, ptr %43, align 8, !tbaa !40
  %175 = load i64, ptr %15, align 8, !tbaa !14
  %176 = udiv i64 %.0119, %175
  store i64 %176, ptr %44, align 8, !tbaa !41
  store i32 1, ptr %41, align 8, !tbaa !42
  %177 = load double, ptr %40, align 8, !tbaa !37
  %178 = load double, ptr %45, align 8, !tbaa !43
  %179 = fcmp olt double %177, %178
  br i1 %179, label %.sink.split, label %180

180:                                              ; preds = %._crit_edge136
  %181 = load i64, ptr %38, align 8, !tbaa !31
  %182 = icmp eq i64 %122, %181
  br i1 %182, label %.sink.split, label %183

.sink.split:                                      ; preds = %180, %._crit_edge136
  %.sink = phi i32 [ 2, %._crit_edge136 ], [ 3, %180 ]
  store i32 %.sink, ptr %41, align 8, !tbaa !42
  br label %183

183:                                              ; preds = %.sink.split, %180
  %184 = phi i32 [ 1, %180 ], [ %.sink, %.sink.split ]
  %185 = load ptr, ptr %46, align 8, !tbaa !44
  %.not128 = icmp eq ptr %185, null
  br i1 %.not128, label %188, label %186

186:                                              ; preds = %183
  %187 = load ptr, ptr %47, align 8, !tbaa !45
  tail call void %185(ptr noundef nonnull %0, ptr noundef %187) #6
  %.pre143 = load i32, ptr %41, align 8, !tbaa !42
  br label %188

188:                                              ; preds = %186, %183
  %189 = phi i32 [ %.pre143, %186 ], [ %184, %183 ]
  %.not129 = icmp eq i32 %189, 1
  br i1 %.not129, label %190, label %192

190:                                              ; preds = %126, %188
  %191 = phi <2 x double> [ <double 1.000000e+00, double 1.000000e+00>, %188 ], [ %105, %126 ]
  %.pre = load i64, ptr %15, align 8, !tbaa !14
  br label %55

192:                                              ; preds = %188
  tail call void @vl_free(ptr noundef %20) #6
  tail call void @vl_free(ptr noundef %17) #6
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @vl_ceil_d(double noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #5

attributes #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 speculatable willreturn memory(none) }
attributes #2 = { 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 #3 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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, !12, i64 40}
!6 = !{!"VlSvm_", !7, i64 0, !10, i64 8, !11, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !11, i64 48, !10, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !10, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !10, i64 160, !10, i64 168, !12, i64 176, !13, i64 184, !11, i64 272, !12, i64 280, !11, i64 288}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long long", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"double", !8, i64 0}
!13 = !{!"VlSvmStatistics_", !7, i64 0, !10, i64 8, !10, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80}
!14 = !{!6, !10, i64 56}
!15 = !{!8, !8, i64 0}
!16 = !{!10, !10, i64 0}
!17 = !{!12, !12, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!6, !11, i64 72}
!21 = !{!6, !11, i64 144}
!22 = !{!6, !11, i64 48}
!23 = !{!6, !11, i64 16}
!24 = !{!6, !12, i64 32}
!25 = !{!6, !12, i64 24}
!26 = !{!6, !11, i64 128}
!27 = !{!6, !11, i64 64}
!28 = !{!6, !12, i64 280}
!29 = !{!6, !11, i64 152}
!30 = !{!6, !10, i64 104}
!31 = !{!6, !10, i64 168}
!32 = !{!6, !10, i64 8}
!33 = distinct !{!33, !19, !34, !35}
!34 = !{!"llvm.loop.isvectorized", i32 1}
!35 = !{!"llvm.loop.unroll.runtime.disable"}
!36 = distinct !{!36, !19, !35, !34}
!37 = !{!6, !12, i64 256}
!38 = distinct !{!38, !19}
!39 = !{!6, !12, i64 264}
!40 = !{!6, !10, i64 192}
!41 = !{!6, !10, i64 200}
!42 = !{!6, !7, i64 184}
!43 = !{!6, !12, i64 176}
!44 = !{!6, !11, i64 88}
!45 = !{!6, !11, i64 96}


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