; LLVM IR from QiaoLiuHit/LSOTB-TIR :: vlfeat-0.9.19/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._VlFrameOrientedEllipse = type { float, float, float, float, float, float }
%struct._VlCovDetFeature = type { %struct._VlFrameOrientedEllipse, float, float, float, float }
%struct._VlCovDet = type { ptr, ptr, i32, double, double, double, i64, 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] }
%struct._VlCovDetFeatureOrientation = type { double, double }
%struct._VlCovDetFeatureLaplacianScale = type { 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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @vl_covdet_append_feature(ptr noundef, ptr noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: nounwind
declare double @cos(double noundef) #4

; Function Attrs: nounwind
declare double @sin(double noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local i64 @vl_covdet_get_num_features(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @vl_covdet_extract_orientations_for_frame(ptr noundef, ptr noundef, ptr noundef byval(%struct._VlFrameOrientedEllipse) align 8) #2

; Function Attrs: nounwind uwtable
define dso_local void @vl_covdet_extract_orientations(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca %struct._VlCovDetFeature, align 8
  %8 = alloca ptr, align 8
  %9 = alloca [4 x double], align 16
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca ptr, 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
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = call i64 @vl_covdet_get_num_features(ptr noundef %13)
  store i64 %14, ptr %5, align 8, !tbaa !9
  store i64 0, ptr %3, align 8, !tbaa !9
  br label %15

15:                                               ; preds = %150, %1
  %16 = load i64, ptr %3, align 8, !tbaa !9
  %17 = load i64, ptr %5, align 8, !tbaa !9
  %18 = trunc i64 %17 to i32
  %19 = sext i32 %18 to i64
  %20 = icmp slt i64 %16, %19
  br i1 %20, label %21, label %153

21:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %7) #5
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct._VlCovDet, ptr %22, i32 0, i32 10
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = load i64, ptr %3, align 8, !tbaa !9
  %26 = getelementptr inbounds %struct._VlCovDetFeature, ptr %24, i64 %25
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 4 %26, i64 40, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %27 = load ptr, ptr %2, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct._VlCovDetFeature, ptr %7, i32 0, i32 0
  %29 = call ptr @vl_covdet_extract_orientations_for_frame(ptr noundef %27, ptr noundef %6, ptr noundef byval(%struct._VlFrameOrientedEllipse) align 8 %28)
  store ptr %29, ptr %8, align 8, !tbaa !5
  store i64 0, ptr %4, align 8, !tbaa !9
  br label %30

30:                                               ; preds = %146, %21
  %31 = load i64, ptr %4, align 8, !tbaa !9
  %32 = load i64, ptr %6, align 8, !tbaa !9
  %33 = trunc i64 %32 to i32
  %34 = sext i32 %33 to i64
  %35 = icmp slt i64 %31, %34
  br i1 %35, label %36, label %149

36:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #5
  %37 = getelementptr inbounds %struct._VlCovDetFeature, ptr %7, i32 0, i32 0
  %38 = getelementptr inbounds %struct._VlFrameOrientedEllipse, ptr %37, i32 0, i32 2
  %39 = load float, ptr %38, align 4, !tbaa !18
  %40 = fpext float %39 to double
  store double %40, ptr %9, align 8, !tbaa !21
  %41 = getelementptr inbounds double, ptr %9, i64 1
  %42 = getelementptr inbounds %struct._VlCovDetFeature, ptr %7, i32 0, i32 0
  %43 = getelementptr inbounds %struct._VlFrameOrientedEllipse, ptr %42, i32 0, i32 4
  %44 = load float, ptr %43, align 4, !tbaa !22
  %45 = fpext float %44 to double
  store double %45, ptr %41, align 8, !tbaa !21
  %46 = getelementptr inbounds double, ptr %9, i64 2
  %47 = getelementptr inbounds %struct._VlCovDetFeature, ptr %7, i32 0, i32 0
  %48 = getelementptr inbounds %struct._VlFrameOrientedEllipse, ptr %47, i32 0, i32 3
  %49 = load float, ptr %48, align 4, !tbaa !23
  %50 = fpext float %49 to double
  store double %50, ptr %46, align 8, !tbaa !21
  %51 = getelementptr inbounds double, ptr %9, i64 3
  %52 = getelementptr inbounds %struct._VlCovDetFeature, ptr %7, i32 0, i32 0
  %53 = getelementptr inbounds %struct._VlFrameOrientedEllipse, ptr %52, i32 0, i32 5
  %54 = load float, ptr %53, align 4, !tbaa !24
  %55 = fpext float %54 to double
  store double %55, ptr %51, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = load i64, ptr %4, align 8, !tbaa !9
  %58 = getelementptr inbounds %struct._VlCovDetFeatureOrientation, ptr %56, i64 %57
  %59 = getelementptr inbounds %struct._VlCovDetFeatureOrientation, ptr %58, i32 0, i32 0
  %60 = load double, ptr %59, align 8, !tbaa !25
  %61 = call double @cos(double noundef %60) #5
  store double %61, ptr %10, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = load i64, ptr %4, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct._VlCovDetFeatureOrientation, ptr %62, i64 %63
  %65 = getelementptr inbounds %struct._VlCovDetFeatureOrientation, ptr %64, i32 0, i32 0
  %66 = load double, ptr %65, align 8, !tbaa !25
  %67 = call double @sin(double noundef %66) #5
  store double %67, ptr %11, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %68 = load i64, ptr %4, align 8, !tbaa !9
  %69 = icmp eq i64 %68, 0
  br i1 %69, label %70, label %76

70:                                               ; preds = %36
  %71 = load ptr, ptr %2, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct._VlCovDet, ptr %71, i32 0, i32 10
  %73 = load ptr, ptr %72, align 8, !tbaa !11
  %74 = load i64, ptr %3, align 8, !tbaa !9
  %75 = getelementptr inbounds %struct._VlCovDetFeature, ptr %73, i64 %74
  store ptr %75, ptr %12, align 8, !tbaa !5
  br label %87

76:                                               ; preds = %36
  %77 = load ptr, ptr %2, align 8, !tbaa !5
  %78 = call i32 @vl_covdet_append_feature(ptr noundef %77, ptr noundef %7)
  %79 = load ptr, ptr %2, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._VlCovDet, ptr %79, i32 0, i32 10
  %81 = load ptr, ptr %80, align 8, !tbaa !11
  %82 = load ptr, ptr %2, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct._VlCovDet, ptr %82, i32 0, i32 11
  %84 = load i64, ptr %83, align 8, !tbaa !27
  %85 = sub i64 %84, 1
  %86 = getelementptr inbounds %struct._VlCovDetFeature, ptr %81, i64 %85
  store ptr %86, ptr %12, align 8, !tbaa !5
  br label %87

87:                                               ; preds = %76, %70
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = load i64, ptr %4, align 8, !tbaa !9
  %90 = getelementptr inbounds %struct._VlCovDetFeatureOrientation, ptr %88, i64 %89
  %91 = getelementptr inbounds %struct._VlCovDetFeatureOrientation, ptr %90, i32 0, i32 1
  %92 = load double, ptr %91, align 8, !tbaa !28
  %93 = fptrunc double %92 to float
  %94 = load ptr, ptr %12, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct._VlCovDetFeature, ptr %94, i32 0, i32 3
  store float %93, ptr %95, align 4, !tbaa !29
  %96 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 0
  %97 = load double, ptr %96, align 16, !tbaa !21
  %98 = load double, ptr %10, align 8, !tbaa !21
  %99 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 2
  %100 = load double, ptr %99, align 16, !tbaa !21
  %101 = load double, ptr %11, align 8, !tbaa !21
  %102 = fmul double %100, %101
  %103 = call double @llvm.fmuladd.f64(double %97, double %98, double %102)
  %104 = fptrunc double %103 to float
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct._VlCovDetFeature, ptr %105, i32 0, i32 0
  %107 = getelementptr inbounds %struct._VlFrameOrientedEllipse, ptr %106, i32 0, i32 2
  store float %104, ptr %107, align 4, !tbaa !18
  %108 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 1
  %109 = load double, ptr %108, align 8, !tbaa !21
  %110 = load double, ptr %10, align 8, !tbaa !21
  %111 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 3
  %112 = load double, ptr %111, align 8, !tbaa !21
  %113 = load double, ptr %11, align 8, !tbaa !21
  %114 = fmul double %112, %113
  %115 = call double @llvm.fmuladd.f64(double %109, double %110, double %114)
  %116 = fptrunc double %115 to float
  %117 = load ptr, ptr %12, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct._VlCovDetFeature, ptr %117, i32 0, i32 0
  %119 = getelementptr inbounds %struct._VlFrameOrientedEllipse, ptr %118, i32 0, i32 4
  store float %116, ptr %119, align 4, !tbaa !22
  %120 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 0
  %121 = load double, ptr %120, align 16, !tbaa !21
  %122 = fneg double %121
  %123 = load double, ptr %11, align 8, !tbaa !21
  %124 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 2
  %125 = load double, ptr %124, align 16, !tbaa !21
  %126 = load double, ptr %10, align 8, !tbaa !21
  %127 = fmul double %125, %126
  %128 = call double @llvm.fmuladd.f64(double %122, double %123, double %127)
  %129 = fptrunc double %128 to float
  %130 = load ptr, ptr %12, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct._VlCovDetFeature, ptr %130, i32 0, i32 0
  %132 = getelementptr inbounds %struct._VlFrameOrientedEllipse, ptr %131, i32 0, i32 3
  store float %129, ptr %132, align 4, !tbaa !23
  %133 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 1
  %134 = load double, ptr %133, align 8, !tbaa !21
  %135 = fneg double %134
  %136 = load double, ptr %11, align 8, !tbaa !21
  %137 = getelementptr inbounds [4 x double], ptr %9, i64 0, i64 3
  %138 = load double, ptr %137, align 8, !tbaa !21
  %139 = load double, ptr %10, align 8, !tbaa !21
  %140 = fmul double %138, %139
  %141 = call double @llvm.fmuladd.f64(double %135, double %136, double %140)
  %142 = fptrunc double %141 to float
  %143 = load ptr, ptr %12, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct._VlCovDetFeature, ptr %143, i32 0, i32 0
  %145 = getelementptr inbounds %struct._VlFrameOrientedEllipse, ptr %144, i32 0, i32 5
  store float %142, ptr %145, align 4, !tbaa !24
  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 32, ptr %9) #5
  br label %146

146:                                              ; preds = %87
  %147 = load i64, ptr %4, align 8, !tbaa !9
  %148 = add nsw i64 %147, 1
  store i64 %148, ptr %4, align 8, !tbaa !9
  br label %30, !llvm.loop !30

149:                                              ; preds = %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %150

150:                                              ; preds = %149
  %151 = load i64, ptr %3, align 8, !tbaa !9
  %152 = add nsw i64 %151, 1
  store i64 %152, ptr %3, align 8, !tbaa !9
  br label %15, !llvm.loop !32

153:                                              ; preds = %15
  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
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"long long", !7, i64 0}
!11 = !{!12, !6, i64 80}
!12 = !{!"_VlCovDet", !6, i64 0, !6, i64 8, !13, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !10, i64 48, !10, i64 56, !14, i64 64, !10, i64 72, !6, i64 80, !10, i64 88, !10, i64 96, !6, i64 104, !10, i64 112, !13, i64 120, !7, i64 128, !7, i64 192, !13, i64 256, !7, i64 260, !7, i64 6984, !7, i64 13708, !7, i64 20432, !7, i64 27156, !7, i64 31512, !7, i64 75072}
!13 = !{!"int", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{i64 0, i64 4, !16, i64 4, i64 4, !16, i64 8, i64 4, !16, i64 12, i64 4, !16, i64 16, i64 4, !16, i64 20, i64 4, !16, i64 24, i64 4, !16, i64 28, i64 4, !16, i64 32, i64 4, !16, i64 36, i64 4, !16}
!16 = !{!17, !17, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!19, !17, i64 8}
!19 = !{!"_VlCovDetFeature", !20, i64 0, !17, i64 24, !17, i64 28, !17, i64 32, !17, i64 36}
!20 = !{!"_VlFrameOrientedEllipse", !17, i64 0, !17, i64 4, !17, i64 8, !17, i64 12, !17, i64 16, !17, i64 20}
!21 = !{!14, !14, i64 0}
!22 = !{!19, !17, i64 16}
!23 = !{!19, !17, i64 12}
!24 = !{!19, !17, i64 20}
!25 = !{!26, !14, i64 0}
!26 = !{!"_VlCovDetFeatureOrientation", !14, i64 0, !14, i64 8}
!27 = !{!12, !10, i64 88}
!28 = !{!26, !14, i64 8}
!29 = !{!19, !17, i64 32}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct._VlFrameOrientedEllipse = type { float, float, float, float, float, float }
%struct._VlCovDetFeature = type { %struct._VlFrameOrientedEllipse, float, float, float, float }
%struct._VlCovDetFeatureOrientation = type { double, double }

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @vl_covdet_append_feature(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @vl_covdet_get_num_features(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @vl_covdet_extract_orientations_for_frame(ptr noundef, ptr noundef, ptr noundef byval(%struct._VlFrameOrientedEllipse) align 8) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @vl_covdet_extract_orientations(ptr noundef %0) local_unnamed_addr #1 {
  %2 = alloca i64, align 8
  %3 = alloca %struct._VlCovDetFeature, align 8
  %4 = tail call i64 @vl_covdet_get_num_features(ptr noundef %0)
  %sext = shl i64 %4, 32
  %5 = ashr exact i64 %sext, 32
  %6 = icmp sgt i64 %5, 0
  br i1 %6, label %.lr.ph44, label %._crit_edge45

.lr.ph44:                                         ; preds = %1
  %7 = getelementptr inbounds i8, ptr %0, i64 80
  %8 = getelementptr inbounds i8, ptr %3, i64 8
  %9 = getelementptr inbounds i8, ptr %3, i64 16
  %10 = getelementptr inbounds i8, ptr %3, i64 12
  %11 = getelementptr inbounds i8, ptr %3, i64 20
  %12 = getelementptr inbounds i8, ptr %0, i64 88
  br label %13

13:                                               ; preds = %.lr.ph44, %._crit_edge
  %.03742 = phi i64 [ 0, %.lr.ph44 ], [ %96, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #5
  %14 = load ptr, ptr %7, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct._VlCovDetFeature, ptr %14, i64 %.03742
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %3, ptr noundef nonnull align 4 dereferenceable(40) %15, i64 40, i1 false), !tbaa.struct !13
  %16 = call ptr @vl_covdet_extract_orientations_for_frame(ptr noundef %0, ptr noundef nonnull %2, ptr noundef nonnull byval(%struct._VlFrameOrientedEllipse) align 8 %3)
  %17 = load i64, ptr %2, align 8, !tbaa !16
  %18 = trunc i64 %17 to i32
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %20, label %._crit_edge

20:                                               ; preds = %13
  %21 = load float, ptr %8, align 8, !tbaa !17
  %22 = fpext float %21 to double
  %23 = load float, ptr %9, align 8, !tbaa !20
  %24 = fpext float %23 to double
  %25 = load <4 x float>, ptr %10, align 4
  %26 = shufflevector <4 x float> %25, <4 x float> poison, <2 x i32> <i32 0, i32 poison>
  %27 = load float, ptr %11, align 4, !tbaa !21
  %28 = load double, ptr %16, align 8, !tbaa !22
  %29 = call double @cos(double noundef %28) #5
  %30 = load double, ptr %16, align 8, !tbaa !22
  %31 = call double @sin(double noundef %30) #5
  %.pre47 = load i64, ptr %2, align 8, !tbaa !16
  %.phi.trans.insert = getelementptr inbounds i8, ptr %16, i64 8
  %.pre = load double, ptr %.phi.trans.insert, align 8, !tbaa !24
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct._VlCovDetFeature, ptr %32, i64 %.03742
  %34 = fptrunc double %.pre to float
  %35 = getelementptr inbounds i8, ptr %33, i64 32
  store float %34, ptr %35, align 4, !tbaa !25
  %36 = getelementptr inbounds i8, ptr %33, i64 8
  %37 = fneg double %22
  %38 = fneg double %24
  %39 = insertelement <2 x float> %26, float %27, i64 1
  %40 = fpext <2 x float> %39 to <2 x double>
  %41 = shufflevector <2 x double> %40, <2 x double> poison, <4 x i32> <i32 0, i32 0, i32 1, i32 1>
  %42 = insertelement <4 x double> poison, double %31, i64 0
  %43 = insertelement <4 x double> %42, double %29, i64 1
  %44 = shufflevector <4 x double> %43, <4 x double> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
  %45 = fmul <4 x double> %44, %41
  %46 = insertelement <4 x double> poison, double %22, i64 0
  %47 = insertelement <4 x double> %46, double %37, i64 1
  %48 = insertelement <4 x double> %47, double %24, i64 2
  %49 = insertelement <4 x double> %48, double %38, i64 3
  %50 = shufflevector <4 x double> %43, <4 x double> poison, <4 x i32> <i32 1, i32 0, i32 1, i32 0>
  %51 = call <4 x double> @llvm.fmuladd.v4f64(<4 x double> %49, <4 x double> %50, <4 x double> %45)
  %52 = fptrunc <4 x double> %51 to <4 x float>
  store <4 x float> %52, ptr %36, align 4, !tbaa !14
  %53 = trunc i64 %.pre47 to i32
  %54 = icmp sgt i32 %53, 1
  br i1 %54, label %.lr.ph.peel.next, label %._crit_edge

.lr.ph.peel.next:                                 ; preds = %20, %.lr.ph.peel.next
  %.03841 = phi i64 [ %92, %.lr.ph.peel.next ], [ 1, %20 ]
  %55 = load float, ptr %8, align 8, !tbaa !17
  %56 = fpext float %55 to double
  %57 = load float, ptr %9, align 8, !tbaa !20
  %58 = fpext float %57 to double
  %59 = load <4 x float>, ptr %10, align 4
  %60 = shufflevector <4 x float> %59, <4 x float> poison, <2 x i32> <i32 0, i32 poison>
  %61 = load float, ptr %11, align 4, !tbaa !21
  %62 = getelementptr inbounds %struct._VlCovDetFeatureOrientation, ptr %16, i64 %.03841
  %63 = load double, ptr %62, align 8, !tbaa !22
  %64 = call double @cos(double noundef %63) #5
  %65 = load double, ptr %62, align 8, !tbaa !22
  %66 = call double @sin(double noundef %65) #5
  %67 = call i32 @vl_covdet_append_feature(ptr noundef nonnull %0, ptr noundef nonnull %3)
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = load i64, ptr %12, align 8, !tbaa !26
  %70 = getelementptr %struct._VlCovDetFeature, ptr %68, i64 %69
  %71 = getelementptr inbounds i8, ptr %62, i64 8
  %72 = load double, ptr %71, align 8, !tbaa !24
  %73 = fptrunc double %72 to float
  %74 = getelementptr i8, ptr %70, i64 -8
  store float %73, ptr %74, align 4, !tbaa !25
  %75 = getelementptr i8, ptr %70, i64 -32
  %76 = fneg double %56
  %77 = fneg double %58
  %78 = insertelement <2 x float> %60, float %61, i64 1
  %79 = fpext <2 x float> %78 to <2 x double>
  %80 = shufflevector <2 x double> %79, <2 x double> poison, <4 x i32> <i32 0, i32 0, i32 1, i32 1>
  %81 = insertelement <4 x double> poison, double %66, i64 0
  %82 = insertelement <4 x double> %81, double %64, i64 1
  %83 = shufflevector <4 x double> %82, <4 x double> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
  %84 = fmul <4 x double> %83, %80
  %85 = insertelement <4 x double> poison, double %56, i64 0
  %86 = insertelement <4 x double> %85, double %76, i64 1
  %87 = insertelement <4 x double> %86, double %58, i64 2
  %88 = insertelement <4 x double> %87, double %77, i64 3
  %89 = shufflevector <4 x double> %82, <4 x double> poison, <4 x i32> <i32 1, i32 0, i32 1, i32 0>
  %90 = call <4 x double> @llvm.fmuladd.v4f64(<4 x double> %88, <4 x double> %89, <4 x double> %84)
  %91 = fptrunc <4 x double> %90 to <4 x float>
  store <4 x float> %91, ptr %75, align 4, !tbaa !14
  %92 = add nuw nsw i64 %.03841, 1
  %93 = load i64, ptr %2, align 8, !tbaa !16
  %sext39 = shl i64 %93, 32
  %94 = ashr exact i64 %sext39, 32
  %95 = icmp slt i64 %92, %94
  br i1 %95, label %.lr.ph.peel.next, label %._crit_edge, !llvm.loop !27

._crit_edge:                                      ; preds = %.lr.ph.peel.next, %20, %13
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  %96 = add nuw nsw i64 %.03742, 1
  %exitcond.not = icmp eq i64 %96, %5
  br i1 %exitcond.not, label %._crit_edge45, label %13, !llvm.loop !30

._crit_edge45:                                    ; preds = %._crit_edge, %1
  ret void
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !7, i64 80}
!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, !11, i64 64, !12, i64 72, !7, i64 80, !12, i64 88, !12, i64 96, !7, i64 104, !12, i64 112, !10, i64 120, !8, i64 128, !8, i64 192, !10, i64 256, !8, i64 260, !8, i64 6984, !8, i64 13708, !8, i64 20432, !8, i64 27156, !8, i64 31512, !8, i64 75072}
!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 = !{i64 0, i64 4, !14, i64 4, i64 4, !14, i64 8, i64 4, !14, i64 12, i64 4, !14, i64 16, i64 4, !14, i64 20, i64 4, !14, i64 24, i64 4, !14, i64 28, i64 4, !14, i64 32, i64 4, !14, i64 36, i64 4, !14}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !8, i64 0}
!16 = !{!12, !12, i64 0}
!17 = !{!18, !15, i64 8}
!18 = !{!"_VlCovDetFeature", !19, i64 0, !15, i64 24, !15, i64 28, !15, i64 32, !15, i64 36}
!19 = !{!"_VlFrameOrientedEllipse", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20}
!20 = !{!18, !15, i64 16}
!21 = !{!18, !15, i64 20}
!22 = !{!23, !11, i64 0}
!23 = !{!"_VlCovDetFeatureOrientation", !11, i64 0, !11, i64 8}
!24 = !{!23, !11, i64 8}
!25 = !{!18, !15, i64 32}
!26 = !{!6, !12, i64 88}
!27 = distinct !{!27, !28, !29}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!"llvm.loop.peeled.count", i32 1}
!30 = distinct !{!30, !28}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass