; LLVM IR from vlfeat/vlfeat :: vl (covdet)

; 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._VlCovDet = type { ptr, ptr, i32, double, double, double, i64, i64, i64, double, i64, double, i64, ptr, i64, i64, ptr, i64, i32, [4 x %struct._VlCovDetFeatureOrientation], [4 x %struct._VlCovDetFeatureLaplacianScale], i32, [1681 x float], [1681 x float], [1681 x float], [1681 x float], [1089 x float], [10890 x float], [5 x i64], i32 }
%struct._VlCovDetFeatureOrientation = type { double, double }
%struct._VlCovDetFeatureLaplacianScale = type { double, double }

@.str.1 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@__PRETTY_FUNCTION__.vl_covdet_new = external hidden unnamed_addr constant [40 x i8], align 1

; 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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, 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
declare double @sqrt(double noundef) #3

; Function Attrs: nounwind uwtable
define dso_local ptr @vl_covdet_new(i32 noundef %0) #4 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i64, 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 i64, 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 i64, align 8
  %18 = alloca ptr, align 8
  store i32 %0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %19 = call ptr @vl_calloc(i64 noundef 75144, i64 noundef 1)
  store ptr %19, ptr %3, align 8, !tbaa !9
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = load ptr, ptr %3, align 8, !tbaa !9
  %22 = getelementptr inbounds %struct._VlCovDet, ptr %21, i32 0, i32 2
  store i32 %20, ptr %22, align 8, !tbaa !11
  %23 = load ptr, ptr %3, align 8, !tbaa !9
  %24 = getelementptr inbounds %struct._VlCovDet, ptr %23, i32 0, i32 6
  store i64 3, ptr %24, align 8, !tbaa !15
  %25 = load ptr, ptr %3, align 8, !tbaa !9
  %26 = getelementptr inbounds %struct._VlCovDet, ptr %25, i32 0, i32 7
  store i64 -1, ptr %26, align 8, !tbaa !16
  %27 = load ptr, ptr %3, align 8, !tbaa !9
  %28 = getelementptr inbounds %struct._VlCovDet, ptr %27, i32 0, i32 8
  store i64 -1, ptr %28, align 8, !tbaa !17
  %29 = load ptr, ptr %3, align 8, !tbaa !9
  %30 = getelementptr inbounds %struct._VlCovDet, ptr %29, i32 0, i32 9
  store double 1.600000e+00, ptr %30, align 8, !tbaa !18
  %31 = load ptr, ptr %3, align 8, !tbaa !9
  %32 = getelementptr inbounds %struct._VlCovDet, ptr %31, i32 0, i32 10
  store i64 4, ptr %32, align 8, !tbaa !19
  %33 = load ptr, ptr %3, align 8, !tbaa !9
  %34 = getelementptr inbounds %struct._VlCovDet, ptr %33, i32 0, i32 2
  %35 = load i32, ptr %34, align 8, !tbaa !11
  switch i32 %35, label %57 [
    i32 1, label %36
    i32 4, label %43
    i32 6, label %43
    i32 2, label %50
    i32 3, label %50
    i32 5, label %50
  ]

36:                                               ; preds = %1
  %37 = load ptr, ptr %3, align 8, !tbaa !9
  %38 = getelementptr inbounds %struct._VlCovDet, ptr %37, i32 0, i32 3
  store double 1.000000e-02, ptr %38, align 8, !tbaa !20
  %39 = load ptr, ptr %3, align 8, !tbaa !9
  %40 = getelementptr inbounds %struct._VlCovDet, ptr %39, i32 0, i32 4
  store double 1.000000e+01, ptr %40, align 8, !tbaa !21
  %41 = load ptr, ptr %3, align 8, !tbaa !9
  %42 = getelementptr inbounds %struct._VlCovDet, ptr %41, i32 0, i32 5
  store double 0.000000e+00, ptr %42, align 8, !tbaa !22
  br label %58

43:                                               ; preds = %1, %1
  %44 = load ptr, ptr %3, align 8, !tbaa !9
  %45 = getelementptr inbounds %struct._VlCovDet, ptr %44, i32 0, i32 3
  store double 2.000000e-06, ptr %45, align 8, !tbaa !20
  %46 = load ptr, ptr %3, align 8, !tbaa !9
  %47 = getelementptr inbounds %struct._VlCovDet, ptr %46, i32 0, i32 4
  store double 1.000000e+01, ptr %47, align 8, !tbaa !21
  %48 = load ptr, ptr %3, align 8, !tbaa !9
  %49 = getelementptr inbounds %struct._VlCovDet, ptr %48, i32 0, i32 5
  store double 1.000000e-02, ptr %49, align 8, !tbaa !22
  br label %58

50:                                               ; preds = %1, %1, %1
  %51 = load ptr, ptr %3, align 8, !tbaa !9
  %52 = getelementptr inbounds %struct._VlCovDet, ptr %51, i32 0, i32 3
  store double 3.000000e-03, ptr %52, align 8, !tbaa !20
  %53 = load ptr, ptr %3, align 8, !tbaa !9
  %54 = getelementptr inbounds %struct._VlCovDet, ptr %53, i32 0, i32 4
  store double 1.000000e+01, ptr %54, align 8, !tbaa !21
  %55 = load ptr, ptr %3, align 8, !tbaa !9
  %56 = getelementptr inbounds %struct._VlCovDet, ptr %55, i32 0, i32 5
  store double 1.000000e-02, ptr %56, align 8, !tbaa !22
  br label %58

57:                                               ; preds = %1
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.1, i32 noundef 1542, ptr noundef @__PRETTY_FUNCTION__.vl_covdet_new) #8
  unreachable

58:                                               ; preds = %50, %43, %36
  %59 = load ptr, ptr %3, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct._VlCovDet, ptr %59, i32 0, i32 11
  store double 5.000000e-01, ptr %60, align 8, !tbaa !23
  %61 = load ptr, ptr %3, align 8, !tbaa !9
  %62 = getelementptr inbounds %struct._VlCovDet, ptr %61, i32 0, i32 13
  store ptr null, ptr %62, align 8, !tbaa !24
  %63 = load ptr, ptr %3, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct._VlCovDet, ptr %63, i32 0, i32 14
  store i64 0, ptr %64, align 8, !tbaa !25
  %65 = load ptr, ptr %3, align 8, !tbaa !9
  %66 = getelementptr inbounds %struct._VlCovDet, ptr %65, i32 0, i32 15
  store i64 0, ptr %66, align 8, !tbaa !26
  %67 = load ptr, ptr %3, align 8, !tbaa !9
  %68 = getelementptr inbounds %struct._VlCovDet, ptr %67, i32 0, i32 16
  store ptr null, ptr %68, align 8, !tbaa !27
  %69 = load ptr, ptr %3, align 8, !tbaa !9
  %70 = getelementptr inbounds %struct._VlCovDet, ptr %69, i32 0, i32 17
  store i64 0, ptr %70, align 8, !tbaa !28
  %71 = load ptr, ptr %3, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct._VlCovDet, ptr %71, i32 0, i32 18
  store i32 0, ptr %72, align 8, !tbaa !29
  %73 = load ptr, ptr %3, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct._VlCovDet, ptr %73, i32 0, i32 21
  store i32 0, ptr %74, align 8, !tbaa !30
  %75 = load ptr, ptr %3, align 8, !tbaa !9
  %76 = getelementptr inbounds %struct._VlCovDet, ptr %75, i32 0, i32 29
  store i32 1, ptr %76, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store i64 20, ptr %4, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store double 0x3FDC18F9C18F9C19, ptr %7, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store double 3.000000e+00, ptr %8, align 8, !tbaa !33
  store i64 -20, ptr %6, align 8, !tbaa !32
  br label %77

77:                                               ; preds = %119, %58
  %78 = load i64, ptr %6, align 8, !tbaa !32
  %79 = icmp sle i64 %78, 20
  br i1 %79, label %80, label %122

80:                                               ; preds = %77
  store i64 -20, ptr %5, align 8, !tbaa !32
  br label %81

81:                                               ; preds = %115, %80
  %82 = load i64, ptr %5, align 8, !tbaa !32
  %83 = icmp sle i64 %82, 20
  br i1 %83, label %84, label %118

84:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %85 = load i64, ptr %5, align 8, !tbaa !32
  %86 = sitofp i64 %85 to double
  %87 = load double, ptr %7, align 8, !tbaa !33
  %88 = fmul double %86, %87
  %89 = load double, ptr %8, align 8, !tbaa !33
  %90 = fdiv double %88, %89
  store double %90, ptr %9, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %91 = load i64, ptr %6, align 8, !tbaa !32
  %92 = sitofp i64 %91 to double
  %93 = load double, ptr %7, align 8, !tbaa !33
  %94 = fmul double %92, %93
  %95 = load double, ptr %8, align 8, !tbaa !33
  %96 = fdiv double %94, %95
  store double %96, ptr %10, align 8, !tbaa !33
  %97 = load double, ptr %9, align 8, !tbaa !33
  %98 = load double, ptr %9, align 8, !tbaa !33
  %99 = load double, ptr %10, align 8, !tbaa !33
  %100 = load double, ptr %10, align 8, !tbaa !33
  %101 = fmul double %99, %100
  %102 = call double @llvm.fmuladd.f64(double %97, double %98, double %101)
  %103 = fmul double -5.000000e-01, %102
  %104 = call double @exp(double noundef %103) #7
  %105 = fptrunc double %104 to float
  %106 = load ptr, ptr %3, align 8, !tbaa !9
  %107 = getelementptr inbounds %struct._VlCovDet, ptr %106, i32 0, i32 25
  %108 = load i64, ptr %5, align 8, !tbaa !32
  %109 = add nsw i64 %108, 20
  %110 = load i64, ptr %6, align 8, !tbaa !32
  %111 = add nsw i64 %110, 20
  %112 = mul nsw i64 41, %111
  %113 = add nsw i64 %109, %112
  %114 = getelementptr inbounds [1681 x float], ptr %107, i64 0, i64 %113
  store float %105, ptr %114, align 4, !tbaa !34
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %115

115:                                              ; preds = %84
  %116 = load i64, ptr %5, align 8, !tbaa !32
  %117 = add nsw i64 %116, 1
  store i64 %117, ptr %5, align 8, !tbaa !32
  br label %81, !llvm.loop !36

118:                                              ; preds = %81
  br label %119

119:                                              ; preds = %118
  %120 = load i64, ptr %6, align 8, !tbaa !32
  %121 = add nsw i64 %120, 1
  store i64 %121, ptr %6, align 8, !tbaa !32
  br label %77, !llvm.loop !38

122:                                              ; preds = %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #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 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 0, ptr %11, align 8, !tbaa !32
  br label %123

123:                                              ; preds = %169, %122
  %124 = load i64, ptr %11, align 8, !tbaa !32
  %125 = icmp slt i64 %124, 10
  br i1 %125, label %126, label %172

126:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %127 = load i64, ptr %11, align 8, !tbaa !32
  %128 = sitofp i64 %127 to double
  %129 = fdiv double %128, 9.000000e+00
  %130 = fadd double -5.000000e-01, %129
  %131 = call double @pow(double noundef 2.000000e+00, double noundef %130) #7
  store double %131, ptr %12, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %132 = call double @sqrt(double noundef 2.000000e+00) #7
  %133 = fdiv double 1.000000e+00, %132
  store double %133, ptr %13, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %134 = load double, ptr %13, align 8, !tbaa !33
  %135 = fmul double 5.000000e-01, %134
  store double %135, ptr %14, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %136 = load double, ptr %12, align 8, !tbaa !33
  %137 = load double, ptr %12, align 8, !tbaa !33
  %138 = load double, ptr %13, align 8, !tbaa !33
  %139 = load double, ptr %13, align 8, !tbaa !33
  %140 = fmul double %138, %139
  %141 = fneg double %140
  %142 = call double @llvm.fmuladd.f64(double %136, double %137, double %141)
  %143 = call double @sqrt(double noundef %142) #7
  store double %143, ptr %15, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store i64 16, ptr %16, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  store i64 33, ptr %17, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %144 = load ptr, ptr %3, align 8, !tbaa !9
  %145 = getelementptr inbounds %struct._VlCovDet, ptr %144, i32 0, i32 27
  %146 = getelementptr inbounds [10890 x float], ptr %145, i64 0, i64 0
  %147 = load i64, ptr %11, align 8, !tbaa !32
  %148 = mul i64 %147, 1089
  %149 = getelementptr inbounds float, ptr %146, i64 %148
  store ptr %149, ptr %18, align 8, !tbaa !9
  %150 = load ptr, ptr %18, align 8, !tbaa !9
  call void @llvm.memset.p0.i64(ptr align 4 %150, i8 0, i64 4356, i1 false)
  %151 = load ptr, ptr %18, align 8, !tbaa !9
  %152 = getelementptr inbounds float, ptr %151, i64 544
  store float -4.000000e+00, ptr %152, align 4, !tbaa !34
  %153 = load ptr, ptr %18, align 8, !tbaa !9
  %154 = getelementptr inbounds float, ptr %153, i64 543
  store float 1.000000e+00, ptr %154, align 4, !tbaa !34
  %155 = load ptr, ptr %18, align 8, !tbaa !9
  %156 = getelementptr inbounds float, ptr %155, i64 545
  store float 1.000000e+00, ptr %156, align 4, !tbaa !34
  %157 = load ptr, ptr %18, align 8, !tbaa !9
  %158 = getelementptr inbounds float, ptr %157, i64 577
  store float 1.000000e+00, ptr %158, align 4, !tbaa !34
  %159 = load ptr, ptr %18, align 8, !tbaa !9
  %160 = getelementptr inbounds float, ptr %159, i64 511
  store float 1.000000e+00, ptr %160, align 4, !tbaa !34
  %161 = load ptr, ptr %18, align 8, !tbaa !9
  %162 = load ptr, ptr %18, align 8, !tbaa !9
  %163 = load double, ptr %15, align 8, !tbaa !33
  %164 = load double, ptr %14, align 8, !tbaa !33
  %165 = fdiv double %163, %164
  %166 = load double, ptr %15, align 8, !tbaa !33
  %167 = load double, ptr %14, align 8, !tbaa !33
  %168 = fdiv double %166, %167
  call void @vl_imsmooth_f(ptr noundef %161, i64 noundef 33, ptr noundef %162, i64 noundef 33, i64 noundef 33, i64 noundef 33, double noundef %165, double noundef %168)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %169

169:                                              ; preds = %126
  %170 = load i64, ptr %11, align 8, !tbaa !32
  %171 = add nsw i64 %170, 1
  store i64 %171, ptr %11, align 8, !tbaa !32
  br label %123, !llvm.loop !39

172:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  %173 = load ptr, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  ret ptr %173
}

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

; Function Attrs: nounwind
declare double @exp(double noundef) #3

; Function Attrs: nounwind
declare double @pow(double noundef, double noundef) #3

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

declare void @vl_imsmooth_f(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, double noundef, double noundef) #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 16}
!12 = !{!"_VlCovDet", !10, i64 0, !10, i64 8, !6, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !13, i64 72, !14, i64 80, !13, i64 88, !14, i64 96, !10, i64 104, !14, i64 112, !14, i64 120, !10, i64 128, !14, i64 136, !6, i64 144, !7, i64 152, !7, i64 216, !6, i64 280, !7, i64 284, !7, i64 7008, !7, i64 13732, !7, i64 20456, !7, i64 27180, !7, i64 31536, !7, i64 75096, !6, i64 75136}
!13 = !{!"double", !7, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = !{!12, !14, i64 48}
!16 = !{!12, !14, i64 56}
!17 = !{!12, !14, i64 64}
!18 = !{!12, !13, i64 72}
!19 = !{!12, !14, i64 80}
!20 = !{!12, !13, i64 24}
!21 = !{!12, !13, i64 32}
!22 = !{!12, !13, i64 40}
!23 = !{!12, !13, i64 88}
!24 = !{!12, !10, i64 104}
!25 = !{!12, !14, i64 112}
!26 = !{!12, !14, i64 120}
!27 = !{!12, !10, i64 128}
!28 = !{!12, !14, i64 136}
!29 = !{!12, !6, i64 144}
!30 = !{!12, !6, i64 280}
!31 = !{!12, !6, i64 75136}
!32 = !{!14, !14, i64 0}
!33 = !{!13, !13, i64 0}
!34 = !{!35, !35, i64 0}
!35 = !{!"float", !7, i64 0}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = distinct !{!38, !37}
!39 = distinct !{!39, !37}


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

@.str.1 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@__PRETTY_FUNCTION__.vl_covdet_new = external hidden unnamed_addr constant [40 x i8], align 1
@switch.table.vl_covdet_new = private unnamed_addr constant [6 x double] [double 1.000000e-02, double 3.000000e-03, double 3.000000e-03, double 2.000000e-06, double 3.000000e-03, double 2.000000e-06], align 8
@switch.table.vl_covdet_new.1 = private unnamed_addr constant [6 x double] [double 0.000000e+00, double 1.000000e-02, double 1.000000e-02, double 1.000000e-02, double 1.000000e-02, double 1.000000e-02], align 8

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, 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
define dso_local ptr @vl_covdet_new(i32 noundef %0) local_unnamed_addr #2 {
  %2 = tail call ptr @vl_calloc(i64 noundef 75144, i64 noundef 1) #6
  %3 = getelementptr inbounds i8, ptr %2, i64 16
  store i32 %0, ptr %3, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %2, i64 48
  store i64 3, ptr %4, align 8, !tbaa !13
  %5 = getelementptr inbounds i8, ptr %2, i64 56
  %6 = getelementptr inbounds i8, ptr %2, i64 72
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %5, i8 -1, i64 16, i1 false)
  store double 1.600000e+00, ptr %6, align 8, !tbaa !14
  %7 = getelementptr inbounds i8, ptr %2, i64 80
  store i64 4, ptr %7, align 8, !tbaa !15
  %switch.tableidx = add i32 %0, -1
  %8 = icmp ult i32 %switch.tableidx, 6
  br i1 %8, label %switch.lookup, label %9

9:                                                ; preds = %1
  tail call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, i32 noundef 1542, ptr noundef nonnull @__PRETTY_FUNCTION__.vl_covdet_new) #7
  unreachable

switch.lookup:                                    ; preds = %1
  %10 = zext nneg i32 %switch.tableidx to i64
  %switch.gep = getelementptr inbounds [6 x double], ptr @switch.table.vl_covdet_new, i64 0, i64 %10
  %switch.load = load double, ptr %switch.gep, align 8
  %11 = zext nneg i32 %switch.tableidx to i64
  %switch.gep77 = getelementptr inbounds [6 x double], ptr @switch.table.vl_covdet_new.1, i64 0, i64 %11
  %switch.load78 = load double, ptr %switch.gep77, align 8
  %12 = getelementptr inbounds i8, ptr %2, i64 24
  store double %switch.load, ptr %12, align 8, !tbaa !16
  %13 = getelementptr inbounds i8, ptr %2, i64 32
  store double 1.000000e+01, ptr %13, align 8, !tbaa !17
  %14 = getelementptr inbounds i8, ptr %2, i64 40
  store double %switch.load78, ptr %14, align 8, !tbaa !18
  %15 = getelementptr inbounds i8, ptr %2, i64 88
  store double 5.000000e-01, ptr %15, align 8, !tbaa !19
  %16 = getelementptr inbounds i8, ptr %2, i64 104
  %17 = getelementptr inbounds i8, ptr %2, i64 280
  store i32 0, ptr %17, align 8, !tbaa !20
  %18 = getelementptr inbounds i8, ptr %2, i64 75136
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(44) %16, i8 0, i64 44, i1 false)
  store i32 1, ptr %18, align 8, !tbaa !21
  %19 = getelementptr inbounds i8, ptr %2, i64 20456
  br label %.preheader67

.preheader67:                                     ; preds = %switch.lookup, %87
  %.06569 = phi i64 [ -20, %switch.lookup ], [ %88, %87 ]
  %20 = sitofp i64 %.06569 to double
  %21 = fmul double %20, 0x3FDC18F9C18F9C19
  %22 = fdiv double %21, 3.000000e+00
  %23 = fmul double %22, %22
  %24 = mul nsw i64 %.06569, 41
  %25 = add nsw i64 %24, 840
  br label %76

.preheader:                                       ; preds = %87
  %26 = getelementptr inbounds i8, ptr %2, i64 31536
  %exp2 = tail call double @exp2(double -5.000000e-01) #6
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(4356) %26, i8 0, i64 4356, i1 false)
  %27 = getelementptr inbounds i8, ptr %2, i64 33708
  store <2 x float> <float 1.000000e+00, float -4.000000e+00>, ptr %27, align 4, !tbaa !22
  %28 = getelementptr inbounds i8, ptr %2, i64 33716
  store float 1.000000e+00, ptr %28, align 4, !tbaa !22
  %29 = getelementptr inbounds i8, ptr %2, i64 33844
  store float 1.000000e+00, ptr %29, align 4, !tbaa !22
  %30 = getelementptr inbounds i8, ptr %2, i64 33580
  store float 1.000000e+00, ptr %30, align 4, !tbaa !22
  tail call void @vl_imsmooth_f(ptr noundef nonnull %26, i64 noundef 33, ptr noundef nonnull %26, i64 noundef 33, i64 noundef 33, i64 noundef 33, double noundef 0x3E64567513E692E9, double noundef 0x3E64567513E692E9) #6
  %exp2.1 = tail call double @exp2(double 0xBFD8E38E38E38E39) #6
  %31 = getelementptr inbounds i8, ptr %2, i64 35892
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(4356) %31, i8 0, i64 4356, i1 false)
  %32 = getelementptr inbounds i8, ptr %2, i64 38064
  store <2 x float> <float 1.000000e+00, float -4.000000e+00>, ptr %32, align 4, !tbaa !22
  %33 = getelementptr inbounds i8, ptr %2, i64 38072
  store float 1.000000e+00, ptr %33, align 4, !tbaa !22
  %34 = getelementptr inbounds i8, ptr %2, i64 38200
  store float 1.000000e+00, ptr %34, align 4, !tbaa !22
  %35 = getelementptr inbounds i8, ptr %2, i64 37936
  store float 1.000000e+00, ptr %35, align 4, !tbaa !22
  tail call void @vl_imsmooth_f(ptr noundef nonnull %31, i64 noundef 33, ptr noundef nonnull %31, i64 noundef 33, i64 noundef 33, i64 noundef 33, double noundef 0x3FEA1DFA4ED0D6BA, double noundef 0x3FEA1DFA4ED0D6BA) #6
  %exp2.2 = tail call double @exp2(double 0xBFD1C71C71C71C72) #6
  %36 = getelementptr inbounds i8, ptr %2, i64 40248
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(4356) %36, i8 0, i64 4356, i1 false)
  %37 = getelementptr inbounds i8, ptr %2, i64 42420
  store <2 x float> <float 1.000000e+00, float -4.000000e+00>, ptr %37, align 4, !tbaa !22
  %38 = getelementptr inbounds i8, ptr %2, i64 42428
  store float 1.000000e+00, ptr %38, align 4, !tbaa !22
  %39 = getelementptr inbounds i8, ptr %2, i64 42556
  store float 1.000000e+00, ptr %39, align 4, !tbaa !22
  %40 = getelementptr inbounds i8, ptr %2, i64 42292
  store float 1.000000e+00, ptr %40, align 4, !tbaa !22
  tail call void @vl_imsmooth_f(ptr noundef nonnull %36, i64 noundef 33, ptr noundef nonnull %36, i64 noundef 33, i64 noundef 33, i64 noundef 33, double noundef 0x3FF33897119B38E7, double noundef 0x3FF33897119B38E7) #6
  %exp2.3 = tail call double @exp2(double 0xBFC5555555555556) #6
  %41 = getelementptr inbounds i8, ptr %2, i64 44604
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(4356) %41, i8 0, i64 4356, i1 false)
  %42 = getelementptr inbounds i8, ptr %2, i64 46776
  store <2 x float> <float 1.000000e+00, float -4.000000e+00>, ptr %42, align 4, !tbaa !22
  %43 = getelementptr inbounds i8, ptr %2, i64 46784
  store float 1.000000e+00, ptr %43, align 4, !tbaa !22
  %44 = getelementptr inbounds i8, ptr %2, i64 46912
  store float 1.000000e+00, ptr %44, align 4, !tbaa !22
  %45 = getelementptr inbounds i8, ptr %2, i64 46648
  store float 1.000000e+00, ptr %45, align 4, !tbaa !22
  tail call void @vl_imsmooth_f(ptr noundef nonnull %41, i64 noundef 33, ptr noundef nonnull %41, i64 noundef 33, i64 noundef 33, i64 noundef 33, double noundef 0x3FF88685332D356C, double noundef 0x3FF88685332D356C) #6
  %exp2.4 = tail call double @exp2(double 0xBFAC71C71C71C720) #6
  %46 = getelementptr inbounds i8, ptr %2, i64 48960
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(4356) %46, i8 0, i64 4356, i1 false)
  %47 = getelementptr inbounds i8, ptr %2, i64 51132
  store <2 x float> <float 1.000000e+00, float -4.000000e+00>, ptr %47, align 4, !tbaa !22
  %48 = getelementptr inbounds i8, ptr %2, i64 51140
  store float 1.000000e+00, ptr %48, align 4, !tbaa !22
  %49 = getelementptr inbounds i8, ptr %2, i64 51268
  store float 1.000000e+00, ptr %49, align 4, !tbaa !22
  %50 = getelementptr inbounds i8, ptr %2, i64 51004
  store float 1.000000e+00, ptr %50, align 4, !tbaa !22
  tail call void @vl_imsmooth_f(ptr noundef nonnull %46, i64 noundef 33, ptr noundef nonnull %46, i64 noundef 33, i64 noundef 33, i64 noundef 33, double noundef 0x3FFD886B4739D845, double noundef 0x3FFD886B4739D845) #6
  %exp2.5 = tail call double @exp2(double 0x3FAC71C71C71C720) #6
  %51 = getelementptr inbounds i8, ptr %2, i64 53316
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(4356) %51, i8 0, i64 4356, i1 false)
  %52 = getelementptr inbounds i8, ptr %2, i64 55488
  store <2 x float> <float 1.000000e+00, float -4.000000e+00>, ptr %52, align 4, !tbaa !22
  %53 = getelementptr inbounds i8, ptr %2, i64 55496
  store float 1.000000e+00, ptr %53, align 4, !tbaa !22
  %54 = getelementptr inbounds i8, ptr %2, i64 55624
  store float 1.000000e+00, ptr %54, align 4, !tbaa !22
  %55 = getelementptr inbounds i8, ptr %2, i64 55360
  store float 1.000000e+00, ptr %55, align 4, !tbaa !22
  tail call void @vl_imsmooth_f(ptr noundef nonnull %51, i64 noundef 33, ptr noundef nonnull %51, i64 noundef 33, i64 noundef 33, i64 noundef 33, double noundef 0x40013BC112D4A709, double noundef 0x40013BC112D4A709) #6
  %exp2.6 = tail call double @exp2(double 0x3FC5555555555554) #6
  %56 = getelementptr inbounds i8, ptr %2, i64 57672
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(4356) %56, i8 0, i64 4356, i1 false)
  %57 = getelementptr inbounds i8, ptr %2, i64 59844
  store <2 x float> <float 1.000000e+00, float -4.000000e+00>, ptr %57, align 4, !tbaa !22
  %58 = getelementptr inbounds i8, ptr %2, i64 59852
  store float 1.000000e+00, ptr %58, align 4, !tbaa !22
  %59 = getelementptr inbounds i8, ptr %2, i64 59980
  store float 1.000000e+00, ptr %59, align 4, !tbaa !22
  %60 = getelementptr inbounds i8, ptr %2, i64 59716
  store float 1.000000e+00, ptr %60, align 4, !tbaa !22
  tail call void @vl_imsmooth_f(ptr noundef nonnull %56, i64 noundef 33, ptr noundef nonnull %56, i64 noundef 33, i64 noundef 33, i64 noundef 33, double noundef 0x4003B9A02A86CC2E, double noundef 0x4003B9A02A86CC2E) #6
  %exp2.7 = tail call double @exp2(double 0x3FD1C71C71C71C72) #6
  %61 = getelementptr inbounds i8, ptr %2, i64 62028
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(4356) %61, i8 0, i64 4356, i1 false)
  %62 = getelementptr inbounds i8, ptr %2, i64 64200
  store <2 x float> <float 1.000000e+00, float -4.000000e+00>, ptr %62, align 4, !tbaa !22
  %63 = getelementptr inbounds i8, ptr %2, i64 64208
  store float 1.000000e+00, ptr %63, align 4, !tbaa !22
  %64 = getelementptr inbounds i8, ptr %2, i64 64336
  store float 1.000000e+00, ptr %64, align 4, !tbaa !22
  %65 = getelementptr inbounds i8, ptr %2, i64 64072
  store float 1.000000e+00, ptr %65, align 4, !tbaa !22
  tail call void @vl_imsmooth_f(ptr noundef nonnull %61, i64 noundef 33, ptr noundef nonnull %61, i64 noundef 33, i64 noundef 33, i64 noundef 33, double noundef 0x4006484978430861, double noundef 0x4006484978430861) #6
  %exp2.8 = tail call double @exp2(double 0x3FD8E38E38E38E38) #6
  %66 = getelementptr inbounds i8, ptr %2, i64 66384
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(4356) %66, i8 0, i64 4356, i1 false)
  %67 = getelementptr inbounds i8, ptr %2, i64 68556
  store <2 x float> <float 1.000000e+00, float -4.000000e+00>, ptr %67, align 4, !tbaa !22
  %68 = getelementptr inbounds i8, ptr %2, i64 68564
  store float 1.000000e+00, ptr %68, align 4, !tbaa !22
  %69 = getelementptr inbounds i8, ptr %2, i64 68692
  store float 1.000000e+00, ptr %69, align 4, !tbaa !22
  %70 = getelementptr inbounds i8, ptr %2, i64 68428
  store float 1.000000e+00, ptr %70, align 4, !tbaa !22
  tail call void @vl_imsmooth_f(ptr noundef nonnull %66, i64 noundef 33, ptr noundef nonnull %66, i64 noundef 33, i64 noundef 33, i64 noundef 33, double noundef 0x4008EFAFC12F0219, double noundef 0x4008EFAFC12F0219) #6
  %exp2.9 = tail call double @exp2(double 5.000000e-01) #6
  %71 = getelementptr inbounds i8, ptr %2, i64 70740
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(4356) %71, i8 0, i64 4356, i1 false)
  %72 = getelementptr inbounds i8, ptr %2, i64 72912
  store <2 x float> <float 1.000000e+00, float -4.000000e+00>, ptr %72, align 4, !tbaa !22
  %73 = getelementptr inbounds i8, ptr %2, i64 72920
  store float 1.000000e+00, ptr %73, align 4, !tbaa !22
  %74 = getelementptr inbounds i8, ptr %2, i64 73048
  store float 1.000000e+00, ptr %74, align 4, !tbaa !22
  %75 = getelementptr inbounds i8, ptr %2, i64 72784
  store float 1.000000e+00, ptr %75, align 4, !tbaa !22
  tail call void @vl_imsmooth_f(ptr noundef nonnull %71, i64 noundef 33, ptr noundef nonnull %71, i64 noundef 33, i64 noundef 33, i64 noundef 33, double noundef 0x400BB67AE8584CAC, double noundef 0x400BB67AE8584CAC) #6
  ret ptr %2

76:                                               ; preds = %.preheader67, %76
  %.068 = phi i64 [ -20, %.preheader67 ], [ %86, %76 ]
  %77 = sitofp i64 %.068 to double
  %78 = fmul double %77, 0x3FDC18F9C18F9C19
  %79 = fdiv double %78, 3.000000e+00
  %80 = tail call double @llvm.fmuladd.f64(double %79, double %79, double %23)
  %81 = fmul double %80, -5.000000e-01
  %82 = tail call double @exp(double noundef %81) #6
  %83 = fptrunc double %82 to float
  %84 = add nsw i64 %25, %.068
  %85 = getelementptr inbounds [1681 x float], ptr %19, i64 0, i64 %84
  store float %83, ptr %85, align 4, !tbaa !22
  %86 = add nsw i64 %.068, 1
  %exitcond.not = icmp eq i64 %86, 21
  br i1 %exitcond.not, label %87, label %76, !llvm.loop !24

87:                                               ; preds = %76
  %88 = add nsw i64 %.06569, 1
  %exitcond71.not = icmp eq i64 %88, 21
  br i1 %exitcond71.not, label %.preheader, label %.preheader67, !llvm.loop !26
}

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

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

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

declare void @vl_imsmooth_f(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, double noundef, double noundef) local_unnamed_addr #3

declare double @exp2(double) local_unnamed_addr

attributes #0 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }
attributes #7 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 16}
!6 = !{!"_VlCovDet", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !11, i64 72, !12, i64 80, !11, i64 88, !12, i64 96, !7, i64 104, !12, i64 112, !12, i64 120, !7, i64 128, !12, i64 136, !10, i64 144, !8, i64 152, !8, i64 216, !10, i64 280, !8, i64 284, !8, i64 7008, !8, i64 13732, !8, i64 20456, !8, i64 27180, !8, i64 31536, !8, i64 75096, !10, i64 75136}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!"long long", !8, i64 0}
!13 = !{!6, !12, i64 48}
!14 = !{!6, !11, i64 72}
!15 = !{!6, !12, i64 80}
!16 = !{!6, !11, i64 24}
!17 = !{!6, !11, i64 32}
!18 = !{!6, !11, i64 40}
!19 = !{!6, !11, i64 88}
!20 = !{!6, !10, i64 280}
!21 = !{!6, !10, i64 75136}
!22 = !{!23, !23, i64 0}
!23 = !{!"float", !8, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,MemCpyOptPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass