; LLVM IR from QiaoLiuHit/LSOTB-TIR :: vlfeat-0.9.19/vl/svm.ll (vl_svm_sdca_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"

%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 }

; 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

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

declare double @vl_get_cpu_time() #1

; Function Attrs: nounwind uwtable
define dso_local void @_vl_svm_sdca_train(ptr noundef %0) #3 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca double, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %15 = call double @vl_get_cpu_time()
  store double %15, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %16 = call ptr @vl_get_rand()
  store ptr %16, ptr %12, align 8, !tbaa !5
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.VlSvm_, ptr %17, i32 0, i32 7
  %19 = load i64, ptr %18, align 8, !tbaa !11
  %20 = call ptr @vl_calloc(i64 noundef %19, i64 noundef 8)
  store ptr %20, ptr %3, align 8, !tbaa !5
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.VlSvm_, ptr %21, i32 0, i32 7
  %23 = load i64, ptr %22, align 8, !tbaa !11
  %24 = call ptr @vl_calloc(i64 noundef %23, i64 noundef 8)
  store ptr %24, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.VlSvm_, ptr %25, i32 0, i32 1
  %27 = load i64, ptr %26, align 8, !tbaa !16
  %28 = call ptr @vl_calloc(i64 noundef %27, i64 noundef 8)
  store ptr %28, ptr %13, align 8, !tbaa !5
  store i64 0, ptr %5, align 8, !tbaa !17
  br label %29

29:                                               ; preds = %85, %1
  %30 = load i64, ptr %5, align 8, !tbaa !17
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.VlSvm_, ptr %31, i32 0, i32 7
  %33 = load i64, ptr %32, align 8, !tbaa !11
  %34 = trunc i64 %33 to i32
  %35 = zext i32 %34 to i64
  %36 = icmp ult i64 %30, %35
  br i1 %36, label %37, label %88

37:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %38 = load i64, ptr %5, align 8, !tbaa !17
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = load i64, ptr %5, align 8, !tbaa !17
  %41 = getelementptr inbounds i64, ptr %39, i64 %40
  store i64 %38, ptr %41, align 8, !tbaa !17
  %42 = load ptr, ptr %13, align 8, !tbaa !5
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.VlSvm_, ptr %43, i32 0, i32 1
  %45 = load i64, ptr %44, align 8, !tbaa !16
  %46 = mul i64 %45, 8
  call void @llvm.memset.p0.i64(ptr align 8 %42, i8 0, i64 %46, i1 false)
  %47 = load ptr, ptr %2, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.VlSvm_, ptr %47, i32 0, i32 19
  %49 = load ptr, ptr %48, align 8, !tbaa !18
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.VlSvm_, ptr %50, i32 0, i32 6
  %52 = load ptr, ptr %51, align 8, !tbaa !19
  %53 = load i64, ptr %5, align 8, !tbaa !17
  %54 = load ptr, ptr %13, align 8, !tbaa !5
  call void %49(ptr noundef %52, i64 noundef %53, ptr noundef %54, double noundef 1.000000e+00)
  %55 = load ptr, ptr %2, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.VlSvm_, ptr %55, i32 0, i32 18
  %57 = load ptr, ptr %56, align 8, !tbaa !20
  %58 = load ptr, ptr %2, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.VlSvm_, ptr %58, i32 0, i32 6
  %60 = load ptr, ptr %59, align 8, !tbaa !19
  %61 = load i64, ptr %5, align 8, !tbaa !17
  %62 = load ptr, ptr %13, align 8, !tbaa !5
  %63 = call double %57(ptr noundef %60, i64 noundef %61, ptr noundef %62)
  store double %63, ptr %14, align 8, !tbaa !9
  %64 = load ptr, ptr %2, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.VlSvm_, ptr %64, i32 0, i32 4
  %66 = load double, ptr %65, align 8, !tbaa !21
  %67 = load ptr, ptr %2, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.VlSvm_, ptr %67, i32 0, i32 4
  %69 = load double, ptr %68, align 8, !tbaa !21
  %70 = load double, ptr %14, align 8, !tbaa !9
  %71 = call double @llvm.fmuladd.f64(double %66, double %69, double %70)
  store double %71, ptr %14, align 8, !tbaa !9
  %72 = load double, ptr %14, align 8, !tbaa !9
  %73 = load ptr, ptr %2, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.VlSvm_, ptr %73, i32 0, i32 5
  %75 = load double, ptr %74, align 8, !tbaa !22
  %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 !11
  %79 = uitofp i64 %78 to double
  %80 = fmul double %75, %79
  %81 = fdiv double %72, %80
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = load i64, ptr %5, align 8, !tbaa !17
  %84 = getelementptr inbounds double, ptr %82, i64 %83
  store double %81, ptr %84, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %85

85:                                               ; preds = %37
  %86 = load i64, ptr %5, align 8, !tbaa !17
  %87 = add i64 %86, 1
  store i64 %87, ptr %5, align 8, !tbaa !17
  br label %29, !llvm.loop !23

88:                                               ; preds = %29
  %89 = load ptr, ptr %13, align 8, !tbaa !5
  call void @vl_free(ptr noundef %89)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  store i64 0, ptr %6, align 8, !tbaa !17
  br label %90

90:                                               ; preds = %302, %88
  br i1 true, label %91, label %305

91:                                               ; preds = %90
  %92 = load i64, ptr %6, align 8, !tbaa !17
  %93 = load ptr, ptr %2, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.VlSvm_, ptr %93, i32 0, i32 7
  %95 = load i64, ptr %94, align 8, !tbaa !11
  %96 = urem i64 %92, %95
  %97 = icmp eq i64 %96, 0
  br i1 %97, label %98, label %104

98:                                               ; preds = %91
  %99 = load ptr, ptr %12, align 8, !tbaa !5
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = load ptr, ptr %2, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.VlSvm_, ptr %101, i32 0, i32 7
  %103 = load i64, ptr %102, align 8, !tbaa !11
  call void @vl_rand_permute_indexes(ptr noundef %99, ptr noundef %100, i64 noundef %103)
  br label %104

104:                                              ; preds = %98, %91
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = load i64, ptr %6, align 8, !tbaa !17
  %107 = load ptr, ptr %2, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.VlSvm_, ptr %107, i32 0, i32 7
  %109 = load i64, ptr %108, align 8, !tbaa !11
  %110 = urem i64 %106, %109
  %111 = getelementptr inbounds i64, ptr %105, i64 %110
  %112 = load i64, ptr %111, align 8, !tbaa !17
  store i64 %112, ptr %5, align 8, !tbaa !17
  %113 = load ptr, ptr %2, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.VlSvm_, ptr %113, i32 0, i32 9
  %115 = load ptr, ptr %114, align 8, !tbaa !25
  %116 = icmp ne ptr %115, null
  br i1 %116, label %117, label %124

117:                                              ; preds = %104
  %118 = load ptr, ptr %2, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.VlSvm_, ptr %118, i32 0, i32 9
  %120 = load ptr, ptr %119, align 8, !tbaa !25
  %121 = load i64, ptr %5, align 8, !tbaa !17
  %122 = getelementptr inbounds double, ptr %120, i64 %121
  %123 = load double, ptr %122, align 8, !tbaa !9
  br label %125

124:                                              ; preds = %104
  br label %125

125:                                              ; preds = %124, %117
  %126 = phi double [ %123, %117 ], [ 1.000000e+00, %124 ]
  store double %126, ptr %10, align 8, !tbaa !9
  %127 = load double, ptr %10, align 8, !tbaa !9
  %128 = fcmp ogt double %127, 0.000000e+00
  br i1 %128, label %129, label %176

129:                                              ; preds = %125
  %130 = load ptr, ptr %2, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.VlSvm_, ptr %130, i32 0, i32 18
  %132 = load ptr, ptr %131, align 8, !tbaa !20
  %133 = load ptr, ptr %2, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.VlSvm_, ptr %133, i32 0, i32 6
  %135 = load ptr, ptr %134, align 8, !tbaa !19
  %136 = load i64, ptr %5, align 8, !tbaa !17
  %137 = load ptr, ptr %2, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.VlSvm_, ptr %137, i32 0, i32 2
  %139 = load ptr, ptr %138, align 8, !tbaa !26
  %140 = call double %132(ptr noundef %135, i64 noundef %136, ptr noundef %139)
  store double %140, ptr %7, align 8, !tbaa !9
  %141 = load ptr, ptr %2, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.VlSvm_, ptr %141, i32 0, i32 3
  %143 = load double, ptr %142, align 8, !tbaa !27
  %144 = load ptr, ptr %2, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.VlSvm_, ptr %144, i32 0, i32 4
  %146 = load double, ptr %145, align 8, !tbaa !21
  %147 = load double, ptr %7, align 8, !tbaa !9
  %148 = call double @llvm.fmuladd.f64(double %143, double %146, double %147)
  store double %148, ptr %7, align 8, !tbaa !9
  %149 = load double, ptr %10, align 8, !tbaa !9
  %150 = load ptr, ptr %2, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.VlSvm_, ptr %150, i32 0, i32 17
  %152 = load ptr, ptr %151, align 8, !tbaa !28
  %153 = load ptr, ptr %2, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.VlSvm_, ptr %153, i32 0, i32 26
  %155 = load ptr, ptr %154, align 8, !tbaa !29
  %156 = load i64, ptr %5, align 8, !tbaa !17
  %157 = getelementptr inbounds double, ptr %155, i64 %156
  %158 = load double, ptr %157, align 8, !tbaa !9
  %159 = load double, ptr %10, align 8, !tbaa !9
  %160 = fdiv double %158, %159
  %161 = load double, ptr %7, align 8, !tbaa !9
  %162 = load double, ptr %10, align 8, !tbaa !9
  %163 = load ptr, ptr %3, align 8, !tbaa !5
  %164 = load i64, ptr %5, align 8, !tbaa !17
  %165 = getelementptr inbounds double, ptr %163, i64 %164
  %166 = load double, ptr %165, align 8, !tbaa !9
  %167 = fmul double %162, %166
  %168 = load ptr, ptr %2, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.VlSvm_, ptr %168, i32 0, i32 8
  %170 = load ptr, ptr %169, align 8, !tbaa !30
  %171 = load i64, ptr %5, align 8, !tbaa !17
  %172 = getelementptr inbounds double, ptr %170, i64 %171
  %173 = load double, ptr %172, align 8, !tbaa !9
  %174 = call double %152(double noundef %160, double noundef %161, double noundef %167, double noundef %173)
  %175 = fmul double %149, %174
  store double %175, ptr %8, align 8, !tbaa !9
  br label %177

176:                                              ; preds = %125
  store double 0.000000e+00, ptr %8, align 8, !tbaa !9
  br label %177

177:                                              ; preds = %176, %129
  %178 = load double, ptr %8, align 8, !tbaa !9
  %179 = fcmp une double %178, 0.000000e+00
  br i1 %179, label %180, label %218

180:                                              ; preds = %177
  %181 = load double, ptr %8, align 8, !tbaa !9
  %182 = load ptr, ptr %2, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.VlSvm_, ptr %182, i32 0, i32 26
  %184 = load ptr, ptr %183, align 8, !tbaa !29
  %185 = load i64, ptr %5, align 8, !tbaa !17
  %186 = getelementptr inbounds double, ptr %184, i64 %185
  %187 = load double, ptr %186, align 8, !tbaa !9
  %188 = fadd double %187, %181
  store double %188, ptr %186, align 8, !tbaa !9
  %189 = load double, ptr %8, align 8, !tbaa !9
  %190 = load ptr, ptr %2, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.VlSvm_, ptr %190, i32 0, i32 7
  %192 = load i64, ptr %191, align 8, !tbaa !11
  %193 = uitofp i64 %192 to double
  %194 = load ptr, ptr %2, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.VlSvm_, ptr %194, i32 0, i32 5
  %196 = load double, ptr %195, align 8, !tbaa !22
  %197 = fmul double %193, %196
  %198 = fdiv double %189, %197
  store double %198, ptr %9, align 8, !tbaa !9
  %199 = load ptr, ptr %2, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.VlSvm_, ptr %199, i32 0, i32 19
  %201 = load ptr, ptr %200, align 8, !tbaa !18
  %202 = load ptr, ptr %2, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.VlSvm_, ptr %202, i32 0, i32 6
  %204 = load ptr, ptr %203, align 8, !tbaa !19
  %205 = load i64, ptr %5, align 8, !tbaa !17
  %206 = load ptr, ptr %2, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.VlSvm_, ptr %206, i32 0, i32 2
  %208 = load ptr, ptr %207, align 8, !tbaa !26
  %209 = load double, ptr %9, align 8, !tbaa !9
  call void %201(ptr noundef %204, i64 noundef %205, ptr noundef %208, double noundef %209)
  %210 = load ptr, ptr %2, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.VlSvm_, ptr %210, i32 0, i32 4
  %212 = load double, ptr %211, align 8, !tbaa !21
  %213 = load double, ptr %9, align 8, !tbaa !9
  %214 = load ptr, ptr %2, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.VlSvm_, ptr %214, i32 0, i32 3
  %216 = load double, ptr %215, align 8, !tbaa !27
  %217 = call double @llvm.fmuladd.f64(double %212, double %213, double %216)
  store double %217, ptr %215, align 8, !tbaa !27
  br label %218

218:                                              ; preds = %180, %177
  %219 = load i64, ptr %6, align 8, !tbaa !17
  %220 = add i64 %219, 1
  %221 = load ptr, ptr %2, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.VlSvm_, ptr %221, i32 0, i32 13
  %223 = load i64, ptr %222, align 8, !tbaa !31
  %224 = urem i64 %220, %223
  %225 = icmp eq i64 %224, 0
  br i1 %225, label %233, label %226

226:                                              ; preds = %218
  %227 = load i64, ptr %6, align 8, !tbaa !17
  %228 = add i64 %227, 1
  %229 = load ptr, ptr %2, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.VlSvm_, ptr %229, i32 0, i32 21
  %231 = load i64, ptr %230, align 8, !tbaa !32
  %232 = icmp eq i64 %228, %231
  br i1 %232, label %233, label %301

233:                                              ; preds = %226, %218
  %234 = load ptr, ptr %2, align 8, !tbaa !5
  call void @_vl_svm_update_statistics(ptr noundef %234)
  %235 = call double @vl_get_cpu_time()
  %236 = load double, ptr %11, align 8, !tbaa !9
  %237 = fsub double %235, %236
  %238 = load ptr, ptr %2, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.VlSvm_, ptr %238, i32 0, i32 23
  %240 = getelementptr inbounds %struct.VlSvmStatistics_, ptr %239, i32 0, i32 10
  store double %237, ptr %240, align 8, !tbaa !33
  %241 = load i64, ptr %6, align 8, !tbaa !17
  %242 = load ptr, ptr %2, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.VlSvm_, ptr %242, i32 0, i32 23
  %244 = getelementptr inbounds %struct.VlSvmStatistics_, ptr %243, i32 0, i32 1
  store i64 %241, ptr %244, align 8, !tbaa !34
  %245 = load i64, ptr %6, align 8, !tbaa !17
  %246 = load ptr, ptr %2, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.VlSvm_, ptr %246, i32 0, i32 7
  %248 = load i64, ptr %247, align 8, !tbaa !11
  %249 = udiv i64 %245, %248
  %250 = load ptr, ptr %2, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.VlSvm_, ptr %250, i32 0, i32 23
  %252 = getelementptr inbounds %struct.VlSvmStatistics_, ptr %251, i32 0, i32 2
  store i64 %249, ptr %252, align 8, !tbaa !35
  %253 = load ptr, ptr %2, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.VlSvm_, ptr %253, i32 0, i32 23
  %255 = getelementptr inbounds %struct.VlSvmStatistics_, ptr %254, i32 0, i32 0
  store i32 1, ptr %255, align 8, !tbaa !36
  %256 = load ptr, ptr %2, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.VlSvm_, ptr %256, i32 0, i32 23
  %258 = getelementptr inbounds %struct.VlSvmStatistics_, ptr %257, i32 0, i32 8
  %259 = load double, ptr %258, align 8, !tbaa !37
  %260 = load ptr, ptr %2, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.VlSvm_, ptr %260, i32 0, i32 22
  %262 = load double, ptr %261, align 8, !tbaa !38
  %263 = fcmp olt double %259, %262
  br i1 %263, label %264, label %268

264:                                              ; preds = %233
  %265 = load ptr, ptr %2, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.VlSvm_, ptr %265, i32 0, i32 23
  %267 = getelementptr inbounds %struct.VlSvmStatistics_, ptr %266, i32 0, i32 0
  store i32 2, ptr %267, align 8, !tbaa !36
  br label %280

268:                                              ; preds = %233
  %269 = load i64, ptr %6, align 8, !tbaa !17
  %270 = add i64 %269, 1
  %271 = load ptr, ptr %2, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.VlSvm_, ptr %271, i32 0, i32 21
  %273 = load i64, ptr %272, align 8, !tbaa !32
  %274 = icmp eq i64 %270, %273
  br i1 %274, label %275, label %279

275:                                              ; preds = %268
  %276 = load ptr, ptr %2, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.VlSvm_, ptr %276, i32 0, i32 23
  %278 = getelementptr inbounds %struct.VlSvmStatistics_, ptr %277, i32 0, i32 0
  store i32 3, ptr %278, align 8, !tbaa !36
  br label %279

279:                                              ; preds = %275, %268
  br label %280

280:                                              ; preds = %279, %264
  %281 = load ptr, ptr %2, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.VlSvm_, ptr %281, i32 0, i32 11
  %283 = load ptr, ptr %282, align 8, !tbaa !39
  %284 = icmp ne ptr %283, null
  br i1 %284, label %285, label %293

285:                                              ; preds = %280
  %286 = load ptr, ptr %2, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.VlSvm_, ptr %286, i32 0, i32 11
  %288 = load ptr, ptr %287, align 8, !tbaa !39
  %289 = load ptr, ptr %2, align 8, !tbaa !5
  %290 = load ptr, ptr %2, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.VlSvm_, ptr %290, i32 0, i32 12
  %292 = load ptr, ptr %291, align 8, !tbaa !40
  call void %288(ptr noundef %289, ptr noundef %292)
  br label %293

293:                                              ; preds = %285, %280
  %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 0
  %297 = load i32, ptr %296, align 8, !tbaa !36
  %298 = icmp ne i32 %297, 1
  br i1 %298, label %299, label %300

299:                                              ; preds = %293
  br label %305

300:                                              ; preds = %293
  br label %301

301:                                              ; preds = %300, %226
  br label %302

302:                                              ; preds = %301
  %303 = load i64, ptr %6, align 8, !tbaa !17
  %304 = add i64 %303, 1
  store i64 %304, ptr %6, align 8, !tbaa !17
  br label %90

305:                                              ; preds = %299, %90
  %306 = load ptr, ptr %3, align 8, !tbaa !5
  call void @vl_free(ptr noundef %306)
  %307 = load ptr, ptr %4, align 8, !tbaa !5
  call void @vl_free(ptr noundef %307)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret void
}

declare ptr @vl_get_rand() #1

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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, !14, i64 56}
!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 = !{!12, !14, i64 8}
!17 = !{!14, !14, i64 0}
!18 = !{!12, !6, i64 152}
!19 = !{!12, !6, i64 48}
!20 = !{!12, !6, i64 144}
!21 = !{!12, !10, i64 32}
!22 = !{!12, !10, i64 40}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!12, !6, i64 72}
!26 = !{!12, !6, i64 16}
!27 = !{!12, !10, i64 24}
!28 = !{!12, !6, i64 136}
!29 = !{!12, !6, i64 288}
!30 = !{!12, !6, i64 64}
!31 = !{!12, !14, i64 104}
!32 = !{!12, !14, i64 168}
!33 = !{!12, !10, i64 264}
!34 = !{!12, !14, i64 192}
!35 = !{!12, !14, i64 200}
!36 = !{!12, !13, i64 184}
!37 = !{!12, !10, i64 248}
!38 = !{!12, !10, i64 176}
!39 = !{!12, !6, i64 88}
!40 = !{!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"

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

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

declare double @vl_get_cpu_time() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @_vl_svm_sdca_train(ptr noundef %0) local_unnamed_addr #2 {
  %2 = tail call double @vl_get_cpu_time() #4
  %3 = tail call ptr @vl_get_rand() #4
  %4 = getelementptr inbounds i8, ptr %0, i64 56
  %5 = load i64, ptr %4, align 8, !tbaa !5
  %6 = tail call ptr @vl_calloc(i64 noundef %5, i64 noundef 8) #4
  %7 = load i64, ptr %4, align 8, !tbaa !5
  %8 = tail call ptr @vl_calloc(i64 noundef %7, i64 noundef 8) #4
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  %10 = load i64, ptr %9, align 8, !tbaa !14
  %11 = tail call ptr @vl_calloc(i64 noundef %10, i64 noundef 8) #4
  %12 = load i64, ptr %4, align 8, !tbaa !5
  %13 = and i64 %12, 4294967295
  %.not109 = icmp eq i64 %13, 0
  br i1 %.not109, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %1
  %14 = getelementptr inbounds i8, ptr %0, i64 152
  %15 = getelementptr inbounds i8, ptr %0, i64 48
  %16 = getelementptr inbounds i8, ptr %0, i64 144
  %17 = getelementptr inbounds i8, ptr %0, i64 32
  %18 = getelementptr inbounds i8, ptr %0, i64 40
  br label %19

19:                                               ; preds = %.lr.ph, %19
  %.0108 = phi i64 [ 0, %.lr.ph ], [ %36, %19 ]
  %20 = getelementptr inbounds i64, ptr %8, i64 %.0108
  store i64 %.0108, ptr %20, align 8, !tbaa !15
  %21 = load i64, ptr %9, align 8, !tbaa !14
  %22 = shl i64 %21, 3
  tail call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 %22, i1 false)
  %23 = load ptr, ptr %14, align 8, !tbaa !16
  %24 = load ptr, ptr %15, align 8, !tbaa !17
  tail call void %23(ptr noundef %24, i64 noundef %.0108, ptr noundef %11, double noundef 1.000000e+00) #4
  %25 = load ptr, ptr %16, align 8, !tbaa !18
  %26 = load ptr, ptr %15, align 8, !tbaa !17
  %27 = tail call double %25(ptr noundef %26, i64 noundef %.0108, ptr noundef %11) #4
  %28 = load double, ptr %17, align 8, !tbaa !19
  %29 = tail call double @llvm.fmuladd.f64(double %28, double %28, double %27)
  %30 = load double, ptr %18, align 8, !tbaa !20
  %31 = load i64, ptr %4, align 8, !tbaa !5
  %32 = uitofp i64 %31 to double
  %33 = fmul double %30, %32
  %34 = fdiv double %29, %33
  %35 = getelementptr inbounds double, ptr %6, i64 %.0108
  store double %34, ptr %35, align 8, !tbaa !21
  %36 = add nuw nsw i64 %.0108, 1
  %37 = and i64 %31, 4294967295
  %38 = icmp ult i64 %36, %37
  br i1 %38, label %19, label %._crit_edge, !llvm.loop !22

._crit_edge:                                      ; preds = %19, %1
  tail call void @vl_free(ptr noundef %11) #4
  %39 = getelementptr inbounds i8, ptr %0, i64 72
  %40 = getelementptr inbounds i8, ptr %0, i64 144
  %41 = getelementptr inbounds i8, ptr %0, i64 48
  %42 = getelementptr inbounds i8, ptr %0, i64 16
  %43 = getelementptr inbounds i8, ptr %0, i64 24
  %44 = getelementptr inbounds i8, ptr %0, i64 32
  %45 = getelementptr inbounds i8, ptr %0, i64 136
  %46 = getelementptr inbounds i8, ptr %0, i64 288
  %47 = getelementptr inbounds i8, ptr %0, i64 64
  %48 = getelementptr inbounds i8, ptr %0, i64 40
  %49 = getelementptr inbounds i8, ptr %0, i64 152
  %50 = getelementptr inbounds i8, ptr %0, i64 104
  %51 = getelementptr inbounds i8, ptr %0, i64 168
  %52 = getelementptr inbounds i8, ptr %0, i64 184
  %53 = getelementptr inbounds i8, ptr %0, i64 264
  %54 = getelementptr inbounds i8, ptr %0, i64 192
  %55 = getelementptr inbounds i8, ptr %0, i64 200
  %56 = getelementptr inbounds i8, ptr %0, i64 248
  %57 = getelementptr inbounds i8, ptr %0, i64 176
  %58 = getelementptr inbounds i8, ptr %0, i64 88
  %59 = getelementptr inbounds i8, ptr %0, i64 96
  br label %60

60:                                               ; preds = %.backedge, %._crit_edge
  %.099 = phi i64 [ 0, %._crit_edge ], [ %111, %.backedge ]
  %61 = load i64, ptr %4, align 8, !tbaa !5
  %62 = urem i64 %.099, %61
  %63 = icmp eq i64 %62, 0
  br i1 %63, label %64, label %65

64:                                               ; preds = %60
  tail call void @vl_rand_permute_indexes(ptr noundef %3, ptr noundef %8, i64 noundef %61) #4
  %.pre = load i64, ptr %4, align 8, !tbaa !5
  %.pre111 = urem i64 %.099, %.pre
  br label %65

65:                                               ; preds = %64, %60
  %.pre-phi = phi i64 [ %.pre111, %64 ], [ %62, %60 ]
  %66 = getelementptr inbounds i64, ptr %8, i64 %.pre-phi
  %67 = load i64, ptr %66, align 8, !tbaa !15
  %68 = load ptr, ptr %39, align 8, !tbaa !24
  %.not = icmp eq ptr %68, null
  br i1 %.not, label %.thread, label %69

69:                                               ; preds = %65
  %70 = getelementptr inbounds double, ptr %68, i64 %67
  %71 = load double, ptr %70, align 8, !tbaa !21
  %72 = fcmp ogt double %71, 0.000000e+00
  br i1 %72, label %.thread, label %.thread106

.thread:                                          ; preds = %65, %69
  %73 = phi double [ %71, %69 ], [ 1.000000e+00, %65 ]
  %74 = load ptr, ptr %40, align 8, !tbaa !18
  %75 = load ptr, ptr %41, align 8, !tbaa !17
  %76 = load ptr, ptr %42, align 8, !tbaa !25
  %77 = tail call double %74(ptr noundef %75, i64 noundef %67, ptr noundef %76) #4
  %78 = load double, ptr %43, align 8, !tbaa !26
  %79 = load double, ptr %44, align 8, !tbaa !19
  %80 = tail call double @llvm.fmuladd.f64(double %78, double %79, double %77)
  %81 = load ptr, ptr %45, align 8, !tbaa !27
  %82 = load ptr, ptr %46, align 8, !tbaa !28
  %83 = getelementptr inbounds double, ptr %82, i64 %67
  %84 = load double, ptr %83, align 8, !tbaa !21
  %85 = fdiv double %84, %73
  %86 = getelementptr inbounds double, ptr %6, i64 %67
  %87 = load double, ptr %86, align 8, !tbaa !21
  %88 = fmul double %73, %87
  %89 = load ptr, ptr %47, align 8, !tbaa !29
  %90 = getelementptr inbounds double, ptr %89, i64 %67
  %91 = load double, ptr %90, align 8, !tbaa !21
  %92 = tail call double %81(double noundef %85, double noundef %80, double noundef %88, double noundef %91) #4
  %93 = fmul double %73, %92
  %94 = fcmp une double %93, 0.000000e+00
  br i1 %94, label %95, label %.thread106

95:                                               ; preds = %.thread
  %96 = load ptr, ptr %46, align 8, !tbaa !28
  %97 = getelementptr inbounds double, ptr %96, i64 %67
  %98 = load double, ptr %97, align 8, !tbaa !21
  %99 = fadd double %93, %98
  store double %99, ptr %97, align 8, !tbaa !21
  %100 = load i64, ptr %4, align 8, !tbaa !5
  %101 = uitofp i64 %100 to double
  %102 = load double, ptr %48, align 8, !tbaa !20
  %103 = fmul double %102, %101
  %104 = fdiv double %93, %103
  %105 = load ptr, ptr %49, align 8, !tbaa !16
  %106 = load ptr, ptr %41, align 8, !tbaa !17
  %107 = load ptr, ptr %42, align 8, !tbaa !25
  tail call void %105(ptr noundef %106, i64 noundef %67, ptr noundef %107, double noundef %104) #4
  %108 = load double, ptr %44, align 8, !tbaa !19
  %109 = load double, ptr %43, align 8, !tbaa !26
  %110 = tail call double @llvm.fmuladd.f64(double %108, double %104, double %109)
  store double %110, ptr %43, align 8, !tbaa !26
  br label %.thread106

.thread106:                                       ; preds = %69, %95, %.thread
  %111 = add i64 %.099, 1
  %112 = load i64, ptr %50, align 8, !tbaa !30
  %113 = urem i64 %111, %112
  %114 = icmp eq i64 %113, 0
  br i1 %114, label %118, label %115

115:                                              ; preds = %.thread106
  %116 = load i64, ptr %51, align 8, !tbaa !31
  %117 = icmp eq i64 %111, %116
  br i1 %117, label %118, label %.backedge

.backedge:                                        ; preds = %115, %134
  br label %60

118:                                              ; preds = %115, %.thread106
  tail call void @_vl_svm_update_statistics(ptr noundef nonnull %0)
  %119 = tail call double @vl_get_cpu_time() #4
  %120 = fsub double %119, %2
  store double %120, ptr %53, align 8, !tbaa !32
  store i64 %.099, ptr %54, align 8, !tbaa !33
  %121 = load i64, ptr %4, align 8, !tbaa !5
  %122 = udiv i64 %.099, %121
  store i64 %122, ptr %55, align 8, !tbaa !34
  store i32 1, ptr %52, align 8, !tbaa !35
  %123 = load double, ptr %56, align 8, !tbaa !36
  %124 = load double, ptr %57, align 8, !tbaa !37
  %125 = fcmp olt double %123, %124
  br i1 %125, label %.sink.split, label %126

126:                                              ; preds = %118
  %127 = load i64, ptr %51, align 8, !tbaa !31
  %128 = icmp eq i64 %111, %127
  br i1 %128, label %.sink.split, label %129

.sink.split:                                      ; preds = %126, %118
  %.sink = phi i32 [ 2, %118 ], [ 3, %126 ]
  store i32 %.sink, ptr %52, align 8, !tbaa !35
  br label %129

129:                                              ; preds = %.sink.split, %126
  %130 = phi i32 [ 1, %126 ], [ %.sink, %.sink.split ]
  %131 = load ptr, ptr %58, align 8, !tbaa !38
  %.not104 = icmp eq ptr %131, null
  br i1 %.not104, label %134, label %132

132:                                              ; preds = %129
  %133 = load ptr, ptr %59, align 8, !tbaa !39
  tail call void %131(ptr noundef nonnull %0, ptr noundef %133) #4
  %.pre110 = load i32, ptr %52, align 8, !tbaa !35
  br label %134

134:                                              ; preds = %132, %129
  %135 = phi i32 [ %.pre110, %132 ], [ %130, %129 ]
  %.not105 = icmp eq i32 %135, 1
  br i1 %.not105, label %.backedge, label %136

136:                                              ; preds = %134
  tail call void @vl_free(ptr noundef %6) #4
  tail call void @vl_free(ptr noundef nonnull %8) #4
  ret void
}

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

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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, !10, i64 56}
!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 8}
!15 = !{!10, !10, i64 0}
!16 = !{!6, !11, i64 152}
!17 = !{!6, !11, i64 48}
!18 = !{!6, !11, i64 144}
!19 = !{!6, !12, i64 32}
!20 = !{!6, !12, i64 40}
!21 = !{!12, !12, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!6, !11, i64 72}
!25 = !{!6, !11, i64 16}
!26 = !{!6, !12, i64 24}
!27 = !{!6, !11, i64 136}
!28 = !{!6, !11, i64 288}
!29 = !{!6, !11, i64 64}
!30 = !{!6, !10, i64 104}
!31 = !{!6, !10, i64 168}
!32 = !{!6, !12, i64 264}
!33 = !{!6, !10, i64 192}
!34 = !{!6, !10, i64 200}
!35 = !{!6, !7, i64 184}
!36 = !{!6, !12, i64 248}
!37 = !{!6, !12, i64 176}
!38 = !{!6, !11, i64 88}
!39 = !{!6, !11, i64 96}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass